On Mon, 2021-10-25 at 13:28 +0200, Vitaly Kuznetsov wrote: > > + pagefault_disable(); > > + err = __get_user(rc, (u8 __user *)ghc->hva + offset); > > + pagefault_enable(); > > This reminds me of copy_from_user_nofault() -- can we use it instead maybe? That's a lot of extra out of line function calls and redundant (I believe) setup/checks, and would make the fast path fairly pointless for the purpose it was *originally* introduced, which was to optimise the case where we're entering the vCPU and just want to check vcpu_info->evtchn_upcall_pending with a simple (fault-handled) dereference.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature