Received: by 10.213.65.68 with SMTP id h4csp160807imn; Thu, 15 Mar 2018 12:45:05 -0700 (PDT) X-Google-Smtp-Source: AG47ELssMuc/s4J4+bHVm5DRpo96UU5rB966QDNq4BmZy0Y1jsJDnVAlAyd6jAd9nJCtmpuMyzup X-Received: by 10.99.131.73 with SMTP id h70mr7534811pge.195.1521143105203; Thu, 15 Mar 2018 12:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521143105; cv=none; d=google.com; s=arc-20160816; b=1LN9je1P8TnLy/1db3HjU067Dm8AvYkpDxnKq7AF/OxXbudDkk/rm4KIk0T6YPO6ln VTpsuDD2wRvASyBGesUVPfx72jnnsHpEHgm8TgQlHD9aZyI+J2hVwrvLkvgY9TKuGggy OTmhrcaQ00svWb/r0AS5XWwzCU/Wq4X6tAM24fA6q5EVqKTWkVfnhab30o8kEmCcgIGe M6U6gm+nvHjFc0CB6G+mtTLaKzZFDbewm7gVN1rH8N1/PbLfFMhUxn3g3UeKKX6oNE+v +2rutw3igB3nyaBKXUD+T0Ow+3aQvvxuDe15V1OBBhlrRsaKdPnwUf2dVKD7yqzI4PsS FDKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=RoNLSTqiJ1YgbkaIB57YiC98qJ6ozrrWFIeugW79D94=; b=bt+GwaEiw7oA89wFm1ZzvIGrKnzKSRjSPXpekD8lrFgDkYfIpYwK1PEmhppxup9oAX w3gi8wOLkNPG3rF/WoHs1UIv5HzdjBBWfBDnHZxkpz3LaP22PjasCuZosf1uiOIKVI6R WPc+vlPzRiGNOLGm/QSpE+OKy3UbgyWJc29e3I8rXmrfg2hy7paKj7CBh7zvQDEtDEhn BHx11mdu74GQmJgswvM3eTx867NCWk+F9gpbcx4NdHyLhr9pvw5xzJOxG/0CJhyQX8Bx 25+l7zxsRYp3i2EgFN8l5GbSmL6fDc4n6MdIaW3gifFXHmTz9OD4+JveLfHDb0BF20us MQAw== 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 y67si4309822pfd.195.2018.03.15.12.44.50; Thu, 15 Mar 2018 12:45:05 -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 S1752290AbeCOTnx (ORCPT + 99 others); Thu, 15 Mar 2018 15:43:53 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56510 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751497AbeCOTnv (ORCPT ); Thu, 15 Mar 2018 15:43:51 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 64C398D6BE; Thu, 15 Mar 2018 19:43:51 +0000 (UTC) Received: from flask (unknown [10.43.2.80]) by smtp.corp.redhat.com (Postfix) with SMTP id 834FB2166BB2; Thu, 15 Mar 2018 19:43:48 +0000 (UTC) Received: by flask (sSMTP sendmail emulation); Thu, 15 Mar 2018 20:43:47 +0100 Date: Thu, 15 Mar 2018 20:43:47 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Thomas Gleixner Cc: Vitaly Kuznetsov , Paolo Bonzini , kvm@vger.kernel.org, x86@kernel.org, "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , Mohammed Gamal , Cathy Avery , Bandan Das , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 7/7] x86/kvm: use Enlightened VMCS when running on Hyper-V Message-ID: <20180315194347.GB5180@flask> References: <20180309140249.2840-1-vkuznets@redhat.com> <20180309140249.2840-8-vkuznets@redhat.com> <2747cc75-b549-61bb-9c1b-0f554a49b536@redhat.com> <87zi399xih.fsf@vitty.brq.redhat.com> <20180315170202.GA5180@flask> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 15 Mar 2018 19:43:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 15 Mar 2018 19:43:51 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'rkrcmar@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-03-15 20:28+0100, Thomas Gleixner: > On Thu, 15 Mar 2018, Radim Krčmář wrote: > > 2018-03-15 16:19+0100, Vitaly Kuznetsov: > > > This works. But hell, this is a crude hack :-) Not sure if there's a > > > cleaner way to find what needs to be patched without something like jump > > > label table ... > > > > Yeah, I can see us accidently patching parts of other instructions. :) > > > > The target instruction address can be made into a C-accessible symbol > > with the same trick that vmx_return uses -- add a .global containing the > > address of a label (not sure if a more direct approach would work). > > > > The evil in me likes it. (The good is too lazy to add a decent patching > > infrastructure for just one user.) > > Can we just use jump labels please? There is agreement that 4.17 will have > a dependency on a jump label capable compiler for x86. Luckily, it turned out that the path is very cold and should use the simple test-and-jump.