From patchwork Tue Nov 13 06:12:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krish Sadhukhan X-Patchwork-Id: 10679803 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 3D3701759 for ; Tue, 13 Nov 2018 06:36:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DE4528FDF for ; Tue, 13 Nov 2018 06:36:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21F8929ABC; Tue, 13 Nov 2018 06:36:32 +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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 BC62E28FDF for ; Tue, 13 Nov 2018 06:36:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731001AbeKMQdB (ORCPT ); Tue, 13 Nov 2018 11:33:01 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:60774 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730819AbeKMQdB (ORCPT ); Tue, 13 Nov 2018 11:33:01 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wAD6ZG43018291; Tue, 13 Nov 2018 06:36:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=BIhmCxsAm9Szfkmc+RuGDN+Rg6o8kDJXGmo+jhdJQFU=; b=Dh72CQPfFwcQ1ajvbkkVAU2EwQC7ImIyD6eNKVcTWO/g6wdza0+LjkUe5XCW4ECQQ5FI Q1yjccE51f64skvs7WgWE+YBuR9X0qAgWGvJgxLQEd6NmlSvqMgnkFfam1nCc3BfEWIs GJU1bguRUosoev7oB+SKNwAPuphbkDM2EfYDztHZJmzta1cTb/vkNuVW3PoHz4ML5vpL 6i9AuTQxjbXGX6CZqwFhEyNVVrVgasK8RIIbiyFsAsYGwMjxV+Pq8xx6NT+Df7gpPE9Z +l2vDHfigQFdwCCRB3LIgSaT1sEk5j4d01OHlnpEw4Ag7cvIlwENYLpjv6h6+YGQii6A 0g== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2nnw6egjd4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Nov 2018 06:36:17 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wAD6aFFf032284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Nov 2018 06:36:16 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wAD6aFIA004926; Tue, 13 Nov 2018 06:36:15 GMT Received: from ban25x6uut29.us.oracle.com (/10.153.73.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 12 Nov 2018 22:36:15 -0800 From: Krish Sadhukhan To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, jmattson@google.com, rkrcmar@redhat.com Subject: [PATCH 1/6] nVMX x86: Re-name check_vmentry_pre[post]reqs to nested_check_vmentry_pre[post] Date: Tue, 13 Nov 2018 01:12:04 -0500 Message-Id: <20181113061209.6843-2-krish.sadhukhan@oracle.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20181113061209.6843-1-krish.sadhukhan@oracle.com> References: <20181113061209.6843-1-krish.sadhukhan@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9075 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=699 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811130062 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Re-name the functions check_vmentry_pre[post]reqs to nested_check_pre[post]reqs because these functions are used only in nested context. Signed-off-by: Krish Sadhukhan Reviewed-by: Liran Alon Reviewed-by: Mihai Carabas Reviewed-by: Mark Kanda --- arch/x86/kvm/vmx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 8dae47e..0f6c38f 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -12313,7 +12313,7 @@ static int nested_vmx_check_nmi_controls(struct vmcs12 *vmcs12) return 0; } -static int check_vmentry_prereqs(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) +static int nested_check_vmentry_prereqs(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) { struct vcpu_vmx *vmx = to_vmx(vcpu); @@ -12472,7 +12472,7 @@ static int nested_vmx_check_vmcs_link_ptr(struct kvm_vcpu *vcpu, return r; } -static int check_vmentry_postreqs(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12, +static int nested_check_vmentry_postreqs(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12, u32 *exit_qual) { bool ia32e; @@ -12650,7 +12650,7 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch) goto out; } - ret = check_vmentry_prereqs(vcpu, vmcs12); + ret = nested_check_vmentry_prereqs(vcpu, vmcs12); if (ret) { nested_vmx_failValid(vcpu, ret); goto out; @@ -12665,7 +12665,7 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch) */ skip_emulated_instruction(vcpu); - ret = check_vmentry_postreqs(vcpu, vmcs12, &exit_qual); + ret = nested_check_vmentry_postreqs(vcpu, vmcs12, &exit_qual); if (ret) { nested_vmx_entry_failure(vcpu, vmcs12, EXIT_REASON_INVALID_STATE, exit_qual); @@ -13987,8 +13987,8 @@ static int vmx_set_nested_state(struct kvm_vcpu *vcpu, return -EINVAL; } - if (check_vmentry_prereqs(vcpu, vmcs12) || - check_vmentry_postreqs(vcpu, vmcs12, &exit_qual)) + if (nested_check_vmentry_prereqs(vcpu, vmcs12) || + nested_check_vmentry_postreqs(vcpu, vmcs12, &exit_qual)) return -EINVAL; if (kvm_state->flags & KVM_STATE_NESTED_RUN_PENDING)