Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1390650ybn; Wed, 25 Sep 2019 17:37:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCHcDcQNKBKrdbXP5qvdDmU/gCTcTOavDR/UQjuatpdUf0PWlUJscZBiY2RnetMLEKgDBs X-Received: by 2002:aa7:c495:: with SMTP id m21mr790439edq.287.1569458268825; Wed, 25 Sep 2019 17:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569458268; cv=none; d=google.com; s=arc-20160816; b=FWoThsiwImExuYFzEC11t19A3Fyo7u8rZaIJjDKdm/yzzEfTTctGw/bGPKp3qMEyLW hJhRMlZGY3j5hTYO9uVBu36c1VQ+CWhVso+vaP3a9vePH1sF8Gg4MW3hq6at6eyfxXnD WkBxW97RE8Pi9XpuQg5aYCtKS4IJzNDIA0tqcWwM9cLXLM+2Nqfiq89zzjbWkDVlt2sT ZziCj9SnOzhZLFMIGYqWOQFHYpga+fJJj3LsMhxcvRwRyCRpPQz5GIRgQLqmjK8kYaJP G3AsNRudHB+YsrT+ntY5juLtfNV9UYLK0MGeMNcbe+/oaC1XITks8kj7O1Eh++GG0lj1 m1MQ== 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=mpcv0KL90LjkeaV/ZJEVaIBae43XjLnOOnfD3fnVH+8=; b=yANDkjSVKQBNugmgGWACcSh9Ruc2sFBd/+7xwGISxiLGRLGNbkd2ZQUKwieCfgN4jC IHdmg7IRzmcIyfs2AnGesiI4b0b7NsgCvTq3JUWRFZeSawHRPayQXUSL8sdhz0S3UhRQ /+yaNNEjdpVT1za+mJdGeNmG/SexXPgSgE4mlrs+ULBWrqw3y9MrSiCOTIV0y//NtYQ6 MiprsrL66YNvtlLAvM7Y1vWkl/PoUhhaOHAdcQ9NG+kpcArytW3u0L+I9PLQ2NPFJxZu BlFMQPgPcr3avkt+SCzSNtEuRVo9ETbdYknHLjxaQJAiygfXTA9mArhLqeN9SmP5UO99 5S7Q== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10si366306eds.428.2019.09.25.17.37.25; Wed, 25 Sep 2019 17:37:48 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2503636AbfIXAfB (ORCPT + 99 others); Mon, 23 Sep 2019 20:35:01 -0400 Received: from mga04.intel.com ([192.55.52.120]:18647 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388800AbfIXAfA (ORCPT ); Mon, 23 Sep 2019 20:35:00 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Sep 2019 17:35:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,542,1559545200"; d="scan'208";a="203247391" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.41]) by fmsmga001.fm.intel.com with ESMTP; 23 Sep 2019 17:35:00 -0700 Date: Mon, 23 Sep 2019 17:35:00 -0700 From: Sean Christopherson To: Paolo Bonzini Cc: Andrea Arcangeli , 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: <20190924003459.GA13147@linux.intel.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 24, 2019 at 02:16:36AM +0200, Paolo Bonzini wrote: > On 23/09/19 23:08, Andrea Arcangeli wrote: > > The two most attractive options to me remains what I already have > > implemented under #ifdef CONFIG_RETPOLINE with direct calls > > (optionally replacing the "if" with a small "switch" still under > > CONFIG_RETPOLINE if we give up the prioritization of the checks), or > > the replacement of kvm_vmx_exit_handlers with a switch() as suggested > > by Vitaly which would cleanup some code. > > > > The intermediate solution that makes "const" work, has the cons of > > forcing to parse EXIT_REASON_VMCLEAR and the other vmx exit reasons > > twice, first through a pointer to function (or another if or switch > > statement) then with a second switch() statement. > > I agree. I think the way Andrea did it in his patch may not the nicest > but is (a bit surprisingly) the easiest and most maintainable. Heh, which patch? The original patch of special casing the high priority exits?