|
@@ -32,6 +32,7 @@
|
|
#include <asm/mtrr.h>
|
|
#include <asm/mtrr.h>
|
|
#include <asm/msr-index.h>
|
|
#include <asm/msr-index.h>
|
|
#include <asm/asm.h>
|
|
#include <asm/asm.h>
|
|
|
|
+#include <asm/kvm_page_track.h>
|
|
|
|
|
|
#define KVM_MAX_VCPUS 255
|
|
#define KVM_MAX_VCPUS 255
|
|
#define KVM_SOFT_MAX_VCPUS 160
|
|
#define KVM_SOFT_MAX_VCPUS 160
|
|
@@ -214,6 +215,14 @@ struct kvm_mmu_memory_cache {
|
|
void *objects[KVM_NR_MEM_OBJS];
|
|
void *objects[KVM_NR_MEM_OBJS];
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * the pages used as guest page table on soft mmu are tracked by
|
|
|
|
+ * kvm_memory_slot.arch.gfn_track which is 16 bits, so the role bits used
|
|
|
|
+ * by indirect shadow page can not be more than 15 bits.
|
|
|
|
+ *
|
|
|
|
+ * Currently, we used 14 bits that are @level, @cr4_pae, @quadrant, @access,
|
|
|
|
+ * @nxe, @cr0_wp, @smep_andnot_wp and @smap_andnot_wp.
|
|
|
|
+ */
|
|
union kvm_mmu_page_role {
|
|
union kvm_mmu_page_role {
|
|
unsigned word;
|
|
unsigned word;
|
|
struct {
|
|
struct {
|
|
@@ -650,6 +659,7 @@ struct kvm_lpage_info {
|
|
struct kvm_arch_memory_slot {
|
|
struct kvm_arch_memory_slot {
|
|
struct kvm_rmap_head *rmap[KVM_NR_PAGE_SIZES];
|
|
struct kvm_rmap_head *rmap[KVM_NR_PAGE_SIZES];
|
|
struct kvm_lpage_info *lpage_info[KVM_NR_PAGE_SIZES - 1];
|
|
struct kvm_lpage_info *lpage_info[KVM_NR_PAGE_SIZES - 1];
|
|
|
|
+ unsigned short *gfn_track[KVM_PAGE_TRACK_MAX];
|
|
};
|
|
};
|
|
|
|
|
|
/*
|
|
/*
|