Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752587AbdFSSej (ORCPT + 2 others); Mon, 19 Jun 2017 14:34:39 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:51875 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752434AbdFSSed (ORCPT ); Mon, 19 Jun 2017 14:34:33 -0400 From: Willy Tarreau To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux@roeck-us.net Cc: Chao Peng , Paolo Bonzini , Willy Tarreau Subject: [PATCH 3.10 164/268] KVM: VMX: use correct vmcs_read/write for guest segment selector/base Date: Mon, 19 Jun 2017 20:31:03 +0200 Message-Id: <1497897167-14556-165-git-send-email-w@1wt.eu> X-Mailer: git-send-email 2.8.0.rc2.1.gbe9624a In-Reply-To: <1497897167-14556-1-git-send-email-w@1wt.eu> References: <1497897167-14556-1-git-send-email-w@1wt.eu> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Chao Peng commit 96794e4ed4d758272c486e1529e431efb7045265 upstream. Guest segment selector is 16 bit field and guest segment base is natural width field. Fix two incorrect invocations accordingly. Without this patch, build fails when aggressive inlining is used with ICC. [js] no vmx_dump_sel in 3.12 Signed-off-by: Chao Peng Signed-off-by: Paolo Bonzini Signed-off-by: Willy Tarreau --- arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 7e9ca58..b4fa8a9 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3074,7 +3074,7 @@ static void fix_rmode_seg(int seg, struct kvm_segment *save) } vmcs_write16(sf->selector, var.selector); - vmcs_write32(sf->base, var.base); + vmcs_writel(sf->base, var.base); vmcs_write32(sf->limit, var.limit); vmcs_write32(sf->ar_bytes, vmx_segment_access_rights(&var)); } -- 2.8.0.rc2.1.gbe9624a