RFC kvm/x86: more huge page recovery fallout
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | vhost: return error instead of NULL on createarch/ drivers/ kernel/ | +4 | 0 replies | |
| 2/2 | kvm: retry nx_huge_page_recovery_thread creationarch/ arch/ arch/ | +11 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC 0/2] kvm/x86: more huge page recovery fallout
From: Keith Busch <[email protected]>
Another corner case on the KVM vhost task!
The crosvm VMM might send signals to its threads that have entered KVM_RUN. The signal specifically is SIGRTRMIN from here:
https://github.com/google/crosvm/blob/main/src/crosvm/sys/linux/vcpu.rs#L651
If this happens to occur when the huge page recovery is trying to create its vhost task, that will fail with ERESTARTNOINTR. Once this happens, all KVM_RUN calls will fail with ENOMEM despite memory not being the problem.
This series propogates the error up so we can distinguish that from the current defaulting to ENOMEM and replaces the call_once since we need to be able to call it repeatedly due to this condition.
Keith Busch (2):
vhost: return error instead of NULL on create
kvm: retry nx_huge_page_recovery_thread creation
arch/x86/include/asm/kvm_host.h | 3 +-- arch/x86/kvm/mmu/mmu.c | 25 ++++++++++--------------- arch/x86/kvm/x86.c | 2 +- drivers/vhost/vhost.c | 2 +- kernel/vhost_task.c | 4 ++-- 5 files changed, 15 insertions(+), 21 deletions(-)
Signature · 1 line
2.43.5