RE: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

From: Jork Loeser
Date: Thu Aug 10 2017 - 15:08:32 EST


> -----Original Message-----
> From: KY Srinivasan


> > -----Original Message-----
> > From: Peter Zijlstra [mailto:peterz@xxxxxxxxxxxxx]
> > Sent: Thursday, August 10, 2017 11:57 AM
> > To: Simon Xiao <sixiao@xxxxxxxxxxxxx>; Haiyang Zhang
> > <haiyangz@xxxxxxxxxxxxx>; Jork Loeser <Jork.Loeser@xxxxxxxxxxxxx>;
> > Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>; torvalds@linux-
> > foundation.org; luto@xxxxxxxxxx; hpa@xxxxxxxxx; vkuznets@xxxxxxxxxx;
> > linux-kernel@xxxxxxxxxxxxxxx; rostedt@xxxxxxxxxxx;
> > andy.shevchenko@xxxxxxxxx; tglx@xxxxxxxxxxxxx; KY Srinivasan
> > <kys@xxxxxxxxxxxxx>; mingo@xxxxxxxxxx
> > Cc: linux-tip-commits@xxxxxxxxxxxxxxx
> > Subject: Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote
> > TLB flush

> > Hold on.. if we don't IPI for TLB invalidation. What serializes our
> > software page table walkers like fast_gup() ?
>
> Hypervisor may implement this functionality via an IPI.
>
> K. Y

HvFlushVirtualAddressList() states:
This call guarantees that by the time control returns back to the caller, the observable effects of all flushes on the specified virtual processors have occurred.

HvFlushVirtualAddressListEx() refers to HvFlushVirtualAddressList() as adding sparse target VP lists.

Is this enough of a guarantee, or do you see other races?

Regards,
Jork