From nobody Sat May 18 21:15:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1613050689; cv=none; d=zohomail.com; s=zohoarc; b=e7J2HAZV+VGnai4jQMQvDnvfmzBluHVMW5gT4WvC4WimxtiufcDjZnW6tQDrvuWzRoehst/6nuk/0iFzXgBNqvzbUac5fF8X2UFGurJRXjKVXsPFiAJSWJ2TRiUYuLLk47rUi0HPSTH12ma/keJFt8HRQT0kroUpJhKhPUAJRuU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613050689; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jz9vKnW6xcIkEotVS8cqLKVxPFE29fdtqoOOvRMbArk=; b=neg7+yr/DxFIdQEJBAlLdVKU5VzLsoVLVeKM+StKBDk6BMpc0oCByvKyBi+HX4pRD8h6U7bjmTsGnW/VLCVp9aKvKNynFpdfS942nfcJbrNkvVtReoSGXYfPoLsptRp6J4n7Y5A7lEIVBp26cpZ3cxDlx3S4KWER4pxPe/Zvdjk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613050689247762.2005262488324; Thu, 11 Feb 2021 05:38:09 -0800 (PST) Received: from localhost ([::1]:56158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lABoE-0002tw-E2 for importer@patchew.org; Thu, 11 Feb 2021 08:15:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lABSJ-0001ms-7q; Thu, 11 Feb 2021 07:52:23 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:39901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lABSH-0005K3-4H; Thu, 11 Feb 2021 07:52:22 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 61D035C0159; Thu, 11 Feb 2021 07:52:20 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 11 Feb 2021 07:52:20 -0500 Received: from apples.local (80-167-98-190-cable.dk.customer.tdc.net [80.167.98.190]) by mail.messagingengine.com (Postfix) with ESMTPA id A81D0108005B; Thu, 11 Feb 2021 07:52:18 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=jz9vKnW6xcIkE otVS8cqLKVxPFE29fdtqoOOvRMbArk=; b=mkxCoJ9lQuchD95wfddAfHbylIwcV BefsTn1PCwG5l6Nb2T4i5oRcYF9kV2fjs1W7HHmbMFBf66mGjt3Dn0UzXrs6ldfu BvqOsRknlUMSvLO8qL/uh6GiVdKU9hGqpGIP5hGMz6eX/QNXCSwLS1BIa2p9kBvi pWTkXXUs4DmyIC+vqNcmVuVSyQ7SapNdEhXiFJwUN23HqT24QKnlfKSwvSUuC8eX Y6Y6D4d48pxaCpSpO6m3YdHnQk2oVZp8YP76fNqIM0l2uyIuENovxxKiyLS7Owii UCafuHd3pGmkO+PQAiGwpcjF2v6i1efV4su5y03ILl4DEf5cmw7u3C7Jg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=jz9vKnW6xcIkEotVS8cqLKVxPFE29fdtqoOOvRMbArk=; b=d4qqg81F A0Ee/aODnkAizPPjSmOTOQmncg/Ij7Ow2GnuT6aQilz3reFit1KU/GZK1YqNSCuW RMNcdZS83I2RMm6ZbyaqA31Wja9Ek5hbhFr/mdqQtHvsLDaBDXj/XbJ6duWHKEe+ dxgpuzqHu8elV1mmIJbsQYQqMb2tPPbqzreQWvY1fLLjrwSaUKdQS3I9YvFoZqWp f/zTU+0S+gB0BvScd/6Bq6G3Ifsambi70zeoVN1jGtU461cgUmb74Tfc+cATBYgZ N+SQU+e/rw1A7lncQRvsM6evB/zYVcpIX44hFIHCcwYml7cz5abU4hvT6LKhPOLy LrFgJTPUydeL6A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheelgdegfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepmfhlrghushcu lfgvnhhsvghnuceoihhtshesihhrrhgvlhgvvhgrnhhtrdgukheqnecuggftrfgrthhtvg hrnhepueelteegieeuhffgkeefgfevjeeigfetkeeitdfgtdeifefhtdfhfeeuffevgfek necukfhppeektddrudeijedrleekrdduledtnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepihhtshesihhrrhgvlhgvvhgrnhhtrdgukh X-ME-Proxy: From: Klaus Jensen To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 1/2] hw/block/nvme: fix legacy namespace registration Date: Thu, 11 Feb 2021 13:52:14 +0100 Message-Id: <20210211125215.985593-2-its@irrelevant.dk> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210211125215.985593-1-its@irrelevant.dk> References: <20210211125215.985593-1-its@irrelevant.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=66.111.4.26; envelope-from=its@irrelevant.dk; helo=out2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, Klaus Jensen , Max Reitz , Keith Busch , Alexander Graf , Minwoo Im , Klaus Jensen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Klaus Jensen Moving namespace registration to the nvme-ns realization function had the unintended side-effect of breaking legacy namespace registration. Fix this. Fixes: 15d024d4aa9b ("hw/block/nvme: split setup and register for namespace= ") Reported-by: Alexander Graf Cc: Minwoo Im Tested-by: Alexander Graf Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 5ce21b7100b3..d36e14fe13e2 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -4507,6 +4507,12 @@ static void nvme_realize(PCIDevice *pci_dev, Error *= *errp) if (nvme_ns_setup(ns, errp)) { return; } + + if (nvme_register_namespace(n, ns, errp)) { + error_propagate_prepend(errp, local_err, + "could not register namespace: "); + return; + } } } =20 --=20 2.30.0 From nobody Sat May 18 21:15:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1613048253; cv=none; d=zohomail.com; s=zohoarc; b=Hxy0w8KwSUbWK4p2IfmU5UAdpXdsvhz13BUF/h5bVXsoSR5Qr+fO5C7StlxOzHNMfu+EfiNcHhbcu7w1ywO7aChCXsX1B3smF8/svxlIzCDOq2855O4vg7rNebV7+hPF6JFPuC9VWHBjive2N2T3GjrW/J/5CyzOkhT6mcLD3/8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613048253; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AZ7m8wOpSo79naj7Q1m+2fHutdfJi2R+FT/lvqMztRY=; b=HiFFNFxIvMIlpVl2kH1+Gyj/8RijuYKu3iKJE6CCBZ9x42ViwCYpN0nDE9kSczVzdm0t2OAbz/qR9gYdhBQu2k/IhLARp6yC/T7qQFdlr0L9vDEQBeuszUgUxZaLEKWJ5DG9+eVfN++rGRhCFqN4306d8aFjCfA5doraXjyCe6k= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613048252777761.1032348282573; Thu, 11 Feb 2021 04:57:32 -0800 (PST) Received: from localhost ([::1]:54122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lABXH-00052h-Hw for importer@patchew.org; Thu, 11 Feb 2021 07:57:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lABSK-0001nw-Jo; Thu, 11 Feb 2021 07:52:24 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:33283) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lABSI-0005Kl-NW; Thu, 11 Feb 2021 07:52:24 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B9CFD5C015C; Thu, 11 Feb 2021 07:52:21 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 11 Feb 2021 07:52:21 -0500 Received: from apples.local (80-167-98-190-cable.dk.customer.tdc.net [80.167.98.190]) by mail.messagingengine.com (Postfix) with ESMTPA id 2581D1080063; Thu, 11 Feb 2021 07:52:20 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm2; bh= AZ7m8wOpSo79naj7Q1m+2fHutdfJi2R+FT/lvqMztRY=; b=Td8wk9nZx4kTSPDe wrOY/cJxIbnnTkXsZqNJCISpQ8bf9asBVWvHocl0xhF00c2wdFOKsJ0BHqO04jau SSr20i5htZy24F8E3Ia2kOZZO5awaSl6+DMqR8FzN3t3++nZXqnOvW4ViTealWX5 jZXRNmBecf+1/kzvFo0BwjbraF2Ug4t7QdqZqHqMPc05EBkNe/CMqs5cPRdOLPME DZmOlSrI6BkNK2mzKT72eyxg61cyXdm8JcWdzpTTvRPRrBRbRDP5hlFCxMh5hZLc xbIl2AiWyM4Zae+TnNAZglYRqmQLI15hWRZrSIVXS+RkVC+VZBfQWs2I9adff6s1 8nioDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=AZ7m8wOpSo79naj7Q1m+2fHutdfJi2R+FT/lvqMzt RY=; b=XiqZxbTiKwsIcHcMCbE8HbRFgiQj0X6vjc7qczR/GEtyldluoULrYA53G j9w2ayXoQhQDf+H13Qua6RPL5OUhIRvK1GvdeNeVHGp7ac3mAyeakDVQbg4xhuWM tHZrT0X0H3GVleNiXP4vA4ITDTFW3u5qADOc2iPgFHTlnyoU++bKoldfyD84c2cu VZYyL/X15lxYtQx/FxvMwbwVwacnrRzaT+ZC56uLjRRugFuj0ZnNOabUrsCvTEnc agrZxLIX70GhCZerhOw+GILXAXX133mFfCeWgnHbPNip29etD1KD72PdWUDWsOLJ F2m3VJ0nkR/Pj5jynrGJ8H/wbsJ+A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheelgdegfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefmlhgruhhs ucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtth gvrhhnpeetveeuudegveeiheegieelueeftedvtdekteefleegheduhfejueelvdfhffdt geenucfkphepkedtrdduieejrdelkedrudeltdenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehithhssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: From: Klaus Jensen To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 2/2] hw/block/nvme: Fix a build error in nvme_get_feature() Date: Thu, 11 Feb 2021 13:52:15 +0100 Message-Id: <20210211125215.985593-3-its@irrelevant.dk> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210211125215.985593-1-its@irrelevant.dk> References: <20210211125215.985593-1-its@irrelevant.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=66.111.4.26; envelope-from=its@irrelevant.dk; helo=out2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, Klaus Jensen , Bin Meng , Max Reitz , Keith Busch , Klaus Jensen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng Current QEMU HEAD nvme.c does not compile with the default GCC 5.4 on a Ubuntu 16.04 host: hw/block/nvme.c:3242:9: error: =E2=80=98result=E2=80=99 may be used unini= tialized in this function [-Werror=3Dmaybe-uninitialized] trace_pci_nvme_getfeat_vwcache(result ? "enabled" : "disabled"); ^ hw/block/nvme.c:3150:14: note: =E2=80=98result=E2=80=99 was declared here uint32_t result; ^ Explicitly initialize the result to fix it. Fixes: aa5e55e3b07e ("hw/block/nvme: open code for volatile write cache") Signed-off-by: Bin Meng Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index d36e14fe13e2..31295e5eeb84 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -3228,6 +3228,7 @@ static uint16_t nvme_get_feature(NvmeCtrl *n, NvmeReq= uest *req) result =3D ns->features.err_rec; goto out; case NVME_VOLATILE_WRITE_CACHE: + result =3D 0; for (i =3D 1; i <=3D n->num_namespaces; i++) { ns =3D nvme_ns(n, i); if (!ns) { --=20 2.30.0