From patchwork Thu May 9 00:53:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nakajima, Jun" X-Patchwork-Id: 2542471 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 0B5683FC5A for ; Thu, 9 May 2013 00:53:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755324Ab3EIAxz (ORCPT ); Wed, 8 May 2013 20:53:55 -0400 Received: from mail-pb0-f51.google.com ([209.85.160.51]:65237 "EHLO mail-pb0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755154Ab3EIAxx (ORCPT ); Wed, 8 May 2013 20:53:53 -0400 Received: by mail-pb0-f51.google.com with SMTP id wy7so1598200pbc.10 for ; Wed, 08 May 2013 17:53:53 -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=xWIYwo3NvjSfBMMW2bnAzETa78TTm6KhICg8fj13nRY=; b=UnpVB6+wpaIlK3m19viR9009ufAqFrvIwtCr4aeZH9X0aVbfQq+V5KYLOzP1+WKJSH SKvi0uTRkbiwY+fRDwAYa5YDDRkpIDYZsJrh9/ih0JBN30Yat9Ai/PsHjKYzvxCLxLAC DQ8wmCUMR+OmkYcVrxPfo3PyyLjmJaTBa+kbZ3gjkqx4NTsPWD2ToWdqDftlq8ipeBJD BFZKE3FpcBPCA0MptSrlCMKolqVcYyicgDOkZEBgJIHEHxPAbdl5BiGo/+s+8jY84MAw xC+D//2nFcgrFdwu/S7o72v7sAUL7JuU7UZajYlIzHDsvGZ5CTbl/61EYhFiSSj9Cs/z PfXw== X-Received: by 10.66.121.234 with SMTP id ln10mr10024618pab.129.1368060833529; Wed, 08 May 2013 17:53:53 -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 ov2sm703945pbc.34.2013.05.08.17.53.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 08 May 2013 17:53:52 -0700 (PDT) From: Jun Nakajima To: kvm@vger.kernel.org Subject: [PATCH v3 11/13] nEPT: Miscelleneous cleanups Date: Wed, 8 May 2013 17:53:23 -0700 Message-Id: <1368060805-2790-11-git-send-email-jun.nakajima@intel.com> X-Mailer: git-send-email 1.8.2.1.610.g562af5b In-Reply-To: <1368060805-2790-10-git-send-email-jun.nakajima@intel.com> References: <1368060805-2790-1-git-send-email-jun.nakajima@intel.com> <1368060805-2790-2-git-send-email-jun.nakajima@intel.com> <1368060805-2790-3-git-send-email-jun.nakajima@intel.com> <1368060805-2790-4-git-send-email-jun.nakajima@intel.com> <1368060805-2790-5-git-send-email-jun.nakajima@intel.com> <1368060805-2790-6-git-send-email-jun.nakajima@intel.com> <1368060805-2790-7-git-send-email-jun.nakajima@intel.com> <1368060805-2790-8-git-send-email-jun.nakajima@intel.com> <1368060805-2790-9-git-send-email-jun.nakajima@intel.com> <1368060805-2790-10-git-send-email-jun.nakajima@intel.com> X-Gm-Message-State: ALoCoQnyVY0jJM1OJUT/OZ7eunJ8QNpHD1kJstMQjy2bwxje0m3hODo9pK7WXd7edgZLgBhtYs08 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 9ceab42..ca49e19 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -714,7 +714,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); @@ -1039,8 +1038,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; } @@ -6731,7 +6729,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 &&