From patchwork Sun Aug 4 17:49:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2838464 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9D5A5BF535 for ; Sun, 4 Aug 2013 17:49:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C89DF2012B for ; Sun, 4 Aug 2013 17:49:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2DC320174 for ; Sun, 4 Aug 2013 17:49:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753716Ab3HDRtj (ORCPT ); Sun, 4 Aug 2013 13:49:39 -0400 Received: from mout.web.de ([212.227.17.12]:64927 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753385Ab3HDRtZ (ORCPT ); Sun, 4 Aug 2013 13:49:25 -0400 Received: from localhost.localdomain ([95.157.58.223]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0MDSxB-1UppwV2KnV-00GnWM for ; Sun, 04 Aug 2013 19:49:24 +0200 From: Jan Kiszka To: Gleb Natapov , Paolo Bonzini Cc: kvm , Xiao Guangrong , Jun Nakajima , Yang Zhang Subject: [PATCH 2/7] KVM: nVMX: Replace kvm_set_cr0 with vmx_set_cr0 in load_vmcs12_host_state Date: Sun, 4 Aug 2013 19:49:01 +0200 Message-Id: <6df46d2215481e12441412ad2c590450fc840ff8.1375638539.git.jan.kiszka@web.de> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: In-Reply-To: References: X-Provags-ID: V03:K0:AtBGAav1Zr4GEwPOCd7y/ntTQweDHW4WtIT9Pyv0LpkWu4dhgi2 8n9GHoC9lSg+3UA/7lUXkAgugdZl938IJP+geJjGlmKmyCcnn6V++bwqBbwH8eY1Zzc09IO odWs9YKrIm/fkjAXSMGX7bHzQtn4IXr8rtnT+GWolmfNj4wrtpqvD+OWxEGK70LKg92gceh T1xScZWT3sw2kfGvLYdqg== Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jan Kiszka Likely a typo, but a fatal one as kvm_set_cr0 performs checks on the state transition that may prevent loading L1's cr0. Signed-off-by: Jan Kiszka --- 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 53050a0..fc4a401 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -8174,7 +8174,7 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu, * fpu_active (which may have changed). * Note that vmx_set_cr0 refers to efer set above. */ - kvm_set_cr0(vcpu, vmcs12->host_cr0); + vmx_set_cr0(vcpu, vmcs12->host_cr0); /* * If we did fpu_activate()/fpu_deactivate() during L2's run, we need * to apply the same changes to L1's vmcs. We just set cr0 correctly,