On Thu, Jun 01, 2023, Oliver Upton wrote: > On Thu, Jun 01, 2023 at 11:59:29AM -0700, Sean Christopherson wrote: > > On Thu, Jun 01, 2023, Oliver Upton wrote: > > > How do we support a userspace that only cares about NOWAIT exits but > > > doesn't want other EFAULT exits to be annotated? > > > > We don't. The proposed approach is to not change the return value, and the > > vcpu->run union currently holds random garbage on -EFAULT, so I don't see any reason > > to require userspace to opt-in, or to let userspace opt-out. I.e. fill > > vcpu->run->memory_fault unconditionally (for the paths that are converted) and > > advertise to userspace that vcpu->run->memory_fault *may* contain useful info on > > -EFAULT when KVM_CAP_MEMORY_FAULT_INFO is supported. And then we define KVM's > > ABI such that vcpu->run->memory_fault is guarateed to be valid if an -EFAULT occurs > > when faulting in guest memory (on supported architectures). > > Sure, but the series currently gives userspace an explicit opt-in for > existing EFAULT paths. Yeah, that's one of the things I am/was going to provide feedback on, I've been really slow getting into reviews for this cycle :-/