Received: by 10.223.176.5 with SMTP id f5csp672060wra; Tue, 30 Jan 2018 17:33:57 -0800 (PST) X-Google-Smtp-Source: AH8x2271pE+8XqeYjiAJeti+5SD+5no8h1ddTSqOuxiEqpt3UELEXSfVY2dEFhgya3A6HeXwJ+cd X-Received: by 10.99.115.89 with SMTP id d25mr24998951pgn.218.1517362436907; Tue, 30 Jan 2018 17:33:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517362436; cv=none; d=google.com; s=arc-20160816; b=I3o8F+rv5qdlfRZDCLLP2C8/x/kW3fQEVS13ARib5Y5fjoBuHKZ8SY/uAMMQuY5dBN BaHqxzK9ZYpX5/FF0SwWyd2V1QxA0UJ4Ph2/qkA1AlWVFMmwe/McwlBQl93khQ7/1WrY hXyeEB5I6Ikt8CbWFXF9/GNtDpxX6ukOi1oFW70pcdSu+ZPHn/D5ow/PoQhnzU/44E4J tcAv0qAowSVfyAp0pV0v1d3LyaQfoqJbgqyxS/HRI5zrdNfW9km1qB5xNx/oiGF0hS1p YQQwsAUIcS1vZSM6kkLKq6dIMUODpRVzmcHO+OvbC+lLcE5jflqTsLsf9C5FBVH/X/hz cstw== 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=yHjIeF53lWPMXfx38A83dnu6cG0N/PKoQOVjTz2qSQc=; b=uLn7xbAQ/K7PkxavnpCgkJPfESgEo6LNiBpylTi9fG67owDIGDJmbfNXdHYZ/DKzH1 qqv3jvlqzgDQSL+PIG9o7392cFK/k14kl02frHzXygmaEAzY0PcnUZ9Z8mqs2/bXvBGE dq1kEpOsFMXYyk7KvX6t9Awvt7z2JZkdih4hxCEFoJ7Me4W0RAiMZbf+yv3S7l4pisSE griBEZ1r6wQVrSo72OJsWvTkvEcmPXPdXd1W8l2xkSblP6+3AWQZjXgV2ghFE8A45Ao4 d49lOmbrOvdwJM0ks5b4p/47h5gpBEDGd87qx+XKDEJZNHp6YfDK6NydPLWXxd890tms XGFg== 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 129si540179pgc.441.2018.01.30.17.33.12; Tue, 30 Jan 2018 17:33:56 -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 S1754016AbeA3XLk (ORCPT + 99 others); Tue, 30 Jan 2018 18:11:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41776 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753610AbeA3XLi (ORCPT ); Tue, 30 Jan 2018 18:11:38 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3FE5E80B22; Tue, 30 Jan 2018 23:11:38 +0000 (UTC) Received: from [10.36.116.40] (ovpn-116-40.ams2.redhat.com [10.36.116.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97A9D60BE0; Tue, 30 Jan 2018 23:11:31 +0000 (UTC) Subject: Re: [9/8] KVM: x86: limit MSR_IA32_SPEC_CTRL access based on CPUID availability To: Thomas Gleixner , David Woodhouse Cc: Jim Mattson , Mihai Carabas , LKML , kvm list , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Liran Alon , Anthony Liguori , Tom Lendacky , Borislav Petkov , the arch/x86 maintainers , Konrad Rzeszutek Wilk References: <20180109120311.27565-10-pbonzini@redhat.com> <6dc02278-7004-1794-3705-69c8cad86be4@oracle.com> <1517332457.18619.132.camel@infradead.org> From: Paolo Bonzini Message-ID: <75049dca-3389-9cc7-44e3-a487a797c605@redhat.com> Date: Tue, 30 Jan 2018 18:11:28 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 30 Jan 2018 23:11:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/01/2018 12:45, Thomas Gleixner wrote: > On Tue, 30 Jan 2018, David Woodhouse wrote: > >> On Tue, 2018-01-30 at 08:57 -0800, Jim Mattson wrote: >>> It's really hard to tell which patches are being proposed for which >>> repositories, but assuming that everything else is correct, I don't >>> think your condition is adequate. What if the physical CPU and the >>> virtual CPU both have CPUID.(EAX=7H,ECX=0):EDX[26], but only the >>> physical CPU has CPUID.(EAX=7H,ECX=0):EDX[27]? If the guest has write >>> access to MSR_IA32_SPEC_CTRL, it can set MSR_IA32_SPEC_CTRL[1] >>> (STIBP), even though setting that bit in the guest should raise #GP. >> >> Everything we're talking about here is for tip/x86/pti. Which I note >> has just updated to be 4.15-based, although I thought it was going to >> stay on 4.14 for now. So I've updated my tree at >> http://git.infradead.org/linux-retpoline.git/shortlog/refs/heads/ibpb >> accordingly. > > Yes, we tried to stay on 4.14 base but this started to created nasty merge > conflicts for no value. Merging in v4.15 turned out to resolve those issues > while still serving as the feed branch for Gregs stable work. For the time > being we try to make stable backporting at least for 4.14/15 as painless as > possible. Great, then the "per-VCPU MSR bitmaps" branch (git://git.kernel.org/pub/scm/virt/kvm/kvm.git refs/heads/msr-bitmaps) that I created last weekend can be pulled directly in tip/x86/pti. It cherry-picks directly to both 4.14 so it will be fine for Greg too. Paolo