Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1392319ybn; Wed, 25 Sep 2019 17:39:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqx75yDYXjTkO5C5ySySqiNS7MwWAL0otmAPVm9ckjVxuS+4dBjwViVIQbmsyiI6gSV+y/0J X-Received: by 2002:a17:906:b316:: with SMTP id n22mr863497ejz.54.1569458368360; Wed, 25 Sep 2019 17:39:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569458368; cv=none; d=google.com; s=arc-20160816; b=hNqX+opE8uMauAQYQoqNCEBnxOxBCuqboONhOhglimU3xumNznXDT5xSbO3pNhJGT0 393YvnyEg5LY8Th97dEqKaaH/a1eyyfQbb6IDaKQPRosEGmUgBBE9JkVj1O4aSL3rvUY Yk14pHxT+RtAS8F/9fxdq0maKDLJgn98rh+nzJwrggoAMvKGvb+oQz6o85Brn6+pWC8X yGYaOMS/KLi6d0T19H3Vm1ISlWP9hq9DRnHKvyykGH/KaZ7ryTsaPwT2shtFlmfYLv6h Ndauxjd27WzTRlqEaEHOI9xWhwLJGKmQt6aCcSsDrC27kMZ3Zj4tAoY/OW7FnxoK+Qvu GErQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/G28wpp8+/Z4hJFwZ4RKO1MiiJzzP3olC18M5/pF81U=; b=nUDFKXPDI+LEm/jZmdi19pPFE1IhUOX9d5ozHqzH3tPzlw3AbpU+swLuCV4GwehIpf 50Wn3/qUz/PUTIAp7D/3J6V+7uTWnUeOcJWcT4DXAlZr2EIu6676lSh+YriE+sV2ZadR I0Yamh54BbKD/h6xCRBwt8+i2aH3c7+j61BISdEW9FFp3F9kJPsDrCvpNOHLlz5+owlY V5moVJ1oYRD7NCCDJOCh9RM9R7US93LAYKzkLFW0GPd9suZZIFza7oQsegkY/2whr8vd fXjEU6bj2orPr3DLaxX1zqwpd1zlRASH567sSk/WRijBSXehLZ/lQUVd03NWsR+2oQme qfAA== 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 h12si379566edq.437.2019.09.25.17.39.04; Wed, 25 Sep 2019 17:39:28 -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 S2391337AbfIWXnL (ORCPT + 99 others); Mon, 23 Sep 2019 19:43:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55504 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729316AbfIWXnK (ORCPT ); Mon, 23 Sep 2019 19:43:10 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 798F1300CB25; Mon, 23 Sep 2019 23:43:10 +0000 (UTC) Received: from mail (ovpn-120-159.rdu2.redhat.com [10.10.120.159]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D1E925D9CA; Mon, 23 Sep 2019 23:43:07 +0000 (UTC) Date: Mon, 23 Sep 2019 19:43:07 -0400 From: Andrea Arcangeli To: Sean Christopherson Cc: Paolo Bonzini , Vitaly Kuznetsov , "Dr. David Alan Gilbert" , Marcelo Tosatti , Peter Xu , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 15/17] KVM: retpolines: x86: eliminate retpoline from vmx.c exit handlers Message-ID: <20190923234307.GG19996@redhat.com> References: <20190920212509.2578-1-aarcange@redhat.com> <20190920212509.2578-16-aarcange@redhat.com> <87o8zb8ik1.fsf@vitty.brq.redhat.com> <7329012d-0b3b-ce86-f58d-3d2d5dc5a790@redhat.com> <20190923190514.GB19996@redhat.com> <20190923202349.GL18195@linux.intel.com> <20190923210838.GA23063@redhat.com> <20190923212435.GO18195@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190923212435.GO18195@linux.intel.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 23 Sep 2019 23:43:10 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 23, 2019 at 02:24:35PM -0700, Sean Christopherson wrote: > An extra CALL+RET isn't going to be noticeable, especially on modern > hardware as the high frequency VMWRITE/VMREAD fields should hit the > shadow VMCS. In your last email with regard to the inlining optimizations made possible by the monolithic KVM model you said "That'd likely save a few CALL/RET/JMP instructions", that kind of directly contradicts the above. I think neither one if taken at face value can be possibly measured. However the above only is relevant for nested KVM so I'm fine if there's an agreement that it's better to hide the nested vmx handlers in nested.c at the cost of some call/ret. From my part I'm dropping 15/16/17 in the short term, perhaps Vitaly or you or Paolo if he has time, want to work on that part in parallel to the orthogonal KVM monolithic changes? Thanks, Andrea