Received: by 10.223.185.116 with SMTP id b49csp969862wrg; Fri, 23 Feb 2018 09:36:37 -0800 (PST) X-Google-Smtp-Source: AH8x225eMjajifNSueU9MOpwhrczDYLNed4Q66HjOudfAzM7oAuf/u5I6iqyVsPb1tTBoPP66LG1 X-Received: by 10.99.120.13 with SMTP id t13mr2040562pgc.35.1519407397505; Fri, 23 Feb 2018 09:36:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519407397; cv=none; d=google.com; s=arc-20160816; b=cN8ZX4HGa7XSLaIRs52mWQmw/Sh9B1yHpAD1wwiSUTzRhAkAhO2iESLt8QneNWUUCy i9m+0kP0WAktv0yjQeH9IZSIrTvJfwT+FPpGBeLOxpP0kwbkF+LwFR4FwA4k9G+bjqpf OT95MU/4G5PQTL+Rw3YSSJ4d/Pcrumnj4fDlPrSP6jqPysZvduaY/upAyaSpyZk2npuw U3pMwGaibwznQXNxTc3Uaz/NBVz13wRpJvV7qt75rDqNCMwHxXQdkcZOVnoK0Jf7+Is8 Xy7RDcmfYFFwWW55JjxUemOp0GI6UHA3O6xQPWK/dMM3wLbok5UXP9edP652cHgwW336 ud9g== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=nU5ImXiipsZk2dEX+m0n+2IHf9PaQOW9ZpS87pLg0K4=; b=OCksWvPzI1syMhgbTxWTK/NCS2hV12lU0cBakFrpGvk8BUg6vxOYiSiA6wXKk6CT/H NA01mVcqDzAxUrtNcE66ZOYniA3j0iEbdcnTjNmLd77y7J4AHve5500MAI094b/9bQTM hXvw/emD7tct91Ds2gQ7105jyORagQNe1NfJEq1pXspbACRrMnrcG/2GjteDXNr4bP1E eglEQMiTzCQvO4HvfZ7CTMt7Si4De9fuMgNbX6sQRGcGMtqEj4QqLToXLnGLSYQBmXCm zE3xsZkVDUDt6Ve2hLr+sO1JvGHOHb/8SO3NdlI3t8NT/Urh3NkgUTEGWGfqs5B1TO1R 0JFA== 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 o64si2120335pfb.346.2018.02.23.09.36.23; Fri, 23 Feb 2018 09:36:37 -0800 (PST) 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 S1751968AbeBWRfh (ORCPT + 99 others); Fri, 23 Feb 2018 12:35:37 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44656 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751425AbeBWRff (ORCPT ); Fri, 23 Feb 2018 12:35:35 -0500 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 EED8740FB64A; Fri, 23 Feb 2018 17:35:34 +0000 (UTC) Received: from [10.36.117.249] (ovpn-117-249.ams2.redhat.com [10.36.117.249]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A9A752024CAB; Fri, 23 Feb 2018 17:35:31 +0000 (UTC) Subject: Re: [PATCH 1/3] KVM: x86: use native MSR ops for SPEC_CTRL To: Konrad Rzeszutek Wilk Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, x86@kernel.org, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , KarimAllah Ahmed , David Woodhouse , Jim Mattson , Thomas Gleixner , Ingo Molnar , stable@vger.kernel.org References: <1519249297-73718-1-git-send-email-pbonzini@redhat.com> <1519249297-73718-2-git-send-email-pbonzini@redhat.com> <20180222170717.GP31483@char.us.oracle.com> <20180223172220.GK8252@char.us.oracle.com> From: Paolo Bonzini Message-ID: <7534bcd3-e21b-240c-9ed2-62026ba10301@redhat.com> Date: Fri, 23 Feb 2018 18:35:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180223172220.GK8252@char.us.oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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.7]); Fri, 23 Feb 2018 17:35:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 23 Feb 2018 17:35:35 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'pbonzini@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/02/2018 18:22, Konrad Rzeszutek Wilk wrote: > On Fri, Feb 23, 2018 at 10:37:49AM +0100, Paolo Bonzini wrote: >> On 22/02/2018 18:07, Konrad Rzeszutek Wilk wrote: >>>> Having a paravirt indirect call in the IBRS restore path is not a >>>> good idea, since we are trying to protect from speculative execution >>>> of bogus indirect branch targets. It is also slower, so use >>>> native_wrmsrl on the vmentry path too. >>> But it gets replaced during patching. As in once the machine boots >>> the assembler changes from: >>> >>> callq *0xfffflbah >>> >>> to >>> wrmsr >>> >>> ? I don't think you need this patch. >> >> Why not be explicit? According to the spec, PRED_CMD and SPEC_CTRL > > Explicit is fine. > > But I would recommend you change the commit message to say so, and > perhaps remove 'It is also slower' - as that is incorrect. Actually it is faster---that's why I made the change in the first place, though later I noticed > If it is detected to be Xen PV, then yes > it will be a call to a function. But that won't help as Xen PV runs in > ring 3, so it has a whole bunch of other issues. Ok, I wasn't sure about PVH (which runs in ring 0 afair). Paolo