diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-15 18:41:28 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-15 18:41:28 -0600 |
commit | 6c263e26a5c162a8cd79e32bb82422697db5c57c (patch) | |
tree | de3955b0d0d026c74e05f1342e7dac75b3c6ab78 /hw | |
parent | cf5cfe0471eb3693401f390bc467413d14dce368 (diff) | |
parent | a4aecd2819fd31641ab62472e3385073043521fb (diff) |
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
* qemu-kvm/uq/master:
apic: Fix legacy vmstate loading for KVM
kvm: Implement kvm_irqchip_in_kernel like kvm_enabled
kvm: Allow to set shadow MMU size
Diffstat (limited to 'hw')
-rw-r--r-- | hw/apic_common.c | 7 | ||||
-rw-r--r-- | hw/pc.c | 4 | ||||
-rw-r--r-- | hw/pc_piix.c | 6 |
3 files changed, 11 insertions, 6 deletions
diff --git a/hw/apic_common.c b/hw/apic_common.c index a440ea8ff5..c91f7d5391 100644 --- a/hw/apic_common.c +++ b/hw/apic_common.c @@ -188,6 +188,7 @@ static void apic_reset_common(DeviceState *d) static int apic_load_old(QEMUFile *f, void *opaque, int version_id) { APICCommonState *s = opaque; + APICCommonClass *info = APIC_COMMON_GET_CLASS(s); int i; if (version_id > 2) { @@ -220,7 +221,11 @@ static int apic_load_old(QEMUFile *f, void *opaque, int version_id) s->next_time = qemu_get_be64(f); if (version_id >= 2) { - qemu_get_timer(f, s->timer); + s->timer_expiry = qemu_get_be64(f); + } + + if (info->post_load) { + info->post_load(s); } return 0; } @@ -890,7 +890,7 @@ static DeviceState *apic_init(void *env, uint8_t apic_id) DeviceState *dev; static int apic_mapped; - if (kvm_enabled() && kvm_irqchip_in_kernel()) { + if (kvm_irqchip_in_kernel()) { dev = qdev_create(NULL, "kvm-apic"); } else { dev = qdev_create(NULL, "apic"); @@ -909,7 +909,7 @@ static DeviceState *apic_init(void *env, uint8_t apic_id) } /* KVM does not support MSI yet. */ - if (!kvm_enabled() || !kvm_irqchip_in_kernel()) { + if (!kvm_irqchip_in_kernel()) { msi_supported = true; } diff --git a/hw/pc_piix.c b/hw/pc_piix.c index c06f1b544e..17f8d5d593 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -104,7 +104,7 @@ static void ioapic_init(GSIState *gsi_state) SysBusDevice *d; unsigned int i; - if (kvm_enabled() && kvm_irqchip_in_kernel()) { + if (kvm_irqchip_in_kernel()) { dev = qdev_create(NULL, "kvm-ioapic"); } else { dev = qdev_create(NULL, "ioapic"); @@ -183,7 +183,7 @@ static void pc_init1(MemoryRegion *system_memory, } gsi_state = g_malloc0(sizeof(*gsi_state)); - if (kvm_enabled() && kvm_irqchip_in_kernel()) { + if (kvm_irqchip_in_kernel()) { kvm_piix3_setup_irq_routing(pci_enabled); gsi = qemu_allocate_irqs(kvm_piix3_gsi_handler, gsi_state, GSI_NUM_PINS); @@ -209,7 +209,7 @@ static void pc_init1(MemoryRegion *system_memory, } isa_bus_irqs(isa_bus, gsi); - if (kvm_enabled() && kvm_irqchip_in_kernel()) { + if (kvm_irqchip_in_kernel()) { i8259 = kvm_i8259_init(isa_bus); } else if (xen_enabled()) { i8259 = xen_interrupt_controller_init(); |