Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-27 Thread Yao, Jiewen
like below: >>> while(TRUE) { >>> if (error) { >>> break; >>> } >>>GetData >>>if (complete) { >>> Break >>>} >>> } >>> >>> BME clear will trigger error break. >>> >>

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-27 Thread Laszlo Ersek
@intel.com>; Laszlo Ersek <ler...@redhat.com>; >> Zeng, Star <star.z...@intel.com>; edk2-devel@lists.01.org >> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>; Kinney, Michael D >> <michael.d.kin...@intel.com> >> Subject: RE: [edk2] [PATCH] Intel

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Yao, Jiewen
>; Laszlo Ersek <ler...@redhat.com>; > Zeng, Star <star.z...@intel.com>; edk2-devel@lists.01.org > Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>; Kinney, Michael D > <michael.d.kin...@intel.com> > Subject: RE: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Ni, Ruiyu
lists.01.org > Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>; Kinney, Michael D > <michael.d.kin...@intel.com> > Subject: RE: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to > CALLBACK. > > I think the error might be PCI device specific. > > BT

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Yao, Jiewen
D > <michael.d.kin...@intel.com> > Subject: RE: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to > CALLBACK. > > Jiewen, > If the BME bit is cleared in Command register, but a device driver > uses DMA to transfer data, what kind of error will be seen by S

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Ni, Ruiyu
intel.com>; edk2-devel@lists.01.org Cc: Ni, Ruiyu <ruiyu...@intel.com>; Ard Biesheuvel <ard.biesheu...@linaro.org>; Kinney, Michael D <michael.d.kin...@intel.com> Subject: RE: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK. Good Info. I think a correct

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Yao, Jiewen
.@intel.com>; Zeng, Star <star.z...@intel.com>; > edk2-devel@lists.01.org > Cc: Ni, Ruiyu <ruiyu...@intel.com>; Ard Biesheuvel > <ard.biesheu...@linaro.org>; > Kinney, Michael D <michael.d.kin...@intel.com> > Subject: Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Laszlo Ersek
To: Zeng, Star <star.z...@intel.com>; Yao, Jiewen <jiewen@intel.com>; >> edk2-devel@lists.01.org >> Cc: Ni, Ruiyu <ruiyu...@intel.com>; Ard Biesheuvel >> <ard.biesheu...@linaro.org> >> Subject: Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Chan

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Yao, Jiewen
gt; edk2-devel@lists.01.org > Cc: Ni, Ruiyu <ruiyu...@intel.com>; Ard Biesheuvel <ard.biesheu...@linaro.org> > Subject: Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to > CALLBACK. > > On 10/26/17 10:10, Zeng, Star wrote: > > Is it security reason

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Laszlo Ersek
On 10/26/17 10:10, Zeng, Star wrote: > Is it security reason when IOMMU disabled and Bus Master not disabled? No, I don't think there is a security issue here. But, my previous assessment about VTdDxe was indeed wrong -- there may be a *correctness* issue. Namely, if the IOMMU is de-activated

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Zeng, Star
Is it security reason when IOMMU disabled and Bus Master not disabled? Could our code have a central place to disable Bus Master? For example PciBusDxe? Thanks, Star -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Thursday, October 26, 2017 3:53 PM To: Zeng,

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Laszlo Ersek
On 10/26/17 08:54, Zeng, Star wrote: > Ok, please add more description into the commit log, for example, "PCI device > should disable BME at NOTIFY", etc. Last time we discussed this question, the consensus was that edk2 should not present any requirement for PCI drivers that is not required by

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Yao, Jiewen
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 (ler...@redhat.com) ; Ni, Ruiyu > ; Zeng, Star >

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Zeng, Star
Ok, please add more description into the commit log, for example, "PCI device should disable BME at NOTIFY", etc. With that, Reviewed-by: Star Zeng Thanks, Star -Original Message- From: Yao, Jiewen Sent: Thursday, October 26, 2017 2:51 PM To: Zeng, Star

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Yao, Jiewen
Yes, this PCI patch will be submitted soon. :) Thank you Yao Jiewen > -Original Message- > From: Zeng, Star > Sent: Thursday, October 26, 2017 2:18 PM > To: Yao, Jiewen ; edk2-devel@lists.01.org > Cc: Laszlo Ersek (ler...@redhat.com) ; Zeng, Star

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Zeng, Star
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 (ler...@redhat.com)

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-26 Thread Yao, Jiewen
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

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-25 Thread Zeng, Star
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 CALLBACK. Thanks, Star

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-25 Thread Yao, Jiewen
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

Re: [edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-25 Thread Zeng, Star
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

[edk2] [PATCH] IntelSiliconPkg/VTdDxe: Change EBS Event TPL to CALLBACK.

2017-10-25 Thread Jiewen Yao
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 ---