Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp500257ybn; Wed, 25 Sep 2019 03:17:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgV0fAQC3vc2EauBnINxVgVnANlS3G1Hf+fE4UjUUJF0BWjdQDvzfjKMI3Xx9DNU+YZg/2 X-Received: by 2002:a1c:7ec4:: with SMTP id z187mr6626445wmc.94.1569406661422; Wed, 25 Sep 2019 03:17:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569406661; cv=none; d=google.com; s=arc-20160816; b=gB9sF/Fl6c0EEY5jXZMAmDZWI2UbtHFP+YPMMb4RaUyGJQUAXHWl4Qqtm1QRIauNIR dzj3EJH/WEE/C9lAf2y2l/5FKsu7BMoYpLEmJWjSv0LQX0sUlz+nY6s/LsX/U/lbtSoY 64iA41A1OJbB6VOZP4QQQHvjU5BrHvghJAX3qSMnFaQ1ssL1o3JrJY/KUUtgcgHU/ryb dyys5nc3seFy4LANbNz8ceb7FG2CbHqrQ8iO2iSuN8rBoAcONw85y63GdQVO9wvuNaHB yby4U1SaLSkekzepa8V8lH7isyqiMRGqtCJz5l2IBN+m/yUroTKUZkt0iWhnxOo8yTvG LDUg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject; bh=nAyRQH3H07FmS67tnT6hsF/Qfh+8LuStTKrVaQ9zhw8=; b=RPsQJOg8LI8Gno4Rwty7q1cdLLwJ1A0SEcUxkkgU7gq4/OCn5Z/K0uIw9i+myIVRNC osw42uzvbGu4y5cdQPG3UTcQH3XOb0aDhU1tLq79nxdMcljtELEepskwpC+SBJr0DASE TN5Ssb8epj2pAW6QnUEtoG+v06ZIi7Rg62OXOz1it5wiHg2IeLCFboPDxoEYGmeKctMp KQzbdQuLLUaCHOYRK+ysZZjWMcCSwjJ0gJa9P132FwFa4Vqlu/MjEppvX9HBN5HrEkKg 47NuHyJTD6MC1tqIK53sI+Unj3ebxu4tcgrN7tdF7kihQWLx0F2W7mwvR3NDao6PS+F+ aaFw== 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 a26si2911564edv.35.2019.09.25.03.17.17; Wed, 25 Sep 2019 03:17:41 -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 S2436821AbfIWKTQ (ORCPT + 99 others); Mon, 23 Sep 2019 06:19:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35320 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727754AbfIWKTQ (ORCPT ); Mon, 23 Sep 2019 06:19:16 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C20FC054C52 for ; Mon, 23 Sep 2019 10:19:15 +0000 (UTC) Received: by mail-wm1-f71.google.com with SMTP id s19so2344070wmj.0 for ; Mon, 23 Sep 2019 03:19:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nAyRQH3H07FmS67tnT6hsF/Qfh+8LuStTKrVaQ9zhw8=; b=FEBwvuAPI4vtSfsQTQ3mnf60V224XyisBHc6JOrxX1iGDYdGQFhV2dZWx7NE8SjVMS ECcokWXmxyMxE+lHIYjHzI10ZB1708eGm2crEgi8iiYVdl/ErV0+FgaOCtwBn18BWNmu vTHIWtE8zR3DRXSj0UJcoGtYJRtLoMJ1115gKOM/pwcZmfbvoofiKswFX+aGbkbQq/f1 bDslgNFZ1Tv3TAHQGFQFtAD3Z1Kt134LHSEI0sQkKIE3ShjSAAGkZ0Q9leU/HJCr/uG/ Xw+t5zSQS52wFK8hgCetV2yHhZyb5fXv8iKPQaL37NHUF3M/ROxOYyBm1gioReTSgVJc ++AA== X-Gm-Message-State: APjAAAV6vIEC5wYjgDD9hFGaMMsPhTCozlW7kRD6EyyHUcOoDe+xJeRy 8D3KweoyhScpcS5ru7AdVIa+2mITNW8UM7B4+QFx7176wpc9Y4lG9nqWe0ErlOoAGrUQSEAdYTY 7UkVLRnBlByDuqX2ZX0iFJXc0 X-Received: by 2002:a5d:458b:: with SMTP id p11mr905177wrq.160.1569233953900; Mon, 23 Sep 2019 03:19:13 -0700 (PDT) X-Received: by 2002:a5d:458b:: with SMTP id p11mr905161wrq.160.1569233953665; Mon, 23 Sep 2019 03:19:13 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:9520:22e6:6416:5c36? ([2001:b07:6468:f312:9520:22e6:6416:5c36]) by smtp.gmail.com with ESMTPSA id s9sm10669778wme.36.2019.09.23.03.19.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Sep 2019 03:19:13 -0700 (PDT) Subject: Re: [PATCH 14/17] KVM: monolithic: x86: inline more exit handlers in vmx.c To: Andrea Arcangeli Cc: Vitaly Kuznetsov , "Dr. David Alan Gilbert" , Marcelo Tosatti , Peter Xu , kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190920212509.2578-1-aarcange@redhat.com> <20190920212509.2578-15-aarcange@redhat.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <6a1d66a1-74c0-25b9-692f-8875e33b2fae@redhat.com> Date: Mon, 23 Sep 2019 12:19:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190920212509.2578-15-aarcange@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/09/19 23:25, Andrea Arcangeli wrote: > 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. What is the output of size(1) before and after? Paolo > 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); > } >