# git rev-parse -q --verify 3efc57369a0ce8f76bf0804f7e673982384e4ac9^{commit} 3efc57369a0ce8f76bf0804f7e673982384e4ac9 already have revision, skipping fetch # git checkout -q -f -B kisskb 3efc57369a0ce8f76bf0804f7e673982384e4ac9 # git clean -qxdf # < git log -1 # commit 3efc57369a0ce8f76bf0804f7e673982384e4ac9 # Merge: e08d227840bb efbc6bd090f4 # Author: Linus Torvalds # Date: Sat Sep 28 09:20:14 2024 -0700 # # Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm # # Pull x86 kvm updates from Paolo Bonzini: # "x86: # # - KVM currently invalidates the entirety of the page tables, not just # those for the memslot being touched, when a memslot is moved or # deleted. # # This does not traditionally have particularly noticeable overhead, # but Intel's TDX will require the guest to re-accept private pages # if they are dropped from the secure EPT, which is a non starter. # # Actually, the only reason why this is not already being done is a # bug which was never fully investigated and caused VM instability # with assigned GeForce GPUs, so allow userspace to opt into the new # behavior. # # - Advertise AVX10.1 to userspace (effectively prep work for the # "real" AVX10 functionality that is on the horizon) # # - Rework common MSR handling code to suppress errors on userspace # accesses to unsupported-but-advertised MSRs # # This will allow removing (almost?) all of KVM's exemptions for # userspace access to MSRs that shouldn't exist based on the vCPU # model (the actual cleanup is non-trivial future work) # # - Rework KVM's handling of x2APIC ICR, again, because AMD (x2AVIC) # splits the 64-bit value into the legacy ICR and ICR2 storage, # whereas Intel (APICv) stores the entire 64-bit value at the ICR # offset # # - Fix a bug where KVM would fail to exit to userspace if one was # triggered by a fastpath exit handler # # - Add fastpath handling of HLT VM-Exit to expedite re-entering the # guest when there's already a pending wake event at the time of the # exit # # - Fix a WARN caused by RSM entering a nested guest from SMM with # invalid guest state, by forcing the vCPU out of guest mode prior to # signalling SHUTDOWN (the SHUTDOWN hits the VM altogether, not the # nested guest) # # - Overhaul the "unprotect and retry" logic to more precisely identify # cases where retrying is actually helpful, and to harden all retry # paths against putting the guest into an infinite retry loop # # - Add support for yielding, e.g. to honor NEED_RESCHED, when zapping # rmaps in the shadow MMU # # - Refactor pieces of the shadow MMU related to aging SPTEs in # prepartion for adding multi generation LRU support in KVM # # - Don't stuff the RSB after VM-Exit when RETPOLINE=y and AutoIBRS is # enabled, i.e. when the CPU has already flushed the RSB # # - Trace the per-CPU host save area as a VMCB pointer to improve # readability and cleanup the retrieval of the SEV-ES host save area # # - Remove unnecessary accounting of temporary nested VMCB related # allocations # # - Set FINAL/PAGE in the page fault error code for EPT violations if # and only if the GVA is valid. If the GVA is NOT valid, there is no # guest-side page table walk and so stuffing paging related metadata # is nonsensical # # - Fix a bug where KVM would incorrectly synthesize a nested VM-Exit # instead of emulating posted interrupt delivery to L2 # # - Add a lockdep assertion to detect unsafe accesses of vmcs12 # structures # # - Harden eVMCS loading against an impossible NULL pointer deref # (really truly should be impossible) # # - Minor SGX fix and a cleanup # # - Misc cleanups # # Generic: # # - Register KVM's cpuhp and syscore callbacks when enabling # virtualization in hardware, as the sole purpose of said callbacks # is to disable and re-enable virtualization as needed # # - Enable virtualization when KVM is loaded, not right before the # first VM is created # # Together with the previous change, this simplifies a lot the logic # of the callbacks, because their very existence implies # virtualization is enabled # # - Fix a bug that results in KVM prematurely exiting to userspace for # coalesced MMIO/PIO in many cases, clean up the related code, and # add a testcase # # - Fix a bug in kvm_clear_guest() where it would trigger a buffer # overflow _if_ the gpa+len crosses a page boundary, which thankfully # is guaranteed to not happen in the current code base. Add WARNs in # more helpers that read/write guest memory to detect similar bugs # # Selftests: # # - Fix a goof that caused some Hyper-V tests to be skipped when run on # bare metal, i.e. NOT in a VM # # - Add a regression test for KVM's handling of SHUTDOWN for an SEV-ES # guest # # - Explicitly include one-off assets in .gitignore. Past Sean was # completely wrong about not being able to detect missing .gitignore # entries # # - Verify userspace single-stepping works when KVM happens to handle a # VM-Exit in its fastpath # # - Misc cleanups" # # * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (127 commits) # Documentation: KVM: fix warning in "make htmldocs" # s390: Enable KVM_S390_UCONTROL config in debug_defconfig # selftests: kvm: s390: Add VM run test case # KVM: SVM: let alternatives handle the cases when RSB filling is required # KVM: VMX: Set PFERR_GUEST_{FINAL,PAGE}_MASK if and only if the GVA is valid # KVM: x86/mmu: Use KVM_PAGES_PER_HPAGE() instead of an open coded equivalent # KVM: x86/mmu: Add KVM_RMAP_MANY to replace open coded '1' and '1ul' literals # KVM: x86/mmu: Fold mmu_spte_age() into kvm_rmap_age_gfn_range() # KVM: x86/mmu: Morph kvm_handle_gfn_range() into an aging specific helper # KVM: x86/mmu: Honor NEED_RESCHED when zapping rmaps and blocking is allowed # KVM: x86/mmu: Add a helper to walk and zap rmaps for a memslot # KVM: x86/mmu: Plumb a @can_yield parameter into __walk_slot_rmaps() # KVM: x86/mmu: Move walk_slot_rmaps() up near for_each_slot_rmap_range() # KVM: x86/mmu: WARN on MMIO cache hit when emulating write-protected gfn # KVM: x86/mmu: Detect if unprotect will do anything based on invalid_list # KVM: x86/mmu: Subsume kvm_mmu_unprotect_page() into the and_retry() version # KVM: x86: Rename reexecute_instruction()=>kvm_unprotect_and_retry_on_failure() # KVM: x86: Update retry protection fields when forcing retry on emulation failure # KVM: x86: Apply retry protection to "unprotect on failure" path # KVM: x86: Check EMULTYPE_WRITE_PF_TO_SP before unprotecting gfn # ... # < /opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sh4-linux/bin/sh4-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sh4-linux/bin/sh4-linux-ld --version # < git log --format=%s --max-count=1 3efc57369a0ce8f76bf0804f7e673982384e4ac9 # make -s -j 160 ARCH=sh O=/kisskb/build/linus_allyesconfig_sh4-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sh4-linux/bin/sh4-linux- allyesconfig # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # < make -s -j 160 ARCH=sh O=/kisskb/build/linus_allyesconfig_sh4-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sh4-linux/bin/sh4-linux- help # make -s -j 160 ARCH=sh O=/kisskb/build/linus_allyesconfig_sh4-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sh4-linux/bin/sh4-linux- olddefconfig # make -s -j 160 ARCH=sh O=/kisskb/build/linus_allyesconfig_sh4-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sh4-linux/bin/sh4-linux- Generating include/generated/machtypes.h :1519:2: warning: #warning syscall clone3 not implemented [-Wcpp] /kisskb/src/arch/sh/kernel/cpu/sh2/../../entry-common.S: Assembler messages: /kisskb/src/arch/sh/kernel/cpu/sh2/../../entry-common.S:85: Warning: overflow in branch to __restore_all; converted into longer instruction sequence /kisskb/src/arch/sh/kernel/cpu/sh2/../../entry-common.S:357: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/arch/sh/kernel/cpu/sh2/../../entry-common.S:360: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/kernel/fork.c: In function '__do_sys_clone3': /kisskb/src/kernel/fork.c:3078:2: error: #warning clone3() entry point is missing, please fix [-Werror=cpp] 3078 | #warning clone3() entry point is missing, please fix | ^~~~~~~ cc1: all warnings being treated as errors make[4]: *** [/kisskb/src/scripts/Makefile.build:229: kernel/fork.o] Error 1 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/kisskb/src/scripts/Makefile.build:478: kernel] Error 2 make[3]: *** Waiting for unfinished jobs.... {standard input}: Assembler messages: {standard input}: Warning: end of file not at end of a line; newline inserted {standard input}:1111: Error: unknown pseudo-op: `.l18' {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive {standard input}:1070: Error: displacement to undefined symbol .L142 overflows 8-bit field {standard input}:1075: Error: displacement to undefined symbol .L161 overflows 8-bit field {standard input}:1059: Error: pcrel too far {standard input}:1060: Error: pcrel too far {standard input}:1061: Error: pcrel too far sh4-linux-gcc: internal compiler error: Segmentation fault signal terminated program cc1 Please submit a full bug report, with preprocessed source (by using -freport-bug). See for instructions. make[6]: *** [/kisskb/src/scripts/Makefile.build:229: drivers/net/pcs/pcs-xpcs.o] Error 4 make[6]: *** Waiting for unfinished jobs.... make[5]: *** [/kisskb/src/scripts/Makefile.build:478: drivers/net/pcs] Error 2 make[5]: *** Waiting for unfinished jobs.... {standard input}: Assembler messages: {standard input}: Warning: end of file not at end of a line; newline inserted {standard input}: Error: .size expression for mp2975_driver_exit does not evaluate to a constant sh4-linux-gcc: internal compiler error: Segmentation fault signal terminated program cc1 Please submit a full bug report, with preprocessed source (by using -freport-bug). See for instructions. make[6]: *** [/kisskb/src/scripts/Makefile.build:229: drivers/hwmon/pmbus/mp2975.o] Error 4 make[6]: *** Waiting for unfinished jobs.... make[4]: *** [/kisskb/src/scripts/Makefile.build:478: drivers/net] Error 2 make[4]: *** Waiting for unfinished jobs.... make[5]: *** [/kisskb/src/scripts/Makefile.build:478: drivers/hwmon/pmbus] Error 2 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [/kisskb/src/scripts/Makefile.build:478: drivers/hwmon] Error 2 make[3]: *** [/kisskb/src/scripts/Makefile.build:478: drivers] Error 2 make[2]: *** [/kisskb/src/Makefile:1936: .] Error 2 make[1]: *** [/kisskb/src/Makefile:224: __sub-make] Error 2 make: *** [Makefile:224: __sub-make] Error 2 Command 'make -s -j 160 ARCH=sh O=/kisskb/build/linus_allyesconfig_sh4-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/sh4-linux/bin/sh4-linux- ' returned non-zero exit status 2. # rm -rf /kisskb/build/linus_allyesconfig_sh4-gcc13 # Build took: 0:03:02.135430