aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r--drivers/kvm/kvm.h53
1 files changed, 22 insertions, 31 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 53717be80bbe..039faa766c57 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);
87void kvm_io_bus_register_dev(struct kvm_io_bus *bus, 87void kvm_io_bus_register_dev(struct kvm_io_bus *bus,
88 struct kvm_io_device *dev); 88 struct kvm_io_device *dev);
89 89
90struct kvm_vcpu {
91 struct kvm *kvm;
92 struct preempt_notifier preempt_notifier;
93 int vcpu_id;
94 struct mutex mutex;
95 int cpu;
96 struct kvm_run *run;
97 int guest_mode;
98 unsigned long requests;
99 struct kvm_guest_debug guest_debug;
100 int fpu_active;
101 int guest_fpu_loaded;
102 wait_queue_head_t wq;
103 int sigset_active;
104 sigset_t sigset;
105 struct kvm_vcpu_stat stat;
106
90#ifdef CONFIG_HAS_IOMEM 107#ifdef CONFIG_HAS_IOMEM
91#define KVM_VCPU_MMIO \ 108 int mmio_needed;
92 int mmio_needed; \ 109 int mmio_read_completed;
93 int mmio_read_completed; \ 110 int mmio_is_write;
94 int mmio_is_write; \ 111 int mmio_size;
95 int mmio_size; \ 112 unsigned char mmio_data[8];
96 unsigned char mmio_data[8]; \
97 gpa_t mmio_phys_addr; 113 gpa_t mmio_phys_addr;
98
99#else
100#define KVM_VCPU_MMIO
101
102#endif 114#endif
103 115
104#define KVM_VCPU_COMM \
105 struct kvm *kvm; \
106 struct preempt_notifier preempt_notifier; \
107 int vcpu_id; \
108 struct mutex mutex; \
109 int cpu; \
110 struct kvm_run *run; \
111 int guest_mode; \
112 unsigned long requests; \
113 struct kvm_guest_debug guest_debug; \
114 int fpu_active; \
115 int guest_fpu_loaded; \
116 wait_queue_head_t wq; \
117 int sigset_active; \
118 sigset_t sigset; \
119 struct kvm_vcpu_stat stat; \
120 KVM_VCPU_MMIO
121
122struct kvm_vcpu {
123 KVM_VCPU_COMM;
124
125 struct kvm_vcpu_arch arch; 116 struct kvm_vcpu_arch arch;
126}; 117};
127 118