diff options
author | Keith Busch <kbusch@kernel.org> | 2025-02-27 15:06:31 -0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-03-01 02:54:18 -0500 |
commit | 916b7f42b3b3b539a71c204a9b49fdc4ca92cd82 (patch) | |
tree | 31ede935f90b03bbcbb5b36165b389bb11d96378 /scripts/clang-tools/gen_compile_commands.py | |
parent | cb380909ae3b1ebf14d6a455a4f92d7916d790cb (diff) | |
download | linux-916b7f42b3b3b539a71c204a9b49fdc4ca92cd82.tar.gz linux-916b7f42b3b3b539a71c204a9b49fdc4ca92cd82.tar.bz2 linux-916b7f42b3b3b539a71c204a9b49fdc4ca92cd82.zip |
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>
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions