Skip to content

Commit 0389b06

Browse files
bostrovsgregkh
authored andcommitted
KVM: SVM: Return TSA_SQ_NO and TSA_L1_NO bits in __do_cpuid_func()
Commit c334ae4 ("KVM: SVM: Advertise TSA CPUID bits to guests") set VERW_CLEAR, TSA_SQ_NO and TSA_L1_NO kvm_caps bits that are supposed to be provided to guest when it requests CPUID 0x80000021. However, the latter two (in the %ecx register) are instead returned as zeroes in __do_cpuid_func(). Return values of TSA_SQ_NO and TSA_L1_NO as set in the kvm_cpu_caps. This fix is stable-only. Cc: <stable@vger.kernel.org> # 6.1.y Fixes: c334ae4 ("KVM: SVM: Advertise TSA CPUID bits to guests") Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8d1e0db commit 0389b06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/kvm/cpuid.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,8 +1259,9 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
12591259
entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
12601260
break;
12611261
case 0x80000021:
1262-
entry->ebx = entry->ecx = entry->edx = 0;
1262+
entry->ebx = entry->edx = 0;
12631263
cpuid_entry_override(entry, CPUID_8000_0021_EAX);
1264+
cpuid_entry_override(entry, CPUID_8000_0021_ECX);
12641265
break;
12651266
/*Add support for Centaur's CPUID instruction*/
12661267
case 0xC0000000:

0 commit comments

Comments
 (0)