MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
PciIoMap () need to feedback the status of
mIoMmuProtocol->SetAttribute () return value.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4652
Cc: Ray Ni <ray.ni@intel.com>
Cc: Huang Jenny <jenny.huang@intel.com>
Cc: Chiang Chris <chris.chiang@intel.com>
Signed-off-by: Sheng Wei <w.sheng@intel.com>
---
MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c
index 14bed54729..e85544d08d 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c
@@ -1024,12 +1024,12 @@ PciIoMap (
return EFI_INVALID_PARAMETER;
}
- mIoMmuProtocol->SetAttribute (
- mIoMmuProtocol,
- PciIoDevice->Handle,
- *Mapping,
- IoMmuAttribute
- );
+ Status = mIoMmuProtocol->SetAttribute (
+ mIoMmuProtocol,
+ PciIoDevice->Handle,
+ *Mapping,
+ IoMmuAttribute
+ );
}
}
--
2.26.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114136): https://edk2.groups.io/g/devel/message/114136
Mute This Topic: https://groups.io/mt/103881889/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
On 1/22/24 00:47, Sheng Wei via groups.io wrote: > PciIoMap () need to feedback the status of > mIoMmuProtocol->SetAttribute () return value. > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4652 I'm still investigating, but this commit breaks booting all types of SEV guests. Without this patch, there is a boot device mapping and the Grub menu is displayed. But with this patch, I receive: map: No mapping found. Press ESC in 1 seconds to skip startup.nsh or any other key to continue. and then drop to the shell prompt. Thanks, Tom > > Cc: Ray Ni <ray.ni@intel.com> > Cc: Huang Jenny <jenny.huang@intel.com> > Cc: Chiang Chris <chris.chiang@intel.com> > Signed-off-by: Sheng Wei <w.sheng@intel.com> > --- > MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c > index 14bed54729..e85544d08d 100644 > --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c > +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c > @@ -1024,12 +1024,12 @@ PciIoMap ( > return EFI_INVALID_PARAMETER; > } > > - mIoMmuProtocol->SetAttribute ( > - mIoMmuProtocol, > - PciIoDevice->Handle, > - *Mapping, > - IoMmuAttribute > - ); > + Status = mIoMmuProtocol->SetAttribute ( > + mIoMmuProtocol, > + PciIoDevice->Handle, > + *Mapping, > + IoMmuAttribute > + ); > } > } > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114621): https://edk2.groups.io/g/devel/message/114621 Mute This Topic: https://groups.io/mt/103881889/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
+Min Adding Min to see if TDX is also experiencing issues around this recent change. Thanks, Tom On 1/26/24 11:21, Tom Lendacky wrote: > On 1/22/24 00:47, Sheng Wei via groups.io wrote: >> PciIoMap () need to feedback the status of >> mIoMmuProtocol->SetAttribute () return value. >> >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4652 > > I'm still investigating, but this commit breaks booting all types of SEV > guests. Without this patch, there is a boot device mapping and the Grub > menu is displayed. But with this patch, I receive: > > map: No mapping found. > Press ESC in 1 seconds to skip startup.nsh or any other key to continue. > > and then drop to the shell prompt. > > Thanks, > Tom > >> >> Cc: Ray Ni <ray.ni@intel.com> >> Cc: Huang Jenny <jenny.huang@intel.com> >> Cc: Chiang Chris <chris.chiang@intel.com> >> Signed-off-by: Sheng Wei <w.sheng@intel.com> >> --- >> MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 12 ++++++------ >> 1 file changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c >> b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c >> index 14bed54729..e85544d08d 100644 >> --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c >> +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c >> @@ -1024,12 +1024,12 @@ PciIoMap ( >> return EFI_INVALID_PARAMETER; >> } >> - mIoMmuProtocol->SetAttribute ( >> - mIoMmuProtocol, >> - PciIoDevice->Handle, >> - *Mapping, >> - IoMmuAttribute >> - ); >> + Status = mIoMmuProtocol->SetAttribute ( >> + mIoMmuProtocol, >> + PciIoDevice->Handle, >> + *Mapping, >> + IoMmuAttribute >> + ); >> } >> } -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114622): https://edk2.groups.io/g/devel/message/114622 Mute This Topic: https://groups.io/mt/103881889/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On 1/26/24 11:38, Tom Lendacky wrote: > +Min > > Adding Min to see if TDX is also experiencing issues around this recent > change. > > Thanks, > Tom > > On 1/26/24 11:21, Tom Lendacky wrote: >> On 1/22/24 00:47, Sheng Wei via groups.io wrote: >>> PciIoMap () need to feedback the status of >>> mIoMmuProtocol->SetAttribute () return value. >>> >>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4652 >> >> I'm still investigating, but this commit breaks booting all types of SEV >> guests. Without this patch, there is a boot device mapping and the Grub >> menu is displayed. But with this patch, I receive: >> >> map: No mapping found. >> Press ESC in 1 seconds to skip startup.nsh or any other key to continue. >> >> and then drop to the shell prompt. The IOMMU protocol is installed under OVMF when either SEV or TDX is active. The SetAttribute() function of this implementation has always returned EFI_UNSUPPORTED, which is now being passed pack to the caller of PciIoMap() and thus causing a failure. Should the SetAttribute() function in OvmfPkg/IoMmuDxe/CcIoMmu.c return success by default? Thanks, Tom >> >> Thanks, >> Tom >> >>> >>> Cc: Ray Ni <ray.ni@intel.com> >>> Cc: Huang Jenny <jenny.huang@intel.com> >>> Cc: Chiang Chris <chris.chiang@intel.com> >>> Signed-off-by: Sheng Wei <w.sheng@intel.com> >>> --- >>> MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 12 ++++++------ >>> 1 file changed, 6 insertions(+), 6 deletions(-) >>> >>> diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c >>> b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c >>> index 14bed54729..e85544d08d 100644 >>> --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c >>> +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c >>> @@ -1024,12 +1024,12 @@ PciIoMap ( >>> return EFI_INVALID_PARAMETER; >>> } >>> - mIoMmuProtocol->SetAttribute ( >>> - mIoMmuProtocol, >>> - PciIoDevice->Handle, >>> - *Mapping, >>> - IoMmuAttribute >>> - ); >>> + Status = mIoMmuProtocol->SetAttribute ( >>> + mIoMmuProtocol, >>> + PciIoDevice->Handle, >>> + *Mapping, >>> + IoMmuAttribute >>> + ); >>> } >>> } -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114623): https://edk2.groups.io/g/devel/message/114623 Mute This Topic: https://groups.io/mt/103881889/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Reviewed by Jenny Huang <jenny.huang@intel.com> -----Original Message----- From: Sheng, W <w.sheng@intel.com> Sent: Sunday, January 21, 2024 10:47 PM To: devel@edk2.groups.io Cc: Ni, Ray <ray.ni@intel.com>; Huang, Jenny <jenny.huang@intel.com>; Chiang, Chris <chris.chiang@intel.com> Subject: [PATCH] MdeModulePkg/PciBusDxe: Add feedback status for PciIoMap PciIoMap () need to feedback the status of mIoMmuProtocol->SetAttribute () return value. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4652 Cc: Ray Ni <ray.ni@intel.com> Cc: Huang Jenny <jenny.huang@intel.com> Cc: Chiang Chris <chris.chiang@intel.com> Signed-off-by: Sheng Wei <w.sheng@intel.com> --- MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c index 14bed54729..e85544d08d 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c @@ -1024,12 +1024,12 @@ PciIoMap ( return EFI_INVALID_PARAMETER; } - mIoMmuProtocol->SetAttribute ( - mIoMmuProtocol, - PciIoDevice->Handle, - *Mapping, - IoMmuAttribute - ); + Status = mIoMmuProtocol->SetAttribute ( + mIoMmuProtocol, + PciIoDevice->Handle, + *Mapping, + IoMmuAttribute + ); } } -- 2.26.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114167): https://edk2.groups.io/g/devel/message/114167 Mute This Topic: https://groups.io/mt/103881889/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Ray Ni <ray.ni@intel.com> Thanks, Ray > -----Original Message----- > From: Huang, Jenny <jenny.huang@intel.com> > Sent: Tuesday, January 23, 2024 11:26 AM > To: Sheng, W <w.sheng@intel.com>; devel@edk2.groups.io > Cc: Ni, Ray <ray.ni@intel.com>; Chiang, Chris <chris.chiang@intel.com> > Subject: RE: [PATCH] MdeModulePkg/PciBusDxe: Add feedback status for > PciIoMap > > Reviewed by Jenny Huang <jenny.huang@intel.com> > > -----Original Message----- > From: Sheng, W <w.sheng@intel.com> > Sent: Sunday, January 21, 2024 10:47 PM > To: devel@edk2.groups.io > Cc: Ni, Ray <ray.ni@intel.com>; Huang, Jenny <jenny.huang@intel.com>; > Chiang, Chris <chris.chiang@intel.com> > Subject: [PATCH] MdeModulePkg/PciBusDxe: Add feedback status for > PciIoMap > > PciIoMap () need to feedback the status of > mIoMmuProtocol->SetAttribute () return value. > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4652 > > Cc: Ray Ni <ray.ni@intel.com> > Cc: Huang Jenny <jenny.huang@intel.com> > Cc: Chiang Chris <chris.chiang@intel.com> > Signed-off-by: Sheng Wei <w.sheng@intel.com> > --- > MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c > b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c > index 14bed54729..e85544d08d 100644 > --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c > +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c > @@ -1024,12 +1024,12 @@ PciIoMap ( > return EFI_INVALID_PARAMETER; > } > > - mIoMmuProtocol->SetAttribute ( > - mIoMmuProtocol, > - PciIoDevice->Handle, > - *Mapping, > - IoMmuAttribute > - ); > + Status = mIoMmuProtocol->SetAttribute ( > + mIoMmuProtocol, > + PciIoDevice->Handle, > + *Mapping, > + IoMmuAttribute > + ); > } > } > > -- > 2.26.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114282): https://edk2.groups.io/g/devel/message/114282 Mute This Topic: https://groups.io/mt/103881889/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.