[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/17] i386/cpuid: Move leaf 7 to correct group
From: |
Paolo Bonzini |
Subject: |
[PULL 08/17] i386/cpuid: Move leaf 7 to correct group |
Date: |
Tue, 20 Feb 2024 09:05:49 +0100 |
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>
---
target/i386/kvm/kvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 9758c83693e..42970ab046f 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -1951,7 +1951,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;
@@ -1971,6 +1970,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
c = &cpuid_data.entries[cpuid_i++];
}
break;
+ case 0x7:
case 0x14:
case 0x1d:
case 0x1e: {
--
2.43.0
- [PULL 00/17] Build, x86 patches for 2024-02-16, Paolo Bonzini, 2024/02/20
- [PULL 01/17] i386/cpu: Clear FEAT_XSAVE_XSS_LO/HI leafs when CPUID_EXT_XSAVE is not available, Paolo Bonzini, 2024/02/20
- [PULL 02/17] i386/cpu: Mask with XCR0/XSS mask for FEAT_XSAVE_XCR0_HI and FEAT_XSAVE_XSS_HI leafs, Paolo Bonzini, 2024/02/20
- [PULL 03/17] target/i386: Add support of KVM_FEATURE_ASYNC_PF_VMEXIT for guest, Paolo Bonzini, 2024/02/20
- [PULL 04/17] i386/pc: Drop pc_machine_kvm_type(), Paolo Bonzini, 2024/02/20
- [PULL 05/17] physmem: replace function name with __func__ in ram_block_discard_range(), Paolo Bonzini, 2024/02/20
- [PULL 06/17] i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F, Paolo Bonzini, 2024/02/20
- [PULL 08/17] i386/cpuid: Move leaf 7 to correct group,
Paolo Bonzini <=
- [PULL 09/17] mips: remove unnecessary "select PTIMER", Paolo Bonzini, 2024/02/20
- [PULL 10/17] isa-superio: validate floppy.count value, Paolo Bonzini, 2024/02/20
- [PULL 11/17] smc37c669: remove useless is_enabled functions, Paolo Bonzini, 2024/02/20
- [PULL 12/17] configure: do not create legacy symlinks, Paolo Bonzini, 2024/02/20
- [PULL 14/17] i386: xen: fix compilation --without-default-devices, Paolo Bonzini, 2024/02/20
- [PULL 13/17] configure: put all symlink creation together, Paolo Bonzini, 2024/02/20
- [PULL 16/17] usb: inline device creation functions, Paolo Bonzini, 2024/02/20
- [PULL 15/17] target/i386: Generate an illegal opcode exception on cmp instructions with lock prefix, Paolo Bonzini, 2024/02/20
- [PULL 17/17] ci: Fix again build-previous-qemu, Paolo Bonzini, 2024/02/20
- [PULL 07/17] i386/cpuid: Remove subleaf constraint on CPUID leaf 1F, Paolo Bonzini, 2024/02/20