Commit 916b7f4
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 <[email protected]>
Signed-off-by: Sean Christopherson <[email protected]>
[implemented the kvm user side]
Signed-off-by: Keith Busch <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>1 parent cb38090 commit 916b7f4
2 files changed
+38
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7460 | 7460 | | |
7461 | 7461 | | |
7462 | 7462 | | |
7463 | | - | |
| 7463 | + | |
7464 | 7464 | | |
7465 | 7465 | | |
7466 | 7466 | | |
| |||
7472 | 7472 | | |
7473 | 7473 | | |
7474 | 7474 | | |
7475 | | - | |
| 7475 | + | |
7476 | 7476 | | |
7477 | 7477 | | |
7478 | 7478 | | |
7479 | 7479 | | |
7480 | 7480 | | |
| 7481 | + | |
7481 | 7482 | | |
7482 | 7483 | | |
7483 | 7484 | | |
7484 | 7485 | | |
7485 | 7486 | | |
7486 | 7487 | | |
7487 | 7488 | | |
7488 | | - | |
7489 | | - | |
7490 | | - | |
7491 | | - | |
| 7489 | + | |
7492 | 7490 | | |
7493 | 7491 | | |
7494 | 7492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
30 | 45 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
43 | 64 | | |
44 | 65 | | |
45 | 66 | | |
0 commit comments