From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 649E82034CF8C for ; Wed, 25 Oct 2017 23:51:57 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP; 25 Oct 2017 23:55:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,434,1503385200"; d="scan'208";a="327906439" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 25 Oct 2017 23:55:43 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 25 Oct 2017 23:55:42 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 25 Oct 2017 23:55:42 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.213]) with mapi id 14.03.0319.002; Thu, 26 Oct 2017 14:55:40 +0800 From: "Yao, Jiewen" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Laszlo Ersek (lersek@redhat.com)" , "Ni, Ruiyu" Thread-Topic: [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK. Thread-Index: AQHTThcCxLYSYGW9y0GhkiqH8Xoq2aL1lmkw//+FSYCAAIfpEP//foKAgACO5jD//3tdgAAQyCeA Date: Thu, 26 Oct 2017 06:55:40 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AA05029@shsmsx102.ccr.corp.intel.com> References: <1508984017-11740-1-git-send-email-jiewen.yao@intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B9AE2AB@shsmsx102.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C503AA0491C@shsmsx102.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B9AE3FE@shsmsx102.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C503AA04CE4@shsmsx102.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B9AE45B@shsmsx102.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C503AA04F32@shsmsx102.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B9AE4D0@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B9AE4D0@shsmsx102.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWYyNGE1YjAtZjgwNy00NmMxLTg0NWQtNWM3MTA3YzM3MzI3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJpZ2tFKzRFelwvZjRvR2lQcllycmRyd1FNTHpcL3h2aTBKYm1vOHVIQ1E3TXVaMjNQd1dJRW51R2JLTERBTHFcL1h3In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Oct 2017 06:51:57 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Agree! > -----Original Message----- > From: Zeng, Star > Sent: Thursday, October 26, 2017 2:55 PM > To: Yao, Jiewen ; edk2-devel@lists.01.org > Cc: Laszlo Ersek (lersek@redhat.com) ; Ni, Ruiyu > ; Zeng, Star > Subject: RE: [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALL= BACK. >=20 > Ok, please add more description into the commit log, for example, "PCI de= vice > should disable BME at NOTIFY", etc. >=20 > With that, Reviewed-by: Star Zeng >=20 >=20 > Thanks, > Star > -----Original Message----- > From: Yao, Jiewen > Sent: Thursday, October 26, 2017 2:51 PM > To: Zeng, Star ; edk2-devel@lists.01.org > Cc: Laszlo Ersek (lersek@redhat.com) ; Ni, Ruiyu > > Subject: RE: [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALL= BACK. >=20 > Yes, this PCI patch will be submitted soon. :) >=20 > Thank you > Yao Jiewen >=20 > > -----Original Message----- > > From: Zeng, Star > > Sent: Thursday, October 26, 2017 2:18 PM > > To: Yao, Jiewen ; edk2-devel@lists.01.org > > Cc: Laszlo Ersek (lersek@redhat.com) ; Zeng, Star > > > > Subject: RE: [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to > CALLBACK. > > > > So there will be a guidance for this " PCI device disable BME at > > NOTIFY " to be documented? > > > > Thanks, > > Star > > -----Original Message----- > > From: Yao, Jiewen > > Sent: Thursday, October 26, 2017 2:03 PM > > To: Zeng, Star ; edk2-devel@lists.01.org > > Cc: Laszlo Ersek (lersek@redhat.com) > > Subject: RE: [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to > CALLBACK. > > > > Right. In the future, we will let PCI device disable BME at NOTIFY. > > > > So we let IOMMU use CALLBACK, to make sure BME is disabled before > > IOMMU is disabled. > > > > Thank you > > Yao Jiewen > > > > > -----Original Message----- > > > From: Zeng, Star > > > Sent: Thursday, October 26, 2017 1:55 PM > > > To: Yao, Jiewen ; edk2-devel@lists.01.org > > > Cc: Laszlo Ersek (lersek@redhat.com) ; Zeng, Star > > > > > > Subject: RE: [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to > > CALLBACK. > > > > > > I am confused. > > > > > > Is this patch to make the device driver's EBS event notification to > > > be run before IntelVTdDxe's EBS event notification? > > > > > > If yes, this patch seemingly can only make sure the behavior when > > > the device driver's EBS event notification is at NOTIFY, but not CALL= BACK. > > > > > > > > > Thanks, > > > Star > > > -----Original Message----- > > > From: Yao, Jiewen > > > Sent: Thursday, October 26, 2017 1:16 PM > > > To: Zeng, Star ; edk2-devel@lists.01.org > > > Cc: Laszlo Ersek (lersek@redhat.com) > > > Subject: RE: [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to > > CALLBACK. > > > > > > That is fine. > > > > > > Here, disabling IOMMU means to disable the protection and allow all > > > DMA access. > > > I do not think it will bring any functional impact. > > > > > > Thank you > > > Yao Jiewen > > > > > > > > > > -----Original Message----- > > > > From: Zeng, Star > > > > Sent: Thursday, October 26, 2017 12:58 PM > > > > To: Yao, Jiewen ; edk2-devel@lists.01.org > > > > Cc: Laszlo Ersek (lersek@redhat.com) ; Zeng, > > > > Star > > > > Subject: RE: [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL > > > > to > > > CALLBACK. > > > > > > > > Some device driver may also have exit boot service event at > > > > CALLBACK, for example AtaPassThruExitBootServices() that was added > > > > by > > Laszlo. > > > > > > > > > > > > Thanks, > > > > Star > > > > -----Original Message----- > > > > From: Yao, Jiewen > > > > Sent: Thursday, October 26, 2017 10:14 AM > > > > To: edk2-devel@lists.01.org > > > > Cc: Zeng, Star > > > > Subject: [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to > CALLBACK. > > > > > > > > Change ExitBootServices TPL to CALLBACK, so that a device can > > > > disable BME before IOMMU grants access right. > > > > > > > > Cc: Star Zeng > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > > > Signed-off-by: Jiewen Yao > > > > --- > > > > IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git > > > > a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c > > > > b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c > > > > index f5de01f..4a4d82e 100644 > > > > --- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c > > > > +++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c > > > > @@ -483,7 +483,7 @@ InitializeDmaProtection ( > > > > > > > > Status =3D gBS->CreateEventEx ( > > > > EVT_NOTIFY_SIGNAL, > > > > - TPL_NOTIFY, > > > > + TPL_CALLBACK, > > > > OnExitBootServices, > > > > NULL, > > > > &gEfiEventExitBootServicesGuid, @@ -492,7 > > > > +492,7 @@ InitializeDmaProtection ( > > > > ASSERT_EFI_ERROR (Status); > > > > > > > > Status =3D EfiCreateEventLegacyBootEx ( > > > > - TPL_NOTIFY, > > > > + TPL_CALLBACK, > > > > OnLegacyBoot, > > > > NULL, > > > > &LegacyBootEvent > > > > -- > > > > 2.7.4.windows.1