summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-03-30 16:54:30 +0300
committerAvi Kivity <avi@qumranet.com>2007-05-03 10:52:28 +0300
commite8207547d2f7b2f557bdb73015c1f74c32474438 (patch)
tree7e5c15bec5cf9ef45a81227b009e6449f5c6d47c /include
parent954bbbc236afe23b368abdf4942f313a5f6e1d50 (diff)
downloadop-kernel-dev-e8207547d2f7b2f557bdb73015c1f74c32474438.zip
op-kernel-dev-e8207547d2f7b2f557bdb73015c1f74c32474438.tar.gz
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 'include')
-rw-r--r--include/linux/kvm.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 728b24c..da9b23f 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -11,7 +11,7 @@
#include <asm/types.h>
#include <linux/ioctl.h>
-#define KVM_API_VERSION 9
+#define KVM_API_VERSION 10
/*
* Architectural interrupt line count, and the size of the bitmap needed
@@ -33,6 +33,13 @@ struct kvm_memory_region {
/* for kvm_memory_region::flags */
#define KVM_MEM_LOG_DIRTY_PAGES 1UL
+struct kvm_memory_alias {
+ __u32 slot; /* this has a different namespace than memory slots */
+ __u32 flags;
+ __u64 guest_phys_addr;
+ __u64 memory_size;
+ __u64 target_phys_addr;
+};
enum kvm_exit_reason {
KVM_EXIT_UNKNOWN = 0,
@@ -261,6 +268,7 @@ struct kvm_signal_mask {
*/
#define KVM_CREATE_VCPU _IO(KVMIO, 0x41)
#define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log)
+#define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias)
/*
* ioctls for vcpu fds
OpenPOWER on IntegriCloud