3143ae25cb
- kvm-accel-kvm-check-for-KVM_CAP_READONLY_MEM-on-VM.patch [RHEL-58928] - kvm-hw-s390x-ipl-Provide-more-memory-to-the-s390-ccw.img.patch [RHEL-58153] - kvm-pc-bios-s390-ccw-Use-the-libc-from-SLOF-and-remove-s.patch [RHEL-58153] - kvm-pc-bios-s390-ccw-Link-the-netboot-code-into-the-main.patch [RHEL-58153] - kvm-redhat-Remove-the-s390-netboot.img-from-the-spec-fil.patch [RHEL-58153] - kvm-hw-s390x-Remove-the-possibility-to-load-the-s390-net.patch [RHEL-58153] - kvm-pc-bios-s390-ccw-Merge-netboot.mak-into-the-main-Mak.patch [RHEL-58153] - kvm-docs-system-s390x-bootdevices-Update-the-documentati.patch [RHEL-58153] - kvm-pc-bios-s390-ccw-Remove-panics-from-ISO-IPL-path.patch [RHEL-58153] - kvm-pc-bios-s390-ccw-Remove-panics-from-ECKD-IPL-path.patch [RHEL-58153] - kvm-pc-bios-s390-ccw-Remove-panics-from-SCSI-IPL-path.patch [RHEL-58153] - kvm-pc-bios-s390-ccw-Remove-panics-from-DASD-IPL-path.patch [RHEL-58153] - kvm-pc-bios-s390-ccw-Remove-panics-from-Netboot-IPL-path.patch [RHEL-58153] - kvm-pc-bios-s390-ccw-Enable-failed-IPL-to-return-after-e.patch [RHEL-58153] - kvm-include-hw-s390x-Add-include-files-for-common-IPL-st.patch [RHEL-58153] - kvm-s390x-Add-individual-loadparm-assignment-to-CCW-devi.patch [RHEL-58153] - kvm-hw-s390x-Build-an-IPLB-for-each-boot-device.patch [RHEL-58153] - kvm-s390x-Rebuild-IPLB-for-SCSI-device-directly-from-DIA.patch [RHEL-58153] - kvm-pc-bios-s390x-Enable-multi-device-boot-loop.patch [RHEL-58153] - kvm-docs-system-Update-documentation-for-s390x-IPL.patch [RHEL-58153] - kvm-tests-qtest-Add-s390x-boot-order-tests-to-cdrom-test.patch [RHEL-58153] - kvm-pc-bios-s390-ccw-Clarify-alignment-is-in-bytes.patch [RHEL-58153] - kvm-pc-bios-s390-ccw-Don-t-generate-TEXTRELs.patch [RHEL-58153] - kvm-pc-bios-s390-ccw-Introduce-EXTRA_LDFLAGS.patch [RHEL-58153] - kvm-vnc-fix-crash-when-no-console-attached.patch [RHEL-50529] - kvm-vfio-migration-Report-only-stop-copy-size-in-vfio_st.patch [RHEL-64308] - kvm-vfio-migration-Change-trace-formats-from-hex-to-deci.patch [RHEL-64308] - kvm-kvm-Allow-kvm_arch_get-put_registers-to-accept-Error.patch [RHEL-20574] - kvm-target-i386-kvm-Report-which-action-failed-in-kvm_ar.patch [RHEL-20574] - kvm-target-i386-cpu-set-correct-supported-XCR0-features-.patch [RHEL-30315 RHEL-45110] - kvm-target-i386-do-not-rely-on-ExtSaveArea-for-accelerat.patch [RHEL-30315 RHEL-45110] - kvm-target-i386-return-bool-from-x86_cpu_filter_features.patch [RHEL-30315 RHEL-45110] - kvm-target-i386-add-AVX10-feature-and-AVX10-version-prop.patch [RHEL-30315 RHEL-45110] - kvm-target-i386-add-CPUID.24-features-for-AVX10.patch [RHEL-30315 RHEL-45110] - kvm-target-i386-Add-feature-dependencies-for-AVX10.patch [RHEL-30315 RHEL-45110] - kvm-target-i386-Add-AVX512-state-when-AVX10-is-supported.patch [RHEL-30315 RHEL-45110] - kvm-target-i386-Introduce-GraniteRapids-v2-model.patch [RHEL-30315 RHEL-45110] - kvm-target-i386-add-sha512-sm3-sm4-feature-bits.patch [RHEL-30315 RHEL-45110] - Resolves: RHEL-58928 (Boot SNP guests failed with qemu-kvm: kvm_set_user_memory_region) - Resolves: RHEL-58153 ([IBM 10.0 FEAT] KVM: Full boot order support - qemu part) - Resolves: RHEL-50529 (Qemu-kvm crashed if no display device setting and switching display by remote-viewer) - Resolves: RHEL-64308 (High threshold value observed in vGPU live migration) - Resolves: RHEL-20574 (Fail migration properly when put cpu register fails) - Resolves: RHEL-30315 ([Intel 10.0 FEAT] [GNR] Virt-QEMU: Add AVX10.1 instruction support) - Resolves: RHEL-45110 ([Intel 10.0 FEAT] [CWF][DMR] Virt-QEMU: Advertise new instructions SHA2-512NI, SM3, and SM4)
90 lines
3.8 KiB
Diff
90 lines
3.8 KiB
Diff
From c44f6f57898eb9f382545201033586a17bbde83c Mon Sep 17 00:00:00 2001
|
|
From: Tao Su <tao1.su@linux.intel.com>
|
|
Date: Thu, 31 Oct 2024 16:52:31 +0800
|
|
Subject: [PATCH 35/38] target/i386: Add feature dependencies for AVX10
|
|
|
|
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
|
|
RH-MergeRequest: 280: Add support for the AVX10.1, SHA512, SM3 and SM4 instruction sets
|
|
RH-Jira: RHEL-30315 RHEL-45110
|
|
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
RH-Commit: [6/9] 38b1a79032d7acdb264a6403fd4d8239d89b68c4 (bonzini/rhel-qemu-kvm)
|
|
|
|
Since the highest supported vector length for a processor implies that
|
|
all lesser vector lengths are also supported, add the dependencies of
|
|
the supported vector lengths. If all vector lengths aren't supported,
|
|
clear AVX10 enable bit as well.
|
|
|
|
Note that the order of AVX10 related dependencies should be kept as:
|
|
CPUID_24_0_EBX_AVX10_128 -> CPUID_24_0_EBX_AVX10_256,
|
|
CPUID_24_0_EBX_AVX10_256 -> CPUID_24_0_EBX_AVX10_512,
|
|
CPUID_24_0_EBX_AVX10_VL_MASK -> CPUID_7_1_EDX_AVX10,
|
|
CPUID_7_1_EDX_AVX10 -> CPUID_24_0_EBX,
|
|
so that prevent user from setting weird CPUID combinations, e.g. 256-bits
|
|
and 512-bits are supported but 128-bits is not, no vector lengths are
|
|
supported but AVX10 enable bit is still set.
|
|
|
|
Since AVX10_128 will be reserved as 1, adding these dependencies has the
|
|
bonus that when user sets -cpu host,-avx10-128, CPUID_7_1_EDX_AVX10 and
|
|
CPUID_24_0_EBX will be disabled automatically.
|
|
|
|
Tested-by: Xuelian Guo <xuelian.guo@intel.com>
|
|
Signed-off-by: Tao Su <tao1.su@linux.intel.com>
|
|
Link: https://lore.kernel.org/r/20241028024512.156724-5-tao1.su@linux.intel.com
|
|
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Link: https://lore.kernel.org/r/20241031085233.425388-7-tao1.su@linux.intel.com
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
(cherry picked from commit 150ab84b2d0083e6af344cca70290614d4fe568d)
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
---
|
|
target/i386/cpu.c | 16 ++++++++++++++++
|
|
target/i386/cpu.h | 4 ++++
|
|
2 files changed, 20 insertions(+)
|
|
|
|
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
|
|
index 958cbff54d..a740429fdd 100644
|
|
--- a/target/i386/cpu.c
|
|
+++ b/target/i386/cpu.c
|
|
@@ -1766,6 +1766,22 @@ static FeatureDep feature_dependencies[] = {
|
|
.from = { FEAT_7_0_EBX, CPUID_7_0_EBX_SGX },
|
|
.to = { FEAT_SGX_12_1_EAX, ~0ull },
|
|
},
|
|
+ {
|
|
+ .from = { FEAT_24_0_EBX, CPUID_24_0_EBX_AVX10_128 },
|
|
+ .to = { FEAT_24_0_EBX, CPUID_24_0_EBX_AVX10_256 },
|
|
+ },
|
|
+ {
|
|
+ .from = { FEAT_24_0_EBX, CPUID_24_0_EBX_AVX10_256 },
|
|
+ .to = { FEAT_24_0_EBX, CPUID_24_0_EBX_AVX10_512 },
|
|
+ },
|
|
+ {
|
|
+ .from = { FEAT_24_0_EBX, CPUID_24_0_EBX_AVX10_VL_MASK },
|
|
+ .to = { FEAT_7_1_EDX, CPUID_7_1_EDX_AVX10 },
|
|
+ },
|
|
+ {
|
|
+ .from = { FEAT_7_1_EDX, CPUID_7_1_EDX_AVX10 },
|
|
+ .to = { FEAT_24_0_EBX, ~0ull },
|
|
+ },
|
|
};
|
|
|
|
typedef struct X86RegisterInfo32 {
|
|
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
|
|
index c60290b8d5..4da9ed5930 100644
|
|
--- a/target/i386/cpu.h
|
|
+++ b/target/i386/cpu.h
|
|
@@ -997,6 +997,10 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w);
|
|
#define CPUID_24_0_EBX_AVX10_256 (1U << 17)
|
|
/* AVX10 512-bit vector support is present */
|
|
#define CPUID_24_0_EBX_AVX10_512 (1U << 18)
|
|
+/* AVX10 vector length support mask */
|
|
+#define CPUID_24_0_EBX_AVX10_VL_MASK (CPUID_24_0_EBX_AVX10_128 | \
|
|
+ CPUID_24_0_EBX_AVX10_256 | \
|
|
+ CPUID_24_0_EBX_AVX10_512)
|
|
|
|
/* RAS Features */
|
|
#define CPUID_8000_0007_EBX_OVERFLOW_RECOV (1U << 0)
|
|
--
|
|
2.39.3
|
|
|