Re: [PATCH 2/3] KVM: arm64: Declare support for KVM_CAP_MEMORY_FAULT_INFO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 06, 2024 at 11:14:15AM -0700, Anish Moorthy wrote:
> On Mon, Aug 5, 2024 at 3:51 PM Oliver Upton <oliver.upton@xxxxxxxxx> wrote:
> >
> > The wording of the cap documentation isn't as relaxed as I'd
> > anticipated. Perhaps:
> >
> >   The presence of this capability indicates that KVM_RUN *may* fill
> >   kvm_run.memory_fault if ...
> >
> > IOW, userspace is not guaranteed that the structure is filled for every
> > 'memory fault'.
> 
> Agreed, I can add a patch to update the docs
> 
> While we're at it, what do we think of removing this disclaimer?
> 
> >Note: Userspaces which attempt to resolve memory faults so that they can retry
> > KVM_RUN are encouraged to guard against repeatedly receiving the same
> > error/annotated fault.
> 
> I originally added this bit due to my concerns with the idea of
> filling kvm_run.memory_fault even for EFAULTs that weren't guaranteed
> to be returned by KVM_RUN [1].

This sort of language generally isn't necessary in UAPI descriptions. We
cannot exhaustively describe the ways userspace might misuse an
interface.

> However if I'm interpreting Sean's
> response to [2] correctly, I think we're now committed to only
> KVM_EXIT_MEMORY_FAULTing for EFAULTs/EHWPOISONs which return from
> KVM_RUN. At the very least, that seems to be true of current usages.

Yeah, I'd have a similar expectation. No point in a half-attempt at
getting out to userspace and subsequently stomping the context.

-- 
Thanks,
Oliver




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux