aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-05 17:47:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-05 17:47:31 -0400
commit01227a889ed56ae53aeebb9f93be9d54dd8b2de8 (patch)
treed5eba9359a9827e84d4112b84d48c54df5c5acde /include/uapi
parent9e6879460c8edb0cd3c24c09b83d06541b5af0dc (diff)
parentdb6ae6158186a17165ef990bda2895ae7594b039 (diff)
Merge tag 'kvm-3.10-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm updates from Gleb Natapov: "Highlights of the updates are: general: - new emulated device API - legacy device assignment is now optional - irqfd interface is more generic and can be shared between arches x86: - VMCS shadow support and other nested VMX improvements - APIC virtualization and Posted Interrupt hardware support - Optimize mmio spte zapping ppc: - BookE: in-kernel MPIC emulation with irqfd support - Book3S: in-kernel XICS emulation (incomplete) - Book3S: HV: migration fixes - BookE: more debug support preparation - BookE: e6500 support ARM: - reworking of Hyp idmaps s390: - ioeventfd for virtio-ccw And many other bug fixes, cleanups and improvements" * tag 'kvm-3.10-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (204 commits) kvm: Add compat_ioctl for device control API KVM: x86: Account for failing enable_irq_window for NMI window request KVM: PPC: Book3S: Add API for in-kernel XICS emulation kvm/ppc/mpic: fix missing unlock in set_base_addr() kvm/ppc: Hold srcu lock when calling kvm_io_bus_read/write kvm/ppc/mpic: remove users kvm/ppc/mpic: fix mmio region lists when multiple guests used kvm/ppc/mpic: remove default routes from documentation kvm: KVM_CAP_IOMMU only available with device assignment ARM: KVM: iterate over all CPUs for CPU compatibility check KVM: ARM: Fix spelling in error message ARM: KVM: define KVM_ARM_MAX_VCPUS unconditionally KVM: ARM: Fix API documentation for ONE_REG encoding ARM: KVM: promote vfp_host pointer to generic host cpu context ARM: KVM: add architecture specific hook for capabilities ARM: KVM: perform HYP initilization for hotplugged CPUs ARM: KVM: switch to a dual-step HYP init code ARM: KVM: rework HYP page table freeing ARM: KVM: enforce maximum size for identity mapped code ARM: KVM: move to a KVM provided HYP idmap ...
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/kvm.h45
1 files changed, 39 insertions, 6 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 3c56ba3d80c1..a5c86fc34a37 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -449,12 +449,15 @@ enum {
449 kvm_ioeventfd_flag_nr_datamatch, 449 kvm_ioeventfd_flag_nr_datamatch,
450 kvm_ioeventfd_flag_nr_pio, 450 kvm_ioeventfd_flag_nr_pio,
451 kvm_ioeventfd_flag_nr_deassign, 451 kvm_ioeventfd_flag_nr_deassign,
452 kvm_ioeventfd_flag_nr_virtio_ccw_notify,
452 kvm_ioeventfd_flag_nr_max, 453 kvm_ioeventfd_flag_nr_max,
453}; 454};
454 455
455#define KVM_IOEVENTFD_FLAG_DATAMATCH (1 << kvm_ioeventfd_flag_nr_datamatch) 456#define KVM_IOEVENTFD_FLAG_DATAMATCH (1 << kvm_ioeventfd_flag_nr_datamatch)
456#define KVM_IOEVENTFD_FLAG_PIO (1 << kvm_ioeventfd_flag_nr_pio) 457#define KVM_IOEVENTFD_FLAG_PIO (1 << kvm_ioeventfd_flag_nr_pio)
457#define KVM_IOEVENTFD_FLAG_DEASSIGN (1 << kvm_ioeventfd_flag_nr_deassign) 458#define KVM_IOEVENTFD_FLAG_DEASSIGN (1 << kvm_ioeventfd_flag_nr_deassign)
459#define KVM_IOEVENTFD_FLAG_VIRTIO_CCW_NOTIFY \
460 (1 << kvm_ioeventfd_flag_nr_virtio_ccw_notify)
458 461
459#define KVM_IOEVENTFD_VALID_FLAG_MASK ((1 << kvm_ioeventfd_flag_nr_max) - 1) 462#define KVM_IOEVENTFD_VALID_FLAG_MASK ((1 << kvm_ioeventfd_flag_nr_max) - 1)
460 463
@@ -558,9 +561,7 @@ struct kvm_ppc_smmu_info {
558#define KVM_CAP_MP_STATE 14 561#define KVM_CAP_MP_STATE 14
559#define KVM_CAP_COALESCED_MMIO 15 562#define KVM_CAP_COALESCED_MMIO 15
560#define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ 563#define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */
561#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
562#define KVM_CAP_DEVICE_ASSIGNMENT 17 564#define KVM_CAP_DEVICE_ASSIGNMENT 17
563#endif
564#define KVM_CAP_IOMMU 18 565#define KVM_CAP_IOMMU 18
565#ifdef __KVM_HAVE_MSI 566#ifdef __KVM_HAVE_MSI
566#define KVM_CAP_DEVICE_MSI 20 567#define KVM_CAP_DEVICE_MSI 20
@@ -576,13 +577,9 @@ struct kvm_ppc_smmu_info {
576#ifdef __KVM_HAVE_PIT 577#ifdef __KVM_HAVE_PIT
577#define KVM_CAP_REINJECT_CONTROL 24 578#define KVM_CAP_REINJECT_CONTROL 24
578#endif 579#endif
579#ifdef __KVM_HAVE_IOAPIC
580#define KVM_CAP_IRQ_ROUTING 25 580#define KVM_CAP_IRQ_ROUTING 25
581#endif
582#define KVM_CAP_IRQ_INJECT_STATUS 26 581#define KVM_CAP_IRQ_INJECT_STATUS 26
583#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
584#define KVM_CAP_DEVICE_DEASSIGNMENT 27 582#define KVM_CAP_DEVICE_DEASSIGNMENT 27
585#endif
586#ifdef __KVM_HAVE_MSIX 583#ifdef __KVM_HAVE_MSIX
587#define KVM_CAP_DEVICE_MSIX 28 584#define KVM_CAP_DEVICE_MSIX 28
588#endif 585#endif
@@ -665,6 +662,10 @@ struct kvm_ppc_smmu_info {
665#define KVM_CAP_PPC_EPR 86 662#define KVM_CAP_PPC_EPR 86
666#define KVM_CAP_ARM_PSCI 87 663#define KVM_CAP_ARM_PSCI 87
667#define KVM_CAP_ARM_SET_DEVICE_ADDR 88 664#define KVM_CAP_ARM_SET_DEVICE_ADDR 88
665#define KVM_CAP_DEVICE_CTRL 89
666#define KVM_CAP_IRQ_MPIC 90
667#define KVM_CAP_PPC_RTAS 91
668#define KVM_CAP_IRQ_XICS 92
668 669
669#ifdef KVM_CAP_IRQ_ROUTING 670#ifdef KVM_CAP_IRQ_ROUTING
670 671
@@ -818,6 +819,28 @@ struct kvm_arm_device_addr {
818}; 819};
819 820
820/* 821/*
822 * Device control API, available with KVM_CAP_DEVICE_CTRL
823 */
824#define KVM_CREATE_DEVICE_TEST 1
825
826struct kvm_create_device {
827 __u32 type; /* in: KVM_DEV_TYPE_xxx */
828 __u32 fd; /* out: device handle */
829 __u32 flags; /* in: KVM_CREATE_DEVICE_xxx */
830};
831
832struct kvm_device_attr {
833 __u32 flags; /* no flags currently defined */
834 __u32 group; /* device-defined */
835 __u64 attr; /* group-defined */
836 __u64 addr; /* userspace address of attr data */
837};
838
839#define KVM_DEV_TYPE_FSL_MPIC_20 1
840#define KVM_DEV_TYPE_FSL_MPIC_42 2
841#define KVM_DEV_TYPE_XICS 3
842
843/*
821 * ioctls for VM fds 844 * ioctls for VM fds
822 */ 845 */
823#define KVM_SET_MEMORY_REGION _IOW(KVMIO, 0x40, struct kvm_memory_region) 846#define KVM_SET_MEMORY_REGION _IOW(KVMIO, 0x40, struct kvm_memory_region)
@@ -904,6 +927,16 @@ struct kvm_s390_ucas_mapping {
904#define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd) 927#define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd)
905/* Available with KVM_CAP_ARM_SET_DEVICE_ADDR */ 928/* Available with KVM_CAP_ARM_SET_DEVICE_ADDR */
906#define KVM_ARM_SET_DEVICE_ADDR _IOW(KVMIO, 0xab, struct kvm_arm_device_addr) 929#define KVM_ARM_SET_DEVICE_ADDR _IOW(KVMIO, 0xab, struct kvm_arm_device_addr)
930/* Available with KVM_CAP_PPC_RTAS */
931#define KVM_PPC_RTAS_DEFINE_TOKEN _IOW(KVMIO, 0xac, struct kvm_rtas_token_args)
932
933/* ioctl for vm fd */
934#define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device)
935
936/* ioctls for fds returned by KVM_CREATE_DEVICE */
937#define KVM_SET_DEVICE_ATTR _IOW(KVMIO, 0xe1, struct kvm_device_attr)
938#define KVM_GET_DEVICE_ATTR _IOW(KVMIO, 0xe2, struct kvm_device_attr)
939#define KVM_HAS_DEVICE_ATTR _IOW(KVMIO, 0xe3, struct kvm_device_attr)
907 940
908/* 941/*
909 * ioctls for vcpu fds 942 * ioctls for vcpu fds