On Tue, May 2, 2023 at 1:41 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote: > > If KVM triggers a WARN_ON_ONCE(), then that's an issue. Though looking at the > code, the cui() aspect is a moot point. As I stated in the previous discussion, > the WARN_ON_ONCE() in question needs to be off-by-default. > > : Hmm, one idea would be to have the initial -EFAULT detection fill kvm_run.memory_fault, > : but set kvm_run.exit_reason to some magic number, e.g. zero it out. Then KVM could > : WARN if something tries to overwrite kvm_run.exit_reason. The WARN would need to > : be buried by a Kconfig or something since kvm_run can be modified by userspace, > : but other than that I think it would work. Ah, ok: I thought using WARN_ON_ONCE instead of WARN might have obviated the Kconfig. I'll go add one.