Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4036838imu; Mon, 10 Dec 2018 12:00:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/WGo8R2q2vARx5jX/ei7tZSz1URDPQC7ZHO39ocU44w1KlSaoE/oJUOUdSnh6w5MyNKUWyz X-Received: by 2002:a62:61c3:: with SMTP id v186mr13694180pfb.55.1544472047072; Mon, 10 Dec 2018 12:00:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544472047; cv=none; d=google.com; s=arc-20160816; b=jVyZa7WDtkKN3npAvqenEmg1yM0kHCcHcdyKZj91QXAVIgFf6eJ1iwAsaO/uylhr0k hXMVM6eRpnSPVWmxgrdXC/0osCPuWIA7uUqWnZItKncOd7kRfQ0QMxWQOjbcCN1GBs/g HfN+sj3yvm9THeVLwQ6mi4aEoqFWVefcbNNHyd/BWmH66YebwWbqbdeyOVtCoyJCRXjT hC50A1IfB/HALQ7HHBKDaLuYO05XrRnEceXylf1V5sL6QnQ6QsMC4Y5XHhSZnQos7YdW 1Ni5xFUTt54uhsySvmmehIiDCE0zxys0qJCNRxmlY1ACzEu38b8UO72xs4gmH/MywirA KGYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=255ScCyeuDDNoXHnfTqAOTDDVQL6zmJEt0P/fyXHwlc=; b=uPVMmzD5ZWyb604YJr7hwV9RsoHEKRuIshkMCXq+eEE/+GUMfXqEaW7BJ9twvj3oRX MyX3R0vQSuKO/rz/SrF0z4WlKBheu2U1Ta/9laLmqUPjOoliO8ts6yWjOpgbGZiHUIdV qJ2VRUtyGPpO7qCJGveWr2qjG+qoaydbsSWljuIzvMFqrULCwzwajjHp+0x7IJe7qNjf GsKyB4fRy3TQMLkOyB0061/nijEe75DVa9CB0cuCC1FAfq4i96GBblRMHTR0H/sBvsEV WOTGDFedkRCf3l8SHj0DmYjjMAf7ABtYG3RaIAt7mjmUJFdOUba3681Zu3E/a9jhH1e4 UGeQ== 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 x64si11151849pfb.120.2018.12.10.12.00.31; Mon, 10 Dec 2018 12:00:47 -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 S1728255AbeLJShd (ORCPT + 99 others); Mon, 10 Dec 2018 13:37:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41484 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727593AbeLJShd (ORCPT ); Mon, 10 Dec 2018 13:37:33 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 15AF530014CC; Mon, 10 Dec 2018 18:37:33 +0000 (UTC) Received: from localhost (ovpn-116-63.gru2.redhat.com [10.97.116.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48054600D7; Mon, 10 Dec 2018 18:37:32 +0000 (UTC) Date: Mon, 10 Dec 2018 16:37:30 -0200 From: Eduardo Habkost To: Borislav Petkov Cc: Paolo Bonzini , =?iso-8859-1?Q?J=F6rg_R=F6del?= , Andre Przywara , kvm ML , lkml , Tom Lendacky Subject: Re: kvm: RDTSCP on AMD Message-ID: <20181210183730.GJ4669@habkost.net> References: <20181210181328.GA762@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181210181328.GA762@zn.tnic> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 10 Dec 2018 18:37:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 10, 2018 at 07:13:28PM +0100, Borislav Petkov wrote: > Reviving an old thread here. > > On Wed, Jul 06, 2016 at 11:27:16PM +0200, Paolo Bonzini wrote: > > On 06/07/2016 19:34, Eduardo Habkost wrote: > > >> > Nothing is needed in the kernel actually. You can skip the intercept > > >> > by running the guest with MSR_TSC_AUX set to the guest's expected value. > > >> > Which KVM does, except that it's botched so I need to apply the > > >> > patch in https://lkml.org/lkml/2016/4/13/802. > > > Do you mean -cpu Opteron_G*,+rdtscp will be buggy on Linux v4.5? > > > (v4.5 reports rdtscp as supported in GET_SUPPORTED_CPUID) > > > > > > Can we do something to make QEMU detect the buggy kernel before > > > allowing rdtscp to be enabled, or should we just tell people to > > > upgrade their kernel? > > > > We usually just tell people to use the latest stable kernel. > > > > Adding new CPU models is not a big deal, in fact it's almost easier than > > getting compat properties right. :) > > Ok, can we finally revert > > 33b5e8c03ae7 ("target-i386: Disable rdtscp on Opteron_G* CPU models") > > in the qemu tree? > > Three years should be enough by now for > > 46896c73c1a4 ("KVM: svm: add support for RDTSCP") > > to have percolated downstream. That's Linux v4.5, released in March 2016. It isn't as simply as reverting commit 33b5e8c03ae7, but we can surely re-add RDTSCP on pc-*-4.0 and newer. I thought we added documentation mentioning the minimum kernel version required by QEMU, but I can't find it. In either case, it seems reasonable to require Linux 4.5 or newer on newer machine-types. -- Eduardo