diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2008-02-22 12:21:37 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-27 05:00:27 -0400 |
commit | 2f333bcb4edd8daef99dabe4e7df8277af73cff1 (patch) | |
tree | c984466e7756e0910bf470a094558b52bd10df33 /include/linux | |
parent | 9f81128591ca1e9907f2e7a7b195e33232167d60 (diff) |
KVM: MMU: hypercall based pte updates and TLB flushes
Hypercall based pte updates are faster than faults, and also allow use
of the lazy MMU mode to batch operations.
Don't report the feature if two dimensional paging is enabled.
[avi:
- one mmu_op hypercall instead of one per op
- allow 64-bit gpa on hypercall
- don't pass host errors (-ENOMEM) to guest]
[akpm: warning fix on i386]
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/kvm.h | 1 | ||||
-rw-r--r-- | include/linux/kvm_para.h | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 76f09474be98..c1b502a50a01 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -238,6 +238,7 @@ struct kvm_vapic_addr { | |||
238 | #define KVM_CAP_NR_MEMSLOTS 10 /* returns max memory slots per vm */ | 238 | #define KVM_CAP_NR_MEMSLOTS 10 /* returns max memory slots per vm */ |
239 | #define KVM_CAP_PIT 11 | 239 | #define KVM_CAP_PIT 11 |
240 | #define KVM_CAP_NOP_IO_DELAY 12 | 240 | #define KVM_CAP_NOP_IO_DELAY 12 |
241 | #define KVM_CAP_PV_MMU 13 | ||
241 | 242 | ||
242 | /* | 243 | /* |
243 | * ioctls for VM fds | 244 | * ioctls for VM fds |
diff --git a/include/linux/kvm_para.h b/include/linux/kvm_para.h index 9c462c91a6b1..3ddce03766ca 100644 --- a/include/linux/kvm_para.h +++ b/include/linux/kvm_para.h | |||
@@ -11,8 +11,11 @@ | |||
11 | 11 | ||
12 | /* Return values for hypercalls */ | 12 | /* Return values for hypercalls */ |
13 | #define KVM_ENOSYS 1000 | 13 | #define KVM_ENOSYS 1000 |
14 | #define KVM_EFAULT EFAULT | ||
15 | #define KVM_E2BIG E2BIG | ||
14 | 16 | ||
15 | #define KVM_HC_VAPIC_POLL_IRQ 1 | 17 | #define KVM_HC_VAPIC_POLL_IRQ 1 |
18 | #define KVM_HC_MMU_OP 2 | ||
16 | 19 | ||
17 | /* | 20 | /* |
18 | * hypercalls use architecture specific | 21 | * hypercalls use architecture specific |