- kvm-s390x-Fix-leak-in-machine_set_loadparm.patch [RHEL-98554] - kvm-hw-s390x-ccw-device-Fix-memory-leak-in-loadparm-sett.patch [RHEL-98554] - kvm-amd_iommu-Rename-variable-mmio-to-mr_mmio.patch [RHEL-66202] - kvm-amd_iommu-Add-support-for-pass-though-mode.patch [RHEL-66202] - kvm-amd_iommu-Use-shared-memory-region-for-Interrupt-Rem.patch [RHEL-66202] - kvm-amd_iommu-Send-notification-when-invalidate-interrup.patch [RHEL-66202] - kvm-amd_iommu-Check-APIC-ID-255-for-XTSup.patch [RHEL-66202] - kvm-io-Fix-partial-struct-copy-in-qio_dns_resolver_looku.patch [RHEL-67104] - kvm-util-qemu-sockets-Refactor-setting-client-sockopts-i.patch [RHEL-67104] - kvm-util-qemu-sockets-Refactor-success-and-failure-paths.patch [RHEL-67104] - kvm-util-qemu-sockets-Add-support-for-keep-alive-flag-to.patch [RHEL-67104] - kvm-util-qemu-sockets-Refactor-inet_parse-to-use-QemuOpt.patch [RHEL-67104] - kvm-util-qemu-sockets-Introduce-inet-socket-options-cont.patch [RHEL-67104] - kvm-tests-unit-test-util-sockets-fix-mem-leak-on-error-o.patch [RHEL-67104] - kvm-target-i386-Expose-bits-related-to-SRSO-vulnerabilit.patch [RHEL-52649] - kvm-target-i386-Add-PerfMonV2-feature-bit.patch [RHEL-52649] - kvm-target-i386-Update-EPYC-CPU-model-for-Cache-property.patch [RHEL-52649] - kvm-target-i386-Update-EPYC-Rome-CPU-model-for-Cache-pro.patch [RHEL-52649] - kvm-target-i386-Update-EPYC-Milan-CPU-model-for-Cache-pr.patch [RHEL-52649] - kvm-target-i386-Add-couple-of-feature-bits-in-CPUID_Fn80.patch [RHEL-52649] - kvm-target-i386-Update-EPYC-Genoa-for-Cache-property-per.patch [RHEL-52649] - kvm-target-i386-Add-support-for-EPYC-Turin-model.patch [RHEL-52649] - kvm-hw-i386-amd_iommu-Assign-pci-id-0x1419-for-the-AMD-I.patch [RHEL-70926] - kvm-hw-i386-amd_iommu-Isolate-AMDVI-PCI-from-amd-iommu-d.patch [RHEL-70925] - kvm-hw-i386-amd_iommu-Allow-migration-when-explicitly-cr.patch [RHEL-70925] - kvm-Enable-amd-iommu-device.patch [RHEL-70925] - kvm-include-qemu-compiler-add-QEMU_UNINITIALIZED-attribu.patch [RHEL-99888] - kvm-hw-virtio-virtio-avoid-cost-of-ftrivial-auto-var-ini.patch [RHEL-99888] - kvm-block-skip-automatic-zero-init-of-large-array-in-ioq.patch [RHEL-99888] - kvm-chardev-char-fd-skip-automatic-zero-init-of-large-ar.patch [RHEL-99888] - kvm-chardev-char-pty-skip-automatic-zero-init-of-large-a.patch [RHEL-99888] - kvm-chardev-char-socket-skip-automatic-zero-init-of-larg.patch [RHEL-99888] - kvm-hw-audio-ac97-skip-automatic-zero-init-of-large-arra.patch [RHEL-99888] - kvm-hw-audio-cs4231a-skip-automatic-zero-init-of-large-a.patch [RHEL-99888] - kvm-hw-audio-es1370-skip-automatic-zero-init-of-large-ar.patch [RHEL-99888] - kvm-hw-audio-gus-skip-automatic-zero-init-of-large-array.patch [RHEL-99888] - kvm-hw-audio-marvell_88w8618-skip-automatic-zero-init-of.patch [RHEL-99888] - kvm-hw-audio-sb16-skip-automatic-zero-init-of-large-arra.patch [RHEL-99888] - kvm-hw-audio-via-ac97-skip-automatic-zero-init-of-large-.patch [RHEL-99888] - kvm-hw-char-sclpconsole-lm-skip-automatic-zero-init-of-l.patch [RHEL-99888] - kvm-hw-dma-xlnx_csu_dma-skip-automatic-zero-init-of-larg.patch [RHEL-99888] - kvm-hw-display-vmware_vga-skip-automatic-zero-init-of-la.patch [RHEL-99888] - kvm-hw-hyperv-syndbg-skip-automatic-zero-init-of-large-a.patch [RHEL-99888] - kvm-hw-misc-aspeed_hace-skip-automatic-zero-init-of-larg.patch [RHEL-99888] - kvm-hw-net-rtl8139-skip-automatic-zero-init-of-large-arr.patch [RHEL-99888] - kvm-hw-net-tulip-skip-automatic-zero-init-of-large-array.patch [RHEL-99888] - kvm-hw-net-virtio-net-skip-automatic-zero-init-of-large-.patch [RHEL-99888] - kvm-hw-net-xgamc-skip-automatic-zero-init-of-large-array.patch [RHEL-99888] - kvm-hw-nvme-ctrl-skip-automatic-zero-init-of-large-array.patch [RHEL-99888] - kvm-hw-ppc-spapr_tpm_proxy-skip-automatic-zero-init-of-l.patch [RHEL-99888] - kvm-hw-usb-hcd-ohci-skip-automatic-zero-init-of-large-ar.patch [RHEL-99888] - kvm-hw-scsi-lsi53c895a-skip-automatic-zero-init-of-large.patch [RHEL-99888] - kvm-hw-scsi-megasas-skip-automatic-zero-init-of-large-ar.patch [RHEL-99888] - kvm-hw-ufs-lu-skip-automatic-zero-init-of-large-array.patch [RHEL-99888] - kvm-net-socket-skip-automatic-zero-init-of-large-array.patch [RHEL-99888] - kvm-net-stream-skip-automatic-zero-init-of-large-array.patch [RHEL-99888] - kvm-ui-vnc-Update-display-update-interval-when-VM-state-.patch [RHEL-100741] - Resolves: RHEL-98554 ([s390x][RHEL9.7.0][virtio_block] there would be memory leak with virtio_blk disks) - Resolves: RHEL-66202 ([AMDSERVER 9.6 Feature] qemu: Interrupt Remap support for emulated amd viommu) - Resolves: RHEL-67104 (postcopy on the destination host can't switch into pause status under the network issue if boot VM with '-S') - Resolves: RHEL-52649 ([AMDSERVER 9.6 Feature] Turin: Qemu EPYC-Turin Model) - Resolves: RHEL-70926 (Qemu/amd-iommu: Advertise a suitable device id) - Resolves: RHEL-70925 (Qemu/amd-iommu: Add ability to manually specify the AMDVI-PCI device) - Resolves: RHEL-99888 (-ftrivial-auto-var-init=zero reduced performance [rhel-9]) - Resolves: RHEL-100741 (Video stuck after switchover phase when play one video during migration [rhel-9])
168 lines
5.7 KiB
Diff
168 lines
5.7 KiB
Diff
From 768e39f40b394eb4524a83857b86e8f7497f4414 Mon Sep 17 00:00:00 2001
|
|
From: Babu Moger <babu.moger@amd.com>
|
|
Date: Thu, 8 May 2025 14:58:03 -0500
|
|
Subject: [PATCH 21/57] target/i386: Update EPYC-Genoa for Cache property,
|
|
perfmon-v2, RAS and SVM feature bits
|
|
|
|
RH-Author: John Allen <None>
|
|
RH-MergeRequest: 378: Update EPYC Models and Feature Bits
|
|
RH-Jira: RHEL-52649
|
|
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
RH-Commit: [7/8] b144233a1115385a1f792c4454f4511173f753d8 (johnalle/qemu-kvm-fork)
|
|
|
|
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-Genoa model.
|
|
The SVM feature bits are used in nested guests.
|
|
|
|
perfmon-v2 : Allow guests to make use of the PerfMonV2 features.
|
|
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
|
|
fs-gs-base-ns : WRMSR to {FS,GS,KERNEL_GS}_BASE is non-serializing
|
|
|
|
The feature details are available in APM listed below [1].
|
|
[1] AMD64 Architecture Programmer's Manual Volume 2: System Programming
|
|
Publication # 24593 Revision 3.41.
|
|
|
|
Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537
|
|
Signed-off-by: Babu Moger <babu.moger@amd.com>
|
|
Reviewed-by: Maksim Davydov <davydov-max@yandex-team.ru>
|
|
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
|
|
Link: https://lore.kernel.org/r/afe3f05d4116124fd5795f28fc23d7b396140313.1746734284.git.babu.moger@amd.com
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
(cherry picked from commit abc92cc8488b5dbcc403b5be24d8092180605101)
|
|
|
|
JIRA: https://issues.redhat.com/browse/RHEL-52649
|
|
|
|
Signed-off-by: John Allen <johnalle@redhat.com>
|
|
---
|
|
target/i386/cpu.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++-
|
|
1 file changed, 79 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
|
|
index 2218071fca..2bc2d41259 100644
|
|
--- a/target/i386/cpu.c
|
|
+++ b/target/i386/cpu.c
|
|
@@ -2598,6 +2598,59 @@ static const CPUCaches epyc_genoa_cache_info = {
|
|
},
|
|
};
|
|
|
|
+static const CPUCaches epyc_genoa_v2_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 = true,
|
|
+ .share_level = CPU_TOPO_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 = true,
|
|
+ .share_level = CPU_TOPO_LEVEL_CORE,
|
|
+ },
|
|
+ .l2_cache = &(CPUCacheInfo) {
|
|
+ .type = UNIFIED_CACHE,
|
|
+ .level = 2,
|
|
+ .size = 1 * MiB,
|
|
+ .line_size = 64,
|
|
+ .associativity = 8,
|
|
+ .partitions = 1,
|
|
+ .sets = 2048,
|
|
+ .lines_per_tag = 1,
|
|
+ .self_init = true,
|
|
+ .inclusive = true,
|
|
+ .share_level = CPU_TOPO_LEVEL_CORE,
|
|
+ },
|
|
+ .l3_cache = &(CPUCacheInfo) {
|
|
+ .type = UNIFIED_CACHE,
|
|
+ .level = 3,
|
|
+ .size = 32 * MiB,
|
|
+ .line_size = 64,
|
|
+ .associativity = 16,
|
|
+ .partitions = 1,
|
|
+ .sets = 32768,
|
|
+ .lines_per_tag = 1,
|
|
+ .self_init = true,
|
|
+ .no_invd_sharing = true,
|
|
+ .complex_indexing = false,
|
|
+ .share_level = CPU_TOPO_LEVEL_DIE,
|
|
+ },
|
|
+};
|
|
/* The following VMX features are not supported by KVM and are left out in the
|
|
* CPU definitions:
|
|
*
|
|
@@ -5530,7 +5583,7 @@ static const X86CPUDefinition builtin_x86_defs[] = {
|
|
CPUID_8000_0008_EBX_STIBP_ALWAYS_ON |
|
|
CPUID_8000_0008_EBX_AMD_SSBD | CPUID_8000_0008_EBX_AMD_PSFD,
|
|
.features[FEAT_8000_0021_EAX] =
|
|
- CPUID_8000_0021_EAX_No_NESTED_DATA_BP |
|
|
+ CPUID_8000_0021_EAX_NO_NESTED_DATA_BP |
|
|
CPUID_8000_0021_EAX_LFENCE_ALWAYS_SERIALIZING |
|
|
CPUID_8000_0021_EAX_NULL_SEL_CLR_BASE |
|
|
CPUID_8000_0021_EAX_AUTO_IBRS,
|
|
@@ -5565,6 +5618,31 @@ static const X86CPUDefinition builtin_x86_defs[] = {
|
|
.xlevel = 0x80000022,
|
|
.model_id = "AMD EPYC-Genoa Processor",
|
|
.cache_info = &epyc_genoa_cache_info,
|
|
+ .versions = (X86CPUVersionDefinition[]) {
|
|
+ { .version = 1 },
|
|
+ {
|
|
+ .version = 2,
|
|
+ .props = (PropValue[]) {
|
|
+ { "overflow-recov", "on" },
|
|
+ { "succor", "on" },
|
|
+ { "lbrv", "on" },
|
|
+ { "tsc-scale", "on" },
|
|
+ { "vmcb-clean", "on" },
|
|
+ { "flushbyasid", "on" },
|
|
+ { "pause-filter", "on" },
|
|
+ { "pfthreshold", "on" },
|
|
+ { "v-vmsave-vmload", "on" },
|
|
+ { "vgif", "on" },
|
|
+ { "fs-gs-base-ns", "on" },
|
|
+ { "perfmon-v2", "on" },
|
|
+ { "model-id",
|
|
+ "AMD EPYC-Genoa-v2 Processor" },
|
|
+ { /* end of list */ }
|
|
+ },
|
|
+ .cache_info = &epyc_genoa_v2_cache_info
|
|
+ },
|
|
+ { /* end of list */ }
|
|
+ }
|
|
},
|
|
};
|
|
|
|
--
|
|
2.39.3
|
|
|