diff mbox series

[v5,3/3] hw/arm/virt: Use edk2_add_host_crypto_policy()

Message ID 20190620122132.10075-4-philmd@redhat.com
State New
Headers show
Series fw_cfg: Add edk2_add_host_crypto_policy() | expand

Commit Message

Philippe Mathieu-Daudé June 20, 2019, 12:21 p.m. UTC
Enable the EDK2 Crypto Policy features on the Virt machine.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/virt.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Laszlo Ersek June 24, 2019, 3:01 p.m. UTC | #1
On 06/20/19 14:21, Philippe Mathieu-Daudé wrote:
> Enable the EDK2 Crypto Policy features on the Virt machine.
> 
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/arm/virt.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 431e2900fd..15727b3d59 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -59,6 +59,7 @@
>  #include "hw/intc/arm_gicv3_common.h"
>  #include "kvm_arm.h"
>  #include "hw/firmware/smbios.h"
> +#include "hw/firmware/uefi_edk2.h"
>  #include "qapi/visitor.h"
>  #include "standard-headers/linux/input.h"
>  #include "hw/arm/smmuv3.h"
> @@ -1355,6 +1356,11 @@ static void virt_build_smbios(VirtMachineState *vms)
>      }
>  }
>  
> +static void virt_uefi_setup(VirtMachineState *vms)
> +{
> +    edk2_add_host_crypto_policy(vms->fw_cfg);
> +}
> +
>  static
>  void virt_machine_done(Notifier *notifier, void *data)
>  {
> @@ -1383,6 +1389,7 @@ void virt_machine_done(Notifier *notifier, void *data)
>  
>      virt_acpi_setup(vms);
>      virt_build_smbios(vms);
> +    virt_uefi_setup(vms);
>  }
>  
>  static uint64_t virt_cpu_mp_affinity(VirtMachineState *vms, int idx)
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
diff mbox series

Patch

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 431e2900fd..15727b3d59 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -59,6 +59,7 @@ 
 #include "hw/intc/arm_gicv3_common.h"
 #include "kvm_arm.h"
 #include "hw/firmware/smbios.h"
+#include "hw/firmware/uefi_edk2.h"
 #include "qapi/visitor.h"
 #include "standard-headers/linux/input.h"
 #include "hw/arm/smmuv3.h"
@@ -1355,6 +1356,11 @@  static void virt_build_smbios(VirtMachineState *vms)
     }
 }
 
+static void virt_uefi_setup(VirtMachineState *vms)
+{
+    edk2_add_host_crypto_policy(vms->fw_cfg);
+}
+
 static
 void virt_machine_done(Notifier *notifier, void *data)
 {
@@ -1383,6 +1389,7 @@  void virt_machine_done(Notifier *notifier, void *data)
 
     virt_acpi_setup(vms);
     virt_build_smbios(vms);
+    virt_uefi_setup(vms);
 }
 
 static uint64_t virt_cpu_mp_affinity(VirtMachineState *vms, int idx)