Re: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Add feedback status for PciIoMap

2024-01-26 Thread Lendacky, Thomas via groups.io

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 
Cc: Huang Jenny 
Cc: Chiang Chris 
Signed-off-by: Sheng Wei 
---
  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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Add feedback status for PciIoMap

2024-01-26 Thread Lendacky, Thomas via groups.io

+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 
Cc: Huang Jenny 
Cc: Chiang Chris 
Signed-off-by: Sheng Wei 
---
  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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Add feedback status for PciIoMap

2024-01-26 Thread Lendacky, Thomas via groups.io

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 
Cc: Huang Jenny 
Cc: Chiang Chris 
Signed-off-by: Sheng Wei 
---
  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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Add feedback status for PciIoMap

2024-01-24 Thread Ni, Ray
Reviewed-by: Ray Ni 

Thanks,
Ray
> -Original Message-
> From: Huang, Jenny 
> Sent: Tuesday, January 23, 2024 11:26 AM
> To: Sheng, W ; devel@edk2.groups.io
> Cc: Ni, Ray ; Chiang, Chris 
> Subject: RE: [PATCH] MdeModulePkg/PciBusDxe: Add feedback status for
> PciIoMap
> 
> Reviewed by Jenny Huang 
> 
> -Original Message-
> From: Sheng, W 
> Sent: Sunday, January 21, 2024 10:47 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Huang, Jenny ;
> Chiang, Chris 
> 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 
> Cc: Huang Jenny 
> Cc: Chiang Chris 
> Signed-off-by: Sheng Wei 
> ---
>  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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Add feedback status for PciIoMap

2024-01-22 Thread Huang, Jenny
Reviewed by Jenny Huang 

-Original Message-
From: Sheng, W  
Sent: Sunday, January 21, 2024 10:47 PM
To: devel@edk2.groups.io
Cc: Ni, Ray ; Huang, Jenny ; Chiang, 
Chris 
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 
Cc: Huang Jenny 
Cc: Chiang Chris 
Signed-off-by: Sheng Wei 
---
 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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Add feedback status for PciIoMap

2024-01-21 Thread Sheng Wei
PciIoMap () need to feedback the status of
mIoMmuProtocol->SetAttribute () return value.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4652

Cc: Ray Ni 
Cc: Huang Jenny 
Cc: Chiang Chris 
Signed-off-by: Sheng Wei 
---
 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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Add feedback status for PciIoMap

2024-01-21 Thread Sheng Wei
PciIoMap () need to feedback the status of
mIoMmuProtocol->SetAttribute () return value.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4652

Cc: Ray Ni 
Cc: Huang, Jenny 
Cc: Chiang, Chris 
Signed-off-by: Sheng Wei 
---
 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 (#114135): https://edk2.groups.io/g/devel/message/114135
Mute This Topic: https://groups.io/mt/103881889/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-