aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r--include/linux/kvm.h49
1 files changed, 47 insertions, 2 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index a24de0b1858e..636fc381c897 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -103,7 +103,7 @@ struct kvm_userspace_memory_region {
103 103
104/* for kvm_memory_region::flags */ 104/* for kvm_memory_region::flags */
105#define KVM_MEM_LOG_DIRTY_PAGES 1UL 105#define KVM_MEM_LOG_DIRTY_PAGES 1UL
106 106#define KVM_MEMSLOT_INVALID (1UL << 1)
107 107
108/* for KVM_IRQ_LINE */ 108/* for KVM_IRQ_LINE */
109struct kvm_irq_level { 109struct kvm_irq_level {
@@ -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 */
409struct 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/*
@@ -497,6 +511,25 @@ struct kvm_ioeventfd {
497#endif 511#endif
498#define KVM_CAP_S390_PSW 42 512#define KVM_CAP_S390_PSW 42
499#define KVM_CAP_PPC_SEGSTATE 43 513#define KVM_CAP_PPC_SEGSTATE 43
514#define KVM_CAP_HYPERV 44
515#define KVM_CAP_HYPERV_VAPIC 45
516#define KVM_CAP_HYPERV_SPIN 46
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
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
500 533
501#ifdef KVM_CAP_IRQ_ROUTING 534#ifdef KVM_CAP_IRQ_ROUTING
502 535
@@ -586,6 +619,7 @@ struct kvm_clock_data {
586 */ 619 */
587#define KVM_CREATE_VCPU _IO(KVMIO, 0x41) 620#define KVM_CREATE_VCPU _IO(KVMIO, 0x41)
588#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: */
589#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)
590#define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) 624#define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44)
591#define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) 625#define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45)
@@ -683,6 +717,16 @@ struct kvm_clock_data {
683/* Available with KVM_CAP_VCPU_EVENTS */ 717/* Available with KVM_CAP_VCPU_EVENTS */
684#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)
685#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)
686 730
687#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) 731#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
688 732
@@ -691,8 +735,9 @@ struct kvm_assigned_pci_dev {
691 __u32 busnr; 735 __u32 busnr;
692 __u32 devfn; 736 __u32 devfn;
693 __u32 flags; 737 __u32 flags;
738 __u32 segnr;
694 union { 739 union {
695 __u32 reserved[12]; 740 __u32 reserved[11];
696 }; 741 };
697}; 742};
698 743