Drop the qemu-kvm version in favor of the equivalent upstream implementation. Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> --- hw/ioapic.c | 75 +--------------------------------------------------------- hw/pc_piix.c | 7 +---- 2 files changed, 2 insertions(+), 80 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index 3f86eff..79549f8 100644 --- a/hw/ioapic.c +++ b/hw/ioapic.c @@ -26,8 +26,6 @@ #include "ioapic.h" #include "ioapic_internal.h" -#include "kvm.h" - //#define DEBUG_IOAPIC #ifdef DEBUG_IOAPIC @@ -222,75 +220,6 @@ ioapic_mem_write(void *opaque, target_phys_addr_t addr, uint64_t val, } } -static void kvm_kernel_ioapic_save_to_user(IOAPICCommonState *s) -{ -#if defined(KVM_CAP_IRQCHIP) && defined(TARGET_I386) - struct kvm_irqchip chip; - struct kvm_ioapic_state *kioapic; - int i; - - chip.chip_id = KVM_IRQCHIP_IOAPIC; - kvm_get_irqchip(kvm_state, &chip); - kioapic = &chip.chip.ioapic; - - s->id = kioapic->id; - s->ioregsel = kioapic->ioregsel; - s->irr = kioapic->irr; - for (i = 0; i < IOAPIC_NUM_PINS; i++) { - s->ioredtbl[i] = kioapic->redirtbl[i].bits; - } -#endif -} - -static void kvm_kernel_ioapic_load_from_user(IOAPICCommonState *s) -{ -#if defined(KVM_CAP_IRQCHIP) && defined(TARGET_I386) - struct kvm_irqchip chip; - struct kvm_ioapic_state *kioapic; - int i; - - chip.chip_id = KVM_IRQCHIP_IOAPIC; - kioapic = &chip.chip.ioapic; - - kioapic->id = s->id; - kioapic->ioregsel = s->ioregsel; - kioapic->base_address = s->busdev.mmio[0].addr; - kioapic->irr = s->irr; - for (i = 0; i < IOAPIC_NUM_PINS; i++) { - kioapic->redirtbl[i].bits = s->ioredtbl[i]; - } - - kvm_set_irqchip(kvm_state, &chip); -#endif -} - -static void kvm_ioapic_pre_save(IOAPICCommonState *s) -{ - - if (kvm_enabled() && kvm_irqchip_in_kernel()) { - kvm_kernel_ioapic_save_to_user(s); - } -} - -static void kvm_ioapic_post_load(IOAPICCommonState *s) -{ - if (kvm_enabled() && kvm_irqchip_in_kernel()) { - kvm_kernel_ioapic_load_from_user(s); - } -} - -static void ioapic_reset(DeviceState *d) -{ - IOAPICCommonState *s = DO_UPCAST(IOAPICCommonState, busdev.qdev, d); - - ioapic_reset_common(d); -#ifdef KVM_CAP_IRQCHIP - if (kvm_enabled() && kvm_irqchip_in_kernel()) { - kvm_kernel_ioapic_load_from_user(s); - } -#endif -} - static const MemoryRegionOps ioapic_io_ops = { .read = ioapic_mem_read, .write = ioapic_mem_write, @@ -312,9 +241,7 @@ static void ioapic_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); k->init = ioapic_init; - k->pre_save = kvm_ioapic_pre_save; - k->post_load = kvm_ioapic_post_load; - dc->reset = ioapic_reset; + dc->reset = ioapic_reset_common; } static TypeInfo ioapic_info = { diff --git a/hw/pc_piix.c b/hw/pc_piix.c index ef0202a..58bec18 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -47,8 +47,6 @@ # include <xen/hvm/hvm_info_table.h> #endif -qemu_irq *ioapic_irq_hack; - #define MAX_IDE_BUS 2 static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 }; @@ -108,12 +106,9 @@ static void ioapic_init(GSIState *gsi_state) SysBusDevice *d; unsigned int i; -#ifdef UNUSED_UPSTREAM_KVM if (kvm_enabled() && kvm_irqchip_in_kernel()) { dev = qdev_create(NULL, "kvm-ioapic"); - } else -#endif - { + } else { dev = qdev_create(NULL, "ioapic"); } qdev_init_nofail(dev); -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html