Received: by 10.213.65.68 with SMTP id h4csp93343imn; Thu, 15 Mar 2018 10:31:30 -0700 (PDT) X-Google-Smtp-Source: AG47ELtbE1Udp53lSk+Z9Wy5AAFLuByAErQZNQb/x63PwlqZxY13Ja1NhtVi5YmqgnwMj9JF2Btl X-Received: by 10.99.126.72 with SMTP id o8mr7337622pgn.256.1521135090664; Thu, 15 Mar 2018 10:31:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521135090; cv=none; d=google.com; s=arc-20160816; b=fpe4II0Cubudgx8D0A+t/sKvXK9WsEPhn2ZZyxjQOyKFafxsqZUGi03UNFIXxKk0kx fI5JsyoqfJ8yw8f0mouw45dcLXL4IT16WZic/dzXex6aqng7kVxkPIochpXsaEUY11Aj PFKyeHOjZw6c3lmB+JPeDAHXgRl0ZBrcOiE4APeqI7yTPWSvjbergn/VLEGUYAXN6Nfx oUDi9WXiWvkEfhIoldHrJeJos91S/sX4XHon6zJMtzng+kmKi8Ac0Nu/dmntT9hda8kt 6nP82ysgQN56X2mImhelwUQaRzv138F+VYQNKkOM+MJWoteAcdMiQ44goRDkNLi6RrZi QpsA== 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=GcJvTNQLUi1ZPHhJXSc4uycnzp99NMn24jc3HgkzR18=; b=IX0Ks4TyF7qHAk0cjf4fk2IDIoEud/J+QUZtTR+5+5y9rHFyG5lNky9Y3KQszyB2/Z R2Vs9vEsXGiUff6ssnXc6qCwSd0cqAeKOOhSb3KB4b+U5ukkWHWpgEx0xGAOwGzI0jmq T45SxBboIk7/CnOgBQOTDIzKyZBkjhYQ6g5ufkiQRddnF3nR6osfC3xUD5BbgyDKVw7j /pBXvP4gvixAngPkYArXaD8dSYYhQ/Ox648Twdcuur2ClYXyuOuPVr/Mu+EpKP6MHnGT AF8dUekzWxTF4FRvJ+ihkZI9PPFM4AKHqzKUhjIxVfIl9/i++GdSFh6hZ17np8rN7Ck3 o1BA== 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 h70si4094276pfc.269.2018.03.15.10.31.15; Thu, 15 Mar 2018 10:31:30 -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 S1752419AbeCOR26 (ORCPT + 99 others); Thu, 15 Mar 2018 13:28:58 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:48880 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751714AbeCOR24 (ORCPT ); Thu, 15 Mar 2018 13:28:56 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2A1A0EAEB3; Thu, 15 Mar 2018 17:28:56 +0000 (UTC) Received: from flask (unknown [10.43.2.80]) by smtp.corp.redhat.com (Postfix) with SMTP id 624A32026E03; Thu, 15 Mar 2018 17:28:53 +0000 (UTC) Received: by flask (sSMTP sendmail emulation); Thu, 15 Mar 2018 18:28:52 +0100 Date: Thu, 15 Mar 2018 18:28:52 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Vitaly Kuznetsov Cc: 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: <20180315172852.GA21667@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: <20180315170202.GA5180@flask> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 15 Mar 2018 17:28:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 15 Mar 2018 17:28:56 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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 18:02+0100, Radim Krčmář: > We actually already have mov in the assembly: > > "cmp %%" _ASM_SP ", %c[host_rsp](%0) \n\t" Oh hell, I didn't pay attention to this line before. > "je 1f \n\t" > "mov %%" _ASM_SP ", %c[host_rsp](%0) \n\t" // here > __ex(ASM_VMX_VMWRITE_RSP_RDX) "\n\t" I bet this path is executed only once in VM's lifetime and what we're doing is wasting more resources than we're ever going to save ... > "1: \n\t"