From patchwork Tue May 24 19:24:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leann Ogasawara X-Patchwork-Id: 97209 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 6C961B6F70 for ; Wed, 25 May 2011 05:25:18 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QOxE0-0008Qc-Pu; Tue, 24 May 2011 19:25:04 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QOxDy-0008Pn-1y for kernel-team@lists.ubuntu.com; Tue, 24 May 2011 19:25:02 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QOxDv-0007L8-JS; Tue, 24 May 2011 19:24:59 +0000 Received: from c-76-105-148-120.hsd1.or.comcast.net ([76.105.148.120] helo=[192.168.1.3]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QOxDv-0004ae-6l; Tue, 24 May 2011 19:24:59 +0000 Subject: [Lucid][SRU][PATCH] UBUNTU: SAUCE: (no-up) Fix up KVM: VMX: Fix host userspace gsbase corruption From: Leann Ogasawara To: kernel-team Date: Tue, 24 May 2011 12:24:55 -0700 Message-ID: <1306265095.1548.60.camel@adamo> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Cc: yunhong.jiang@intel.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com SRU Justification: http://bugs.launchpad.net/bugs/787675 I've clearly buggered up a backported patch on Lucid that came in as an aside for the 2.6.32.26+drm33.11 stable patch set (See bug 681132). The patch in question is: KVM: VMX: Fix host userspace gsbase corruption We now use load_gs_index() to load gs safely; unfortunately this also changes MSR_KERNEL_GS_BASE, which we managed separately. This resulted in confusion and breakage running 32-bit host userspace on a 64-bit kernel. The original thread regarding this patch can be read at: https://lists.ubuntu.com/archives/kernel-team/2010-November/013655.html The attached patch correctly fixes up the accidental deletion of a line of code, and correctly removes the intended line. Please apply to Lucid. I've also built a test kernel and referenced it in the bug. I'm hoping for testing feedback from Jiang who originally brought the mistake to my attention. Thanks, Leann The following changes since commit 800e98aaa03cf2134fb3b1a7c11f59e93fa97c23: Thomas Schlichter (1): UBUNTU: SAUCE: vesafb: enable mtrr WC by default are available in the git repository at: git://kernel.ubuntu.com/ogasawara/ubuntu-lucid.git lp787675 Leann Ogasawara (1): UBUNTU: SAUCE: (no-up) Fix up KVM: VMX: Fix host userspace gsbase corruption arch/x86/kvm/vmx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) From 7766255c19171ecd6961ea9b6455d0de11245d19 Mon Sep 17 00:00:00 2001 From: Leann Ogasawara Date: Tue, 24 May 2011 09:40:12 -0700 Subject: [PATCH] UBUNTU: SAUCE: (no-up) Fix up KVM: VMX: Fix host userspace gsbase corruption BugLink: http://bugs.launchpad.net/bugs/787675 The backport for the following commit was incorrect, eg. it removed a line which it shouldn't have. commit 6cbdc7ba48dff850c233a1ea1abe87a6d0cde2dd Author: Avi Kivity Date: Thu Nov 11 12:37:26 2010 +0200 KVM: VMX: Fix host userspace gsbase corruption Fix up the backport to be correct. Signed-off-by: Leann Ogasawara Acked-by: Brad Figg Acked-by: Steve Conklin Acked-by: Herton Ronaldo Krzesinski --- arch/x86/kvm/vmx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 77c3287..e3222ab 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -699,7 +699,7 @@ static void __vmx_load_host_state(struct vcpu_vmx *vmx) if (vmx->host_state.gs_ldt_reload_needed) { kvm_load_ldt(vmx->host_state.ldt_sel); #ifdef CONFIG_X86_64 - wrmsrl(MSR_KERNEL_GS_BASE, current->thread.gs); + load_gs_index(vmx->host_state.gs_sel); #else loadsegment(gs, vmx->host_state.gs_sel); #endif