Patch "KVM: x86/pmu: Clear anythread deprecated bit when 0xa leaf is unsupported on the SVM" has been added to the 5.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    KVM: x86/pmu: Clear anythread deprecated bit when 0xa leaf is unsupported on the SVM

to the 5.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kvm-x86-pmu-clear-anythread-deprecated-bit-when-0xa-.patch
and it can be found in the queue-5.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 48483717b4e3f3dea5dd69d9472aeec3516918f3
Author: Like Xu <like.xu.linux@xxxxxxxxx>
Date:   Mon Jun 28 15:43:54 2021 +0800

    KVM: x86/pmu: Clear anythread deprecated bit when 0xa leaf is unsupported on the SVM
    
    [ Upstream commit 7234c362ccb3c2228f06f19f93b132de9cfa7ae4 ]
    
    The AMD platform does not support the functions Ah CPUID leaf. The returned
    results for this entry should all remain zero just like the native does:
    
    AMD host:
       0x0000000a 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000
    (uncanny) AMD guest:
       0x0000000a 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00008000
    
    Fixes: cadbaa039b99 ("perf/x86/intel: Make anythread filter support conditional")
    Signed-off-by: Like Xu <likexu@xxxxxxxxxxx>
    Message-Id: <20210628074354.33848-1-likexu@xxxxxxxxxxx>
    Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index ca7866d63e98..739be5da3bca 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -765,7 +765,8 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
 
 		edx.split.num_counters_fixed = min(cap.num_counters_fixed, MAX_FIXED_COUNTERS);
 		edx.split.bit_width_fixed = cap.bit_width_fixed;
-		edx.split.anythread_deprecated = 1;
+		if (cap.version)
+			edx.split.anythread_deprecated = 1;
 		edx.split.reserved1 = 0;
 		edx.split.reserved2 = 0;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux