Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d7deeeb02cf73fd98cb71a6a0a5dffab9ef79556
Commit:     d7deeeb02cf73fd98cb71a6a0a5dffab9ef79556
Parent:     f05e70ac03a6614af12194a014b338ec5594cb5c
Author:     Zhang Xiantao <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 14 10:17:34 2007 +0800
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 17:58:10 2008 +0200

    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 <[EMAIL PROTECTED]>
    Acked-by: Carsten Otte <[EMAIL PROTECTED]>
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/ioapic.c |    4 ++--
 drivers/kvm/irq.h    |    4 ++--
 drivers/kvm/kvm.h    |    2 --
 drivers/kvm/x86.c    |   14 +++++++-------
 drivers/kvm/x86.h    |    2 ++
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/kvm/ioapic.c b/drivers/kvm/ioapic.c
index 0491036..f823677 100644
--- a/drivers/kvm/ioapic.c
+++ b/drivers/kvm/ioapic.c
@@ -271,7 +271,7 @@ static int get_eoi_gsi(struct kvm_ioapic *ioapic, int 
vector)
 
 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;
 
@@ -390,7 +390,7 @@ int kvm_ioapic_init(struct kvm *kvm)
        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;
diff --git a/drivers/kvm/irq.h b/drivers/kvm/irq.h
index a688c51..6e023dc 100644
--- a/drivers/kvm/irq.h
+++ b/drivers/kvm/irq.h
@@ -148,12 +148,12 @@ do {                                                      
                \
 
 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)
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 65de5e4..d9ce916 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -124,8 +124,6 @@ struct 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;
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c
index c0e95fb..b37c009 100644
--- a/drivers/kvm/x86.c
+++ b/drivers/kvm/x86.c
@@ -1386,12 +1386,12 @@ long kvm_arch_vm_ioctl(struct file *filp,
        }
        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
@@ -1409,7 +1409,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
                                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);
@@ -3084,8 +3084,8 @@ static void kvm_free_vcpus(struct kvm *kvm)
 
 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);
diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h
index 5cdc366..ef23a30 100644
--- a/drivers/kvm/x86.h
+++ b/drivers/kvm/x86.h
@@ -275,6 +275,8 @@ struct kvm_arch{
         * 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 {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to