[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/29] target/i386: Fix wrong count setting
From: |
Paolo Bonzini |
Subject: |
[PULL 03/29] target/i386: Fix wrong count setting |
Date: |
Mon, 6 Jun 2022 16:36:18 +0200 |
From: Yang Zhong <yang.zhong@intel.com>
The previous patch used wrong count setting with index value, which got wrong
value from CPUID(EAX=12,ECX=0):EAX. So the SGX1 instruction can't be exposed
to VM and the SGX decice can't work in VM.
Fixes: d19d6ffa0710 ("target/i386: introduce helper to access supported CPUID")
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20220530131834.1222801-1-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index bb6a5dd498..9fdfec9d8b 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -5559,7 +5559,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index,
uint32_t count,
* supports. Features can be further restricted by userspace, but not
* made more permissive.
*/
- x86_cpu_get_supported_cpuid(0x12, index, eax, ebx, ecx, edx);
+ x86_cpu_get_supported_cpuid(0x12, count, eax, ebx, ecx, edx);
if (count == 0) {
*eax &= env->features[FEAT_SGX_12_0_EAX];
--
2.36.1
- [PULL 00/29] Misc patches for 2022-06-06, Paolo Bonzini, 2022/06/06
- [PULL 02/29] build: add a "make modules" target, Paolo Bonzini, 2022/06/06
- [PULL 07/29] replay: notify vCPU when BH is scheduled, Paolo Bonzini, 2022/06/06
- [PULL 06/29] replay: fix event queue flush for qemu shutdown, Paolo Bonzini, 2022/06/06
- [PULL 10/29] docs: convert docs/devel/replay page to rst, Paolo Bonzini, 2022/06/06
- [PULL 13/29] tests/avocado: add replay Linux tests for virtio machine, Paolo Bonzini, 2022/06/06
- [PULL 14/29] tests/avocado: add replay Linux test for Aarch64 machines, Paolo Bonzini, 2022/06/06
- [PULL 03/29] target/i386: Fix wrong count setting,
Paolo Bonzini <=
- [PULL 05/29] modules: generates per-target modinfo, Paolo Bonzini, 2022/06/06
- [PULL 04/29] modules: introduces module_kconfig directive, Paolo Bonzini, 2022/06/06
- [PULL 09/29] replay: simplify async event processing, Paolo Bonzini, 2022/06/06
- [PULL 17/29] x86: cpu: fixup number of addressable IDs for logical processors sharing cache, Paolo Bonzini, 2022/06/06
- [PULL 18/29] python: update for mypy 0.950, Paolo Bonzini, 2022/06/06
- [PULL 01/29] target/i386/tcg: Fix masking of real-mode addresses with A20 bit, Paolo Bonzini, 2022/06/06
- [PULL 08/29] replay: rewrite async event handling, Paolo Bonzini, 2022/06/06
- [PULL 15/29] tests/Makefile.include: Fix 'make check-help' output, Paolo Bonzini, 2022/06/06
- [PULL 20/29] tests: use python3 as the python executable name, Paolo Bonzini, 2022/06/06
- [PULL 19/29] tests: add "TESTS_PYTHON" variable to Makefile, Paolo Bonzini, 2022/06/06