From: Andrew Cooper <andrew.cooper3@citrix.com>
To: yosry@kernel.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
pbonzini@redhat.com, seanjc@google.com, venkateshs@chromium.org,
venkateshs@google.com
Subject: Re: [PATCH v2 3/3] KVM: SVM: Advertise Translation Cache Extensions to userspace
Date: Sat, 7 Mar 2026 01:54:18 +0000 [thread overview]
Message-ID: <34cbc227-f01f-4d4b-b6ab-19bcb02d7e3c@citrix.com> (raw)
In-Reply-To: <20260307011619.2324234-4-yosry@kernel.org>
> From: Venkatesh Srinivas <venkateshs@chromium.org>
>
> TCE augments the behavior of TLB invalidating instructions (INVLPG,
> INVLPGB, and INVPCID) to only invalidate translations for relevant
> intermediate mappings to the address range, rather than ALL intermdiate
> translations.
>
> The Linux kernel has been setting EFER.TCE if supported by the CPU since
> commit 440a65b7d25f ("x86/mm: Enable AMD translation cache extensions"),
> as it may improve performance.
>
> KVM does not need to do anything to virtualize the feature, only
> advertise it and allow setting EFER.TCE. If a TLB invalidating
> instruction is not intercepted, it will behave according to the guest's
> setting of EFER.TCE as the value will be loaded on VM-Enter. Otherwise,
> KVM's emulation may invalidate more TLB entries, which is perfectly fine
> as the CPU is allowed to invalidate more TLB entries that it strictly
> needs to.
>
> Advertise X86_FEATURE_TCE to userspace, and allow the guest to set
> EFER.TCE if available.
>
> Signed-off-by: Venkatesh Srinivas <venkateshs@chromium.org>
> Co-developed-by: Yosry Ahmed <yosry@kernel.org>
> Signed-off-by: Yosry Ahmed <yosry@kernel.org>
I'll repeat what I said on that referenced patch.
What's the point? AMD have said that TCE doesn't exist any more; it's a
bit that's no longer wired into anything.
You've got to get to pre-Zen hardware before this has any behavioural
effect, at which point the breath of testing is almost 0.
~Andrew
next prev parent reply other threads:[~2026-03-07 1:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-07 1:16 [PATCH v2 0/3] KVM: SVM: Advertise TCE " Yosry Ahmed
2026-03-07 1:16 ` [PATCH v2 1/3] KVM: x86: Move some EFER bits enablement to common code Yosry Ahmed
2026-03-07 1:16 ` [PATCH v2 2/3] KVM: x86: Use kvm_cpu_cap_has() for EFER bits enablement checks Yosry Ahmed
2026-03-07 1:16 ` [PATCH v2 3/3] KVM: SVM: Advertise Translation Cache Extensions to userspace Yosry Ahmed
2026-03-07 1:54 ` Andrew Cooper [this message]
2026-03-09 13:53 ` Yosry Ahmed
2026-03-09 15:06 ` Sean Christopherson
2026-03-09 15:10 ` Yosry Ahmed
2026-03-09 22:53 ` Venkatesh Srinivas
2026-04-03 15:13 ` [PATCH v2 0/3] KVM: SVM: Advertise TCE " Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=34cbc227-f01f-4d4b-b6ab-19bcb02d7e3c@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=venkateshs@chromium.org \
--cc=venkateshs@google.com \
--cc=yosry@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®