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.web10.6997.1593698155196208687 for ; Thu, 02 Jul 2020 06:55:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=oMQtTUXW; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: paul.a.lohr@intel.com) IronPort-SDR: ukusPW8RjjHYbeWNcpGibINL1Zdzow4M/GZeriAIfa9jZOLsZnXIL6h5W48ZcghMUPt2hASlBp C7UicBcd7Etg== X-IronPort-AV: E=McAfee;i="6000,8403,9669"; a="146897451" X-IronPort-AV: E=Sophos;i="5.75,304,1589266800"; d="scan'208,217";a="146897451" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2020 06:55:54 -0700 IronPort-SDR: w8d0U84OJPgcR6pZEz3nSpnGyP1wQksc8LLrDfBMdzjuKOclLSTxXjI9EgEWs9+ZTlATSP2EFP fzdfNoTKaNng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,304,1589266800"; d="scan'208,217";a="313030018" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga008.jf.intel.com with ESMTP; 02 Jul 2020 06:55:54 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 2 Jul 2020 06:55:53 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 2 Jul 2020 06:55:53 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 2 Jul 2020 06:55:53 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.104) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 2 Jul 2020 06:55:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MXKlhcZgZhGKhCflLY1rEiwUN/JzgFySwXF87QtkavRSU2PazkP/8eWrhCVoC5Qw7XJluk5jazGcgrUCu7V9Q84K4AX0rrs0cvB0MdutZs7KToTAOFvmSUlo3byDxK1VxRwmE0zuUehDrg45Ll34hKx12pZ5Ous5mq6MI4RivE+wYBT0MsFS4QoNRKwEovGAU+2jGELXoBxWzdCYmhj/pTZGpzOeNSh459WPuA66Ve88lnjRJEs+JvpfdY8ACjFZJe2i7PbWzGzWmftulYB0Finwmbm08ZheI1LuB768FDTIMDbwEHn8rGy8Ku3Yj/o8hetpGGN3acGbtFQTe3qUrw== 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-SenderADCheck; bh=kB9t8GRrKD9s/RJBa6bVzIc1FMvsabvQZ1yiR2ISoR8=; b=ICZxQomnZMQpGUI12PbYJobNTQncK0PpSZs9OxrIHwGiKGraM2sejAzaDkOekpVnlHBUB6t2dHb9TF70U8B7YOPps15Kon+Ch8pXZb7rP4ydONvm8OI7HCqnd7SJy5VQKU2whFX27BfVqAyXvbyBe9NjKddsDih4kFt+R1bPJ1PTKt4cYrz+Sqz7N2Ith+GYG6fU0847qXOeZAars56dAbwbSSeLrHmxO+vE+kmyKDVvov5cVRNOAPw1lhXNjjVTFwwIs6rI3Nx3xbg8q3lVglR7SmE4o2cwyOgxLR7GOHA1+GgnXO+rZhgZGFqSlQ/w4WrPFcK4zIt321u6EVJUfQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kB9t8GRrKD9s/RJBa6bVzIc1FMvsabvQZ1yiR2ISoR8=; b=oMQtTUXW7JgnLLImW2PLeGMasoXil8CbTFfKdrGuF8GV8Jtq59xd3AC2qbMPDyVtgoOaiiM0u7h8GYDDGgUkkv0KScDjYSbiUjRRKBL3J0rNX1uZ0NAwB99iDVKkpAwBIdWRH2vf9tb9qlV8HSIk9Uevo++VWR/f/ytM8n9D4II= Received: from SA0PR11MB4590.namprd11.prod.outlook.com (2603:10b6:806:96::17) by SN6PR11MB3440.namprd11.prod.outlook.com (2603:10b6:805:cb::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23; Thu, 2 Jul 2020 13:55:43 +0000 Received: from SA0PR11MB4590.namprd11.prod.outlook.com ([fe80::986b:dc5e:c0c3:331d]) by SA0PR11MB4590.namprd11.prod.outlook.com ([fe80::986b:dc5e:c0c3:331d%6]) with mapi id 15.20.3153.022; Thu, 2 Jul 2020 13:55:43 +0000 From: "Lohr, Paul A" To: "devel@edk2.groups.io" , "Yao, Jiewen" , "De Leon Vazquez, Lorena R" CC: "Kinney, Michael D" Subject: Re: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU generic bug fix Thread-Topic: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU generic bug fix Thread-Index: AdXw5cIqcI9g1CYLQByg/sbQxnIlIgABtlAQF+LrE7A= Date: Thu, 2 Jul 2020 13:55:43 +0000 Message-ID: References: <74D8A39837DF1E4DA445A8C0B3885C503F96301F@shsmsx102.ccr.corp.intel.com> In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503F96301F@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.52.206] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a9e02ae4-6860-49cb-5da4-08d81e8f9cf5 x-ms-traffictypediagnostic: SN6PR11MB3440: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2201; x-forefront-prvs: 0452022BE1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NpIbI4GpKzr7xannp5ILSycEBeJf4Ss2cMWQQDYnJFjJBUio1QnZGgeIuqzIRLGT9oKGSciEQs6zhAKe5K2rW2tgWYGF9KTUb9ud7yuraUKKlKD6kWGpNwDOAOLtPbOQnfBIKOcgdUZN4WH32gV7ZHQGBsQgyUcfD3RrHoQmrG2xLVn+GZCk8LfJhggP0MOkPQAhXM0THuU4EBd/1T5YF0LpfBZYJePuEZZIGfHDrw5e7QZ/kEuGUz74OMpl/d1Go7WsdvBWTPEjN3pn7U6d7xRFn6TAjaXk6MXG7SbkjaDGpr/mCVTWCXNElU9DHLfh3L+s1hTnw6Sn0LejQbtemrf9lwVe6VGaFnAmnelgRbd0pUdQbVfLe1R/c0ZC3zXy5ha+aza7QST7zzBUgy08WcRasyTmiIbGeti2I5txzIIhJiDeXXQJ0jxmOoVE6+TAnGJiOyAZlTGmE8bwPOZNxA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR11MB4590.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(376002)(346002)(39860400002)(396003)(136003)(66946007)(66556008)(64756008)(7696005)(9326002)(66446008)(478600001)(83380400001)(6636002)(52536014)(76236003)(4326008)(53546011)(6506007)(71200400001)(9686003)(186003)(55016002)(107886003)(5660300002)(2906002)(110136005)(26005)(76116006)(316002)(33656002)(8936002)(166002)(86362001)(8676002)(66476007)(41533002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: SDTxx81HRTTCpWI/xP1+DglitLhuq0RTZyMU2K+hPLsOiQrErU+dO4YNTCb5AI9nIF+vPwR2kdJZC34JdPgZ5SxyK4VAvyIlfkJZpQhNOiS/9nEq6ZLHNGKqkf0P5blJTiWD0CRqY6Ilxkmwz79WxUs3cLsWdgBU4DO0CnDCkGu4At4fVtcfPfkQSKd1EAExg+sJHlaC9GDy0zsQvvQzPOV+ilSxB1ChQGN5XgGnaNJoY9/utY5KTDe10gUsrn+1ZqmYTLYUtVhfsrdPF0068aAP6WLfq9Zq1pbZAwe3kB5SP8TL2cFAedoq9LzbiGHnJ3GiTiFlfVJEYjPXzzHux4TqIH9cHQMvIKsyUXtvvitRZ2jY7DOioOpR+FamXcKVX6CeOAizXvFxfOI8XVWXlUa/h4nUKQZyRSEOm6rNXj8G3yK2q8UNhxMKfNSwQLklJPdU4p2Ul5NKNKRY5oqMNleXDruiLyZyHuH3+OoPX/Sgy2heDe19wYoZcnEPsmmF MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA0PR11MB4590.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9e02ae4-6860-49cb-5da4-08d81e8f9cf5 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2020 13:55:43.3695 (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: rX3IjAtSPKMytUYWQKL6j5YjWk14Ke8nDYui6gNTB6G1pmeTyeHqr7zKS/vC3gcQ979QqMTUg3akFmPiRNCisA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3440 Return-Path: paul.a.lohr@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_SA0PR11MB45906F687BFF0CC9226479B4BF6D0SA0PR11MB4590namp_" --_000_SA0PR11MB45906F687BFF0CC9226479B4BF6D0SA0PR11MB4590namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, It seems this did not get checked in. Is there something wrong with the p= atch itself? Or was this simply submitted incorrectly? I don't see a Bugz= illa associated with it is why I ask. Paul A. Lohr - Server Firmware Enabling 512.239.9073 (cell) 512.794.5044 (work) From: devel@edk2.groups.io On Behalf Of Yao, Jiewen Sent: Monday, March 2, 2020 5:46 PM To: De Leon Vazquez, Lorena R ; devel@= edk2.groups.io Cc: Kinney, Michael D Subject: Re: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU = generic bug fix Reviewed-by: jiewen.yao@intel.com From: De Leon Vazquez, Lorena R > Sent: Tuesday, March 3, 2020 7:04 AM To: devel@edk2.groups.io Cc: Yao, Jiewen >; Kinne= y, Michael D = > Subject: [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU generic bug fix Looks like Addresswidth is BIT wise values. Right now these values are not= used any Suggested-by: Star Zeng star.zeng@intel.com Signed-off-by: lorena.r.de.leon.vazquez@intel.com -- .../Feature/VTd/IntelVTdDxe/TranslationTable.c | 11 ++++------- .../Feature/VTd/IntelVTdDxe/TranslationTableEx.c | 11 ++++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/Transla= tionTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/Transla= tionTable.c index cc970c0..61fbb4a 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTab= le.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTab= le.c @@ -128,14 +128,11 @@ CreateContextEntry ( DEBUG ((DEBUG_INFO,"Source: S%04x B%02x D%02x F%02x\n", mVtdUnitInfor= mation[VtdIndex].Segment, SourceId.Bits.Bus, SourceId.Bits.Device, SourceId= .Bits.Function)); - switch (mVtdUnitInformation[VtdIndex].CapReg.Bits.SAGAW) { - case BIT1: - ContextEntry->Bits.AddressWidth =3D 0x1; - break; - case BIT2: - ContextEntry->Bits.AddressWidth =3D 0x2; - break; + if ((mVtdUnitInformation[VtdIndex].CapReg.Bits.SAGAW & BIT2) =3D=3D 0= ) { + DEBUG((DEBUG_ERROR, "!!!! 4-level page-table is not supported on VT= D %d !!!!\n", VtdIndex)); + return error; } + ContextEntry->Bits.AddressWidth =3D 0x2; } FlushPageTableMemory (VtdIndex, (UINTN)mVtdUnitInformation[VtdIndex].Ro= otEntryTable, EFI_PAGES_TO_SIZE(EntryTablePages)); diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/Transla= tionTableEx.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/Trans= lationTableEx.c index 0da1611..6bd31b7 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTab= leEx.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTab= leEx.c @@ -78,14 +78,11 @@ CreateExtContextEntry ( DEBUG ((DEBUG_INFO,"DOMAIN: S%04x, B%02x D%02x F%02x\n", mVtdUnitInfo= rmation[VtdIndex].Segment, SourceId.Bits.Bus, SourceId.Bits.Device, SourceI= d.Bits.Function)); - switch (mVtdUnitInformation[VtdIndex].CapReg.Bits.SAGAW) { - case BIT1: - ExtContextEntry->Bits.AddressWidth =3D 0x1; - break; - case BIT2: - ExtContextEntry->Bits.AddressWidth =3D 0x2; - break; + if ((mVtdUnitInformation[VtdIndex].CapReg.Bits.SAGAW & BIT2) =3D=3D 0= ) { + DEBUG((DEBUG_ERROR, "!!!! 4-level page-table is not supported on VT= D %d !!!!\n", VtdIndex)); + return error; } + ContextEntry->Bits.AddressWidth =3D 0x2; } FlushPageTableMemory (VtdIndex, (UINTN)mVtdUnitInformation[VtdIndex].Ex= tRootEntryTable, EFI_PAGES_TO_SIZE(EntryTablePages)); -- 2.21.0.windows.1 --_000_SA0PR11MB45906F687BFF0CC9226479B4BF6D0SA0PR11MB4590namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello,

 

It seems this did not get checked in.  Is ther= e something wrong with the patch itself?  Or was this simply submitted= incorrectly?  I don’t see a Bugzilla associated with it is why = I ask.

 

Paul A. Lohr – S= erver Firmware Enabling

512.239.9073 (cell)<= /o:p>

512.794.5044 (work)<= /o:p>

 

From: devel@edk2.groups.io <devel@edk2.gr= oups.io> On Behalf Of Yao, Jiewen
Sent: Monday, March 2, 2020 5:46 PM
To: De Leon Vazquez, Lorena R <lorena.r.de.leon.vazquez@intel.co= m>; devel@edk2.groups.io
Cc: Kinney, Michael D <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg:= IOMMU generic bug fix

 

Reviewed-by: jiewen.yao@intel.com

 

From: De Leon Vazquez, Lorena R <lorena.r.de.leon.vazquez@in= tel.com>
Sent: Tuesday, March 3, 2020 7:04 AM
To: devel@edk2.groups.io
Cc: Yao, Jiewen <
jiewen.= yao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU generic bu= g fix

 

Looks like Addresswidth is BIT wise values. Right n= ow these values are not used any

 

Suggested-by: Sta= r Zeng star.zeng@intel.com<= /span>

Signed-off-by: lorena.r.de.leon.vaz= quez@intel.com

 

--

.../Feature/VTd/IntelVTdDxe/TranslationTable.c = ;       | 11 ++++-------=

.../Feature/VTd/IntelVTdDxe/TranslationTableEx.c&nb= sp;     | 11 ++++-------

2 files changed, 8 insertions(+), 14 deletions(= -)

 

diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/= VTd/IntelVTdDxe/TranslationTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/= VTd/IntelVTdDxe/TranslationTable.c

index cc970c0..61fbb4a 100644

--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/Int= elVTdDxe/TranslationTable.c

+++ b/Silicon/Intel/IntelSiliconPkg/Fea= ture/VTd/IntelVTdDxe/TranslationTable.c

@@ -128,14 +128,11 @@ CreateContextEntry (=

 

     DEBUG ((DEBUG_INFO,&q= uot;Source: S%04x B%02x D%02x F%02x\n", mVtdUnitInformation[VtdIndex].= Segment, SourceId.Bits.Bus, SourceId.Bits.Device, SourceId.Bits.Function));=

 

-    switch (mVtdUnitInformation[Vtd= Index].CapReg.Bits.SAGAW) {

-    case BIT1:

-      ContextEntry->Bi= ts.AddressWidth =3D 0x1;

-      break;

-    case BIT2:

-      ContextEntry->Bi= ts.AddressWidth =3D 0x2;

-      break;

+    if ((mVtdUnitInformation[Vt= dIndex].CapReg.Bits.SAGAW & BIT2) =3D=3D 0) {

+      DEBUG((DEBUG_ER= ROR, "!!!! 4-level page-table is not supported on VTD %d !!!!\n",= VtdIndex));

+      return error;

     }

+    ContextEntry->Bits.Addre= ssWidth =3D 0x2;

   }

 

   FlushPageTableMemory (VtdIndex, (= UINTN)mVtdUnitInformation[VtdIndex].RootEntryTable, EFI_PAGES_TO_SIZE(Entry= TablePages));

diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/= VTd/IntelVTdDxe/TranslationTableEx.c b/Silicon/Intel/IntelSiliconPkg/Featur= e/VTd/IntelVTdDxe/TranslationTableEx.c

index 0da1611..6bd31b7 100644

--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/Int= elVTdDxe/TranslationTableEx.c

+++ b/Silicon/Intel/IntelSiliconPkg/Fea= ture/VTd/IntelVTdDxe/TranslationTableEx.c

@@ -78,14 +78,11 @@ CreateExtContextEntry (

 

     DEBUG ((DEBUG_INFO,&q= uot;DOMAIN: S%04x, B%02x D%02x F%02x\n", mVtdUnitInformation[VtdIndex]= .Segment, SourceId.Bits.Bus, SourceId.Bits.Device, SourceId.Bits.Function))= ;

 

-    switch (mVtdUnitInformation[Vtd= Index].CapReg.Bits.SAGAW) {

-    case BIT1:

-      ExtContextEntry->= ;Bits.AddressWidth =3D 0x1;

-      break;

-    case BIT2:

-      ExtContextEntry->= ;Bits.AddressWidth =3D 0x2;

-      break;

+    if ((mVtdUnitInformation[Vt= dIndex].CapReg.Bits.SAGAW & BIT2) =3D=3D 0) {

+      DEBUG((DEBUG_ER= ROR, "!!!! 4-level page-table is not supported on VTD %d !!!!\n",= VtdIndex));

+      return error;

     }

+    ContextEntry->Bits.Addre= ssWidth =3D 0x2;

   }

 

   FlushPageTableMemory (VtdIndex, (= UINTN)mVtdUnitInformation[VtdIndex].ExtRootEntryTable, EFI_PAGES_TO_SIZE(En= tryTablePages));

--

2.21.0.windows.1

 

--_000_SA0PR11MB45906F687BFF0CC9226479B4BF6D0SA0PR11MB4590namp_--