[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1199630379-28638-8-git-send-email-avi@qumranet.com>
Date: Sun, 6 Jan 2008 16:39:13 +0200
From: Avi Kivity <avi@...ranet.com>
To: linux-kernel@...r.kernel.org, kvm-devel@...ts.sourceforge.net
Cc: Zhang Xiantao <xiantao.zhang@...el.com>
Subject: [PATCH 07/33] KVM: Portability: Expand the KVM_VCPU_COMM in kvm_vcpu structure.
From: Zhang Xiantao <xiantao.zhang@...el.com>
This patches removes KVM_COMM macro, original it is hold
kvm_vcpu common fields.
Signed-off-by: Zhang Xiantao <xiantao.zhang@...el.com>
Acked-by: Carsten Otte <cotte@...ibm.com>
Signed-off-by: Avi Kivity <avi@...ranet.com>
---
drivers/kvm/kvm.h | 53 ++++++++++++++++++++++-------------------------------
1 files changed, 22 insertions(+), 31 deletions(-)
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 53717be..039faa7 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -87,41 +87,32 @@ struct kvm_io_device *kvm_io_bus_find_dev(struct kvm_io_bus *bus, gpa_t addr);
void kvm_io_bus_register_dev(struct kvm_io_bus *bus,
struct kvm_io_device *dev);
+struct kvm_vcpu {
+ struct kvm *kvm;
+ struct preempt_notifier preempt_notifier;
+ int vcpu_id;
+ struct mutex mutex;
+ int cpu;
+ struct kvm_run *run;
+ int guest_mode;
+ unsigned long requests;
+ struct kvm_guest_debug guest_debug;
+ int fpu_active;
+ int guest_fpu_loaded;
+ wait_queue_head_t wq;
+ int sigset_active;
+ sigset_t sigset;
+ struct kvm_vcpu_stat stat;
+
#ifdef CONFIG_HAS_IOMEM
-#define KVM_VCPU_MMIO \
- int mmio_needed; \
- int mmio_read_completed; \
- int mmio_is_write; \
- int mmio_size; \
- unsigned char mmio_data[8]; \
+ int mmio_needed;
+ int mmio_read_completed;
+ int mmio_is_write;
+ int mmio_size;
+ unsigned char mmio_data[8];
gpa_t mmio_phys_addr;
-
-#else
-#define KVM_VCPU_MMIO
-
#endif
-#define KVM_VCPU_COMM \
- struct kvm *kvm; \
- struct preempt_notifier preempt_notifier; \
- int vcpu_id; \
- struct mutex mutex; \
- int cpu; \
- struct kvm_run *run; \
- int guest_mode; \
- unsigned long requests; \
- struct kvm_guest_debug guest_debug; \
- int fpu_active; \
- int guest_fpu_loaded; \
- wait_queue_head_t wq; \
- int sigset_active; \
- sigset_t sigset; \
- struct kvm_vcpu_stat stat; \
- KVM_VCPU_MMIO
-
-struct kvm_vcpu {
- KVM_VCPU_COMM;
-
struct kvm_vcpu_arch arch;
};
--
1.5.3.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists