diff options
author | Alexander Graf <agraf@suse.de> | 2010-03-24 16:48:29 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 05:17:09 -0400 |
commit | 71fbfd5f38f73515f1516a68fbe04dba198b70f0 (patch) | |
tree | 653626126cef565890652f83f4eba7f376642709 /include/linux/kvm.h | |
parent | ca7f4203b9b66e12d0d9968ff7dfe781f3a9695a (diff) |
KVM: Add support for enabling capabilities per-vcpu
Some times we don't want all capabilities to be available to all
our vcpus. One example for that is the OSI interface, implemented
in the next patch.
In order to have a generic mechanism in how to enable capabilities
individually, this patch introduces a new ioctl that can be used
for this purpose. That way features we don't want in all guests or
userspace configurations can just not be enabled and we're good.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r-- | include/linux/kvm.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index c36d093e9806..ecb68e433558 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -400,6 +400,15 @@ struct kvm_ioeventfd { | |||
400 | __u8 pad[36]; | 400 | __u8 pad[36]; |
401 | }; | 401 | }; |
402 | 402 | ||
403 | /* for KVM_ENABLE_CAP */ | ||
404 | struct kvm_enable_cap { | ||
405 | /* in */ | ||
406 | __u32 cap; | ||
407 | __u32 flags; | ||
408 | __u64 args[4]; | ||
409 | __u8 pad[64]; | ||
410 | }; | ||
411 | |||
403 | #define KVMIO 0xAE | 412 | #define KVMIO 0xAE |
404 | 413 | ||
405 | /* | 414 | /* |
@@ -508,6 +517,7 @@ struct kvm_ioeventfd { | |||
508 | #endif | 517 | #endif |
509 | #define KVM_CAP_X86_ROBUST_SINGLESTEP 51 | 518 | #define KVM_CAP_X86_ROBUST_SINGLESTEP 51 |
510 | #define KVM_CAP_PPC_UNSET_IRQ 53 | 519 | #define KVM_CAP_PPC_UNSET_IRQ 53 |
520 | #define KVM_CAP_ENABLE_CAP 54 | ||
511 | 521 | ||
512 | #ifdef KVM_CAP_IRQ_ROUTING | 522 | #ifdef KVM_CAP_IRQ_ROUTING |
513 | 523 | ||
@@ -697,6 +707,7 @@ struct kvm_clock_data { | |||
697 | /* Available with KVM_CAP_DEBUGREGS */ | 707 | /* Available with KVM_CAP_DEBUGREGS */ |
698 | #define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs) | 708 | #define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs) |
699 | #define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs) | 709 | #define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs) |
710 | #define KVM_ENABLE_CAP _IOW(KVMIO, 0xa3, struct kvm_enable_cap) | ||
700 | 711 | ||
701 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 712 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
702 | 713 | ||