Patch "KVM: x86: Mask off reserved bits in CPUID.8000001AH" has been added to the 6.0-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: Mask off reserved bits in CPUID.8000001AH

to the 6.0-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-mask-off-reserved-bits-in-cpuid.8000001ah.patch
and it can be found in the queue-6.0 subdirectory.

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


>From 079f6889818dd07903fb36c252532ab47ebb6d48 Mon Sep 17 00:00:00 2001
From: Jim Mattson <jmattson@xxxxxxxxxx>
Date: Thu, 29 Sep 2022 15:52:01 -0700
Subject: KVM: x86: Mask off reserved bits in CPUID.8000001AH

From: Jim Mattson <jmattson@xxxxxxxxxx>

commit 079f6889818dd07903fb36c252532ab47ebb6d48 upstream.

KVM_GET_SUPPORTED_CPUID should only enumerate features that KVM
actually supports. In the case of CPUID.8000001AH, only three bits are
currently defined. The 125 reserved bits should be masked off.

Fixes: 24c82e576b78 ("KVM: Sanitize cpuid")
Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx>
Message-Id: <20220929225203.2234702-4-jmattson@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 arch/x86/kvm/cpuid.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -1171,6 +1171,9 @@ static inline int __do_cpuid_func(struct
 		entry->ecx = entry->edx = 0;
 		break;
 	case 0x8000001a:
+		entry->eax &= GENMASK(2, 0);
+		entry->ebx = entry->ecx = entry->edx = 0;
+		break;
 	case 0x8000001e:
 		break;
 	case 0x8000001F:


Patches currently in stable-queue which might be from jmattson@xxxxxxxxxx are

queue-6.0/kvm-x86-mask-off-reserved-bits-in-cpuid.80000008h.patch
queue-6.0/kvm-x86-mask-off-reserved-bits-in-cpuid.80000006h.patch
queue-6.0/kvm-x86-mask-off-reserved-bits-in-cpuid.80000001h.patch
queue-6.0/kvm-x86-mask-off-reserved-bits-in-cpuid.8000001ah.patch
queue-6.0/kvm-x86-mask-off-reserved-bits-in-cpuid.8000001fh.patch



[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