From patchwork Tue Aug 28 16:04:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 10578801 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 A9A25139B for ; Tue, 28 Aug 2018 16:05:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98E0129566 for ; Tue, 28 Aug 2018 16:05:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D8FA2A662; Tue, 28 Aug 2018 16:05: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=-7.9 required=2.0 tests=BAYES_00,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 402B229566 for ; Tue, 28 Aug 2018 16:05:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727507AbeH1T5l (ORCPT ); Tue, 28 Aug 2018 15:57:41 -0400 Received: from mga01.intel.com ([192.55.52.88]:33260 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727398AbeH1T5e (ORCPT ); Tue, 28 Aug 2018 15:57:34 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2018 09:05:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,300,1531810800"; d="scan'208";a="65826902" Received: from sjchrist-coffee.jf.intel.com ([10.54.74.9]) by fmsmga007.fm.intel.com with ESMTP; 28 Aug 2018 09:05:06 -0700 From: Sean Christopherson To: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= Cc: kvm@vger.kernel.org, Jim Mattson , Sean Christopherson Subject: [PATCH v2 12/18] KVM: vVMX: rename label for post-enter_guest_mode consistency check Date: Tue, 28 Aug 2018 09:04:53 -0700 Message-Id: <20180828160459.14093-13-sean.j.christopherson@intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180828160459.14093-1-sean.j.christopherson@intel.com> References: <20180828160459.14093-1-sean.j.christopherson@intel.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Rename 'fail' to 'consistency_check_vmexit_guest_mode' to make it more obvious that it's simply a different entry point to the consitency check VMExit path, whose purpose is unwind the updates done prior to calling prepare_vmcs02. Signed-off-by: Sean Christopherson --- arch/x86/kvm/vmx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index ed0f9de50ff7..db4751c626ce 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -12616,7 +12616,7 @@ static int nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu, vcpu->arch.tsc_offset += vmcs12->tsc_offset; if (prepare_vmcs02(vcpu, vmcs12, &exit_qual)) - goto fail; + goto consistency_check_vmexit_guest_mode; if (from_vmentry) { exit_reason = EXIT_REASON_MSR_LOAD_FAIL; @@ -12624,7 +12624,7 @@ static int nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu, vmcs12->vm_entry_msr_load_addr, vmcs12->vm_entry_msr_load_count); if (exit_qual) - goto fail; + goto consistency_check_vmexit_guest_mode; } else { /* * The MMU is not initialized to point at the right entities yet and @@ -12644,7 +12644,7 @@ static int nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu, */ return 0; -fail: +consistency_check_vmexit_guest_mode: if (vmcs12->cpu_based_vm_exec_control & CPU_BASED_USE_TSC_OFFSETING) vcpu->arch.tsc_offset -= vmcs12->tsc_offset; leave_guest_mode(vcpu);