Received: by 10.223.185.116 with SMTP id b49csp5187920wrg; Wed, 7 Mar 2018 07:41:45 -0800 (PST) X-Google-Smtp-Source: AG47ELuHcg0zUuFBiAV1HCT0kp5Scw3z+PNXN5JEJ6EITIsCTZZ3HP3D9WAN1mY/4/Lzb6VQV58r X-Received: by 10.99.191.78 with SMTP id i14mr17739317pgo.95.1520437305748; Wed, 07 Mar 2018 07:41:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520437305; cv=none; d=google.com; s=arc-20160816; b=csQQDo9e4+WC2P+2J3jo8OMOESCGT7bfrpjE+3Rqh/BD/WDEUI/pgarhUz9Kfg/k4R fG7rmZyneVX6fhcW6+0pGIZuGZla5MxklrpBmTT+xZR9EDeXrFGH2Hgc/hGKGdV1qeea FMy/tLDEVBzTjo3Z6bSyjaaSTri+h1TUCeLZFhB45CWS0BFjy/QkObp6Fr46HkLlr3QN 7IfSEPNcuX9VlW/Y0WB60wGgG1CP4jYruFQy+cN/xJLGHbP8ikfZqEACBS/4ghipuuyW bYhVj8ZgJjI04TSg5czRPgN97P7DuHMAPh7YHy6njhl2mlAG1gr78ZvKGUyfCafEDL5U 999Q== 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=vwoc/eiHjI5/MP7gPVGqzupWzgfJRch1pVWvjpZDC2M=; b=CQpxzWiwc2E67Sd3Vfs0m/kyKhcHr7kexpRs3bN+ipoByZp9pSUjbNhsS1zd0yWZjo Y7WHLhX4X9dAlqOKbILDOaE2DnGCUYYAR0vJ9IVUWBGi/qDVUwSNPyn5SOI2Q9TRMG1q eEnt+ybMdG900UqwRMORtJgkQ4YCILmZw+tARVzbQI/88Mxh7sXPgBuwwJ1JhYap8J3L +apCcQmCTUop3x2xfuyHGqtKlT4zZ1VyM7dFG0arz38zID6xypLPRh/ztl0jf3tNv8Dq FNE4RAudAgxohcXs1HLBb9zO6FNoW8PbR8yY8bVVkn2QNbszzHIeg7fTMy1WYj0kIEvo 3Hjg== 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 m83si14173122pfa.367.2018.03.07.07.41.30; Wed, 07 Mar 2018 07:41:45 -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 S934004AbeCGPk2 (ORCPT + 99 others); Wed, 7 Mar 2018 10:40:28 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:40384 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933386AbeCGPkX (ORCPT ); Wed, 7 Mar 2018 10:40:23 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 903EA4068055; Wed, 7 Mar 2018 15:40:22 +0000 (UTC) Received: from flask (unknown [10.43.2.80]) by smtp.corp.redhat.com (Postfix) with SMTP id 75C5D1134CD6; Wed, 7 Mar 2018 15:40:20 +0000 (UTC) Received: by flask (sSMTP sendmail emulation); Wed, 07 Mar 2018 16:39:42 +0100 Date: Wed, 7 Mar 2018 16:39:42 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Cc: Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, David Woodhouse , KarimAllah Ahmed Subject: Re: [PATCH] KVM: VMX: expose the host's ARCH_CAPABILITIES MSR to userspace Message-ID: <20180307153942.GC12290@flask> References: <1519433546-33879-1-git-send-email-pbonzini@redhat.com> <20180226221300.GK22024@char.us.oracle.com> <20180301213205.GB29001@flask> <20180302214212.GB13606@flask> <9cad32c8-fdb6-95db-2cd3-a0e3297b1811@redhat.com> <20180307145628.GA12299@flask> <37a89c09-e933-9256-1b7a-3a9df846a672@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <37a89c09-e933-9256-1b7a-3a9df846a672@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 07 Mar 2018 15:40:22 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 07 Mar 2018 15:40:22 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.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-07 16:10+0100, Paolo Bonzini: > On 07/03/2018 15:56, Radim Krčmář wrote: > > The MSR_F10H_DECFG default is questionable -- MSR_F10H_DECFG is an > > architectural MSR, so we'd be changing the guest under the sight of > > existing userspaces. > > A potential security risk if they migrate the guest to a CPU that > > doesn't serialize LFENCE. ARCH_CAPABILITIES are at least hidden by a > > new CPUID bit. > > Good point. Perhaps we should add a KVM-specific CPUID bit for > serializing LFENCE. I reckon it wouldn't help much in the wild: we'd need userspace changes (at least for QEMU) and at that point, userspace can as well just implement MSR_F10H_DECFG and use an unmodified guest. We can't easily intercept LFENCE to emulate the feature either, so it seems like a waste of effort to me.