diff options
author | Avi Kivity <avi@qumranet.com> | 2007-02-22 12:39:30 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-05-03 03:52:23 -0400 |
commit | 46fc1477887c41c8e900f2c95485e222b9a54822 (patch) | |
tree | ef9d4d4b6fc32f3d6b4e77a87d1b47b6da455574 /include | |
parent | 9a2bb7f486dc639a1cf2ad803bf2227f0dc0809d (diff) |
KVM: Do not communicate to userspace through cpu registers during PIO
Currently when passing the a PIO emulation request to userspace, we
rely on userspace updating %rax (on 'in' instructions) and %rsi/%rdi/%rcx
(on string instructions). This (a) requires two extra ioctls for getting
and setting the registers and (b) is unfriendly to non-x86 archs, when
they get kvm ports.
So fix by doing the register fixups in the kernel and passing to userspace
only an abstract description of the PIO to be done.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kvm.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index d88e7508ee0a..19aeb3385188 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 5 | 14 | #define KVM_API_VERSION 6 |
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 |
@@ -53,7 +53,7 @@ enum kvm_exit_reason { | |||
53 | struct kvm_run { | 53 | struct kvm_run { |
54 | /* in */ | 54 | /* in */ |
55 | __u32 emulated; /* skip current instruction */ | 55 | __u32 emulated; /* skip current instruction */ |
56 | __u32 mmio_completed; /* mmio request completed */ | 56 | __u32 io_completed; /* mmio/pio request completed */ |
57 | __u8 request_interrupt_window; | 57 | __u8 request_interrupt_window; |
58 | __u8 padding1[7]; | 58 | __u8 padding1[7]; |
59 | 59 | ||
@@ -80,7 +80,7 @@ struct kvm_run { | |||
80 | __u32 error_code; | 80 | __u32 error_code; |
81 | } ex; | 81 | } ex; |
82 | /* KVM_EXIT_IO */ | 82 | /* KVM_EXIT_IO */ |
83 | struct { | 83 | struct kvm_io { |
84 | #define KVM_EXIT_IO_IN 0 | 84 | #define KVM_EXIT_IO_IN 0 |
85 | #define KVM_EXIT_IO_OUT 1 | 85 | #define KVM_EXIT_IO_OUT 1 |
86 | __u8 direction; | 86 | __u8 direction; |