Received: by 10.213.65.68 with SMTP id h4csp111378imn; Thu, 15 Mar 2018 11:05:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELuObJYFyl2xzbEBFPOE0tzwXPU4XV8GeKlfpBbW1bLyjh2W2vawpz2uXruDYBJpexbt+oCy X-Received: by 10.101.72.69 with SMTP id i5mr7209998pgs.78.1521137152298; Thu, 15 Mar 2018 11:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521137152; cv=none; d=google.com; s=arc-20160816; b=CpSkkosUic9XywstvkT4nAkzfQHdnl9tULdnN7t504smkxK5TOCyPjJHhSY4vtLY/a VkVqBm+fS6HZM7TR+ZbuQk5NZOjEt/2yeMqER4kaxf2Sz0bK/EKu0RBWp/CWYKmL6P4w /1WpCnqz7zR2PsnkioH5ocr+/2oVPJikDMgKxw63cnujKLq3LdWD7yLH4XriegnTfHa3 SHcZokMekyWu+aVRO6D6uKDtb03c4INUBfIjOJZs6HmvQoRAoMQiZcuqbVGRCBeaHbvP 1npzlJSwl75eikNoUzaYYfsJjWPN7IQKFJfrE+u2dx0JehNMIekhii7nXoIEE6brUb+n BWWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:arc-authentication-results; bh=UmqEbzZvVsYYpyFeke1WWxvqkYtXutGOrTJKN4waZKA=; b=KyK5TQaWeFrXTRNdP3kuJ8O+TO1hARkoe0Trk1RRw7o2NK3NrAEV4r8LVyMUp8whfz yek/Kx5OGiMOeqtrsrJHPUttjcT4eRGyWFrFZw3ImkYiJw8JnkiPXQS7xiFiX1iuVms3 HKjBYf05d4nAj9BYkcHwWCc5lw6KOCeB8k5CVE34XXoagofAadWPn4/syXHKTYLxBrqE ev/yJwmRqI6B4ccLgHlFp/p9FZW5Wi2srXUG1YrVvbG0LcoOVv7hmDCtqJAGqVYB+4ro RyZIQ90KxSnlcnqJva185NRBZsZNPog4qO54sjqVbYknI/4E2O5lOg8cCPU26+GyOUOw Ybig== 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 w15si4171194pfa.86.2018.03.15.11.05.37; Thu, 15 Mar 2018 11:05:52 -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 S1752411AbeCOSEl (ORCPT + 99 others); Thu, 15 Mar 2018 14:04:41 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55814 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751394AbeCOSEk (ORCPT ); Thu, 15 Mar 2018 14:04:40 -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 E06094023141; Thu, 15 Mar 2018 18:04:39 +0000 (UTC) Received: from vitty.brq.redhat.com.redhat.com (unknown [10.40.205.96]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2CC92215CDA7; Thu, 15 Mar 2018 18:04:36 +0000 (UTC) From: Vitaly Kuznetsov To: Radim =?utf-8?B?S3LEjW3DocWZ?= 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 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> <20180315172852.GA21667@flask> Date: Thu, 15 Mar 2018 19:04:35 +0100 In-Reply-To: <20180315172852.GA21667@flask> ("Radim \=\?utf-8\?B\?S3LEjW3DocWZ\?\= \=\?utf-8\?B\?Iidz\?\= message of "Thu, 15 Mar 2018 18:28:52 +0100") Message-ID: <87sh919pvw.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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.6]); Thu, 15 Mar 2018 18:04:39 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 15 Mar 2018 18:04:39 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'vkuznets@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Radim Krčmář writes: > 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. > This is still going to work if we conditionally replace it with pointer to evmcs as you suggested before but ... >> "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 ... > yes, we're not gonna save anything... -- Vitaly