From patchwork Wed Nov 14 20:54:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v4,10/14] q35: Suppress SMM BIOS initialization under KVM Date: Wed, 14 Nov 2012 10:54:07 -0000 From: Jason Baron X-Patchwork-Id: 199026 Message-Id: To: anthony@codemonkey.ws, qemu-devel@nongnu.org Cc: alex.williamson@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, armbru@redhat.com, agraf@suse.de, blauwirbel@gmail.com, yamahata@valinux.co.jp, juzhang@redhat.com, kevin@koconnor.net, kraxel@redhat.com, gsomlo@gmail.com, mkletzan@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com, afaerber@suse.de From: Jan Kiszka Same as for i44fx: KVM does not support SMM yet. Signal it initialized to Seabios to avoid failures. Reviewed-by: Paolo Bonzini Signed-off-by: Jan Kiszka Signed-off-by: Jason Baron --- 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 c45921c..61034d3 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 "ich9.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); }