From: Zhao Liu <zhao1.liu@intel.com>
To: Babu Moger <babu.moger@amd.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org,
davydov-max@yandex-team.ru
Subject: Re: [PATCH v5 2/6] target/i386: Update EPYC-Rome CPU model for Cache property, RAS, SVM feature bits
Date: Thu, 20 Feb 2025 19:18:19 +0800 [thread overview]
Message-ID: <Z7cPeyLAuNDL0Oc4@intel.com> (raw)
In-Reply-To: <8e40e18b433d2d152433724a15bddcacdecbf154.1738869208.git.babu.moger@amd.com>
On Thu, Feb 06, 2025 at 01:28:35PM -0600, Babu Moger wrote:
> Date: Thu, 6 Feb 2025 13:28:35 -0600
> From: Babu Moger <babu.moger@amd.com>
> Subject: [PATCH v5 2/6] target/i386: Update EPYC-Rome CPU model for Cache
> property, RAS, SVM feature bits
> X-Mailer: git-send-email 2.34.1
>
> Found that some of the cache properties are not set correctly for EPYC models.
>
> l1d_cache.no_invd_sharing should not be true.
> l1i_cache.no_invd_sharing should not be true.
>
> L2.self_init should be true.
> L2.inclusive should be true.
>
> L3.inclusive should not be true.
> L3.no_invd_sharing should be true.
>
> Fix these cache properties.
>
> Also add the missing RAS and SVM features bits on AMD EPYC-Rome. The SVM
> feature bits are used in nested guests.
>
> succor : Software uncorrectable error containment and recovery capability.
> overflow-recov : MCA overflow recovery support.
> lbrv : LBR virtualization
> tsc-scale : MSR based TSC rate control
> vmcb-clean : VMCB clean bits
> flushbyasid : Flush by ASID
> pause-filter : Pause intercept filter
> pfthreshold : PAUSE filter threshold
> v-vmsave-vmload : Virtualized VMLOAD and VMSAVE
> vgif : Virtualized GIF
>
> Signed-off-by: Babu Moger <babu.moger@amd.com>
> Reviewed-by: Maksim Davydov <davydov-max@yandex-team.ru>
> ---
> target/i386/cpu.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 73 insertions(+)
>
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index 94292bfaa2..e2c3c797ed 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -2342,6 +2342,60 @@ static const CPUCaches epyc_rome_v3_cache_info = {
> },
> };
>
> +static const CPUCaches epyc_rome_v5_cache_info = {
> + .l1d_cache = &(CPUCacheInfo) {
> + .type = DATA_CACHE,
> + .level = 1,
> + .size = 32 * KiB,
> + .line_size = 64,
> + .associativity = 8,
> + .partitions = 1,
> + .sets = 64,
> + .lines_per_tag = 1,
> + .self_init = 1,
This field could be true,
> + .share_level = CPU_TOPOLOGY_LEVEL_CORE,
> + },
> + .l1i_cache = &(CPUCacheInfo) {
> + .type = INSTRUCTION_CACHE,
> + .level = 1,
> + .size = 32 * KiB,
> + .line_size = 64,
> + .associativity = 8,
> + .partitions = 1,
> + .sets = 64,
> + .lines_per_tag = 1,
> + .self_init = 1,
ditto,
Compared to the previous cache model version, the differences can be
checked. I feel that in the future, when we introduce a new cache model,
it's better to avoid omitting items that default to false. This way, the
cache model can correspond to the output of the cpuid tool, making it
easier to compare and check.
Overall, LGTM,
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
next prev parent reply other threads:[~2025-02-20 10:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 19:28 [PATCH v5 0/6] target/i386: Update EPYC CPU models for Cache property, RAS, SVM feature and add EPYC-Turin CPU model Babu Moger
2025-02-06 19:28 ` [PATCH v5 1/6] target/i386: Update EPYC CPU model for Cache property, RAS, SVM feature bits Babu Moger
2025-02-20 10:59 ` Zhao Liu
2025-02-25 17:01 ` John Allen
2025-02-26 20:28 ` Moger, Babu
2025-02-27 6:42 ` Zhao Liu
2025-02-06 19:28 ` [PATCH v5 2/6] target/i386: Update EPYC-Rome " Babu Moger
2025-02-20 11:18 ` Zhao Liu [this message]
2025-02-21 0:41 ` Moger, Babu
2025-02-06 19:28 ` [PATCH v5 3/6] target/i386: Update EPYC-Milan " Babu Moger
2025-02-20 11:26 ` Zhao Liu
2025-02-21 0:43 ` Moger, Babu
2025-02-06 19:28 ` [PATCH v5 4/6] target/i386: Add feature that indicates WRMSR to BASE reg is non-serializing Babu Moger
2025-02-20 12:00 ` Zhao Liu
2025-02-21 0:45 ` Moger, Babu
2025-02-06 19:28 ` [PATCH v5 5/6] target/i386: Update EPYC-Genoa for Cache property, perfmon-v2, RAS and SVM feature bits Babu Moger
2025-02-20 12:05 ` Zhao Liu
2025-02-21 0:46 ` Moger, Babu
2025-02-06 19:28 ` [PATCH v5 6/6] target/i386: Add support for EPYC-Turin model Babu Moger
2025-02-20 12:11 ` Zhao Liu
2025-02-21 0:48 ` Moger, Babu
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=Z7cPeyLAuNDL0Oc4@intel.com \
--to=zhao1.liu@intel.com \
--cc=babu.moger@amd.com \
--cc=davydov-max@yandex-team.ru \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).