From nobody Sat Nov 19 17:55:24 2022 X-Original-To: dev-commits-src-branches@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 4NF1XD2Wlqz4hTxr; Sat, 19 Nov 2022 17:55:24 +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 4NF1XD25Nzz46Bh; Sat, 19 Nov 2022 17:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668880524; 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=0f4xmxMjykJVrUkC7EJBTyRXrS+w0isa2zd9NysR1gI=; b=NKlYJl1s/AZbdnyBQUauW28LEn88Pm1+8hF7Ml5mN7OBm9LBuOrq/q0G9u8UqCeqkg/MqC VJInH7ofQ5JJarRdXbc+KUeV86fLX0G6jrz3lUKLf4ldkPIwqcaJyBz7I/vrqiIo/B3epE TEcfSekEO/g3bdqmeqeSpAtJv5PIoMM1Vl3VzMxU1KWI5fCZYDZChp7BAs6OX8c9ntl0tM LhJtgKnnh8qqS3A69tU5CUXaQPmcYTngGi9aUaG4F9XOFV4J1KgzQJmj3TlUgmDGUj9PO6 6nnjo1tx/hIKAekDQn241cjr0QYF5sfaQiECnArq1M0cTx8hyW3lkMC6p4sT7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668880524; 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=0f4xmxMjykJVrUkC7EJBTyRXrS+w0isa2zd9NysR1gI=; b=Hw6wzbEaJRGrBXPvP3NZUMJJbGotLsjZuRx1ZbNGRmhrmIyOiKDpUWt1B2xXJAEQPHAjSm GvKTblWsSHXc5pv5ED0K279XzpYoss9bFhWOxlS/b1zCwYpt2edsbQy53z51+vDIeDghVp XaUWlqYbsg2CgjJ2E5IIkRd1mqUyT+4oEGoP720UeHesYM9nH2bhh8XATRqpUDOnvrXQFW +dopG2ogzdV5Nfvngnb7BAYB3oMNtB2cWpjj9N8qcxMUOFXGJTV6zIC0vP3/AjRcSzxPaM ktEOyWG94doq9sFdNsmKbhGr0YX8MquZUFkaVixaXPPTrz1U6sDG+pus5AK6Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668880524; a=rsa-sha256; cv=none; b=aO7+hq6AsuI2NFeghx/YT60mDrw/X/L/fXXrDTjwQTuW9bsRvBA6Y/veIS6jU3TBq5VQtQ bPzEgaD542jIltcbYdrshY99KbYInRjfoKMfGFIWvifVL80cHLRlwNb1JUUUm9BPC5jaUi 3hxQjweXTCeAx+5O42ND9U2rxR8eDdsXFyzzHW8wvTsjtcp5m9Dkkf8TtAxrXOnbXhZh/7 5rwRtXGYeawtvMD94/5BlReWWu0g3CIXYjY39QP/AIhp7fI+41qSfxXtyGNN6pmHjDYDRt 1D87UI088/S006ZMlfUIZmfB6wp3O8EN2VBBa/G9mi2uQUTUbEXtCpEo74zGuA== 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 4NF1XD186DzvKp; Sat, 19 Nov 2022 17:55:24 +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 2AJHtOPk039019; Sat, 19 Nov 2022 17:55:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AJHtOrV039018; Sat, 19 Nov 2022 17:55:24 GMT (envelope-from git) Date: Sat, 19 Nov 2022 17:55:24 GMT Message-Id: <202211191755.2AJHtOrV039018@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Chuck Tuffli Subject: git: 2449e9c5e777 - stable/13 - bhyve: Fix Number of Power States Supported value List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2449e9c5e777876cd0989ece96e4352b45cf5115 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=2449e9c5e777876cd0989ece96e4352b45cf5115 commit 2449e9c5e777876cd0989ece96e4352b45cf5115 Author: WanpengQian AuthorDate: 2022-08-14 15:26:42 +0000 Commit: Chuck Tuffli CommitDate: 2022-11-20 01:52:01 +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. (cherry picked from commit eae0210cdd2e22c2eb9bc652f2136b3386a663a4) --- 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 1b2ad6177f40..4b0920860e5b 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -549,7 +549,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; @@ -578,8 +582,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; } /*