On Mon, Oct 08, 2018 at 07:19:05PM +0200, Vitaly Kuznetsov wrote: > Rewrite kvm_hv_flush_tlb()/send_ipi_vcpus_mask() making them cleaner and > somewhat more optimal. > > hv_vcpu_in_sparse_set() is converted to sparse_set_to_vcpu_mask() > which copies sparse banks u64-at-a-time and then, depending on the > num_mismatched_vp_indexes value, returns immediately or does > vp index to vcpu index conversion by walking all vCPUs. > > To support the change and make kvm_hv_send_ipi() look similar to > kvm_hv_flush_tlb() send_ipi_vcpus_mask() is introduced. > > Suggested-by: Roman Kagan <rkagan@xxxxxxxxxxxxx> > Signed-off-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> > --- > arch/x86/kvm/hyperv.c | 159 ++++++++++++++++-------------------------- > 1 file changed, 61 insertions(+), 98 deletions(-) Reviewed-by: Roman Kagan <rkagan@xxxxxxxxxxxxx>