From 3c892168a02b4ff9ef8c398599940b8f16a32437 Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 17 Apr 2009 14:26:21 +0000 Subject: kvm: Apply SMM-already-initialized workaround on reset (Jan Kiszka) Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7136 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/acpi.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/acpi.c b/hw/acpi.c index 52f50a0..53c1fec 100644 --- a/hw/acpi.c +++ b/hw/acpi.c @@ -483,13 +483,18 @@ static int pm_load(QEMUFile* f,void* opaque,int version_id) static void piix4_reset(void *opaque) { - PIIX4PMState *s = opaque; - uint8_t *pci_conf = s->dev.config; + PIIX4PMState *s = opaque; + uint8_t *pci_conf = s->dev.config; + + pci_conf[0x58] = 0; + pci_conf[0x59] = 0; + pci_conf[0x5a] = 0; + pci_conf[0x5b] = 0; - pci_conf[0x58] = 0; - pci_conf[0x59] = 0; - pci_conf[0x5a] = 0; - pci_conf[0x5b] = 0; + if (kvm_enabled()) { + /* Mark SMM as already inited (until KVM supports SMM). */ + pci_conf[0x5B] = 0x02; + } } i2c_bus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base, -- cgit v1.1