[RFC 1/2] hw/uefi: Add hardware-info ID for virtio mmio devices for SVSM

Oliver Steffen posted 2 patches 4 months, 2 weeks ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Gerd Hoffmann <kraxel@redhat.com>
[RFC 1/2] hw/uefi: Add hardware-info ID for virtio mmio devices for SVSM
Posted by Oliver Steffen 4 months, 2 weeks ago
Add a hardware-info device ID for virtio mmio devices intended for use by an SVSM.
The ID has already been reserved in edk2, see edk2 commit f25e3d0d2c55.

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
---
 include/hw/uefi/hardware-info.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/hw/uefi/hardware-info.h b/include/hw/uefi/hardware-info.h
index 94c38cff20..d688af0e8a 100644
--- a/include/hw/uefi/hardware-info.h
+++ b/include/hw/uefi/hardware-info.h
@@ -14,6 +14,7 @@ typedef enum {
     HardwareInfoTypeUndefined  = 0,
     HardwareInfoTypeHostBridge = 1,
     HardwareInfoQemuUefiVars   = 2,
+    HardwareInfoVirtioMmioSvsm = 0x1000,
 } HARDWARE_INFO_TYPE;
 
 typedef struct {
-- 
2.50.0
Re: [RFC 1/2] hw/uefi: Add hardware-info ID for virtio mmio devices for SVSM
Posted by Stefano Garzarella 3 months, 2 weeks ago
On Tue, Jul 01, 2025 at 02:18:14PM +0200, Oliver Steffen wrote:
>Add a hardware-info device ID for virtio mmio devices intended for use by an SVSM.
>The ID has already been reserved in edk2, see edk2 commit f25e3d0d2c55.
>
>Signed-off-by: Oliver Steffen <osteffen@redhat.com>
>---
> include/hw/uefi/hardware-info.h | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/include/hw/uefi/hardware-info.h b/include/hw/uefi/hardware-info.h
>index 94c38cff20..d688af0e8a 100644
>--- a/include/hw/uefi/hardware-info.h
>+++ b/include/hw/uefi/hardware-info.h
>@@ -14,6 +14,7 @@ typedef enum {
>     HardwareInfoTypeUndefined  = 0,
>     HardwareInfoTypeHostBridge = 1,
>     HardwareInfoQemuUefiVars   = 2,
>+    HardwareInfoVirtioMmioSvsm = 0x1000,

Can we use hexadecimal everywhere?

Which is basically the same for now, but I mean using the same format 
(0x0001, etc.). That said, I would probably do it in another cleanup 
patch.

LGTM!

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

> } HARDWARE_INFO_TYPE;
>
> typedef struct {
>-- 
>2.50.0
>