aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-17 14:26:21 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-17 14:26:21 +0000
commit3c892168a02b4ff9ef8c398599940b8f16a32437 (patch)
tree2cf388defcb5699e0c16c50eb7013cd1d92fd6b7 /hw
parent29203dcf3172d66863b7c5618c5df72e153078a6 (diff)
kvm: Apply SMM-already-initialized workaround on reset (Jan Kiszka)
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7136 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/acpi.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/hw/acpi.c b/hw/acpi.c
index 52f50a0814..53c1fec3c9 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,