Re: [PATCH v10 09/13] x86/mm: Reset tags in a canonical address helper call

From: Maciej Wieczor-Retman

Date: Tue Feb 24 2026 - 04:02:31 EST


On 2026-02-23 at 12:39:22 -0800, Dave Hansen wrote:
>On 2/4/26 11:20, Maciej Wieczor-Retman wrote:
>> - return __is_canonical_address(vaddr, boot_cpu_data.x86_virt_bits);
>> + return __is_canonical_address(__tag_reset(vaddr), boot_cpu_data.x86_virt_bits);
>> }
>
>I think we should just do this in __canonical_address() itself instead
>of changing its callers. There are a whole host of ways to get in there.

Cc: Sean Christopherson <seanjc@xxxxxxxxxx>

I tried doing that before and Sean said it'd be wrong from KVM perspective [1].
Not sure if there is some other way to do it so that it makes sense in KVM?

[1] https://lore.kernel.org/all/aWpuuiuqZhkGRj2B@xxxxxxxxxx/

--
Kind regards
Maciej Wieczór-Retman