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 kernel (2 of 150 files). Show all
Unified · Split
| @@ -12,7 +12,6 @@ · 11 unmodified lines | ||
| 12 | 12 | #include <linux/percpu.h> |
| 13 | 13 | #include <linux/hardirq.h> |
| 14 | 14 | #include <linux/spinlock.h> |
| 15 | −#include <asm/qrwlock.h> | |
| 16 | 15 | |
| 17 | 16 | /** |
| 18 | 17 | * queued_read_lock_slowpath - acquire read lock of a queue rwlock |
| @@ -7028,6 +7028,46 @@ int __cond_resched_lock(spinlock_t *lock) · 7027 unmodified lines | ||
| 7028 | 7028 | } |
| 7029 | 7029 | EXPORT_SYMBOL(__cond_resched_lock); |
| 7030 | 7030 | |
| 7031 | +int __cond_resched_rwlock_read(rwlock_t *lock) | |
| 7032 | +{ | |
| 7033 | + int resched = should_resched(PREEMPT_LOCK_OFFSET); | |
| 7034 | + int ret = 0; | |
| 7035 | + | |
| 7036 | + lockdep_assert_held_read(lock); | |
| 7037 | + | |
| 7038 | + if (rwlock_needbreak(lock) || resched) { | |
| 7039 | + read_unlock(lock); | |
| 7040 | + if (resched) | |
| 7041 | + preempt_schedule_common(); | |
| 7042 | + else | |
| 7043 | + cpu_relax(); | |
| 7044 | + ret = 1; | |
| 7045 | + read_lock(lock); | |
| 7046 | + } | |
| 7047 | + return ret; | |
| 7048 | +} | |
| 7049 | +EXPORT_SYMBOL(__cond_resched_rwlock_read); | |
| 7050 | + | |
| 7051 | +int __cond_resched_rwlock_write(rwlock_t *lock) | |
| 7052 | +{ | |
| 7053 | + int resched = should_resched(PREEMPT_LOCK_OFFSET); | |
| 7054 | + int ret = 0; | |
| 7055 | + | |
| 7056 | + lockdep_assert_held_write(lock); | |
| 7057 | + | |
| 7058 | + if (rwlock_needbreak(lock) || resched) { | |
| 7059 | + write_unlock(lock); | |
| 7060 | + if (resched) | |
| 7061 | + preempt_schedule_common(); | |
| 7062 | + else | |
| 7063 | + cpu_relax(); | |
| 7064 | + ret = 1; | |
| 7065 | + write_lock(lock); | |
| 7066 | + } | |
| 7067 | + return ret; | |
| 7068 | +} | |
| 7069 | +EXPORT_SYMBOL(__cond_resched_rwlock_write); | |
| 7070 | + | |
| 7031 | 7071 | /** |
| 7032 | 7072 | * yield - yield the current processor to other threads. |
| 7033 | 7073 | * |