History

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM updates from Paolo Bonzini: "x86: - Support for userspace to emulate Xen hypercalls - Raise the maximum number of user memslots - Scalability improvements for the new MMU. Instead of the complex "fast page fault" logic that is used in mmu.c, tdp_mmu.c uses an rwlock so that page faults are concurrent, but the code that can run against page faults is limited. Right now only page faults take the lock for reading; in the future this will be extended to some cases of page table destruction. I hope to switch the default MMU around 5.12-rc3 (some testing was delayed due to Chinese New Year). - Cleanups for MAXPHYADDR checks - Use static calls for vendor-specific callbacks - On AMD, use VMLOAD/VMSAVE to save and restore host state - Stop using deprecated jump label APIs - Workaround for AMD erratum that made nested virtualization unreliable - Support for LBR emulation in the guest - Support for communicating bus lock vmexits to userspace - Add support for SEV attestation command - Miscellaneous cleanups PPC: - Support for second data watchpoint on POWER10 - Remove some complex workarounds for buggy early versions of POWER9 - Guest entry/exit fixes ARM64: - Make the nVHE EL2 object relocatable - Cleanups for concurrent translation faults hitting the same page - Support for the standard TRNG hypervisor call - A bunch of small PMU/Debug fixes - Simplification of the early init hypercall handling Non-KVM changes (with acks): - Detection of contended rwlocks (implemented only for qrwlocks, because KVM only needs it for x86) - Allow __DISABLE_EXPORTS from assembly code - Provide a saner follow_pfn replacements for modules" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (192 commits) KVM: x86/xen: Explicitly pad struct compat_vcpu_info to 64 bytes KVM: selftests: Don't bother mapping GVA for Xen shinfo test KVM: selftests: Fix hex vs. decimal snafu in Xen test KVM: selftests: Fix size of memslots created by Xen tests KVM: selftests: Ignore recently added Xen tests' build output KVM: selftests: Add missing header file needed by xAPIC IPI tests KVM: selftests: Add operand to vmsave/vmload/vmrun in svm.c KVM: SVM: Make symbol 'svm_gp_erratum_intercept' static locking/arch: Move qrwlock.h include after qspinlock.h KVM: PPC: Book3S HV: Fix host radix SLB optimisation with hash guests KVM: PPC: Book3S HV: Ensure radix guest has no SLB entries KVM: PPC: Don't always report hash MMU capability for P9 < DD2.2 KVM: PPC: Book3S HV: Save and restore FSCR in the P9 path KVM: PPC: remove unneeded semicolon KVM: PPC: Book3S HV: Use POWER9 SLBIA IH=6 variant to clear SLB KVM: PPC: Book3S HV: No need to clear radix host SLB before loading HPT guest KVM: PPC: Book3S HV: Fix radix guest SLB side channel KVM: PPC: Book3S HV: Remove support for running HPT guest on RPT host without mixed mode support KVM: PPC: Book3S HV: Introduce new capability for 2nd DAWR KVM: PPC: Book3S HV: Add infrastructure to support 2nd DAWR ...

Linus Torvalds committed 5 years ago

Commit 3e105852 parents 9c5b80b 8c6e67b150 files · +6655 −2060Browse files

Showing the changes to include/uapi (1 of 150 files). Show all

Unified · Split

