Re: [PATCH 3/5] KVM: Add a common kvm_run flag to communicate an exit needs completion

David Woodhouse <[email protected]>
Newsgroups org.kernel.vger.kvm,dev.linux.lists.kvmarm,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.ozlabs.lists.linuxppc-dev
Message-ID <[email protected]>
On Mon, 2025-01-13 at 14:04 -0800, Sean Christopherson wrote:
> I do agree that the VMM is likely going to run into problems sooner or later if
> the developers/maintainers don't fundamentally understand the need to redo KVM_RUN,
> but I also think there's significant value in reducing the chances for simple
> human error to result in broken VMs.

I agree that it makes sense for the kernel to expose this flag, and
keep it in sync with the exit reasons that need it as they accumulate
over time, rather than having to keep the VMM in sync.

Coincidentally, I did an audit of a VMM only a few weeks ago, adding a
userspace flag for 'exit_response_pending' and making sure it does one
last run of the vCPU with an immediate exit requested, before pausing
for migration. I added that flag for exactly the same KVM_EXIT_xxx
reasons, matching the kernel... for now.

(I just said in a separate thread that you missed KVM_EXIT_XEN, but on
closer inspection I was wrong because kvm_xen_hypercall() sets the
arch.complete_userspace_io flag so it's fine; I just didn't see the
Xen-specific setup in my first look.)
smime.p7s (application/pkcs7-signature, 6 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.