[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/16] target/i386: Add new EPYC CPU versions with updated cache_i
|
From: |
Paolo Bonzini |
|
Subject: |
[PULL 09/16] target/i386: Add new EPYC CPU versions with updated cache_info |
|
Date: |
Tue, 9 May 2023 11:04:46 +0200 |
From: Michael Roth <michael.roth@amd.com>
Introduce new EPYC cpu versions: EPYC-v4 and EPYC-Rome-v3.
The only difference vs. older models is an updated cache_info with
the 'complex_indexing' bit unset, since this bit is not currently
defined for AMD and may cause problems should it be used for
something else in the future. Setting this bit will also cause
CPUID validation failures when running SEV-SNP guests.
Signed-off-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Babu Moger <babu.moger@amd.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20230504205313.225073-3-babu.moger@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/cpu.c | 118 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 118 insertions(+)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 855d5abc7d17..90a650a836a0 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -1729,6 +1729,56 @@ static const CPUCaches epyc_cache_info = {
},
};
+static CPUCaches epyc_v4_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,
+ .no_invd_sharing = true,
+ },
+ .l1i_cache = &(CPUCacheInfo) {
+ .type = INSTRUCTION_CACHE,
+ .level = 1,
+ .size = 64 * KiB,
+ .line_size = 64,
+ .associativity = 4,
+ .partitions = 1,
+ .sets = 256,
+ .lines_per_tag = 1,
+ .self_init = 1,
+ .no_invd_sharing = true,
+ },
+ .l2_cache = &(CPUCacheInfo) {
+ .type = UNIFIED_CACHE,
+ .level = 2,
+ .size = 512 * KiB,
+ .line_size = 64,
+ .associativity = 8,
+ .partitions = 1,
+ .sets = 1024,
+ .lines_per_tag = 1,
+ },
+ .l3_cache = &(CPUCacheInfo) {
+ .type = UNIFIED_CACHE,
+ .level = 3,
+ .size = 8 * MiB,
+ .line_size = 64,
+ .associativity = 16,
+ .partitions = 1,
+ .sets = 8192,
+ .lines_per_tag = 1,
+ .self_init = true,
+ .inclusive = true,
+ .complex_indexing = false,
+ },
+};
+
static const CPUCaches epyc_rome_cache_info = {
.l1d_cache = &(CPUCacheInfo) {
.type = DATA_CACHE,
@@ -1779,6 +1829,56 @@ static const CPUCaches epyc_rome_cache_info = {
},
};
+static const CPUCaches epyc_rome_v3_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,
+ .no_invd_sharing = true,
+ },
+ .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,
+ .no_invd_sharing = true,
+ },
+ .l2_cache = &(CPUCacheInfo) {
+ .type = UNIFIED_CACHE,
+ .level = 2,
+ .size = 512 * KiB,
+ .line_size = 64,
+ .associativity = 8,
+ .partitions = 1,
+ .sets = 1024,
+ .lines_per_tag = 1,
+ },
+ .l3_cache = &(CPUCacheInfo) {
+ .type = UNIFIED_CACHE,
+ .level = 3,
+ .size = 16 * MiB,
+ .line_size = 64,
+ .associativity = 16,
+ .partitions = 1,
+ .sets = 16384,
+ .lines_per_tag = 1,
+ .self_init = true,
+ .inclusive = true,
+ .complex_indexing = false,
+ },
+};
+
static const CPUCaches epyc_milan_cache_info = {
.l1d_cache = &(CPUCacheInfo) {
.type = DATA_CACHE,
@@ -4113,6 +4213,15 @@ static const X86CPUDefinition builtin_x86_defs[] = {
{ /* end of list */ }
}
},
+ {
+ .version = 4,
+ .props = (PropValue[]) {
+ { "model-id",
+ "AMD EPYC-v4 Processor" },
+ { /* end of list */ }
+ },
+ .cache_info = &epyc_v4_cache_info
+ },
{ /* end of list */ }
}
},
@@ -4232,6 +4341,15 @@ static const X86CPUDefinition builtin_x86_defs[] = {
{ /* end of list */ }
}
},
+ {
+ .version = 3,
+ .props = (PropValue[]) {
+ { "model-id",
+ "AMD EPYC-Rome-v3 Processor" },
+ { /* end of list */ }
+ },
+ .cache_info = &epyc_rome_v3_cache_info
+ },
{ /* end of list */ }
}
},
--
2.40.1
- [PULL 00/16] Misc patches for 2023-05-09, Paolo Bonzini, 2023/05/09
- [PULL 02/16] test-aio-multithread: do not use mb_read/mb_set for simple flags, Paolo Bonzini, 2023/05/09
- [PULL 01/16] rcu: remove qatomic_mb_set, expand comments, Paolo Bonzini, 2023/05/09
- [PULL 03/16] test-aio-multithread: simplify test_multi_co_schedule, Paolo Bonzini, 2023/05/09
- [PULL 04/16] call_rcu: stop using mb_set/mb_read, Paolo Bonzini, 2023/05/09
- [PULL 07/16] include/qemu/osdep.h: Bump _WIN32_WINNT to the Windows 8 API, Paolo Bonzini, 2023/05/09
- [PULL 05/16] tb-maint: do not use mb_read/mb_set, Paolo Bonzini, 2023/05/09
- [PULL 09/16] target/i386: Add new EPYC CPU versions with updated cache_info,
Paolo Bonzini <=
- [PULL 06/16] MAINTAINERS: add stanza for Kconfig files, Paolo Bonzini, 2023/05/09
- [PULL 08/16] target/i386: allow versioned CPUs to specify new cache_info, Paolo Bonzini, 2023/05/09
- [PULL 12/16] target/i386: Add missing feature bits in EPYC-Milan model, Paolo Bonzini, 2023/05/09
- [PULL 11/16] target/i386: Add feature bits for CPUID_Fn80000021_EAX, Paolo Bonzini, 2023/05/09
- [PULL 13/16] target/i386: Add VNMI and automatic IBRS feature bits, Paolo Bonzini, 2023/05/09
- [PULL 10/16] target/i386: Add a couple of feature bits in 8000_0008_EBX, Paolo Bonzini, 2023/05/09
- [PULL 16/16] meson: leave unnecessary modules out of the build, Paolo Bonzini, 2023/05/09
- [PULL 14/16] target/i386: Add EPYC-Genoa model to support Zen 4 processor series, Paolo Bonzini, 2023/05/09
- [PULL 15/16] docs: clarify --without-default-devices, Paolo Bonzini, 2023/05/09
- Re: [PULL 00/16] Misc patches for 2023-05-09, Richard Henderson, 2023/05/10