linux/arch/x86/hyperv
Michael Kelley 493cc07385 x86/hyperv: Exclude lazy TLB mode CPUs from enlightened TLB flushes
In the case where page tables are not freed, native_flush_tlb_multi()
does not do a remote TLB flush on CPUs in lazy TLB mode because the
CPU will flush itself at the next context switch. By comparison, the
Hyper-V enlightened TLB flush does not exclude CPUs in lazy TLB mode
and so performs unnecessary flushes.

If we're not freeing page tables, add logic to test for lazy TLB
mode when adding CPUs to the input argument to the Hyper-V TLB
flush hypercall. Exclude lazy TLB mode CPUs so the behavior
matches native_flush_tlb_multi() and the unnecessary flushes are
avoided. Handle both the <=64 vCPU case and the _ex case for >64
vCPUs.

Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1679922967-26582-3-git-send-email-mikelley@microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
2023-04-17 19:19:05 +00:00
..
hv_apic.c x86/hyperv: Add callback filter to cpumask_to_vpset() 2023-04-17 19:19:05 +00:00
hv_init.c Drivers: hv: Don't remap addresses that are above shared_gpa_boundary 2023-04-17 19:19:04 +00:00
hv_proc.c drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status 2021-04-21 09:49:19 +00:00
hv_spinlock.c x86/hyperv: Fix unused variable 'msr_val' warning in hv_qlock_wait 2021-03-24 11:31:04 +00:00
irqdomain.c genirq: Return a const cpumask from irq_data_get_affinity_mask 2022-07-07 09:38:04 +01:00
ivm.c hv_netvsc: Remove second mapping of send and recv buffers 2023-04-17 19:19:04 +00:00
Makefile x86/hyperv: Add new hvcall guest address host visibility support 2021-10-28 11:21:33 +00:00
mmu.c x86/hyperv: Exclude lazy TLB mode CPUs from enlightened TLB flushes 2023-04-17 19:19:05 +00:00
nested.c drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status 2021-04-21 09:49:19 +00:00