From patchwork Sat Sep 22 01:56:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 10611315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 05F0D15A6 for ; Sat, 22 Sep 2018 01:57:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9AB12D87D for ; Sat, 22 Sep 2018 01:57:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCECA2D8CC; Sat, 22 Sep 2018 01:57:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CCDE2D87D for ; Sat, 22 Sep 2018 01:57:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391701AbeIVHsw (ORCPT ); Sat, 22 Sep 2018 03:48:52 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33378 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391689AbeIVHsv (ORCPT ); Sat, 22 Sep 2018 03:48:51 -0400 Received: by mail-pg1-f196.google.com with SMTP id y18-v6so3504479pge.0 for ; Fri, 21 Sep 2018 18:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=n90OkVrWe3mbyEL4AaOQA8+x5U4ua8uiP3Qk/GCt1+I=; b=K3MC4LOeSfBkozDgI8eHAeCoEr0/lU0h+RpcbI8UyrAxmEeUURUbaZp6Ave2knC07e RrY///M4T9PR0WelKGP1yl0lFpWWIOvbKet9/xv5FMjrE4/igGOM331Up/HOJPL7enL9 C8hhbIGrhpXKkZ8sOyPuya8MyepYnYsftapEkxv5o/T3uHuCD53kPe5lOoTmnhxF0r+n pVvjCaNh+/TMFg95iNvyfh+yDja3Wn5O5tc77BETfIlhH1ssQZNl18c2dLhIeMHVXGKB mjCrlXf4rKY2Tt8xrl7OsX7vP5sBYYkQ0CMgEMuzyqMulwCYdR0cBuSIi4WlWtYCOEQh CJag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=n90OkVrWe3mbyEL4AaOQA8+x5U4ua8uiP3Qk/GCt1+I=; b=j3f9qlmmwIBvFvFKL5Ib+WqtoqV2BxsxVR5lAXYaQjubx1Dr8hR6xASu3JiTF5j0L+ AttIxsj0SYd9vMUYvaKZcRMr2j/YGoEwp5k5XAIb0g1JASgF7+zbioD//RuySIWaTb3Q 4vqFx0PqqMlqmksQHSKntJJWbwPFmv2Rrp+/QcQxHQNWK3ZfTIylau877EWnyV2ZNR9f ac6dFKsApQK6b//J8KW3bCbpyJyfxlTrf7gTPSog7Kf/HntSIxMgBtsQEG55mAL52nEG tEuPs5qTHYRPdngU83YDV1rgwgVTUorsXdAivYhoS1sfoj6c0873DrpeKrho+KVz2o0f cXFw== X-Gm-Message-State: ABuFfoiI+cXu3NE/Dm9dti5GBHbOnaK4RxwvhNm3K7Z9+OyAWuC/IOgo k+lToAP9Wn6BIbD6tUIPfAI= X-Google-Smtp-Source: ACcGV62Z8hxIFjxgPsDQMO3CAqvtvqzcO+Tkms/JvWddyM7y79ampulg9HaIi3y6kCYAlYo/j8272w== X-Received: by 2002:a63:ef4f:: with SMTP id c15-v6mr321517pgk.368.1537581436869; Fri, 21 Sep 2018 18:57:16 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id d7-v6sm19174207pfg.1.2018.09.21.18.57.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 18:57:16 -0700 (PDT) From: Wei Yang To: pbonzini@redhat.com, rkrcmar@redhat.com, tglx@linutronix.de Cc: x86@kernel.org, kvm@vger.kernel.org, Wei Yang Subject: [PATCH 2/2] KVM: x86: remove duplicate cr0 set in vmx_vcpu_reset() Date: Sat, 22 Sep 2018 09:56:39 +0800 Message-Id: <20180922015639.12666-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180922015639.12666-1-richard.weiyang@gmail.com> References: <20180922015639.12666-1-richard.weiyang@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP vmx->vcpu.arch.cr0 will be set in vmx_set_cr0(). This patch removes duplicate cr0 set in vmx_vcpu_reset(). Signed-off-by: Wei Yang Reviewed-by: Krish Sadhukhan --- arch/x86/kvm/vmx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 1519f030fd73..b1e1d63a4970 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -6734,7 +6734,6 @@ static void vmx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) vmcs_write16(VIRTUAL_PROCESSOR_ID, vmx->vpid); cr0 = X86_CR0_NW | X86_CR0_CD | X86_CR0_ET; - vmx->vcpu.arch.cr0 = cr0; vmx_set_cr0(vcpu, cr0); /* enter rmode */ vmx_set_cr4(vcpu, 0); vmx_set_efer(vcpu, 0);