diff options
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r-- | include/linux/kvm.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 60df9c84ecae..636fc381c897 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -160,6 +160,7 @@ struct kvm_pit_config { | |||
160 | #define KVM_EXIT_DCR 15 | 160 | #define KVM_EXIT_DCR 15 |
161 | #define KVM_EXIT_NMI 16 | 161 | #define KVM_EXIT_NMI 16 |
162 | #define KVM_EXIT_INTERNAL_ERROR 17 | 162 | #define KVM_EXIT_INTERNAL_ERROR 17 |
163 | #define KVM_EXIT_OSI 18 | ||
163 | 164 | ||
164 | /* For KVM_EXIT_INTERNAL_ERROR */ | 165 | /* For KVM_EXIT_INTERNAL_ERROR */ |
165 | #define KVM_INTERNAL_ERROR_EMULATION 1 | 166 | #define KVM_INTERNAL_ERROR_EMULATION 1 |
@@ -259,6 +260,10 @@ struct kvm_run { | |||
259 | __u32 ndata; | 260 | __u32 ndata; |
260 | __u64 data[16]; | 261 | __u64 data[16]; |
261 | } internal; | 262 | } internal; |
263 | /* KVM_EXIT_OSI */ | ||
264 | struct { | ||
265 | __u64 gprs[32]; | ||
266 | } osi; | ||
262 | /* Fix the size of the union. */ | 267 | /* Fix the size of the union. */ |
263 | char padding[256]; | 268 | char padding[256]; |
264 | }; | 269 | }; |
@@ -400,6 +405,15 @@ struct kvm_ioeventfd { | |||
400 | __u8 pad[36]; | 405 | __u8 pad[36]; |
401 | }; | 406 | }; |
402 | 407 | ||
408 | /* for KVM_ENABLE_CAP */ | ||
409 | struct kvm_enable_cap { | ||
410 | /* in */ | ||
411 | __u32 cap; | ||
412 | __u32 flags; | ||
413 | __u64 args[4]; | ||
414 | __u8 pad[64]; | ||
415 | }; | ||
416 | |||
403 | #define KVMIO 0xAE | 417 | #define KVMIO 0xAE |
404 | 418 | ||
405 | /* | 419 | /* |
@@ -501,7 +515,21 @@ struct kvm_ioeventfd { | |||
501 | #define KVM_CAP_HYPERV_VAPIC 45 | 515 | #define KVM_CAP_HYPERV_VAPIC 45 |
502 | #define KVM_CAP_HYPERV_SPIN 46 | 516 | #define KVM_CAP_HYPERV_SPIN 46 |
503 | #define KVM_CAP_PCI_SEGMENT 47 | 517 | #define KVM_CAP_PCI_SEGMENT 47 |
518 | #define KVM_CAP_PPC_PAIRED_SINGLES 48 | ||
519 | #define KVM_CAP_INTR_SHADOW 49 | ||
520 | #ifdef __KVM_HAVE_DEBUGREGS | ||
521 | #define KVM_CAP_DEBUGREGS 50 | ||
522 | #endif | ||
504 | #define KVM_CAP_X86_ROBUST_SINGLESTEP 51 | 523 | #define KVM_CAP_X86_ROBUST_SINGLESTEP 51 |
524 | #define KVM_CAP_PPC_OSI 52 | ||
525 | #define KVM_CAP_PPC_UNSET_IRQ 53 | ||
526 | #define KVM_CAP_ENABLE_CAP 54 | ||
527 | #ifdef __KVM_HAVE_XSAVE | ||
528 | #define KVM_CAP_XSAVE 55 | ||
529 | #endif | ||
530 | #ifdef __KVM_HAVE_XCRS | ||
531 | #define KVM_CAP_XCRS 56 | ||
532 | #endif | ||
505 | 533 | ||
506 | #ifdef KVM_CAP_IRQ_ROUTING | 534 | #ifdef KVM_CAP_IRQ_ROUTING |
507 | 535 | ||
@@ -591,6 +619,7 @@ struct kvm_clock_data { | |||
591 | */ | 619 | */ |
592 | #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) | 620 | #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) |
593 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) | 621 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) |
622 | /* KVM_SET_MEMORY_ALIAS is obsolete: */ | ||
594 | #define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) | 623 | #define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) |
595 | #define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) | 624 | #define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) |
596 | #define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) | 625 | #define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) |
@@ -688,6 +717,16 @@ struct kvm_clock_data { | |||
688 | /* Available with KVM_CAP_VCPU_EVENTS */ | 717 | /* Available with KVM_CAP_VCPU_EVENTS */ |
689 | #define KVM_GET_VCPU_EVENTS _IOR(KVMIO, 0x9f, struct kvm_vcpu_events) | 718 | #define KVM_GET_VCPU_EVENTS _IOR(KVMIO, 0x9f, struct kvm_vcpu_events) |
690 | #define KVM_SET_VCPU_EVENTS _IOW(KVMIO, 0xa0, struct kvm_vcpu_events) | 719 | #define KVM_SET_VCPU_EVENTS _IOW(KVMIO, 0xa0, struct kvm_vcpu_events) |
720 | /* Available with KVM_CAP_DEBUGREGS */ | ||
721 | #define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs) | ||
722 | #define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs) | ||
723 | #define KVM_ENABLE_CAP _IOW(KVMIO, 0xa3, struct kvm_enable_cap) | ||
724 | /* Available with KVM_CAP_XSAVE */ | ||
725 | #define KVM_GET_XSAVE _IOR(KVMIO, 0xa4, struct kvm_xsave) | ||
726 | #define KVM_SET_XSAVE _IOW(KVMIO, 0xa5, struct kvm_xsave) | ||
727 | /* Available with KVM_CAP_XCRS */ | ||
728 | #define KVM_GET_XCRS _IOR(KVMIO, 0xa6, struct kvm_xcrs) | ||
729 | #define KVM_SET_XCRS _IOW(KVMIO, 0xa7, struct kvm_xcrs) | ||
691 | 730 | ||
692 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 731 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
693 | 732 | ||