From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-10628.protonmail.ch (mail-10628.protonmail.ch [79.135.106.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B373E369981 for ; Tue, 24 Feb 2026 08:57:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.28 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771923456; cv=none; b=j2LcXvFOWQugIbIlbbPRxpLnDqnOD3QC+dAzmlhiCS4qUWM0vu5khEmp0b/Fm2CGfafNQHxRhSRme1200IrVdwP4Wi+zUOeFW1Nm97tbpl/tdMERc1YoSBCPI9BpFkLxAcODdJSjy+fW6+PDSU6OAA8rDElWzDJn49zVkZSawq4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771923456; c=relaxed/simple; bh=OsvyKck5oIZOKJsZUjwTW7P7uUZIQ+g6fS612hrhWpA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oEjxw4K5Lm2OZJ509lLRHfqNcXdHntyzc47bxQpCN5plL3tkjZQxBlYW66SCvnZlDZOw7w8F4/o4KSr8UXqSM41+RSzUCVonEC4t8TX30d5BIN3TtNMtFnWxlViOAcxdoaiDFijlyxR0OfIv5RI6gD7p9un0TdhdtWdV9Jo0MXc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me; spf=pass smtp.mailfrom=pm.me; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b=q2OpzsVY; arc=none smtp.client-ip=79.135.106.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pm.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b="q2OpzsVY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1771923451; x=1772182651; bh=7VlzQp7GeURUTlmP9SjOKzMAqMmo5FuwR6FsQkb/IMs=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=q2OpzsVY++TXT1M4+lR1LEI1jEY3YJYdtvpIT6+Dd0Fh9D/pam+am9VAEEfVwdK78 jjzATxgVamo4t/NNaW/I05r8UK/pJX6v4p0tm1wpcg7dfk08tpajfKKFYYnLky7xCs TYcmJUlOI+r9Q8ZgE5EUXxIZJpbzlBIcIfBnhNRRMXFV5G3WXpz86Xq+7cmRzgD64i SJT2KOicSZU+VNGb855oTVZ8G7cgzL6vFsrwU+uoZzWI5D7NNtv3578G6S6tXGMFR2 5MLJaiysFgVdjcLBV60Jhus6DR6x3BqC91M57MblTYFrGO76JLV9N5biX2Q0K/2+OG ghdQ5TODRNw7g== Date: Tue, 24 Feb 2026 08:57:26 +0000 To: Dave Hansen From: Maciej Wieczor-Retman Cc: Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Maciej Wieczor-Retman , linux-kernel@vger.kernel.org Subject: Re: [PATCH v10 09/13] x86/mm: Reset tags in a canonical address helper call Message-ID: In-Reply-To: References: <8c1d34e7d8d9fdeb836230160c9207e7bc06e0ee.1770232424.git.m.wieczorretman@pm.me> Feedback-ID: 164464600:user:proton X-Pm-Message-ID: fad61112ce89ef35a26d1789e07d4daa7ea2f194 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2026-02-23 at 12:39:22 -0800, Dave Hansen wrote: >On 2/4/26 11:20, Maciej Wieczor-Retman wrote: >> -=09return __is_canonical_address(vaddr, boot_cpu_data.x86_virt_bits); >> +=09return __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 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@google.com/ --=20 Kind regards Maciej Wiecz=C3=B3r-Retman