From patchwork Fri Apr 26 06:43:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nakajima, Jun" X-Patchwork-Id: 2491121 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 05F743FC64 for ; Fri, 26 Apr 2013 06:44:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759522Ab3DZGoF (ORCPT ); Fri, 26 Apr 2013 02:44:05 -0400 Received: from mail-da0-f51.google.com ([209.85.210.51]:60425 "EHLO mail-da0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754657Ab3DZGoD (ORCPT ); Fri, 26 Apr 2013 02:44:03 -0400 Received: by mail-da0-f51.google.com with SMTP id g27so754898dan.24 for ; Thu, 25 Apr 2013 23:44:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=VxKFDJr9lzup8+etuM3tei1b+/9FuU1fK5V/iuq2R6U=; b=Zc3kz43iCW2b1CnO0c9nAAy3PrNcBgQ52Qi7VdE3svc2h/oEfhkDJ9gk8DMYQTAtTn ZkWMr6yqWgw/n+mxieiWvyZ7pYEK/B54TzdUi9oVKJauNCOWhPorWkDeW5FwoEDTmw6y XC2PAPUJidofRwlzzXx3214ZindbmfAfvjVRfo1HyQymLbbr7qUM3qoGK2kzpFEVtHZa j1ZCFasGJoau9l7oflIImA0+WOT8rQi+vXHQj0pNnQqMZ1TT6O3c+DR/R8YJwMcGmjvZ KpjE2s58Wkct0q8iIO9GLMbC8ry3mSrWZ1fpBz0cQtqFXjyRLHYtR8IFag5Yl++hqHSf Q7oA== X-Received: by 10.66.87.5 with SMTP id t5mr29945494paz.169.1366958642720; Thu, 25 Apr 2013 23:44:02 -0700 (PDT) Received: from localhost (c-98-207-34-191.hsd1.ca.comcast.net. [98.207.34.191]) by mx.google.com with ESMTPSA id 10sm3530629pbr.45.2013.04.25.23.44.00 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 25 Apr 2013 23:44:01 -0700 (PDT) From: Jun Nakajima To: kvm@vger.kernel.org Subject: [PATCH 10/11] nEPT: Miscelleneous cleanups Date: Thu, 25 Apr 2013 23:43:30 -0700 Message-Id: <1366958611-6935-10-git-send-email-jun.nakajima@intel.com> X-Mailer: git-send-email 1.8.2.1.610.g562af5b In-Reply-To: <1366958611-6935-9-git-send-email-jun.nakajima@intel.com> References: <1366958611-6935-1-git-send-email-jun.nakajima@intel.com> <1366958611-6935-2-git-send-email-jun.nakajima@intel.com> <1366958611-6935-3-git-send-email-jun.nakajima@intel.com> <1366958611-6935-4-git-send-email-jun.nakajima@intel.com> <1366958611-6935-5-git-send-email-jun.nakajima@intel.com> <1366958611-6935-6-git-send-email-jun.nakajima@intel.com> <1366958611-6935-7-git-send-email-jun.nakajima@intel.com> <1366958611-6935-8-git-send-email-jun.nakajima@intel.com> <1366958611-6935-9-git-send-email-jun.nakajima@intel.com> X-Gm-Message-State: ALoCoQk8toAztDI0ym50PQa82+9wCnSA8wvm5B7a/2VG869he3DueA1A8wBtIaZR1FZwe9VSNUri Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Some trivial code cleanups not really related to nested EPT. Signed-off-by: Nadav Har'El Signed-off-by: Jun Nakajima Signed-off-by: Xinhao Xu Reviewed-by: Paolo Bonzini --- arch/x86/kvm/vmx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index c67eb06..95304cc 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -616,7 +616,6 @@ static void nested_release_page_clean(struct page *page) static u64 construct_eptp(unsigned long root_hpa); static void kvm_cpu_vmxon(u64 addr); static void kvm_cpu_vmxoff(void); -static void vmx_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3); static int vmx_set_tss_addr(struct kvm *kvm, unsigned int addr); static void vmx_set_segment(struct kvm_vcpu *vcpu, struct kvm_segment *var, int seg); @@ -912,8 +911,7 @@ static inline bool nested_cpu_has2(struct vmcs12 *vmcs12, u32 bit) (vmcs12->secondary_vm_exec_control & bit); } -static inline bool nested_cpu_has_virtual_nmis(struct vmcs12 *vmcs12, - struct kvm_vcpu *vcpu) +static inline bool nested_cpu_has_virtual_nmis(struct vmcs12 *vmcs12) { return vmcs12->pin_based_vm_exec_control & PIN_BASED_VIRTUAL_NMIS; } @@ -6321,7 +6319,7 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu) if (unlikely(!cpu_has_virtual_nmis() && vmx->soft_vnmi_blocked && !(is_guest_mode(vcpu) && nested_cpu_has_virtual_nmis( - get_vmcs12(vcpu), vcpu)))) { + get_vmcs12(vcpu))))) { if (vmx_interrupt_allowed(vcpu)) { vmx->soft_vnmi_blocked = 0; } else if (vmx->vnmi_blocked_time > 1000000000LL &&