From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.13827.1596180581525455396 for ; Fri, 31 Jul 2020 00:29:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=U/sQFgIi; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: liming.gao@intel.com) IronPort-SDR: ILtwTNqsslBhFPmGm1liqrnZz8Yaway0gjdZP9vbv38XElhXX0VJg/mGgOiT4ziv9FdaWV5DJt aeQqPlg4lW1Q== X-IronPort-AV: E=McAfee;i="6000,8403,9698"; a="236606459" X-IronPort-AV: E=Sophos;i="5.75,417,1589266800"; d="scan'208,217";a="236606459" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2020 00:29:40 -0700 IronPort-SDR: EMXkChSjgZW28WoAJ7brevZOe0FV/sLZ6aEtDkdPRZ1IBSXdr2WZMsMlD0WgnRcyFrIWU0tPux nIfDmRYMrMiw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,417,1589266800"; d="scan'208,217";a="365430806" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 31 Jul 2020 00:29:40 -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; Fri, 31 Jul 2020 00:29:39 -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; Fri, 31 Jul 2020 00:29:39 -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; Fri, 31 Jul 2020 00:29:39 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 31 Jul 2020 00:29:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C3SXUTtccWmdeKqk8AeL9t8JClKB97zx1ArP4Wwnfcb5Blqw1QUZEgnUJtnn8m6UJuq8q7lS/nkM3Y68W73wdZZTXhIjUcvIwz108y2fOBnIg4eEZE/EALPpjMX0bZHZ/UTREWMm0UVREebYxdKWBnsLvi0TM7YMVQ9WC694B1mmmh/B346EigZWEUU/BJm4tn1tjv9jWJn/YwxQzKv45U7vLTfM97V95wcc6Q1xtuThxWvJT9EmkwFzTZnXL3yH89lL6rnKdjM5mY980ZoVLAHzunH0Q+899B3+td9DKjFDl4EOKhWruMAolTJWsY44wuL4BnBI5re0GEB/PaWnDg== 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=+YEYTgneeOGDJ8gkxLaNk95zuPtEPDnK8DPjQt5nvqg=; b=S47hlefm/0OwndwLJmArTdKWUhWdrlvEZrJKnGp7lVxsH9sqa1s58opqkf7ZRcABzwMgSh4nRVAqONJT+TJEyoBruuic23oK8/mimlHPJqUNuoBLBFr0PcO7mVgp/rryoTpXeX6Sf5okmEjRg0AcqL79e+rJ8DTCwW0GholOXBP+mMauxHW8L8GfHLaiJd9/1FpPd9oX1ZQMml69g5cSRo6PJTFnJInmNu066W4jvTkAMYXHkty/V9rxdXCRS1Z2PeG8S3L0+lGokIWCNKyuN3rJv+NDK2hPgK01hnjdu64iGqTxfKmo7CIuONrJZE5SXdNRW0X8oTwvnmaeCF6AvQ== 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=+YEYTgneeOGDJ8gkxLaNk95zuPtEPDnK8DPjQt5nvqg=; b=U/sQFgIiO0lDrTKON1GPdnsLMUWjVHyLy8pi3rZ3BS4aZzyg87OJclKUFHL9acpNqsRhqtqqxoMYoOncTEi/xVMCXybiTpY4fNjuo23+ZsOrJFlSrobm+guc9kwIMartGRhccIaMrImBD1yceVEKgkwo5vF++6cdxtOAjfNVd4c= Received: from CY4PR11MB1526.namprd11.prod.outlook.com (2603:10b6:910:7::10) by CY4PR11MB2037.namprd11.prod.outlook.com (2603:10b6:903:2f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16; Fri, 31 Jul 2020 07:29:36 +0000 Received: from CY4PR11MB1526.namprd11.prod.outlook.com ([fe80::f8c4:711:84e3:4c97]) by CY4PR11MB1526.namprd11.prod.outlook.com ([fe80::f8c4:711:84e3:4c97%4]) with mapi id 15.20.3216.034; Fri, 31 Jul 2020 07:29:36 +0000 From: "Liming Gao" To: "De Leon Vasquez, Lorena R" , "devel@edk2.groups.io" , "Lohr, Paul A" , "Yao, Jiewen" 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+LrE7AAGPt4IAC3aFwgAI0ZORAD82aOoABUGsvQ Date: Fri, 31 Jul 2020 07:29:36 +0000 Message-ID: References: <74D8A39837DF1E4DA445A8C0B3885C503F96301F@shsmsx102.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.194] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d7c1b68f-1edc-423f-7c56-08d835237a7a x-ms-traffictypediagnostic: CY4PR11MB2037: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: P4B+u5ZaH9+J/EI0HIC8NfaIQl/+HdK5NI4eWvfcJO0EPm7vdJb7lzStLPJPm0lK2EImsmzW5hga0s50EFGVaTbnfFLOnwwNfJZVzO2QKrrrT/ZCkKPRwWyr1DTKwLiVKYUiOCiFRJDA+nBve+Frf62SVT0EFChqwzNtSCs2wlcUjQo2aOsKyn1EkMMGhOiUvRSHY0QET5i14KzeJc3f4p0EmO66fi6h+7yhNupUQQRZxW5ZRY/6iF8BqZlkB1kOZJw36IezpT+mvV6KdiYPsLmiULeg0YVPTNAv8qqn8suC3H7f/RT3Cud+3dYY7yOHh5/U87Hpy1g5JA/yvm9/C7+R1beFYB1KQ/52gV2HAp4v2/MYvGBC1Xa/glHXfbIidvXC8hK67FyjLTP5s5dsIujMmJJq9dvc62qMrrXRsjxubZVG/bn3tUv2mxwS484Pr1XBUtiM11ZlQYjtL8slaA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR11MB1526.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(396003)(376002)(136003)(366004)(346002)(39860400002)(6636002)(8676002)(7696005)(52536014)(8936002)(186003)(26005)(5660300002)(71200400001)(33656002)(55016002)(4326008)(6506007)(53546011)(316002)(9686003)(2906002)(76236003)(66946007)(76116006)(66446008)(107886003)(86362001)(110136005)(64756008)(66556008)(478600001)(166002)(83380400001)(66476007)(41533002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: d2bGcZ3IWBGIwUdN/nlBK+4fA0Fyyleweh1z8JWdSZfIMSg8srpOoO2rfMWs+bzKYLI+RAlnpOfWkHEfQ2IWf5ji+6Y2sYgFbRt0wCmB2yZf+G1pP34CqJclQ69Lb6XmClFTXrikgjRuQw5+gSEgVlXrST7woW9W0a+npXzTi4ryOPfdFhQApQXfXWxCNc/1gBfteRQJ0S3aJ2bCB8wDfgZ6uZpb/BYBRpEHZzf/bBEM6tkIojOSX5FAjJfrY80j7rd8JUGiUH0OBBn6vMmNUNvANmjbXikDtYFmygs9u2o7BYasyoMTgkdq2z7PA+LHrY5dEnWw9Fk9fejNUHCnXCX/7JhYo4/H1QxXmQIHPJ9AEPFLpcpEXQmbl12v943V2Lr59RHfnFD3hhHne0twGQzheBd5y78kc932mNqNJdN0jz1AHN1yFssGUEUlML4z9rUO7p4IKtnQrU33xg8mM5je/PnjLg2BVPi190jCJH69WFOrGwUqDFNCWAv7yW5qZwPPnk18u6/HKU0b46bEJOW0A4swLbanvbqxWxQitDWTR2A0M+x3ofYs7PS1mIwLOKBdQA4mLKq2jges2+XSs+zP9+VJpOjxm6nd+FqzuTeTMLTH8N6qICHG3lnWIYALEemuCj6prxJNQShAHUvZbw== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1526.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7c1b68f-1edc-423f-7c56-08d835237a7a X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jul 2020 07:29:36.6091 (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: HpUDwNG2d8qtAhXBehC7MsHoHajhnp5EXa0yEIr26I7JCBBGjUXbfZ5enHIhK/NCdv/D0r4rHjz6HBQLxbioWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB2037 Return-Path: liming.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CY4PR11MB152657C7F01463C864F8055B804E0CY4PR11MB1526namp_" --_000_CY4PR11MB152657C7F01463C864F8055B804E0CY4PR11MB1526namp_ Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Lorena: Thanks for your update. Can you correct name style as Star Zeng for below message? Suggested-by: Star Zeng star.zeng@intel.com Signed-off-by: lorena.r.de.leon.vazquez@intel.com Thanks Liming From: De Leon Vasquez, Lorena R Sent: 2020=1B$BG/=1B(B7=1B$B7n=1B(B29=1B$BF|=1B(B 23:23 To: Gao, Liming ; devel@edk2.groups.io; Lohr, Paul A= ; Yao, Jiewen Cc: Kinney, Michael D Subject: RE: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU = generic bug fix I=1B$B!G=1B(Bve attached patch with modifications suggested From: Gao, Liming > Sent: Thursday, July 9, 2020 7:45 AM To: De Leon Vazquez, Lorena R >; devel@edk2.groups.io; Lohr, Paul A >; Yao, Jiewen > Cc: Kinney, Michael D > Subject: RE: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU = generic bug fix Lorena: I have one minor comment on this patch. The error return status should b= e EFI_UNSUPPORTED. + return error; =3D=3D> return EFI_UNSUPPORTED; Thanks Liming From: De Leon Vazquez, Lorena R > Sent: Tuesday, July 7, 2020 1:24 AM To: Gao, Liming >; devel= @edk2.groups.io; Lohr, Paul A >; Yao, Jiewen > Cc: Kinney, Michael D > Subject: RE: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU = generic bug fix Hi Liming, I=1B$B!G=1B(Bve attached the patch Thanks, Lorena From: Gao, Liming > Sent: Thursday, July 2, 2020 8:54 PM To: devel@edk2.groups.io; Lohr, Paul A >; Yao, Jiewen >; De Leon Vazquez, Lorena R > Cc: Kinney, Michael D > Subject: RE: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU = generic bug fix Paul: This patch is missing to be merged. Lorena: I can=1B$B!G=1B(Bt extract the patch from the mail. Can you send the pat= ch to me? I can help merge it. Thanks Liming From: devel@edk2.groups.io > On Behalf Of Lohr, Paul A Sent: Thursday, July 2, 2020 9:56 PM 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 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=1B$B!G=1B(Bt= see a Bugzilla 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_CY4PR11MB152657C7F01463C864F8055B804E0CY4PR11MB1526namp_ Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable

