From nobody Sun Aug 14 18:18:27 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M5Qdc232bz4YbkX; Sun, 14 Aug 2022 18:18:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M5Qdc1bXqz46xM; Sun, 14 Aug 2022 18:18:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660501108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kbBhF3cwXh2ekO1Yq2z59G9+RPANRUOUTM+AI9pNKsg=; b=HbpDYvCY5mi//tsc8hVvoMp10ZARh36B0sUH7lwfFYSn39QMmAcGHxt0GTjFB+AnyRM3zj jth4tByS4sRttweUgLSNhJofSSVagtUxKTG//B/tjFDclpQjM1r1BHv9nrTbpl/H3xXQxL 1x66yKATCaQdDZaongqdat2TNNvfxW/nA9E591gVR1dgdYPHYwKGyDSYlOM2hSDD5D12dC f0EwMnKrxWUos2E0JXXIwIfFgii8hE4l9HqspXYFhDoptQM7cYG0JgxyrIGpKLEeYmod64 RzW5kHPX8Qcgx6HZOJgJLrm8V1uqdvvkVMrEntC3IZTOhG5zGiQg+ywqyBJUYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M5Qdc0S96z10jv; Sun, 14 Aug 2022 18:18:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27EIIRAD045464; Sun, 14 Aug 2022 18:18:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27EIIRoF045463; Sun, 14 Aug 2022 18:18:27 GMT (envelope-from git) Date: Sun, 14 Aug 2022 18:18:27 GMT Message-Id: <202208141818.27EIIRoF045463@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Tuffli Subject: git: eae0210cdd2e - main - bhyve: Fix Number of Power States Supported value List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chuck X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eae0210cdd2e22c2eb9bc652f2136b3386a663a4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660501108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kbBhF3cwXh2ekO1Yq2z59G9+RPANRUOUTM+AI9pNKsg=; b=NJp3lqwDPwcBLZpI0thzy4Q74f7vZ85kr7I2aYBoCfVxGt0dEzXNCFcwnSOAkYuY0AqRyF O6Hh2l/1OqianE9o1zDpwmwQ0PNrjLuKWDJxsUJ3k1YyHMGx3nrsp1xEReeZo9GDTOWrBk 0dfx4p1Gmvh2OV9s7880ydwKVNzA6uLhGcrjZPakTc3p+Pj6ZwdRSsFOaH9P44jnz+6pxf M6baz+N11OA9yuMKN3Nk8HjSeOU/I0SvXUpVQNQR2BY6Grc4+fnHFVTFz8j+k7aUg4fr38 HiJpPvUGJcvjHJ7JbxIy5ImXmlOyI18eoY7oOzvlHTq0pOBMGf+D8BJeksCdKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660501108; a=rsa-sha256; cv=none; b=D+bx9PXnBaOW3IvwBd6+iyLOz1rCTpXksEd9H2LZQ3iU3CbXdDpWwpHtDBkY8Wl2kWozp6 1ikm749ImM4/D3sfGL3ZlKwieMFNe5Rlf6HYcW6X7fzpX8Lw5zU4ooiSk23Vfdk/biTSvh PlaMMRASMQhi6XKXB54ohaa2VZOB/Pwq7voLXahzcF3UhVd+8JF9kLGU4H666MDe84B+z2 lq362JidODIgSBWJLA4jIPhw1FvdocI3sNvyx+Rib3id0RQHZoHmHkCQGAI/BBborTkkGt o44XZuBRiXmgG99o/UX918e3x5azw21UU9yE5hFEEyY0ZrRwwPxwquTnbp4+Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=eae0210cdd2e22c2eb9bc652f2136b3386a663a4 commit eae0210cdd2e22c2eb9bc652f2136b3386a663a4 Author: WanpengQian AuthorDate: 2022-08-14 15:26:42 +0000 Commit: Chuck Tuffli CommitDate: 2022-08-14 16:59:36 +0000 bhyve: Fix Number of Power States Supported value Summary: Set Number of Power States Supported to indicate 1 power state. Keep the Power State Descriptor data structures as zero to indicate "Not reported". Test Plan: Within FreeBSD/Linux guests, list the number of power states and check the Max Power value. Reviewed By: markj, chuck MFC after: 2 weeks Signed-off-by: Wanpeng Qian Differential Revision: https://reviews.freebsd.org/D32657 --- usr.sbin/bhyve/pci_nvme.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index 38102beb0152..93edd96a0d0d 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -550,7 +550,11 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) (1 << NVME_CTRLR_DATA_FRMW_NUM_SLOTS_SHIFT); cd->lpa = 0; /* TODO: support some simple things like SMART */ cd->elpe = 0; /* max error log page entries */ - cd->npss = 1; /* number of power states support */ + /* + * Report a single power state (zero-based value) + * power_state[] values are left as zero to indicate "Not reported" + */ + cd->npss = 0; /* Warning Composite Temperature Threshold */ cd->wctemp = 0x0157; @@ -579,8 +583,6 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT; cd->vwc = NVME_CTRLR_DATA_VWC_ALL_NO << NVME_CTRLR_DATA_VWC_ALL_SHIFT; - - cd->power_state[0].mp = 10; } /*