diff options
author | Avi Kivity <avi@qumranet.com> | 2007-03-30 16:54:30 +0300 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-05-03 10:52:28 +0300 |
commit | e8207547d2f7b2f557bdb73015c1f74c32474438 (patch) | |
tree | 7e5c15bec5cf9ef45a81227b009e6449f5c6d47c /drivers/kvm/kvm.h | |
parent | 954bbbc236afe23b368abdf4942f313a5f6e1d50 (diff) | |
download | kernel-crypto-e8207547d2f7b2f557bdb73015c1f74c32474438.tar.gz kernel-crypto-e8207547d2f7b2f557bdb73015c1f74c32474438.tar.xz kernel-crypto-e8207547d2f7b2f557bdb73015c1f74c32474438.zip |
KVM: Add physical memory aliasing feature
With this, we can specify that accesses to one physical memory range will
be remapped to another. This is useful for the vga window at 0xa0000 which
is used as a movable window into the (much larger) framebuffer.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r-- | drivers/kvm/kvm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index d19985a5508..fceeb840a25 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h @@ -51,6 +51,7 @@ #define UNMAPPED_GVA (~(gpa_t)0) #define KVM_MAX_VCPUS 1 +#define KVM_ALIAS_SLOTS 4 #define KVM_MEMORY_SLOTS 4 #define KVM_NUM_MMU_PAGES 256 #define KVM_MIN_FREE_MMU_PAGES 5 @@ -312,6 +313,12 @@ struct kvm_vcpu { struct kvm_cpuid_entry cpuid_entries[KVM_MAX_CPUID_ENTRIES]; }; +struct kvm_mem_alias { + gfn_t base_gfn; + unsigned long npages; + gfn_t target_gfn; +}; + struct kvm_memory_slot { gfn_t base_gfn; unsigned long npages; @@ -322,6 +329,8 @@ struct kvm_memory_slot { struct kvm { spinlock_t lock; /* protects everything except vcpus */ + int naliases; + struct kvm_mem_alias aliases[KVM_ALIAS_SLOTS]; int nmemslots; struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS]; /* |