Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4191415ioa; Tue, 26 Apr 2022 20:13:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJQjD+OcdKDZGkgMa3tcWALVFw+lR3JcPODaelWYj+nBu78isnIwS+YRdqJuSAeNCMSCbH X-Received: by 2002:a05:6402:5d6:b0:425:fc9a:d82a with SMTP id n22-20020a05640205d600b00425fc9ad82amr6363842edx.310.1651029198649; Tue, 26 Apr 2022 20:13:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651029198; cv=none; d=google.com; s=arc-20160816; b=aocjARVtyREqThu+cSuXtYKazbRtnYd47V96aAyWEGwYL6VUD2YXzSppXXnzRnGS/Z GqP2oNtP+57g7sHV+nRgAVM1ZRla4dIoQ1WA4ja1vE6qEOg+z14tbRSRfSOMYQcXEa09 yKc7AjHNRc/se4CCt07tn+gOy6tUyYaqgd3dCv8zKnwoXAS8/Ir5oxlG1t1C7SaF2I30 yycD0AGIMl82gyql9knjFPDaLj8TjwvtdCVWpp8JXH5Zz4/QvSEF0vC8iZFu66jy3CD5 BsrGKD3ACwefmP6AhoQJKk52ngQlKRMqxYXCncaRMc0nGF9XtmUQ3e49fSedvz/ije4v q2qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hKJGGOpT3F2q12K0TOR4cwYGKrYX9Y91K4DjIS+rO9M=; b=z3X6tmbiFY861SFupN8SpDU7dmnSzLbcfQ7yP8ohjVmNz8Dd0Qn4/4QpJXVn5dZ6c0 u3TQ9AnNuAb3VMggyDH20MhpREO+fjlMD6m8fxB+TyxZJvXiEwjK481eNS4d2pTJboik dAfHUbjMhTDFt+CIVFta3PWZJdcvtp43VAibg3VqoUCb0uTNCeQIxynpnmk/oZaB7XQJ dB7Alfq8VmgSTBmdMFyoSh0s5fXni0RZCPwpPa+6xkgFFhmMlHR+XbjM7uWNzpeodKZR Sn2K9vJWqFjOUQjSl2KAa7RqUMNrMp9JoEt/IMXNnDVt8dQtW4MeF6LfrN2K9f/jwn8K 7qsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YyIVK1J5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v3-20020a056402348300b00425f03098bfsi357436edc.324.2022.04.26.20.12.55; Tue, 26 Apr 2022 20:13:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YyIVK1J5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231514AbiDZJRD (ORCPT + 99 others); Tue, 26 Apr 2022 05:17:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347216AbiDZIvO (ORCPT ); Tue, 26 Apr 2022 04:51:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E8FD158F55; Tue, 26 Apr 2022 01:39:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6D63160EC4; Tue, 26 Apr 2022 08:39:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E647C385A0; Tue, 26 Apr 2022 08:39:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962384; bh=ji0RFgXR37v47Ioji/Ek0sxM2Xxd8cjtq5D9oiSiFpU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YyIVK1J5vWBELa9ZkHXci6w1RASG9omwaG461doW9C3gHgtaTdhk28RvWb5zWsaiO nhysQRnKTWrFXFoV9YBHlnb9Q3Zo0eL5RYTO1RtScXmjHpGuc4E+cLvk3ArgUuPPU0 TfS1hSpfzRSI/Q3NU42kNU8m/GZ6gw9ezs2J+Djs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luis Chamberlain , Christoph Hellwig , Keith Busch , Sagi Grimberg , Sasha Levin Subject: [PATCH 5.15 076/124] nvme-pci: disable namespace identifiers for Qemu controllers Date: Tue, 26 Apr 2022 10:21:17 +0200 Message-Id: <20220426081749.461615444@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081747.286685339@linuxfoundation.org> References: <20220426081747.286685339@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig [ Upstream commit 66dd346b84d79fde20832ed691a54f4881eac20d ] Qemu unconditionally reports a UUID, which depending on the qemu version is either all-null (which is incorrect but harmless) or contains a single bit set for all controllers. In addition it can also optionally report a eui64 which needs to be manually set. Disable namespace identifiers for Qemu controlles entirely even if in some cases they could be set correctly through manual intervention. Reported-by: Luis Chamberlain Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Sasha Levin --- drivers/nvme/host/pci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 61f01f5afdc1..d7695bdbde8d 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -3314,7 +3314,10 @@ static const struct pci_device_id nvme_id_table[] = { .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, }, { PCI_VDEVICE(INTEL, 0x5845), /* Qemu emulated controller */ .driver_data = NVME_QUIRK_IDENTIFY_CNS | - NVME_QUIRK_DISABLE_WRITE_ZEROES, }, + NVME_QUIRK_DISABLE_WRITE_ZEROES | + NVME_QUIRK_BOGUS_NID, }, + { PCI_VDEVICE(REDHAT, 0x0010), /* Qemu emulated controller */ + .driver_data = NVME_QUIRK_BOGUS_NID, }, { PCI_DEVICE(0x126f, 0x2263), /* Silicon Motion unidentified */ .driver_data = NVME_QUIRK_NO_NS_DESC_LIST, }, { PCI_DEVICE(0x1bb1, 0x0100), /* Seagate Nytro Flash Storage */ -- 2.35.1