diff options
author | Avi Kivity <avi@qumranet.com> | 2007-03-30 09:54:30 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-05-03 03:52:28 -0400 |
commit | e8207547d2f7b2f557bdb73015c1f74c32474438 (patch) | |
tree | 7e5c15bec5cf9ef45a81227b009e6449f5c6d47c /include | |
parent | 954bbbc236afe23b368abdf4942f313a5f6e1d50 (diff) |
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.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 728b24cf5d77..da9b23fa4b6c 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/types.h> | 11 | #include <asm/types.h> |
12 | #include <linux/ioctl.h> | 12 | #include <linux/ioctl.h> |
13 | 13 | ||
14 | #define KVM_API_VERSION 9 | 14 | #define KVM_API_VERSION 10 |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Architectural interrupt line count, and the size of the bitmap needed | 17 | * Architectural interrupt line count, and the size of the bitmap needed |
@@ -33,6 +33,13 @@ struct kvm_memory_region { | |||
33 | /* for kvm_memory_region::flags */ | 33 | /* for kvm_memory_region::flags */ |
34 | #define KVM_MEM_LOG_DIRTY_PAGES 1UL | 34 | #define KVM_MEM_LOG_DIRTY_PAGES 1UL |
35 | 35 | ||
36 | struct kvm_memory_alias { | ||
37 | __u32 slot; /* this has a different namespace than memory slots */ | ||
38 | __u32 flags; | ||
39 | __u64 guest_phys_addr; | ||
40 | __u64 memory_size; | ||
41 | __u64 target_phys_addr; | ||
42 | }; | ||
36 | 43 | ||
37 | enum kvm_exit_reason { | 44 | enum kvm_exit_reason { |
38 | KVM_EXIT_UNKNOWN = 0, | 45 | KVM_EXIT_UNKNOWN = 0, |
@@ -261,6 +268,7 @@ struct kvm_signal_mask { | |||
261 | */ | 268 | */ |
262 | #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) | 269 | #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) |
263 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) | 270 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) |
271 | #define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) | ||
264 | 272 | ||
265 | /* | 273 | /* |
266 | * ioctls for vcpu fds | 274 | * ioctls for vcpu fds |