void kvm_ioapic_update_eoi(struct kvm *kvm, int vector)
{
- struct kvm_ioapic *ioapic = kvm->vioapic;
+ struct kvm_ioapic *ioapic = kvm->arch.vioapic;
union ioapic_redir_entry *ent;
int gsi;
ioapic = kzalloc(sizeof(struct kvm_ioapic), GFP_KERNEL);
if (!ioapic)
return -ENOMEM;
- kvm->vioapic = ioapic;
+ kvm->arch.vioapic = ioapic;
kvm_ioapic_reset(ioapic);
ioapic->dev.read = ioapic_mmio_read;
ioapic->dev.write = ioapic_mmio_write;
static inline struct kvm_pic *pic_irqchip(struct kvm *kvm)
{
- return kvm->vpic;
+ return kvm->arch.vpic;
}
static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm)
{
- return kvm->vioapic;
+ return kvm->arch.vioapic;
}
static inline int irqchip_in_kernel(struct kvm *kvm)
struct file *filp;
struct kvm_io_bus mmio_bus;
struct kvm_io_bus pio_bus;
- struct kvm_pic *vpic;
- struct kvm_ioapic *vioapic;
int round_robin_prev_vcpu;
unsigned int tss_addr;
struct page *apic_access_page;
}
case KVM_CREATE_IRQCHIP:
r = -ENOMEM;
- kvm->vpic = kvm_create_pic(kvm);
- if (kvm->vpic) {
+ kvm->arch.vpic = kvm_create_pic(kvm);
+ if (kvm->arch.vpic) {
r = kvm_ioapic_init(kvm);
if (r) {
- kfree(kvm->vpic);
- kvm->vpic = NULL;
+ kfree(kvm->arch.vpic);
+ kvm->arch.vpic = NULL;
goto out;
}
} else
kvm_pic_set_irq(pic_irqchip(kvm),
irq_event.irq,
irq_event.level);
- kvm_ioapic_set_irq(kvm->vioapic,
+ kvm_ioapic_set_irq(kvm->arch.vioapic,
irq_event.irq,
irq_event.level);
mutex_unlock(&kvm->lock);
void kvm_arch_destroy_vm(struct kvm *kvm)
{
- kfree(kvm->vpic);
- kfree(kvm->vioapic);
+ kfree(kvm->arch.vpic);
+ kfree(kvm->arch.vioapic);
kvm_free_vcpus(kvm);
kvm_free_physmem(kvm);
kfree(kvm);
* Hash table of struct kvm_mmu_page.
*/
struct list_head active_mmu_pages;
+ struct kvm_pic *vpic;
+ struct kvm_ioapic *vioapic;
};
struct kvm_vcpu_stat {