aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/x86.c
diff options
context:
space:
mode:
authorZhang Xiantao <xiantao.zhang@intel.com>2007-12-13 21:17:34 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:58:10 -0500
commitd7deeeb02cf73fd98cb71a6a0a5dffab9ef79556 (patch)
treed1f1d1bf5ae822ddf1d91caf484366ebabf11217 /drivers/kvm/x86.c
parentf05e70ac03a6614af12194a014b338ec5594cb5c (diff)
KVM: Portability: move vpic and vioapic to kvm_arch
This patches moves two fields vpid and vioapic to kvm_arch Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Acked-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86.c')
-rw-r--r--drivers/kvm/x86.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c
index c0e95fb9f46c..b37c0093d728 100644
--- a/drivers/kvm/x86.c
+++ b/drivers/kvm/x86.c
@@ -1386,12 +1386,12 @@ long kvm_arch_vm_ioctl(struct file *filp,
1386 } 1386 }
1387 case KVM_CREATE_IRQCHIP: 1387 case KVM_CREATE_IRQCHIP:
1388 r = -ENOMEM; 1388 r = -ENOMEM;
1389 kvm->vpic = kvm_create_pic(kvm); 1389 kvm->arch.vpic = kvm_create_pic(kvm);
1390 if (kvm->vpic) { 1390 if (kvm->arch.vpic) {
1391 r = kvm_ioapic_init(kvm); 1391 r = kvm_ioapic_init(kvm);
1392 if (r) { 1392 if (r) {
1393 kfree(kvm->vpic); 1393 kfree(kvm->arch.vpic);
1394 kvm->vpic = NULL; 1394 kvm->arch.vpic = NULL;
1395 goto out; 1395 goto out;
1396 } 1396 }
1397 } else 1397 } else
@@ -1409,7 +1409,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
1409 kvm_pic_set_irq(pic_irqchip(kvm), 1409 kvm_pic_set_irq(pic_irqchip(kvm),
1410 irq_event.irq, 1410 irq_event.irq,
1411 irq_event.level); 1411 irq_event.level);
1412 kvm_ioapic_set_irq(kvm->vioapic, 1412 kvm_ioapic_set_irq(kvm->arch.vioapic,
1413 irq_event.irq, 1413 irq_event.irq,
1414 irq_event.level); 1414 irq_event.level);
1415 mutex_unlock(&kvm->lock); 1415 mutex_unlock(&kvm->lock);
@@ -3084,8 +3084,8 @@ static void kvm_free_vcpus(struct kvm *kvm)
3084 3084
3085void kvm_arch_destroy_vm(struct kvm *kvm) 3085void kvm_arch_destroy_vm(struct kvm *kvm)
3086{ 3086{
3087 kfree(kvm->vpic); 3087 kfree(kvm->arch.vpic);
3088 kfree(kvm->vioapic); 3088 kfree(kvm->arch.vioapic);
3089 kvm_free_vcpus(kvm); 3089 kvm_free_vcpus(kvm);
3090 kvm_free_physmem(kvm); 3090 kvm_free_physmem(kvm);
3091 kfree(kvm); 3091 kfree(kvm);