Re: [PATCH v2 3/5] x86/hyperv: Use native callbacks for trimming and ASID transitions
From: Naman Jain
Date: Wed Nov 25 2026 - 00:06:29 EST
On 11/25/2026 1:42 AM, Michael Kelley wrote:
From: Naman Jain <namjain@xxxxxxxxxxxxxxxxxxx> Sent: Monday, November 23, 2026 10:45 PM
On 11/24/2026 5:46 AM, Michael Kelley wrote:
From: Naman Jain <namjain@xxxxxxxxxxxxxxxxxxx> Sent: Tuesday, November 17, 2026 1:15 AM
Successful Hyper-V flush hypercalls do not run the guest callbacks that
How should I interpret the "Successful" qualifier on this statement? It seems
a bit spurious since unsuccessful flush hypercalls don't run the callbacks
either. But maybe there's something I'm not understanding ....
Michael
I meant that a failed hypercall leads to native fallback, which can run
the callbacks, whereas a successful call returns without
doing so. But the hypercall itself never runs those callbacks.
I can use this commit msg the next time.
x86/hyperv: Use native flushes for mask trimming and ASID transitions
When trimming mm_cpumask(), Linux needs to run flush_tlb_func() on
remote CPUs so they can clear their stale bits. A Hyper-V TLB flush
hypercall invalidates translations but does not run this function.
The same applies during a global ASID transition. CPUs still using
local ASIDs need to run flush_tlb_func() to switch to the global ASID.
Call native_flush_tlb_multi() in both cases so the required work runs
on the target CPUs.
Yes, this text looks good to me.
A comment unrelated to the commit text: mm_in_asid_transition()
is always false unless the INVLPGB instruction is present, which is only
on AMD processors. Furthermore, when I last checked about a year
ago, Hyper-V does not make INVLPGB available in guest VMs, except
for SEV-SNP guests. So if you want to test the local ASID to global
ASID path, it must be on an SEV-SNP VM.
Michael
Thanks. Let me check if I can get hands on this setup.
Regards,
Naman