On 17.11.2021 19:26, Andrew Cooper wrote: > TLB flushing is a hotpath, and function pointer calls are > expensive (especially under repoline) for what amounts to an identity > transform on the data. Just pass the vcpu_bitmap bitmap directly. > > As we use NULL for all rather than none, introduce a flush_vcpu() helper to > avoid the risk of logical errors from opencoding the expression. This also > means the viridian callers can avoid writing an all-ones bitmap for the > flushing logic to consume.
I think you want to clarify that you convert only one of the two ways of specifying "all". The other (HV_GENERIC_SET_ALL as consumed by hv_vpset_to_vpmask()) could also be converted, but this would be a bit more involved. I have no idea which of the two Windows would typically use, nor why there are two mechanisms in the first place. > No functional change. > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> Jan