From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web12.4439.1647912529294345995 for ; Mon, 21 Mar 2022 18:28:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=cWJN6KM5; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: hao.a.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647912529; x=1679448529; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=2lktEzoIoSyQCfKLCB0ktjxlUEGung6ZLpMWgpZYRVA=; b=cWJN6KM5HV8dYta6Alv21O0VhTQK4SVCLAay0j5YoY+bzP1Jl5xCe/gE ZVUCIQTDIiCjMfHFByGIZ1ZcuRpZ9S83GsV2N1C0AKBRNzTrcLrwO/uwk 5xEmXdK6ZSl7wLiqAQPd/u2uks4VKTbEsS2ZTM/l9o8Ljb5g8z8Snhhuu mDfhjcF7x21vyWSCxY61XHrgU/FvyBpqF3nJGu2p7/+4dIUOzXQGsOAMg Q45Ax6vbAhigxcSDpuwwknNHKBFS+m2AcD00Rsy2iPXC386jCWuclC7SP cEQpD2XBDAC5pBcU3/6IaMi0MHqxsffGCmr7+EYm76CkE2Rk3ZHY/zcXY g==; X-IronPort-AV: E=McAfee;i="6200,9189,10293"; a="257639646" X-IronPort-AV: E=Sophos;i="5.90,200,1643702400"; d="scan'208";a="257639646" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2022 18:28:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,200,1643702400"; d="scan'208";a="543464558" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga007.jf.intel.com with ESMTP; 21 Mar 2022 18:28:48 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Mon, 21 Mar 2022 18:28:47 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Mon, 21 Mar 2022 18:28:47 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 21 Mar 2022 18:28:47 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Mon, 21 Mar 2022 18:28:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UpHIEZBqMaocnU4AMwJRUktESXnq5Z2Rg1mpi2rCo/FtG3PsHWd29fVo3vt8yW5tRkW6S+c9f/CfsTX1oztrzFCf7NFUOIuqxUWMPuTVt+tV0z4hdUS7aehgw9BoH0nU5eNzCmEoZOSWsB2YBtknP3yPEXDHDBz+2yNvp8+4BATcKvmE6znFXxFwB8omw4GCL48P/cd4Ze3XdoJRO1gnRYERn/4zsXhLVhV7iznS37B4lb7Fi1Pc7/2tIJ1uxDNn9JVSapTCSerz/B06mfpRJ8R6BW/zF6ldHycW7c0bGM++9HEAi1JbSdVKqTlM7FMCvash8iAS1bZh5vYN4CVSHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5YGtMP9cqXyiI2GS5IlOrQtecU4sl5DO3p9QsEDRNg4=; b=a03YhBlQM2FEoUQIYVTIGXELnNKwRzQUMQdUZstUfzlHYXZtPUEEfRMkYlFF2tCzm8DuUZuKBsLFynYd18WHBhaPgWbvzdnxfruv3GFl77Pdv+eRqPziEna82FB4PVc/fhZF0NHt4BT6kSqUniGk6dtluIz+1n4w6Gxykm+a9ksVC1L9PDRcpViYC5m+ugOm7TtJfw+Bgbw1yaLvxX09FOhJ1ivAgrF0WYy9e2IPW35Hs9zw8/IRXXrOu5hJ8ePw3sOHT1xy4tw4rktqfeAGXfM+2jYnBK9H62cWCkqwc5FPikVBqlRR/1i7pOtQ6w2DP6vNC86Fc8RtF3rgpKJycg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB4025.namprd11.prod.outlook.com (2603:10b6:5:197::31) by MWHPR11MB1408.namprd11.prod.outlook.com (2603:10b6:300:24::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.15; Tue, 22 Mar 2022 01:28:45 +0000 Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::7852:37e2:513c:470b]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::7852:37e2:513c:470b%7]) with mapi id 15.20.5081.022; Tue, 22 Mar 2022 01:28:45 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "littlefox@lf-net.org" Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/NvmExpressDxe: fix check for Cap.Css Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg/NvmExpressDxe: fix check for Cap.Css Thread-Index: AQHYOYN3cYMYlMPe3kiuym82iBUuo6zHTuEAgAG4JdCAARHLgIAAi1HA Date: Tue, 22 Mar 2022 01:28:45 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1654d62c-4916-4206-540d-08da0ba34eab x-ms-traffictypediagnostic: MWHPR11MB1408:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5zqPlJ+6OOz3CFJfM+luqwlXfglE31BCj5dxdb/sF6HfWHL+EWlSYW5YZ09IabDgBCjHS3zA4PC4vYLJrp/u8/9OEI6u9T2jOEu4IcuMsk5fvXwQTFrwWPjHvNc2xCBm1OHifNu6EH3N1V3J1t3Z0OEEVQhR/dsAauf6BBUsCIdWIM8VQxMUZDkgf5W6omGEDmFkvyV98qCED5FCkKSK4//iM9S9l0mzz4nIjyQJ7x+3ITAM2fwaJvsKMmRCPXKnW9hL3V0EFeVYOXvAA4SRAevsHOlEy1tNymXhlI2BAchwJRWo4CuTKmEzyo8qMHOJ7MxZjWffsmzvtn0VoO85aVlhjs8jFE7n2rvqmurSTjQCoaiNCVe6CS/vx7t8QPRH/7mO7cD61x7VIkGIVMpCmQP2IUlj749gxF/nLmsWViKgytspEo9bmXNck7D5Rt+PwoN6M2E++VBV2LJGT/qmX9dUmdCigtxFJjvK1ffssA1vWTTrLHzidjuOeEUX8rXXEVTT/1bEpo6pz60YrRsa1YWgEdKbNpfccX0Nbr8gS6L/kg+AU1dHUXlXGhkPbTOIxy7plFX7bz1O/C9KTJv60fOpLKabliczHELG/9ckK5eIbExXC2wmcHLjMVOeiQm4SpbxUFiG3e67jqHZbZggzZj/KkTMjwtbrKNuUgeeSm+X5mqyGqEBK+lJIV+IopKK8aiiovz1+QSQQodxVNriPGRg1dV/CkZzA6qDdLDsvJwN1KNYCiIUsvPhK6/rUzi8I47IV1o0gDsDyurXN4cPINxyXQcr/Rz0cg71rGeD3gG/GuoCzkwM8+sGnyajvMv0L/CmPk4IjrK3BYPOqanN3Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4025.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(66946007)(66446008)(66556008)(66476007)(76116006)(7696005)(64756008)(122000001)(8676002)(6506007)(508600001)(53546011)(966005)(33656002)(55016003)(38100700002)(71200400001)(86362001)(38070700005)(110136005)(316002)(26005)(83380400001)(82960400001)(8936002)(9686003)(5660300002)(2906002)(52536014)(186003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?df7TedBUlM0phPzyreZ4Jfg6jEzRE3Dw2L+QKs4TVaSk4t2W6fVfjoF1k/J1?= =?us-ascii?Q?5d38SmgstbhVeGytb23Q4LICYfgqlVma+gc+usGfJ8UDCYvL60zyO1/qYppX?= =?us-ascii?Q?1DwotXHCXJoX7nf9ZJLgaBFUtliB4J4RKEvY5QkczmBxBCBy1qdBXluBA24J?= =?us-ascii?Q?pXbRikDc4B8VQ8WGFKY07AP8P3C1X/ReKXGh6cfDhutixybE5C+2aniTnUwC?= =?us-ascii?Q?eYL5hPeh7pkdLhhFBDSR6Z9XNxXd26GvaXd4fCA4NC2u71tsU4sno0sBVUVb?= =?us-ascii?Q?Vw/ITQfveXbH8814qKTHXv5/aKOWu0jcZ54ltcFH95Ve7/EklShuMwL0jml8?= =?us-ascii?Q?TvqsQKdfxzo9b92U3xoZ/PagaoW/t2GGHJETObPSWwQ6BFZk/rIR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5Cg9kI81rqNk7z166T4Egbiyj3VgXsZBGY0hrCABzslmokgvXSM4kVAlh?= =?us-ascii?Q?VTkH9vBI0BfnilNJAFGboWc8bHGId3zm+qdBjpDu9NlovH3D+chnPlAs5ZKj?= =?us-ascii?Q?tFHoSBqHGyrOM0lOQjMtqlb2nNDua+HF8tm1xMV4D12rHn1sGBY1gkYaX0lp?= =?us-ascii?Q?v6xjzCwKeAJT7IFcV36aop3g/14rtKni?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4025.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1654d62c-4916-4206-540d-08da0ba34eab X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Mar 2022 01:28:45.2522 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 05/VXiynZ1r5aaDJAlW4bYMfVy9J55AVeYKNuwNuHpcyLWHPB2gnP6TjQ0/ns970qtY/Jh12VJHVS9zbSPpk8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1408 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The change is good to me. Could you help to apply this change to the code in MdeModulePkg\Bus\Pci\Nvm= ExpressPei\ as well? Really sorry for missing the above comment in previous reply. Best Regards, Hao Wu > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Mara > Sophie Grosch via groups.io > Sent: Tuesday, March 22, 2022 1:06 AM > To: devel@edk2.groups.io; Wu, Hao A > Subject: [edk2-devel] [PATCH] MdeModulePkg/NvmExpressDxe: fix check for > Cap.Css >=20 > Fix the check for NVMe command set being supported by the controller. >=20 > Was problematic with qemu (6.2.0, Debian 1:6.2+dfsg-3), which sets 0xC1 i= n that > register, making the OVMF think the NVMe controller does not support NVMe= . >=20 > Uncovered by commit 9dd14fc91c174eae87fd122c7ac70073a363527f, which > changed the number of bits included in the Css register from 4 to 8. >=20 > Signed-off-by: Mara Sophie Grosch > --- > MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c > b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c > index d87212ffb2..b90c48731c 100644 > --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c > +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c > @@ -761,7 +761,7 @@ NvmeControllerInit ( > return Status; > } >=20 > - if (Private->Cap.Css !=3D 0x01) { > + if ((Private->Cap.Css & BIT0) =3D=3D 0) { > DEBUG ((DEBUG_INFO, "NvmeControllerInit: the controller doesn't sup= port > NVMe command set\n")); > return EFI_UNSUPPORTED; > } > -- > 2.35.1 >=20 >=20 >=20 >=20