diff options
author | Avi Kivity <avi@qumranet.com> | 2007-03-20 06:46:50 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-05-03 03:52:25 -0400 |
commit | 039576c03c35e2f990ad9bb9c39e1bad3cd60d34 (patch) | |
tree | fa6c81a40a36d2c0da1cf20c5deb45cb9bd7ba95 /include | |
parent | f0fe510864a4520a85dfa35ae14f5f376c56efc7 (diff) |
KVM: Avoid guest virtual addresses in string pio userspace interface
The current string pio interface communicates using guest virtual addresses,
relying on userspace to translate addresses and to check permissions. This
interface cannot fully support guest smp, as the check needs to take into
account two pages at one in case an unaligned string transfer straddles a
page boundary.
Change the interface not to communicate guest addresses at all; instead use
a buffer page (mmaped by userspace) and do transfers there. The kernel
manages the virtual to physical translation and can perform the checks
atomically by taking the appropriate locks.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kvm.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index dad90816cad8..728b24cf5d77 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -86,16 +86,9 @@ struct kvm_run { | |||
86 | #define KVM_EXIT_IO_OUT 1 | 86 | #define KVM_EXIT_IO_OUT 1 |
87 | __u8 direction; | 87 | __u8 direction; |
88 | __u8 size; /* bytes */ | 88 | __u8 size; /* bytes */ |
89 | __u8 string; | ||
90 | __u8 string_down; | ||
91 | __u8 rep; | ||
92 | __u8 pad; | ||
93 | __u16 port; | 89 | __u16 port; |
94 | __u64 count; | 90 | __u32 count; |
95 | union { | 91 | __u64 data_offset; /* relative to kvm_run start */ |
96 | __u64 address; | ||
97 | __u32 value; | ||
98 | }; | ||
99 | } io; | 92 | } io; |
100 | struct { | 93 | struct { |
101 | } debug; | 94 | } debug; |