Received: by 10.213.65.68 with SMTP id h4csp1210422imn; Wed, 14 Mar 2018 13:00:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELvoAQO4SOOsT1x6PFFX+HjLgvbeLVpLHOqCFK06W32Bv8YR7EiKbGxW8uas5Nb2ASC/9VD0 X-Received: by 10.99.127.92 with SMTP id p28mr4755851pgn.305.1521057646684; Wed, 14 Mar 2018 13:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521057646; cv=none; d=google.com; s=arc-20160816; b=pW7jpYGO+tbHa+sfYoiUnnmzXFinZeILET1MSYXBFqN48FRmBtERxo+aNOg9rejITK v3HVxptpiPLOgikJRA2f9nJrjnDF0Fq9476Uy4D3CLyWgW2kHeRWyveJlvtZmk4EIsZg mQQUE3tLOCRYm1hVC/0VrCSW8IRYqIP0i1KM8GEoVtVPrR+n0UfsTI++RXUGr7uYFGNO VQtEg0tXZCXwRki53qmdOQAoK/aDqRtVYJ85lHZzrAfo7/Fpb96/Vw6Y+EVbacCv/1di /2Efa8qlkoyYm/fVYXBvDyHrTYCOtx68gnm+e/Y9s4fC2PQdRZ4SugcASf97nt1a73Ja h6HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=R8az/Lrw+iQ7kNWBZWj/CkNlW4iIPpR0zE3myiHTsso=; b=EmI/LgNJuwV1BvJUCBnS0H4hQZNcQVgISRZsEXVlXHYviGGY69XU+s/dLLNqu4vuQk rj9++1dKGYPejJFGuMYwKV57/waHu3ym7m1RYqFhfBFW34sTWrPesQWnC0aJPxJJiFRU ENqbRgeiSe7Q2CTmprYccvxIJzSrOWVHMb/7QcS6Kmf19hZ5zkYBiXhM9uaFGBeyAjub MJc5RcJ24z8JCe/cKF1jNk0nsY76Ydd896L1bb3NM2qL+PfbCuEsfof/Kn9w+ajZ0PO/ JFWoHHcT0Q76vIYcFMP4xabAvjJuec7/MhRteH9AItpvb8jqiejs5FSJbfw45aiMcpNh TPfQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd8-v6si2462035plb.288.2018.03.14.13.00.26; Wed, 14 Mar 2018 13:00:46 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751791AbeCNT7b (ORCPT + 99 others); Wed, 14 Mar 2018 15:59:31 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:52137 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbeCNT7a (ORCPT ); Wed, 14 Mar 2018 15:59:30 -0400 Received: from p4fea5f09.dip0.t-ipconnect.de ([79.234.95.9] helo=nanos.glx-home) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ewCYX-0008DM-FD; Wed, 14 Mar 2018 20:59:25 +0100 Date: Wed, 14 Mar 2018 20:59:25 +0100 (CET) From: Thomas Gleixner To: Vitaly Kuznetsov cc: Paolo Bonzini , =?ISO-8859-2?Q?Radim_Kr=E8m=E1=F8?= , kvm@vger.kernel.org, x86@kernel.org, "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , Mohammed Gamal , Cathy Avery , Bandan Das , LKML , Peter Zijlstra Subject: Re: [PATCH v3 7/7] x86/kvm: use Enlightened VMCS when running on Hyper-V In-Reply-To: <87k1uebmiu.fsf@vitty.brq.redhat.com> Message-ID: References: <20180309140249.2840-1-vkuznets@redhat.com> <20180309140249.2840-8-vkuznets@redhat.com> <87r2opcr6u.fsf@vitty.brq.redhat.com> <87k1uebmiu.fsf@vitty.brq.redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 14 Mar 2018, Vitaly Kuznetsov wrote: > Thomas Gleixner writes: > > On Mon, 12 Mar 2018, Vitaly Kuznetsov wrote: > >> Thomas Gleixner writes: > >> > On Fri, 9 Mar 2018, Vitaly Kuznetsov wrote: > >> >> Static key is being used to avoid performance penalty for non-Hyper-V > >> >> deployments. Tests show we add around 3 (three) CPU cycles on each > >> >> VMEXIT (1077.5 cycles before, 1080.7 cycles after for the same CPUID > >> >> loop on bare metal). We can probably avoid one test/jmp in vmx_vcpu_run() > >> >> but I don't see a clean way to use static key in assembly. > >> > > >> > STATIC_JUMP_IF_TRUE, STATIC_JUMP_IF_FALSE are your friends. > >> > > >> > >> Thanks for the tip, > >> > >> with a single kernel user of these APIs it was easy to miss :-) > >> > >> Unfortunately, these APIs are only present if HAVE_JUMP_LABEL and > >> (afaiu) we still care about KVM on !HAVE_JUMP_LABEL builds. It would be > >> nice if we can make them behave the same way static_branch_likely() and > >> friends do: compile into something else when !HAVE_JUMP_LABEL so we can > >> avoid nasty #ifdefs in C code. > > > > What's the reason for !jump label builds of a recent kernel? Old compilers? > > > > To be honest I don't see any, we can start depending on HAVE_JUMP_LABEL > for CONFIG_KVM I guess. We currently try to move the minimum compiler version to one which provides jump label support, so this should be a non issue. @Peter: What was the final conclusion of this discussion? Thanks, tglx