Received: by 10.223.176.5 with SMTP id f5csp1937408wra; Wed, 31 Jan 2018 14:00:01 -0800 (PST) X-Google-Smtp-Source: AH8x226lUJLQzFyUqOhBZxd5c0/qFilX1z4CGOcFN17wNG8ykP9YDH6uDJju8a41TjBl/g1rwCQ3 X-Received: by 2002:a17:902:6945:: with SMTP id k5-v6mr20400366plt.389.1517436001320; Wed, 31 Jan 2018 14:00:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517436001; cv=none; d=google.com; s=arc-20160816; b=SK8+sH+QUOx2datOSX1AoCRU6e9gNIF2JrskAuZ+eO8aIpJYMPqbCTXIKPA6Q+ZqBG sFFJtFNFLp/1+MjDWqXrCBxhV2aReA3vvlXQD5iNNbUvEV1rBRlJz/UqaqV4Q63QF7xN s/TcldMDpXPMBz3g7DbyMdTLmcN39pQvz1t85rTuUy0ouyERf2iSNCzAz9cg9VTaucro srZiyvgQI5Sxn/tX6/ExFtVA3zd70GOXzbJdfWayrraKf6//1xobqqTN9Wm/NcjXK/Bu RkMs0tRHZ9gblr33R3Pt0I4jNfKZ3dNl9DZF+Y9VAZ6ikyiJ8QvVP7uYXbtRTUgR0wCF vAfw== 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=mfoqFvfelUrSCJJSpRlSznYowB0lbMRYPuys/kmlwzY=; b=YhHAQl/uGb6cnMff9BXCEFdXrTaT5bbWIePtQ/EpiURuMkAk18k+2jZnFZnBKvgtcg UeNJ1v10/pT7f4y+j9N9akSe6iKrV/uwyt281OhVFqMr/8qo+PiCpMlP9AuCuBodGZBf /+oEeCQ5Ybr+usfFPMt1fMvsRZRC4bVuJZMfQvEU3/f58WP27dScPtyMYxe257qmU/go bKszwmghRcl1AT7jmU3wK8ihU3EF1gMCL526b7g8TH+rIZhOYUOWqVT0IFpzaCMxxlbK ehW7oG+4EzehcyKB5q4uolEp1NmXeoScInSM73HAQ5XIQBFWdTIDaUWEdLqPP9lfd6UW R9og== 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 z61-v6si2780778plb.669.2018.01.31.13.59.46; Wed, 31 Jan 2018 14:00:01 -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 S1753339AbeAaV7U (ORCPT + 99 others); Wed, 31 Jan 2018 16:59:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57022 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753244AbeAaV7S (ORCPT ); Wed, 31 Jan 2018 16:59:18 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A26B66A7DB; Wed, 31 Jan 2018 21:59:18 +0000 (UTC) Received: from [10.36.116.69] (ovpn-116-69.ams2.redhat.com [10.36.116.69]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD64E5D6B7; Wed, 31 Jan 2018 21:59:12 +0000 (UTC) Subject: Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL To: Jim Mattson Cc: KarimAllah Ahmed , KarimAllah Ahmed , kvm list , LKML , the arch/x86 maintainers , Asit Mallick , Arjan Van De Ven , Dave Hansen , Andi Kleen , Andrea Arcangeli , Linus Torvalds , Tim Chen , Thomas Gleixner , Dan Williams , Jun Nakajima , David Woodhouse , Greg KH , Andy Lutomirski , Ashok Raj References: <1517427467-28567-1-git-send-email-karahmed@amazon.de> <1517427467-28567-5-git-send-email-karahmed@amazon.de> <06cb88da-f355-41ed-380f-7daa8ddf6159@amazon.com> <67dca2bb-1298-c7fa-f681-018e4edc6725@redhat.com> <16d89e09-fbfc-4a08-00a6-40cfb4776018@redhat.com> From: Paolo Bonzini Message-ID: Date: Wed, 31 Jan 2018 16:59:10 -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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 31 Jan 2018 21:59:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/01/2018 16:53, Jim Mattson wrote: > On Wed, Jan 31, 2018 at 1:42 PM, Paolo Bonzini wrote: > >> Can we just say it sucks to be L2 too? :) Because in the end as long as >> no one ever writes to spec_ctrl, everybody is happy. > > Unfortunately, quite a few OS vendors shipped IBRS-based mitigations > earlier this month. (Has Redhat stopped writing to IA32_SPEC_CTRL yet? > :-) Not yet, but getting there. :) > And in the long run, everyone is going to set IA32_SPEC_CTRL.IBRS=1 on > CPUs with IA32_ARCH_CAPABILITIES.IBRS_ALL. And then it will suck for everyone---they will have to pay the price of saving/restoring an MSR that is going to be written just once. Perhaps we will have to tweak the heuristic, only passing IBRS through when the guest writes IBRS=0. In the end I think it's premature to try and optimize for L2 guests of long-lived L1 hypervisors. Paolo