Hi Fabiano and Peter,

On Tue, Nov 17, 2026 11:25:50AM -0800, Peter Xu wrote:
> On Tue, Nov 17, 2026 at 04: 01: 45PM -0300, Fabiano Rosas wrote: > Sorry for 
> the
> delay, we're all swimming in slop these days. The only > feedback I have at 
> the
> moment is that this feature needs tests. What's > your plan in this regard?
> 
> On Tue, Nov 17, 2026 at 04:01:45PM -0300, Fabiano Rosas wrote:
>> Sorry for the delay, we're all swimming in slop these days. The only
>> feedback I have at the moment is that this feature needs tests. What's
>> your plan in this regard? Can this run with nested virtualization? Or
>> perhaps is there a way to mock the kernel interfaces and ensure QEMU
>> does the right thing even without them? We don't need much, but the code
>> definitely needs to be exercised somehow.

Thank you very much for the response and suggestion. I will follow this to make
the feature more robust.

So far, the only way to test it is through kexec, which not only takes time but
also isn't friendly to unit testing.

Based on my understanding of LUO/KHO, with the latest mainline Linux kernel,
once the fds are preserved, there is no way to retrieve them until after kexec.

Therefore, perhaps we could implement the LUO API functions in QEMU through an
ops interface.

1. The first idea is to implement an emulator so that the ops interface can
support both the real API and a test API. The test API would talk to the
emulator to emulate the preserve/retrieve procedure.

2. The second idea is to implement a set of test ops, with QEMU launched by a
parent process. The source QEMU could preserve fds, and the target QEMU could
retrieve them through the parent process.

3. The third idea is to implement something in the kernel to emulate a quick
switch between outgoing and incoming fds so that we can retrieve them
immediately after preserving them.

Options (1) and (2) seem better. While (2) looks easier to implement for quick
unit testing, (1) would be better for testing with arbitrary devices and
configurations in cpr-luo mode.

Thank you very much!

Dongli Zhang

> 
> Apologize from my side too on being slow, I'm going to start reading mails
> on the list this week, but it'll still be slow, together with other things.
> Just to say, this one is on my review list.  Sorry again.
> 
> -- 
> Peter Xu
> 

Reply via email to