From nobody Tue May 7 06:46:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+55317+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55317+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=intel.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1583236686959974.6557330797303; Tue, 3 Mar 2020 03:58:06 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id cr4lYY1788612xBhmjCqsQq1; Tue, 03 Mar 2020 03:58:05 -0800 X-Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web09.671.1583190279657781239 for ; Mon, 02 Mar 2020 15:04:39 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2020 15:04:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,508,1574150400"; d="scan'208,217";a="273932745" X-Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 02 Mar 2020 15:04:30 -0800 X-Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 2 Mar 2020 15:04:30 -0800 X-Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) 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.1713.5; Mon, 2 Mar 2020 15:04:29 -0800 X-Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 2 Mar 2020 15:04:29 -0800 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.43) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 2 Mar 2020 15:04:29 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gCGgiAV2IukilteRd+//Cc25RcS/1GyEuNS7TWsSdocTC2WQHtIDvkLZpxU1NA98klrQ0jQFQ5uoaUJ7b2uFVMYmD+oM9KvpR3MISaVrtJc0BUJIr6fzqc4oliTDvjvemGc5Of08l/v0Wwi+zxl4mjprNxe5LPctBualN6AEavszMn3/vpMsjAVwblbatSAMCx0MaEUTX9QHs2Z/jU5ZaYWJWo4ClmbR+HGgvVNPLBBL5ioBmtRn14juM6VASPsKJt1XMCnNVjjdYab9a9XcCnX0+xR32mUI9TQexclvsMsAhkAIJZEXWR4+/YqhssgVIKlzkOpHxjr1UBvhV/6ZVQ== 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=wdPx+hzaSW46XJJmJexcjd0fkM2laHC8ADpx//fUxVg=; b=LQGrMA5eYTfUjzm1V2PLMsWD5JC+xlOngv6hIKW3sq/oeVk4q/FdlmGnEj//106egjnHWia9C+9K8ChkubLWF7dbgV7v1PgK70Bx/5AVBn/dzrGqHRfNkEH3Hi7hQKNlfiKosMzCPl7HHdStxyNijDlFRgQQdpdmzb8cF9jCFD2Xotwzb1GuFLvlHrAkH87jMxRwDiQlzZ1u514gcIW5E/YnQaAH0rrGgxpBy3OezqbyRyKXH9n9DtYYUWzuJ3hwSqoKmtwsY+whxL3+bEEGRupJC9I5ddXB4WOsMBuIC5u+0d7/9xntEygdLTNYPZB/pa0i4XmBl+9rYYHnK+QuyA== 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 X-Received: from SN6PR11MB2768.namprd11.prod.outlook.com (2603:10b6:805:62::20) by SN6PR11MB2973.namprd11.prod.outlook.com (2603:10b6:805:ce::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.16; Mon, 2 Mar 2020 23:04:25 +0000 X-Received: from SN6PR11MB2768.namprd11.prod.outlook.com ([fe80::58c5:da4e:3513:99b6]) by SN6PR11MB2768.namprd11.prod.outlook.com ([fe80::58c5:da4e:3513:99b6%7]) with mapi id 15.20.2772.019; Mon, 2 Mar 2020 23:04:25 +0000 From: "De Leon Vazquez, Lorena R" To: "devel@edk2.groups.io" CC: "Yao, Jiewen" , "Kinney, Michael D" Subject: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU generic bug fix Thread-Topic: [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU generic bug fix Thread-Index: AdXw5cIqcI9g1CYLQByg/sbQxnIlIg== Date: Mon, 2 Mar 2020 23:04:25 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmNmMjRkZGQtOTM0Mi00ZTM3LWEzZjktYjljZjk0YTUzZTNlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVFFlQ1Jsbld3N0h1T0hVUmZobE1cL1pXR0Z6SDVWUzJaZEc3d25aeW5WNE54Q3Y1VVwvRENPTUt1Y1wvVG8yU2NhbyJ9 dlp-reaction: no-action x-ctpclassification: CTP_NT dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-originating-ip: [192.55.52.210] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: aab57538-dab6-46e1-9d19-08d7befe0dc6 x-ms-traffictypediagnostic: SN6PR11MB2973: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2399; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 0r1w0OyTScmh8K+8lX2K82tjYpvtSs9oAOiWsIIUeYZ1/rdl6oe7OqohqGU/EE3i3weJQDFB10ot813AgzweCjTWHNQja1in76cFQvHKCH0K6JHM/ahJHOCuMIerL471V5aFCxa6v/G+jnw15j6DXfUxEeD5l3gzKr8v2DYf1dYvup5Iw0uarekfXV1g4wO6bbEbRiqZ0F7ZT2zhovIC/n0fo4XXSR3CnKroLhabQrn0ZaJNo/IM6cxtbua/8TYXRumCX9J8aPCJAgmUmzcoty/c2lT2fcPzqOyhK63pRRPN0WHbml4K/0FhT4Sqi+oD+4vG8J5gMKNkOewoxR/YP81nB//m/8frN9IwSEXXKF/K27rQZGdeFq7X1Y+g70QMjG69V++CA4Ro5NXNG6Tlfgihp5EP/4LvsOaNfEMgJuWvrt2Nxs9R56RQAWDrWHEZ5tVptqEDCGK+WTEaquIBtZ0h1iPvHHsaIdQIUeyccIYwfQrEwGNhpy3dHz0+We62 x-ms-exchange-antispam-messagedata: QKHVvMb9ioytYH/hJTy0GH6Thq4zQXhSmwlO3LR+LkMyqd9QskKasGtJVZIVBVhDHvVeslI9gnLEZYY16+Nt0FjiBEEOwmclD/35ZRlCJy7EUdJEUc/itlsemcpVQ3pfLdz9I+oKH5mMNGjDB3LQeA== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: aab57538-dab6-46e1-9d19-08d7befe0dc6 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2020 23:04:25.6746 (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: XaiNtJguHMgmKaf79/vwcQpcjXSCEW8dskAKY10Q3SqDcSkRTA78J1jOzCreVQ6zcgY3JyAnCs9A8KLFbWONkKw0xBpyQUKwKD+9WljO6u7qzl3FBFGSMk5mCKfZhglY X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2973 X-OriginatorOrg: intel.com Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lorena.r.de.leon.vazquez@intel.com X-Gm-Message-State: b9OEtka02Shp8oWV6ycssabLx1787277AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_SN6PR11MB2768E38BFE9F4860231C5CDAD9E70SN6PR11MB2768namp_" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1583236685; bh=9kAMZozfAbDNfUN+s/f/Gg3nhQ+tD3d3X9hxJjHRlZ0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Domxx6GrA/4MZFBozPMWitO9nW1POmXQxnr+w6BiaAytAiQRy2I0A5bVk9XMETm3o1y Gnt42q1PIb2oIxD6aNNA26LmvF8G1flozU1niKsviczJEmBOMeVVZO9Yw91LDPosZsYWO 1V8qg8SMuhc0HZ2KXGyIokJCDuCgggOisN0= X-ZohoMail-DKIM: pass (identity @groups.io) --_000_SN6PR11MB2768E38BFE9F4860231C5CDAD9E70SN6PR11MB2768namp_ Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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/Translat= ionTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/Translat= ionTable.c index cc970c0..61fbb4a 100644 Reviewed-by: jiewen.yao@intel.com Reviewed-by: jiewen.yao@intel.com --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTabl= e.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTabl= e.c @@ -128,14 +128,11 @@ CreateContextEntry ( DEBUG ((DEBUG_INFO,"Source: S%04x B%02x D%02x F%02x\n", mVtdUnitInform= ation[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 VTD= %d !!!!\n", VtdIndex)); + return error; } + ContextEntry->Bits.AddressWidth =3D 0x2; } FlushPageTableMemory (VtdIndex, (UINTN)mVtdUnitInformation[VtdIndex].Roo= tEntryTable, EFI_PAGES_TO_SIZE(EntryTablePages)); diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/Translat= ionTableEx.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/Transl= ationTableEx.c index 0da1611..6bd31b7 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTabl= eEx.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTabl= eEx.c @@ -78,14 +78,11 @@ CreateExtContextEntry ( DEBUG ((DEBUG_INFO,"DOMAIN: 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: - 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 VTD= %d !!!!\n", VtdIndex)); + return error; } + ContextEntry->Bits.AddressWidth =3D 0x2; } FlushPageTableMemory (VtdIndex, (UINTN)mVtdUnitInformation[VtdIndex].Ext= RootEntryTable, EFI_PAGES_TO_SIZE(EntryTablePages)); -- 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#55317): https://edk2.groups.io/g/devel/message/55317 Mute This Topic: https://groups.io/mt/71688474/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_SN6PR11MB2768E38BFE9F4860231C5CDAD9E70SN6PR11MB2768namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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

 

_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#55317) | | Mu= te This Topic | New Topic

Your Subscripti= on | Contact Group Owner | Unsubscribe [importer@patchew.org]

_._,_._,_
--_000_SN6PR11MB2768E38BFE9F4860231C5CDAD9E70SN6PR11MB2768namp_--