Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1797392ybj; Sun, 22 Sep 2019 12:08:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKWyztzABcYAx2VHQc5JeTPuPcjeMXZhzg9AatZ5Ly3dxe5iH6lOe7r7Y29LL+fAY55fEa X-Received: by 2002:a17:906:fc11:: with SMTP id ov17mr3623415ejb.288.1569179332266; Sun, 22 Sep 2019 12:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569179332; cv=none; d=google.com; s=arc-20160816; b=oYEqUvq6njtfJAd2nUjOxykozCZoZpwcuh54toqohdCmAUW8HwWrt3nBXfEUobqb2B lSWcdxl/2c3NTDS20S9/xmZkv5pdsLaABiZc3NEBgljuy1A17YB5enN9EgIcxyLEMVRz tg/buWJTVKhRY+KaZu6PXWobFmAjVTg2QF9UH/zcIKT/dor/ZA5Ib0Yfek1Z16+xzclR CODceABzZf+qVhZnqAexCObWtjmSxWaQkX56Efqo21ToeFJuDXXuzVM/DnizXO+lpck+ Qm/itq5wLMcMEl89n0cDkp2DIZ9xR3bmev8Up0UbOq/PFDzW9E4+0E7Y6bOatQIxn4yB XKNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Uxn7XeCj0VDb3lYGNjlQBs3+JLXrtcVJdTmnGEbLN7I=; b=N7DMxUUXdRp1uHqFTB7WjmdOF6diYFPcv2b03tjEgQO+3bTdWGQIAw5yn7Z6J0rDyl fql6CpQgPZbG7c+jg6qp2Hs93SImCndVXHoaMgZnc8k0angR3XZfX76R3s5zJWElcXt8 ocgOrFCw93QKKB3HvEp/8p5zMgTVCqGtijH2svszBkpJdsZSEplyIXXYAyia240wW15D A1uPrRrrRqGP9dU0c+KVPZjXJsvT+Qdk02HNQR33DSuALMMv8SJO/N+wBfkbLMshHMBK vuJYIkNipJaXsefKZhCAnIYWGxBu+0meAKdawlbdICCFZosawyXMyM35i12aJi6zYPtR fGKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s19si3962711ejd.277.2019.09.22.12.08.28; Sun, 22 Sep 2019 12:08:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394010AbfITV0Q (ORCPT + 99 others); Fri, 20 Sep 2019 17:26:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53098 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392265AbfITVZN (ORCPT ); Fri, 20 Sep 2019 17:25:13 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6A1707F743; Fri, 20 Sep 2019 21:25:13 +0000 (UTC) Received: from mail (ovpn-120-159.rdu2.redhat.com [10.10.120.159]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 49FD210013D9; Fri, 20 Sep 2019 21:25:13 +0000 (UTC) From: Andrea Arcangeli To: Paolo Bonzini Cc: Vitaly Kuznetsov , "Dr. David Alan Gilbert" , Marcelo Tosatti , Peter Xu , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/17] KVM: monolithic: x86: inline more exit handlers in vmx.c Date: Fri, 20 Sep 2019 17:25:06 -0400 Message-Id: <20190920212509.2578-15-aarcange@redhat.com> In-Reply-To: <20190920212509.2578-1-aarcange@redhat.com> References: <20190920212509.2578-1-aarcange@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Fri, 20 Sep 2019 21:25:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org They can be called directly more efficiently, so we can as well mark some of them inline in case gcc doesn't decide to inline them. Signed-off-by: Andrea Arcangeli --- arch/x86/kvm/vmx/vmx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index ff46008dc514..a6e597025011 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -4588,7 +4588,7 @@ static int handle_exception_nmi(struct kvm_vcpu *vcpu) return 0; } -static int handle_external_interrupt(struct kvm_vcpu *vcpu) +static __always_inline int handle_external_interrupt(struct kvm_vcpu *vcpu) { ++vcpu->stat.irq_exits; return 1; @@ -4860,7 +4860,7 @@ static void vmx_set_dr7(struct kvm_vcpu *vcpu, unsigned long val) vmcs_writel(GUEST_DR7, val); } -static int handle_cpuid(struct kvm_vcpu *vcpu) +static __always_inline int handle_cpuid(struct kvm_vcpu *vcpu) { return kvm_emulate_cpuid(vcpu); } @@ -4891,7 +4891,7 @@ static int handle_interrupt_window(struct kvm_vcpu *vcpu) return 1; } -static int handle_halt(struct kvm_vcpu *vcpu) +static __always_inline int handle_halt(struct kvm_vcpu *vcpu) { return kvm_emulate_halt(vcpu); }