Lorena:

  Thanks for your update. Can you correct= name style as Star Zeng <star.zeng@intel.com> for below message?

 

Su= ggested-by: Star Zeng star.zeng@intel.com<= /span>

Si= gned-off-by: lorena.r.de.leon.vazquez@intel.com

 

Thanks

Liming

From: De Leon Vasquez, Lorena R <lorena.r.de.leon.vasquez@intel.c= om>
Sent: 2020
=1B$BG/=1B(B7=1B$B7n=1B(B29=1B$BF|=1B(B 23:23
To: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io;= Lohr, Paul A <paul.a.lohr@intel.com>; Yao, Jiewen <jiewen.yao@int= el.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg:= IOMMU generic bug fix

 

I=1B$B!G=1B(Bve attached patch= with modifications suggested  

 

From: Gao, Liming <liming= .gao@intel.com>
Sent: Thursday, July 9, 2020 7:45 AM
To: De Leon Vazquez, Lorena R <lorena.r.de.leon.vazquez@intel.com>; devel@edk2.groups.io; Lohr, Pa= ul A <paul.a.lohr@intel.com= >; Yao, Jiewen <jiewen.yao@in= tel.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg:= IOMMU generic bug fix

 

Lorena:

  I have one minor commen= t on this patch. The error return status should be EFI_UNSUPPORTED.

 

+     = ; return error;

è

return EFI_UNSUPPORTED;

 

Thanks

Liming

From: De Leon Vazquez, Lorena R <lorena.r.de.leon.vazquez@intel.com>
Sent: Tuesday, July 7, 2020 1:24 AM
To: Gao, Liming <liming.= gao@intel.com>; devel@edk2.groups.io; Lohr, Pa= ul A <paul.a.lohr@intel.com= >; Yao, Jiewen <jiewen.yao@in= tel.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg:= IOMMU generic bug fix

 

Hi Liming, <= /p>

I=1B$B!G=1B(Bve attached the p= atch

 

Thanks,

Lorena

 

From: Gao, Liming <liming= .gao@intel.com>
Sent: Thursday, July 2, 2020 8:54 PM
To: devel@edk2.groups.io; Lohr, Paul A <paul.a.lohr@in= tel.com>; Yao, Jiewen <ji= ewen.yao@intel.com>; De Leon Vazquez, Lorena R <lorena.r.de.l= eon.vazquez@intel.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg:= IOMMU generic bug fix

 

Paul:

  This patch is miss= ing to be merged.

 

Lorena:

  I can=1B$B!G=1B(Bt= extract the patch from the mail. Can you send the patch to me? I can help = merge it.

 

Thanks

Liming

From: devel@edk2.groups.io <devel= @edk2.groups.io> On Behalf Of Lohr, Paul A
Sent: Thursday, July 2, 2020 9:56 PM
To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel= .com>; De Leon Vazquez, Lorena R <lorena.r.de.leon.vazquez@intel.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg:= IOMMU generic bug fix

 

Hello,

 

It seems this did not get chec= ked in.  Is there something wrong with the patch itself?  Or was = this simply submitted incorrectly?  I don=1B$B!G=1B(Bt see a Bugzilla = associated with it is why I ask.

 

Paul A.= Lohr – Server Firmware Enabling

512.239.90= 73 (cell)

512.794.50= 44 (work)

 

From: devel@edk2.groups.io <devel= @edk2.groups.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.com>; 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@intel.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 now these values are not used any

 

Su= ggested-by: Star Zeng star.zeng@intel.com<= /span>

Si= gned-off-by: lorena.r.de.leon.vazquez@intel.com

 

--

.../Feature/VTd/IntelVTdDxe/Tr= anslationTable.c        | 11 ++++-------=

.../Feature/VTd/IntelVTdDxe/Tr= anslationTableEx.c      | 11 ++++-------

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

 

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

index cc970c0..61fbb4a 100644<= o:p>

--- a/Silicon/Intel/IntelSilic= onPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c

+++ b/Silicon/Intel/IntelSilic= onPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c

@@ -128,14 +128,11 @@ CreateCo= ntextEntry (

 

     = DEBUG ((DEBUG_INFO,"Source: S%04x B%02x D%02x F%02x\n", mVtdUnitI= nformation[VtdIndex].Segment, SourceId.Bits.Bus, SourceId.Bits.Device, Sour= ceId.Bits.Function));

 

-    switch (mV= tdUnitInformation[VtdIndex].CapReg.Bits.SAGAW) {

-    case BIT1:=

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

-     = ; break;

-    case BIT2:=

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

-     = ; break;

+    if ((mVtdU= nitInformation[VtdIndex].CapReg.Bits.SAGAW & BIT2) =3D=3D 0) {

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

+     &nbs= p;return error;

     }

+    ContextEnt= ry->Bits.AddressWidth =3D 0x2;

   }

 

   FlushPageTab= leMemory (VtdIndex, (UINTN)mVtdUnitInformation[VtdIndex].RootEntryTable, EF= I_PAGES_TO_SIZE(EntryTablePages));

diff --git a/Silicon/Intel/Int= elSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTableEx.c b/Silicon/Intel/I= ntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTableEx.c

index 0da1611..6bd31b7 100644<= o:p>

--- a/Silicon/Intel/IntelSilic= onPkg/Feature/VTd/IntelVTdDxe/TranslationTableEx.c

+++ b/Silicon/Intel/IntelSilic= onPkg/Feature/VTd/IntelVTdDxe/TranslationTableEx.c

@@ -78,14 +78,11 @@ CreateExtC= ontextEntry (

 

     = DEBUG ((DEBUG_INFO,"DOMAIN: S%04x, B%02x D%02x F%02x\n", mVtdUnit= Information[VtdIndex].Segment, SourceId.Bits.Bus, SourceId.Bits.Device, Sou= rceId.Bits.Function));

 

-    switch (mV= tdUnitInformation[VtdIndex].CapReg.Bits.SAGAW) {

-    case BIT1:=

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

-     = ; break;

-    case BIT2:=

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

-     = ; break;

+    if ((mVtdU= nitInformation[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;

     }

+    ContextEnt= ry->Bits.AddressWidth =3D 0x2;

   }

 

   FlushPageTab= leMemory (VtdIndex, (UINTN)mVtdUnitInformation[VtdIndex].ExtRootEntryTable,= EFI_PAGES_TO_SIZE(EntryTablePages));

--

2.21.0.windows.1

 

--_000_CY4PR11MB152657C7F01463C864F8055B804E0CY4PR11MB1526namp_--