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 ...
Showing the changes to include/uapi (1 of 150 files). Show all
Unified · Split
| @@ -216,6 +216,20 @@ struct kvm_hyperv_exit { · 215 unmodified lines | |||
| 216 | } u; | 216 | } u; |
| 217 | }; | 217 | }; |
| 218 | 218 | ||
| 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 | |||
| 219 | #define KVM_S390_GET_SKEYS_NONE 1 | 233 | #define KVM_S390_GET_SKEYS_NONE 1 |
| 220 | #define KVM_S390_SKEYS_MAX 1048576 | 234 | #define KVM_S390_SKEYS_MAX 1048576 |
| 221 | 235 | ||
| @@ -252,6 +266,8 @@ struct kvm_hyperv_exit { · 30 unmodified lines | |||
| 252 | #define KVM_EXIT_X86_WRMSR 30 | 266 | #define KVM_EXIT_X86_WRMSR 30 |
| 253 | #define KVM_EXIT_DIRTY_RING_FULL 31 | 267 | #define KVM_EXIT_DIRTY_RING_FULL 31 |
| 254 | #define KVM_EXIT_AP_RESET_HOLD 32 | 268 | #define KVM_EXIT_AP_RESET_HOLD 32 |
| 269 | #define KVM_EXIT_X86_BUS_LOCK 33 | ||
| 270 | #define KVM_EXIT_XEN 34 | ||
| 255 | 271 | ||
| 256 | /* For KVM_EXIT_INTERNAL_ERROR */ | 272 | /* For KVM_EXIT_INTERNAL_ERROR */ |
| 257 | /* Emulate instruction failed. */ | 273 | /* Emulate instruction failed. */ |
| @@ -428,6 +444,8 @@ struct kvm_run { · 170 unmodified lines | |||
| 428 | __u32 index; /* kernel -> user */ | 444 | __u32 index; /* kernel -> user */ |
| 429 | __u64 data; /* kernel <-> user */ | 445 | __u64 data; /* kernel <-> user */ |
| 430 | } msr; | 446 | } msr; |
| 447 | /* KVM_EXIT_XEN */ | ||
| 448 | struct kvm_xen_exit xen; | ||
| 431 | /* Fix the size of the union. */ | 449 | /* Fix the size of the union. */ |
| 432 | char padding[256]; | 450 | char padding[256]; |
| 433 | }; | 451 | }; |
| @@ -1058,6 +1076,8 @@ struct kvm_ppc_resize_hpt { · 624 unmodified lines | |||
| 1058 | #define KVM_CAP_ENFORCE_PV_FEATURE_CPUID 190 | 1076 | #define KVM_CAP_ENFORCE_PV_FEATURE_CPUID 190 |
| 1059 | #define KVM_CAP_SYS_HYPERV_CPUID 191 | 1077 | #define KVM_CAP_SYS_HYPERV_CPUID 191 |
| 1060 | #define KVM_CAP_DIRTY_LOG_RING 192 | 1078 | #define KVM_CAP_DIRTY_LOG_RING 192 |
| 1079 | #define KVM_CAP_X86_BUS_LOCK_EXIT 193 | ||
| 1080 | #define KVM_CAP_PPC_DAWR1 194 | ||
| 1061 | 1081 | ||
| 1062 | #ifdef KVM_CAP_IRQ_ROUTING | 1082 | #ifdef KVM_CAP_IRQ_ROUTING |
| 1063 | 1083 | ||
| @@ -1131,6 +1151,10 @@ struct kvm_x86_mce { · 67 unmodified lines | |||
| 1131 | #endif | 1151 | #endif |
| 1132 | 1152 | ||
| 1133 | #ifdef KVM_CAP_XEN_HVM | 1153 | #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 | |||
| 1134 | struct kvm_xen_hvm_config { | 1158 | struct kvm_xen_hvm_config { |
| 1135 | __u32 flags; | 1159 | __u32 flags; |
| 1136 | __u32 msr; | 1160 | __u32 msr; |
| @@ -1565,6 +1589,45 @@ struct kvm_pv_cmd { · 428 unmodified lines | |||
| 1565 | /* Available with KVM_CAP_DIRTY_LOG_RING */ | 1589 | /* Available with KVM_CAP_DIRTY_LOG_RING */ |
| 1566 | #define KVM_RESET_DIRTY_RINGS _IO(KVMIO, 0xc7) | 1590 | #define KVM_RESET_DIRTY_RINGS _IO(KVMIO, 0xc7) |
| 1567 | 1591 | ||
| 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 | |||
| 1568 | /* Secure Encrypted Virtualization command */ | 1631 | /* Secure Encrypted Virtualization command */ |
| 1569 | enum sev_cmd_id { | 1632 | enum sev_cmd_id { |
| 1570 | /* Guest initialization commands */ | 1633 | /* Guest initialization commands */ |
| @@ -1593,6 +1656,8 @@ enum sev_cmd_id { · 22 unmodified lines | |||
| 1593 | KVM_SEV_DBG_ENCRYPT, | 1656 | KVM_SEV_DBG_ENCRYPT, |
| 1594 | /* Guest certificates commands */ | 1657 | /* Guest certificates commands */ |
| 1595 | KVM_SEV_CERT_EXPORT, | 1658 | KVM_SEV_CERT_EXPORT, |
| 1659 | /* Attestation report */ | ||
| 1660 | KVM_SEV_GET_ATTESTATION_REPORT, | ||
| 1596 | 1661 | ||
| 1597 | KVM_SEV_NR_MAX, | 1662 | KVM_SEV_NR_MAX, |
| 1598 | }; | 1663 | }; |
| @@ -1645,6 +1710,12 @@ struct kvm_sev_dbg { · 46 unmodified lines | |||
| 1645 | __u32 len; | 1710 | __u32 len; |
| 1646 | }; | 1711 | }; |
| 1647 | 1712 | ||
| 1713 | struct kvm_sev_attestation_report { | ||
| 1714 | __u8 mnonce[16]; | ||
| 1715 | __u64 uaddr; | ||
| 1716 | __u32 len; | ||
| 1717 | }; | ||
| 1718 | |||
| 1648 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 1719 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
| 1649 | #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) | 1720 | #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) |
| 1650 | #define KVM_DEV_ASSIGN_MASK_INTX (1 << 2) | 1721 | #define KVM_DEV_ASSIGN_MASK_INTX (1 << 2) |
| @@ -1766,4 +1837,7 @@ struct kvm_dirty_gfn { · 115 unmodified lines | |||
| 1766 | __u64 offset; | 1837 | __u64 offset; |
| 1767 | }; | 1838 | }; |
| 1768 | 1839 | ||
| 1840 | #define KVM_BUS_LOCK_DETECTION_OFF (1 << 0) | ||
| 1841 | #define KVM_BUS_LOCK_DETECTION_EXIT (1 << 1) | ||
| 1842 | |||
| 1769 | #endif /* __LINUX_KVM_H */ | 1843 | #endif /* __LINUX_KVM_H */ |