mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
KVM: Portability: Expand the KVM_VCPU_COMM in kvm_vcpu structure.
This patches removes KVM_COMM macro, original it is hold kvm_vcpu common fields. 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>
This commit is contained in:
parent
d657a98e3c
commit
d17fbbf738
1 changed files with 24 additions and 33 deletions
|
@ -87,40 +87,31 @@ 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);
|
||||
|
||||
#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]; \
|
||||
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 *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
|
||||
int mmio_needed;
|
||||
int mmio_read_completed;
|
||||
int mmio_is_write;
|
||||
int mmio_size;
|
||||
unsigned char mmio_data[8];
|
||||
gpa_t mmio_phys_addr;
|
||||
#endif
|
||||
|
||||
struct kvm_vcpu_arch arch;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue