Patchwork [v2,14/21] q35: Suppress SMM BIOS initialization under KVM

login
register
mail settings
Submitter Jason Baron
Date Oct. 9, 2012, 3:30 a.m.
Message ID <4c27506681a076bb646d4661ed7004617405580b.1349749915.git.jbaron@redhat.com>
Download mbox | patch
Permalink /patch/190193/
State New
Headers show

Comments

Jason Baron - Oct. 9, 2012, 3:30 a.m.
From: Jan Kiszka <jan.kiszka@siemens.com>

Same as for i44fx: KVM does not support SMM yet. Signal it initialized
to Seabios to avoid failures.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jason Baron <jbaron@redhat.com>
---
 hw/acpi_ich9.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
Paolo Bonzini - Oct. 9, 2012, 7:53 a.m.
Il 09/10/2012 05:30, Jason Baron ha scritto:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Same as for i44fx: KVM does not support SMM yet. Signal it initialized
> to Seabios to avoid failures.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> Signed-off-by: Jason Baron <jbaron@redhat.com>
> ---
>  hw/acpi_ich9.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/acpi_ich9.c b/hw/acpi_ich9.c
> index 9e78b60..1412ad3 100644
> --- a/hw/acpi_ich9.c
> +++ b/hw/acpi_ich9.c
> @@ -28,6 +28,7 @@
>  #include "qemu-timer.h"
>  #include "sysemu.h"
>  #include "acpi.h"
> +#include "kvm.h"
>  
>  #include "q35.h"
>  
> @@ -292,6 +293,12 @@ static void pm_reset(void *opaque)
>      acpi_pm_tmr_reset(&pm->acpi_regs);
>      acpi_gpe_reset(&pm->acpi_regs);
>  
> +    if (kvm_enabled()) {
> +        /* Mark SMM as already inited to prevent SMM from running. KVM does not
> +         * support SMM mode. */
> +        pm->smi_en |= ICH9_PMIO_SMI_EN_APMC_EN;
> +    }
> +
>      pm_update_sci(pm);
>  }
>  
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Patch

diff --git a/hw/acpi_ich9.c b/hw/acpi_ich9.c
index 9e78b60..1412ad3 100644
--- a/hw/acpi_ich9.c
+++ b/hw/acpi_ich9.c
@@ -28,6 +28,7 @@ 
 #include "qemu-timer.h"
 #include "sysemu.h"
 #include "acpi.h"
+#include "kvm.h"
 
 #include "q35.h"
 
@@ -292,6 +293,12 @@  static void pm_reset(void *opaque)
     acpi_pm_tmr_reset(&pm->acpi_regs);
     acpi_gpe_reset(&pm->acpi_regs);
 
+    if (kvm_enabled()) {
+        /* Mark SMM as already inited to prevent SMM from running. KVM does not
+         * support SMM mode. */
+        pm->smi_en |= ICH9_PMIO_SMI_EN_APMC_EN;
+    }
+
     pm_update_sci(pm);
 }