From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754744AbcE0PWg (ORCPT ); Fri, 27 May 2016 11:22:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46243 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752302AbcE0PWe (ORCPT ); Fri, 27 May 2016 11:22:34 -0400 Date: Fri, 27 May 2016 17:22:25 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: kmeaw@yandex-team.ru Cc: "Gabriel L. Somlo" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "gleb@kernel.org" , "pbonzini@redhat.com" Subject: Re: [PATCH] KVM: Handle MSR_IA32_PERF_CTL Message-ID: <20160527152224.GA11721@potion> References: <770161464247923@webcorp02g.yandex-team.ru> <20160526203931.GB25334@potion> <20160526204439.GF2186@HEDWIG.INI.CMU.EDU> <920591464331762@webcorp02f.yandex-team.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <920591464331762@webcorp02f.yandex-team.ru> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 27 May 2016 15:22:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2016-05-27 09:49+0300, kmeaw@yandex-team.ru: > 26.05.2016, 23:44, "Gabriel L. Somlo" : >> On Thu, May 26, 2016 at 10:39:31PM +0200, Radim Krčmář wrote: >>>  2016-05-26 10:32+0300, kmeaw@yandex-team.ru: >>>  > This patch implements a dummy handler for MSR_IA32_PERF_CTL to avoid the >>>  > crashes. Most notably it fixes an issue with MacOS X 10.10 kernel. >>>  Does MacOS X write it too? >> >> After setting /sys/module/kvm/parameters/ignore_msrs, all I get in >> dmesg after firing up OS X is: >> >>         vcpu0 ignored rdmsr: 0x199 >> >> So no, I don't think it would try to write it. > > That's right, OS X does not issue an wrmsr to 0x199. More specifically, I have not > observed that on my KVM instances. Should I remove the "wrmsr" portion from the > patch? Yes, please. Silently ignoring the write is worse than #GP and #GP is not a problem, so I wouldn't bother with a phony implementation. Returning 0 on read is ok as seems to mean P-state=0, which is within expectations. (I wonder why MacOS X doesn't read IA32_PERF_STATUS, though.)