2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/arch/x86/kvm
Keith Busch 916b7f42b3 kvm: retry nx_huge_page_recovery_thread creation
A VMM may send a non-fatal signal to its threads, including vCPU tasks,
at any time, and thus may signal vCPU tasks during KVM_RUN.  If a vCPU
task receives the signal while its trying to spawn the huge page recovery
vhost task, then KVM_RUN will fail due to copy_process() returning
-ERESTARTNOINTR.

Rework call_once() to mark the call complete if and only if the called
function succeeds, and plumb the function's true error code back to the
call_once() invoker.  This provides userspace with the correct, non-fatal
error code so that the VMM doesn't terminate the VM on -ENOMEM, and allows
subsequent KVM_RUN a succeed by virtue of retrying creation of the NX huge
page task.

Co-developed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
[implemented the kvm user side]
Signed-off-by: Keith Busch <kbusch@kernel.org>
Message-ID: <20250227230631.303431-3-kbusch@meta.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-03-01 02:54:18 -05:00
..
mmu kvm: retry nx_huge_page_recovery_thread creation 2025-03-01 02:54:18 -05:00
svm KVM fixes for 6.14 part 1 2025-02-14 19:08:35 -05:00
vmx KVM: nVMX: Process events on nested VM-Exit if injectable IRQ or NMI is pending 2025-02-26 04:17:32 -05:00
.gitignore
cpuid.c kvm: x86: SRSO_USER_KERNEL_NO is not synthesized 2025-02-04 11:13:24 -05:00
cpuid.h KVM: x86: Replace (almost) all guest CPUID feature queries with cpu_caps 2024-12-18 14:20:15 -08:00
debugfs.c KVM: Get rid of return value from kvm_arch_create_vm_debugfs() 2024-02-23 21:44:58 +00:00
emulate.c KVM: x86: Add X86EMUL_F_MSR and X86EMUL_F_DT_LOAD to aid canonical checks 2024-11-01 09:22:25 -07:00
fpu.h
hyperv.c KVM: x86: Reject Hyper-V's SEND_IPI hypercalls if local APIC isn't in-kernel 2025-02-12 08:53:56 -08:00
hyperv.h KVM: x86: hyper-v: Remove unused inline function kvm_hv_free_pa_page() 2024-08-13 09:28:48 -04:00
i8254.c treewide: Introduce kthread_run_worker[_on_cpu]() 2025-01-08 18:15:03 +01:00
i8254.h
i8259.c KVM: x86: Fix poll command 2023-06-01 13:44:13 -07:00
ioapic.c KVM: x86/ioapic: Resample the pending state of an IRQ when unmasking 2023-03-27 10:13:28 -04:00
ioapic.h
irq_comm.c KVM: x86: Don't re-setup empty IRQ routing when KVM_CAP_SPLIT_IRQCHIP 2024-06-11 14:18:40 -07:00
irq.c KVM: x86: Fold kvm_get_apic_interrupt() into kvm_cpu_get_interrupt() 2024-09-09 20:15:01 -07:00
irq.h KVM: x86: Don't re-setup empty IRQ routing when KVM_CAP_SPLIT_IRQCHIP 2024-06-11 14:18:40 -07:00
Kconfig KVM: x86: Break CONFIG_KVM_X86's direct dependency on KVM_INTEL || KVM_AMD 2024-11-19 19:34:51 -05:00
kvm_cache_regs.h KVM: x86: Add lockdep-guarded asserts on register cache usage 2024-11-01 09:22:22 -07:00
kvm_emulate.h KVM: x86: Add emulation status for unhandleable exception vectoring 2024-12-18 15:14:42 -08:00
kvm_onhyperv.c KVM: x86/mmu: Move filling of Hyper-V's TLB range struct into Hyper-V code 2023-04-10 15:17:29 -07:00
kvm_onhyperv.h KVM: x86: Move Hyper-V partition assist page out of Hyper-V emulation context 2023-12-07 09:34:01 -08:00
kvm-asm-offsets.c KVM: SVM: move MSR_IA32_SPEC_CTRL save/restore to assembly 2022-11-09 12:25:53 -05:00
lapic.c KVM x86 misc changes for 6.14: 2025-01-20 06:49:39 -05:00
lapic.h KVM: nVMX: Defer SVI update to vmcs01 on EOI when L2 is active w/o VID 2024-12-19 07:33:58 -08:00
Makefile KVM: x86: leave kvm.ko out of the build if no vendor module is requested 2024-10-06 03:53:41 -04:00
mmu.h Merge branch 'kvm-mirror-page-tables' into HEAD 2025-01-20 07:15:58 -05:00
mtrr.c KVM: x86: drop x86.h include from cpuid.h 2024-11-01 09:22:23 -07:00
pmu.c KVM: x86/pmu: Drop now-redundant refresh() during init() 2024-12-18 14:19:33 -08:00
pmu.h KVM: x86/pmu: Introduce distinct macros for GP/fixed counter max number 2024-06-28 09:12:16 -07:00
reverse_cpuid.h KVM: x86: Replace guts of "governed" features with comprehensive cpu_caps 2024-12-18 14:20:05 -08:00
smm.c KVM: x86: Replace (almost) all guest CPUID feature queries with cpu_caps 2024-12-18 14:20:15 -08:00
smm.h KVM: x86: smm: preserve interrupt shadow in SMRAM 2022-11-09 12:31:26 -05:00
trace.h KVM: x86: Add information about pending requests to kvm_exit tracepoint 2024-12-18 15:14:49 -08:00
tss.h
x86.c KVM: x86: Free vCPUs before freeing VM state 2025-02-26 04:17:15 -05:00
x86.h Merge branch 'kvm-userspace-hypercall' into HEAD 2025-01-20 07:03:06 -05:00
xen.c KVM: x86/xen: Initialize hrtimer in kvm_xen_init_vcpu() 2024-11-07 02:47:05 +01:00
xen.h KVM: x86/xen: inject vCPU upcall vector when local APIC is enabled 2024-03-04 16:22:36 -08:00