[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.10 27/33] i386/cpuid: Move leaf 7 to correct group
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.10 27/33] i386/cpuid: Move leaf 7 to correct group |
Date: |
Thu, 22 Feb 2024 00:47:10 +0300 |
From: Xiaoyao Li <xiaoyao.li@intel.com>
CPUID leaf 7 was grouped together with SGX leaf 0x12 by commit
b9edbadefb9e ("i386: Propagate SGX CPUID sub-leafs to KVM") by mistake.
SGX leaf 0x12 has its specific logic to check if subleaf (starting from 2)
is valid or not by checking the bit 0:3 of corresponding EAX is 1 or
not.
Leaf 7 follows the logic that EAX of subleaf 0 enumerates the maximum
valid subleaf.
Fixes: b9edbadefb9e ("i386: Propagate SGX CPUID sub-leafs to KVM")
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Message-ID: <20240125024016.2521244-4-xiaoyao.li@intel.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 0729857c707535847d7fe31d3d91eb8b2a118e3c)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 5779b80ecb..4d83bb5784 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -1900,7 +1900,6 @@ int kvm_arch_init_vcpu(CPUState *cs)
c = &cpuid_data.entries[cpuid_i++];
}
break;
- case 0x7:
case 0x12:
for (j = 0; ; j++) {
c->function = i;
@@ -1920,6 +1919,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
c = &cpuid_data.entries[cpuid_i++];
}
break;
+ case 0x7:
case 0x14:
case 0x1d:
case 0x1e: {
--
2.39.2
- [Stable-7.2.10 18/33] tests/acpi: Update DSDT.cxl to reflect change _STA return value., (continued)
- [Stable-7.2.10 18/33] tests/acpi: Update DSDT.cxl to reflect change _STA return value., Michael Tokarev, 2024/02/21
- [Stable-7.2.10 19/33] linux-user/aarch64: Choose SYNC as the preferred MTE mode, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 20/33] target/arm: Fix nregs computation in do_{ld, st}_zpa, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 22/33] target/arm: Don't get MDCR_EL2 in pmu_counter_enabled() before checking ARM_FEATURE_PMU, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 21/33] target/arm: Fix SVE/SME gross MTE suppression checks, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 23/33] iotests: Make 144 deterministic again, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 24/33] i386/cpu: Clear FEAT_XSAVE_XSS_LO/HI leafs when CPUID_EXT_XSAVE is not available, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 26/33] i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 28/33] target/i386: Generate an illegal opcode exception on cmp instructions with lock prefix, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 25/33] i386/cpu: Mask with XCR0/XSS mask for FEAT_XSAVE_XCR0_HI and FEAT_XSAVE_XSS_HI leafs, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 27/33] i386/cpuid: Move leaf 7 to correct group,
Michael Tokarev <=
- [Stable-7.2.10 29/33] ui: reject extended clipboard message if not activated, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 30/33] ui/clipboard: mark type as not available when there is no data, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 32/33] ui/console: Fix console resize with placeholder surface, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 31/33] ui/clipboard: add asserts for update and request, Michael Tokarev, 2024/02/21
- [Stable-7.2.10 33/33] audio: Depend on dbus_display1_dep, Michael Tokarev, 2024/02/21