stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "KVM: x86: handle SMBASE as physical address in RSM" has been added to the 4.3-stable tree
@ 2015-12-07  8:31 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-12-07  8:31 UTC (permalink / raw)
  To: rkrcmar, gregkh, lersek, pbonzini; +Cc: stable, stable-commits


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

    KVM: x86: handle SMBASE as physical address in RSM

to the 4.3-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-handle-smbase-as-physical-address-in-rsm.patch
and it can be found in the queue-4.3 subdirectory.

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


>From f40606b147dd5b4678cedc877a71deb520ca507e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= <rkrcmar@redhat.com>
Date: Fri, 30 Oct 2015 16:36:25 +0100
Subject: KVM: x86: handle SMBASE as physical address in RSM
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= <rkrcmar@redhat.com>

commit f40606b147dd5b4678cedc877a71deb520ca507e upstream.

GET_SMSTATE depends on real mode to ensure that smbase+offset is treated
as a physical address, which has already caused a bug after shuffling
the code.  Enforce physical addressing.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Reported-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kvm/emulate.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2272,8 +2272,8 @@ static int emulator_has_longmode(struct
 #define GET_SMSTATE(type, smbase, offset)				  \
 	({								  \
 	 type __val;							  \
-	 int r = ctxt->ops->read_std(ctxt, smbase + offset, &__val,       \
-				     sizeof(__val), NULL);		  \
+	 int r = ctxt->ops->read_phys(ctxt, smbase + offset, &__val,      \
+				      sizeof(__val));			  \
 	 if (r != X86EMUL_CONTINUE)					  \
 		 return X86EMUL_UNHANDLEABLE;				  \
 	 __val;								  \
@@ -2484,8 +2484,7 @@ static int em_rsm(struct x86_emulate_ctx
 
 	/*
 	 * Get back to real mode, to prepare a safe state in which to load
-	 * CR0/CR3/CR4/EFER.  Also this will ensure that addresses passed
-	 * to read_std/write_std are not virtual.
+	 * CR0/CR3/CR4/EFER.
 	 *
 	 * CR4.PCIDE must be zero, because it is a 64-bit mode only feature.
 	 */


Patches currently in stable-queue which might be from rkrcmar@redhat.com are

queue-4.3/kvm-x86-set-kvm_req_event-when-updating-irr.patch
queue-4.3/kvm-x86-handle-smbase-as-physical-address-in-rsm.patch
queue-4.3/kvm-x86-allow-rsm-from-64-bit-mode.patch
queue-4.3/kvm-x86-add-read_phys-to-x86_emulate_ops.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-07 12:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-07  8:31 Patch "KVM: x86: handle SMBASE as physical address in RSM" has been added to the 4.3-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).