[RFC] proposal: KVM: Orphaned VMs: The Caretaker approach for Live Update
Paolo Bonzini
pbonzini at redhat.com
Thu Apr 30 20:32:11 PDT 2026
On 4/30/26 17:27, David Woodhouse wrote:
> On Thu, 2026-04-30 at 15:28 +0200, Paolo Bonzini wrote:
>> I even wonder if, for long term simplicity, the interface for
>> host->caretaker should be just for the caretaker to swallow the host
>> into non-root mode, again as in Arm nVHE.
>
> There's a lot of merit in that approach.
>
> I talked about wanting to use this 'caretaker' for secret hiding. But
> why have *voluntary* secret hiding with the kernel hiding things from
> its own address space, when you have have *mandatory* secret hiding
> with something running in EL2, like pKVM.
Well, other than because it's a lot of work? :)
> Honestly, I don't see the *caretaker* being much of an ABI at all,
> except from one kernel to the next.
I agree.
> The *userspace* ABI considerations are all about how you make a vCPU
> that runs asynchronously (should it conceptually just be an async
> KVM_RUN call, which allows the vCPU to run in a kernel thread up to the
> point of kexec? Why is it fundamentally tied to kexec at all?).
It's not tied to kexec. kexec is just forcing a handoff + forcing an
update.
The big difference is that:
1) if you don't tie it to kexec, a detached vCPU thread is a struct
vhost_task and a blocking vmexit schedules out the thread; while during
kexec you have s/kthread/pCPU/ and halting the CPU instead of scheduling
it out.
2) if you don't tie it to kexec, address space isolation is the only
real reason for the complication of treating the caretaker as a separate
bare metal program. OTOH maybe that's a feature - you could do:
- ioctl(KVM_RUN_ASYNC)
- then vmfd/vcpufd handoff to a new mm on top
- then address space isolation on top
- then kexec (de)serialization on top
> I'd love to start without kexec in the picture at all. Just show me the
> KVM API for starting a *confidential* guest (pKVM, SEV-SNP, whatever),
> leaving it running, completely stopping the VMM and then starting a new
> VMM to pick up from where it left off.
Why confidential?
Paolo
More information about the kexec
mailing list