From patchwork Mon May 6 07:04: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: 2522931 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id E56AEE00E6 for ; Mon, 6 May 2013 07:05:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753051Ab3EFHFF (ORCPT ); Mon, 6 May 2013 03:05:05 -0400 Received: from mail-da0-f53.google.com ([209.85.210.53]:37704 "EHLO mail-da0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753004Ab3EFHFE (ORCPT ); Mon, 6 May 2013 03:05:04 -0400 Received: by mail-da0-f53.google.com with SMTP id o9so1681651dan.12 for ; Mon, 06 May 2013 00:05:03 -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=h+MzJaoN26VNO9TnTpNmMLXtEaivn/FEUhTD4ZDjO+c=; b=Y2iVY9cBjTqpkg6GIOzpimOoItPDN8tSA4oHYpM5oBBB5OiMKUt7LBqi/ZQ5ZXi8Bu MHbxeF+O3Vj/uFWXSLpL2bS4rYjR4S0BIUsgySnWcMRLqwy3pd0uPhIHHm6IIGvWQ5NW gOcoIpDny0/eYVGKGqVVSVFMcS/bUx1DqGIpJTPFUfn1T47vpVUD4nFNPyxYAfF9FJGX RKkcsGUKEp9ohZq3/h5SCrFND4DAd4PSEvKOmgqI/vUHBeygkELHL6uDsO73H70lLDUW 8Esy0wG7+1TD31ChLnSt1pJptoTJwEFWB2PWKdjB6DsaKg7eKBvNzvpqXJY2TPZWAePE Hmrg== X-Received: by 10.68.196.1 with SMTP id ii1mr24736399pbc.200.1367823903714; Mon, 06 May 2013 00:05:03 -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 xe3sm12171707pbc.30.2013.05.06.00.05.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 06 May 2013 00:05:02 -0700 (PDT) From: Jun Nakajima To: kvm@vger.kernel.org Subject: [PATCH v2 11/13] nEPT: Miscelleneous cleanups Date: Mon, 6 May 2013 00:04:30 -0700 Message-Id: <1367823872-25895-11-git-send-email-jun.nakajima@intel.com> X-Mailer: git-send-email 1.8.2.1.610.g562af5b In-Reply-To: <1367823872-25895-10-git-send-email-jun.nakajima@intel.com> References: <1367823872-25895-1-git-send-email-jun.nakajima@intel.com> <1367823872-25895-2-git-send-email-jun.nakajima@intel.com> <1367823872-25895-3-git-send-email-jun.nakajima@intel.com> <1367823872-25895-4-git-send-email-jun.nakajima@intel.com> <1367823872-25895-5-git-send-email-jun.nakajima@intel.com> <1367823872-25895-6-git-send-email-jun.nakajima@intel.com> <1367823872-25895-7-git-send-email-jun.nakajima@intel.com> <1367823872-25895-8-git-send-email-jun.nakajima@intel.com> <1367823872-25895-9-git-send-email-jun.nakajima@intel.com> <1367823872-25895-10-git-send-email-jun.nakajima@intel.com> X-Gm-Message-State: ALoCoQntnhBcml7EYt3dYNfrEp/rjCUouSCHPWxldilXH3eTVRPVR5xc8FS7qRym7Zg8ttJbVAoS 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 86e4022..914cdda 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 &&