include/uapi/linux/kvm.h+74−0
@@ -216,6 +216,20 @@ struct kvm_hyperv_exit { · 215 unmodified lines
216216 } u;
217217 };
218218
219+struct kvm_xen_exit {
220+#define KVM_EXIT_XEN_HCALL 1
221+ __u32 type;
222+ union {
223+ struct {
224+ __u32 longmode;
225+ __u32 cpl;
226+ __u64 input;
227+ __u64 result;
228+ __u64 params[6];
229+ } hcall;
230+ } u;
231+};
232+
219233 #define KVM_S390_GET_SKEYS_NONE 1
220234 #define KVM_S390_SKEYS_MAX 1048576
221235
@@ -252,6 +266,8 @@ struct kvm_hyperv_exit { · 30 unmodified lines
252266 #define KVM_EXIT_X86_WRMSR 30
253267 #define KVM_EXIT_DIRTY_RING_FULL 31
254268 #define KVM_EXIT_AP_RESET_HOLD 32
269+#define KVM_EXIT_X86_BUS_LOCK 33
270+#define KVM_EXIT_XEN 34
255271
256272 /* For KVM_EXIT_INTERNAL_ERROR */
257273 /* Emulate instruction failed. */
@@ -428,6 +444,8 @@ struct kvm_run { · 170 unmodified lines
428444 __u32 index; /* kernel -> user */
429445 __u64 data; /* kernel <-> user */
430446 } msr;
447+ /* KVM_EXIT_XEN */
448+ struct kvm_xen_exit xen;
431449 /* Fix the size of the union. */
432450 char padding[256];
433451 };
@@ -1058,6 +1076,8 @@ struct kvm_ppc_resize_hpt { · 624 unmodified lines
10581076 #define KVM_CAP_ENFORCE_PV_FEATURE_CPUID 190
10591077 #define KVM_CAP_SYS_HYPERV_CPUID 191
10601078 #define KVM_CAP_DIRTY_LOG_RING 192
1079+#define KVM_CAP_X86_BUS_LOCK_EXIT 193
1080+#define KVM_CAP_PPC_DAWR1 194
10611081
10621082 #ifdef KVM_CAP_IRQ_ROUTING
10631083
@@ -1131,6 +1151,10 @@ struct kvm_x86_mce { · 67 unmodified lines
11311151 #endif
11321152
11331153 #ifdef KVM_CAP_XEN_HVM
1154+#define KVM_XEN_HVM_CONFIG_HYPERCALL_MSR (1 << 0)
1155+#define KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL (1 << 1)
1156+#define KVM_XEN_HVM_CONFIG_SHARED_INFO (1 << 2)
1157+
11341158 struct kvm_xen_hvm_config {
11351159 __u32 flags;
11361160 __u32 msr;
@@ -1565,6 +1589,45 @@ struct kvm_pv_cmd { · 428 unmodified lines
15651589 /* Available with KVM_CAP_DIRTY_LOG_RING */
15661590 #define KVM_RESET_DIRTY_RINGS _IO(KVMIO, 0xc7)
15671591
1592+/* Per-VM Xen attributes */
1593+#define KVM_XEN_HVM_GET_ATTR _IOWR(KVMIO, 0xc8, struct kvm_xen_hvm_attr)
1594+#define KVM_XEN_HVM_SET_ATTR _IOW(KVMIO, 0xc9, struct kvm_xen_hvm_attr)
1595+
1596+struct kvm_xen_hvm_attr {
1597+ __u16 type;
1598+ __u16 pad[3];
1599+ union {
1600+ __u8 long_mode;
1601+ __u8 vector;
1602+ struct {
1603+ __u64 gfn;
1604+ } shared_info;
1605+ __u64 pad[8];
1606+ } u;
1607+};
1608+
1609+/* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO */
1610+#define KVM_XEN_ATTR_TYPE_LONG_MODE 0x0
1611+#define KVM_XEN_ATTR_TYPE_SHARED_INFO 0x1
1612+#define KVM_XEN_ATTR_TYPE_UPCALL_VECTOR 0x2
1613+
1614+/* Per-vCPU Xen attributes */
1615+#define KVM_XEN_VCPU_GET_ATTR _IOWR(KVMIO, 0xca, struct kvm_xen_vcpu_attr)
1616+#define KVM_XEN_VCPU_SET_ATTR _IOW(KVMIO, 0xcb, struct kvm_xen_vcpu_attr)
1617+
1618+struct kvm_xen_vcpu_attr {
1619+ __u16 type;
1620+ __u16 pad[3];
1621+ union {
1622+ __u64 gpa;
1623+ __u64 pad[8];
1624+ } u;
1625+};
1626+
1627+/* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO */
1628+#define KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO 0x0
1629+#define KVM_XEN_VCPU_ATTR_TYPE_VCPU_TIME_INFO 0x1
1630+
15681631 /* Secure Encrypted Virtualization command */
15691632 enum sev_cmd_id {
15701633 /* Guest initialization commands */
@@ -1593,6 +1656,8 @@ enum sev_cmd_id { · 22 unmodified lines
15931656 KVM_SEV_DBG_ENCRYPT,
15941657 /* Guest certificates commands */
15951658 KVM_SEV_CERT_EXPORT,
1659+ /* Attestation report */
1660+ KVM_SEV_GET_ATTESTATION_REPORT,
15961661
15971662 KVM_SEV_NR_MAX,
15981663 };
@@ -1645,6 +1710,12 @@ struct kvm_sev_dbg { · 46 unmodified lines
16451710 __u32 len;
16461711 };
16471712
1713+struct kvm_sev_attestation_report {
1714+ __u8 mnonce[16];
1715+ __u64 uaddr;
1716+ __u32 len;
1717+};
1718+
16481719 #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
16491720 #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)
16501721 #define KVM_DEV_ASSIGN_MASK_INTX (1 << 2)
@@ -1766,4 +1837,7 @@ struct kvm_dirty_gfn { · 115 unmodified lines
17661837 __u64 offset;
17671838 };
17681839
1840+#define KVM_BUS_LOCK_DETECTION_OFF (1 << 0)
1841+#define KVM_BUS_LOCK_DETECTION_EXIT (1 << 1)
1842+
17691843 #endif /* __LINUX_KVM_H */