All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: jmattson@google.com, pbonzini@redhat.com
Cc: <stable@vger.kernel.org>
Subject: FAILED: patch "[PATCH] KVM: x86: Mask off reserved bits in CPUID.8000001FH" failed to apply to 5.4-stable tree
Date: Mon, 07 Nov 2022 17:48:23 +0100	[thread overview]
Message-ID: <166783970395162@kroah.com> (raw)


The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

Possible dependencies:

86c4f0d547f6 ("KVM: x86: Mask off reserved bits in CPUID.8000001FH")
e39f00f60ebd ("KVM: x86: Use kernel's x86_phys_bits to handle reduced MAXPHYADDR")
4bf48e3c0aaf ("KVM: x86: Use guest MAXPHYADDR from CPUID.0x8000_0008 iff TDP is enabled")
d9db0fd6c5c9 ("KVM: SEV: Mask CPUID[0x8000001F].eax according to supported features")
013380782d4d ("KVM: x86: Move reverse CPUID helpers to separate header file")
01de8682b32d ("KVM: x86: Add reverse-CPUID lookup support for scattered SGX features")
4e66c0cb79b7 ("KVM: x86: Add support for reverse CPUID lookup of scattered features")
e42033342293 ("KVM: x86: Advertise INVPCID by default")
916391a2d1dc ("KVM: SVM: Add support for SEV-ES capability in KVM")
9d4747d02376 ("KVM: SVM: Remove the call to sev_platform_status() during setup")
dc46515cf838 ("KVM: x86: Move illegal GPA helper out of the MMU code")
1dbf5d68af6f ("KVM: VMX: Add guest physical address check in EPT violation and misconfig")
a0c134347baf ("KVM: VMX: introduce vmx_need_pf_intercept")
ec7771ab471b ("KVM: x86: mmu: Add guest physical address check in translate_gpa()")
cd313569f581 ("KVM: x86: mmu: Move translate_gpa() to mmu.c")
985ab2780164 ("KVM: x86/mmu: Make kvm_mmu_page definition and accessor internal-only")
6ca9a6f3adef ("KVM: x86/mmu: Add MMU-internal header")
06e7852c0ffb ("KVM: SVM: Add vmcb_ prefix to mark_*() functions")
f25a9dec2da3 ("KVM: x86/mmu: Drop kvm_arch_write_log_dirty() wrapper")
2dbebf7ae1ed ("KVM: nVMX: Plumb L2 GPA through to PML emulation")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 86c4f0d547f6460d0426ebb3ba0614f1134b8cda Mon Sep 17 00:00:00 2001
From: Jim Mattson <jmattson@google.com>
Date: Thu, 29 Sep 2022 15:52:03 -0700
Subject: [PATCH] KVM: x86: Mask off reserved bits in CPUID.8000001FH

KVM_GET_SUPPORTED_CPUID should only enumerate features that KVM
actually supports. CPUID.8000001FH:EBX[31:16] are reserved bits and
should be masked off.

Fixes: 8765d75329a3 ("KVM: X86: Extend CPUID range to include new leaf")
Signed-off-by: Jim Mattson <jmattson@google.com>
Message-Id: <20220929225203.2234702-6-jmattson@google.com>
Cc: stable@vger.kernel.org
[Clear NumVMPL too. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index a0292ba650df..0810e93cbedc 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -1199,7 +1199,8 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
 			entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
 		} else {
 			cpuid_entry_override(entry, CPUID_8000_001F_EAX);
-
+			/* Clear NumVMPL since KVM does not support VMPL.  */
+			entry->ebx &= ~GENMASK(31, 12);
 			/*
 			 * Enumerate '0' for "PA bits reduction", the adjusted
 			 * MAXPHYADDR is enumerated directly (see 0x80000008).


                 reply	other threads:[~2022-11-07 16:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=166783970395162@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jmattson@google.com \
    --cc=pbonzini@redhat.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.