Signed-off-by: Sheng Yang <sheng@xxxxxxxxxxxxxxx> --- kvm/include/linux/kvm.h | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h index e46729e..3925fab 100644 --- a/kvm/include/linux/kvm.h +++ b/kvm/include/linux/kvm.h @@ -530,6 +530,9 @@ struct kvm_enable_cap { #ifdef __KVM_HAVE_XCRS #define KVM_CAP_XCRS 56 #endif +#ifdef __KVM_HAVE_MSIX +#define KVM_CAP_MSIX_MASK 59 +#endif #ifdef KVM_CAP_IRQ_ROUTING @@ -660,6 +663,9 @@ struct kvm_clock_data { #define KVM_XEN_HVM_CONFIG _IOW(KVMIO, 0x7a, struct kvm_xen_hvm_config) #define KVM_SET_CLOCK _IOW(KVMIO, 0x7b, struct kvm_clock_data) #define KVM_GET_CLOCK _IOR(KVMIO, 0x7c, struct kvm_clock_data) +/* Available with KVM_CAP_MSIX_MASK */ +#define KVM_GET_MSIX_ENTRY _IOWR(KVMIO, 0x7d, struct kvm_msix_entry) +#define KVM_UPDATE_MSIX_MMIO _IOW(KVMIO, 0x7e, struct kvm_msix_mmio) /* Available with KVM_CAP_PIT_STATE2 */ #define KVM_GET_PIT2 _IOR(KVMIO, 0x9f, struct kvm_pit_state2) #define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2) @@ -781,4 +787,30 @@ struct kvm_assigned_msix_entry { __u16 padding[3]; }; +#define KVM_MSIX_TYPE_ASSIGNED_DEV 1 + +#define KVM_MSIX_FLAG_MASKBIT (1 << 0) +#define KVM_MSIX_FLAG_QUERY_MASKBIT (1 << 0) + +struct kvm_msix_entry { + __u32 id; + __u32 type; + __u32 entry; /* The index of entry in the MSI-X table */ + __u32 flags; + __u32 query_flags; + __u32 reserved[5]; +}; + +#define KVM_MSIX_MMIO_FLAG_REGISTER (1 << 0) +#define KVM_MSIX_MMIO_FLAG_UNREGISTER (1 << 1) + +struct kvm_msix_mmio { + __u32 id; + __u32 type; + __u64 base_addr; + __u32 max_entries_nr; + __u32 flags; + __u32 reserved[6]; +}; + #endif /* __LINUX_KVM_H */ -- 1.7.0.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html