diff mbox series

[v3,4/6] hw/uefi-vars-sysbus: allow for riscv virt

Message ID 20250319141159.1461621-5-kraxel@redhat.com (mailing list archive)
State New
Headers show
Series hw/uefi: some bugfixes | expand

Commit Message

Gerd Hoffmann March 19, 2025, 2:11 p.m. UTC
Allow the device being added to riscv virt VMs.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/riscv/virt.c | 2 ++
 hw/uefi/Kconfig | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Daniel P. Berrangé March 19, 2025, 2:22 p.m. UTC | #1
On Wed, Mar 19, 2025 at 03:11:56PM +0100, Gerd Hoffmann wrote:
> Allow the device being added to riscv virt VMs.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/riscv/virt.c | 2 ++
>  hw/uefi/Kconfig | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
Daniel Henrique Barboza March 19, 2025, 3:04 p.m. UTC | #2
On 3/19/25 11:11 AM, Gerd Hoffmann wrote:
> Allow the device being added to riscv virt VMs.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---

Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

>   hw/riscv/virt.c | 2 ++
>   hw/uefi/Kconfig | 2 +-
>   2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
> index dae46f4733cd..e517002fdfc7 100644
> --- a/hw/riscv/virt.c
> +++ b/hw/riscv/virt.c
> @@ -57,6 +57,7 @@
>   #include "hw/acpi/aml-build.h"
>   #include "qapi/qapi-visit-common.h"
>   #include "hw/virtio/virtio-iommu.h"
> +#include "hw/uefi/var-service-api.h"
>   
>   /* KVM AIA only supports APLIC MSI. APLIC Wired is always emulated by QEMU. */
>   static bool virt_use_kvm_aia_aplic_imsic(RISCVVirtAIAType aia_type)
> @@ -1935,6 +1936,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
>       hc->plug = virt_machine_device_plug_cb;
>   
>       machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RAMFB_DEVICE);
> +    machine_class_allow_dynamic_sysbus_dev(mc, TYPE_UEFI_VARS_SYSBUS);
>   #ifdef CONFIG_TPM
>       machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS);
>   #endif
> diff --git a/hw/uefi/Kconfig b/hw/uefi/Kconfig
> index ca6c2bc46a96..f139008b632b 100644
> --- a/hw/uefi/Kconfig
> +++ b/hw/uefi/Kconfig
> @@ -1,3 +1,3 @@
>   config UEFI_VARS
>   	bool
> -        default y if X86_64 || AARCH64
> +        default y if X86_64 || AARCH64 || RISCV64
diff mbox series

Patch

diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index dae46f4733cd..e517002fdfc7 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -57,6 +57,7 @@ 
 #include "hw/acpi/aml-build.h"
 #include "qapi/qapi-visit-common.h"
 #include "hw/virtio/virtio-iommu.h"
+#include "hw/uefi/var-service-api.h"
 
 /* KVM AIA only supports APLIC MSI. APLIC Wired is always emulated by QEMU. */
 static bool virt_use_kvm_aia_aplic_imsic(RISCVVirtAIAType aia_type)
@@ -1935,6 +1936,7 @@  static void virt_machine_class_init(ObjectClass *oc, void *data)
     hc->plug = virt_machine_device_plug_cb;
 
     machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RAMFB_DEVICE);
+    machine_class_allow_dynamic_sysbus_dev(mc, TYPE_UEFI_VARS_SYSBUS);
 #ifdef CONFIG_TPM
     machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS);
 #endif
diff --git a/hw/uefi/Kconfig b/hw/uefi/Kconfig
index ca6c2bc46a96..f139008b632b 100644
--- a/hw/uefi/Kconfig
+++ b/hw/uefi/Kconfig
@@ -1,3 +1,3 @@ 
 config UEFI_VARS
 	bool
-        default y if X86_64 || AARCH64
+        default y if X86_64 || AARCH64 || RISCV64