aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorZhang Xiantao <xiantao.zhang@intel.com>2007-12-13 20:54:20 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:58:10 -0500
commitd69fb81f0554fb980e4b1d3db4e44351c2c4a4a2 (patch)
treec2b6f6081ceb31fba9c37401f0cc81afaa3b6d1f /drivers/kvm/kvm.h
parent77b4c255af34e73ea1efd1c3384bbe91361c81e6 (diff)
KVM: Portability: Move memslot aliases to new struct kvm_arch
This patches create kvm_arch to hold arch-specific kvm fileds and moves fields naliases and aliases 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/kvm.h')
-rw-r--r--drivers/kvm/kvm.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 9ea7149e741d..bf5b85c1f094 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -25,7 +25,6 @@
25#include "x86.h" 25#include "x86.h"
26 26
27#define KVM_MAX_VCPUS 4 27#define KVM_MAX_VCPUS 4
28#define KVM_ALIAS_SLOTS 4
29#define KVM_MEMORY_SLOTS 8 28#define KVM_MEMORY_SLOTS 8
30/* memory slots that does not exposed to userspace */ 29/* memory slots that does not exposed to userspace */
31#define KVM_PRIVATE_MEM_SLOTS 4 30#define KVM_PRIVATE_MEM_SLOTS 4
@@ -94,12 +93,6 @@ struct kvm_vcpu {
94 struct kvm_vcpu_arch arch; 93 struct kvm_vcpu_arch arch;
95}; 94};
96 95
97struct kvm_mem_alias {
98 gfn_t base_gfn;
99 unsigned long npages;
100 gfn_t target_gfn;
101};
102
103struct kvm_memory_slot { 96struct kvm_memory_slot {
104 gfn_t base_gfn; 97 gfn_t base_gfn;
105 unsigned long npages; 98 unsigned long npages;
@@ -123,8 +116,6 @@ struct kvm_vm_stat {
123struct kvm { 116struct kvm {
124 struct mutex lock; /* protects everything except vcpus */ 117 struct mutex lock; /* protects everything except vcpus */
125 struct mm_struct *mm; /* userspace tied to this vm */ 118 struct mm_struct *mm; /* userspace tied to this vm */
126 int naliases;
127 struct kvm_mem_alias aliases[KVM_ALIAS_SLOTS];
128 int nmemslots; 119 int nmemslots;
129 struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS + 120 struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS +
130 KVM_PRIVATE_MEM_SLOTS]; 121 KVM_PRIVATE_MEM_SLOTS];
@@ -147,6 +138,7 @@ struct kvm {
147 unsigned int tss_addr; 138 unsigned int tss_addr;
148 struct page *apic_access_page; 139 struct page *apic_access_page;
149 struct kvm_vm_stat stat; 140 struct kvm_vm_stat stat;
141 struct kvm_arch arch;
150}; 142};
151 143
152/* The guest did something we don't support. */ 144/* The guest did something we don't support. */