i386/cpuid: Minor fixes for CPUID leaf 1f setup
cover i386/cpuid: Minor fixes for CPUID leaf 1f setup
The issue that fixed by Patch 1 looks fatal though it doesn't appear on KVM because KVM always searches with assending order and hit with the correct cpuid leaf 0.
Patch 2 removes the wrong constraint on CPUID leaf 1f
Xiaoyao Li (2):
i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F i386/cpuid: Remove subleaf constraint on CPUID leaf 1F
target/i386/kvm/kvm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Signature · 1 line
2.27.0
PATCH 1/2 i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F
Decrease array index cpuid_i when CPUID leaf 1F is skipped, otherwise it will get an all zero'ed CPUID entry with leaf 0 and subleaf 0. It conflicts with correct leaf 0.
--- target/i386/kvm/kvm.c | 1 + 1 file changed, 1 insertion(+)
target/i386/kvm/kvm.c +1 -0
@@ -1831,6 +1831,7 @@ int kvm_arch_init_vcpu(CPUState *cs) }case 0x1f :if (env->nr_dies <2 ) { + cpuid_i--;break ; }/* fallthrough */
Signature · 1 line
2.27.0
PATCH 2/2 i386/cpuid: Remove subleaf constraint on CPUID leaf 1F
In reply to Xiaoyao LiNo such constraint that subleaf index needs to be less than 64.
--- target/i386/kvm/kvm.c | 4 ---- 1 file changed, 4 deletions(-)
target/i386/kvm/kvm.c +0 -4
@@ -1843,10 +1843,6 @@ int kvm_arch_init_vcpu(CPUState *cs)break ; } -if (i ==0x1f && j ==64 ) { -break ; - } - c->function = i; c->flags =KVM_CPUID_FLAG_SIGNIFCANT_INDEX ; c->index = j;
Signature · 1 line
2.27.0
Quoted 5 lines · Xiaoyao Li
The issue that fixed by Patch 1 looks fatal though it doesn't appear on KVM because KVM always searches with assending order and hit with the correct cpuid leaf 0.
Patch 2 removes the wrong constraint on CPUID leaf 1f
Kindly ping.
Quoted 7 lines
Xiaoyao Li (2):
i386/cpuid: Decreasecpuid_iwhen skipping CPUID leaf 1F i386/cpuid: Remove subleaf constraint on CPUID leaf 1Ftarget/i386/kvm/kvm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Quoted 8 lines · Xiaoyao Li
Quoted 5 lines · Xiaoyao Li
The issue that fixed by Patch 1 looks fatal though it doesn't appear on KVM because KVM always searches with assending order and hit with the correct cpuid leaf 0.
Patch 2 removes the wrong constraint on CPUID leaf 1f
Kindly ping.
ping it one more time.
Does it need a rebase and resend?
Quoted 9 lines
Quoted 7 lines
Xiaoyao Li (2):
i386/cpuid: Decreasecpuid_iwhen skipping CPUID leaf 1F i386/cpuid: Remove subleaf constraint on CPUID leaf 1F
target/i386/kvm/kvm.c| 5 +----1 file changed, 1 insertion(+), 4 deletions(-)