summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/x86.h
diff options
context:
space:
mode:
authorZhang Xiantao <xiantao.zhang@intel.com>2007-12-14 02:54:20 +0100
committerAvi Kivity <avi@qumranet.com>2008-01-30 16:58:10 +0100
commitd69fb81f0554fb980e4b1d3db4e44351c2c4a4a2 (patch)
treec2b6f6081ceb31fba9c37401f0cc81afaa3b6d1f /drivers/kvm/x86.h
parentKVM: Portability: Move kvm_vcpu_stat to x86.h (diff)
downloadlinux-d69fb81f0554fb980e4b1d3db4e44351c2c4a4a2.tar.xz
linux-d69fb81f0554fb980e4b1d3db4e44351c2c4a4a2.zip
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 '')
-rw-r--r--drivers/kvm/x86.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h
index 4ca848536365..be84f2b89095 100644
--- a/drivers/kvm/x86.h
+++ b/drivers/kvm/x86.h
@@ -54,6 +54,8 @@
#define IOPL_SHIFT 12
+#define KVM_ALIAS_SLOTS 4
+
#define KVM_PERMILLE_MMU_PAGES 20
#define KVM_MIN_ALLOC_MMU_PAGES 64
#define KVM_NUM_MMU_PAGES 1024
@@ -255,6 +257,17 @@ struct kvm_vcpu_arch {
struct x86_emulate_ctxt emulate_ctxt;
};
+struct kvm_mem_alias {
+ gfn_t base_gfn;
+ unsigned long npages;
+ gfn_t target_gfn;
+};
+
+struct kvm_arch{
+ int naliases;
+ struct kvm_mem_alias aliases[KVM_ALIAS_SLOTS];
+};
+
struct kvm_vcpu_stat {
u32 pf_fixed;
u32 pf_guest;