kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: kmeaw@yandex-team.ru
Cc: "Gabriel L. Somlo" <gsomlo@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"gleb@kernel.org" <gleb@kernel.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>
Subject: Re: [PATCH] KVM: Handle MSR_IA32_PERF_CTL
Date: Fri, 27 May 2016 17:22:25 +0200	[thread overview]
Message-ID: <20160527152224.GA11721@potion> (raw)
In-Reply-To: <920591464331762@webcorp02f.yandex-team.ru>

2016-05-27 09:49+0300, kmeaw@yandex-team.ru:
> 26.05.2016, 23:44, "Gabriel L. Somlo" <gsomlo@gmail.com>:
>> 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.)

  parent reply	other threads:[~2016-05-27 15:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26  7:32 [PATCH] KVM: Handle MSR_IA32_PERF_CTL kmeaw
2016-05-26 20:39 ` Radim Krčmář
2016-05-26 20:44   ` Gabriel L. Somlo
     [not found]     ` <920591464331762@webcorp02f.yandex-team.ru>
2016-05-27 15:22       ` Radim Krčmář [this message]
2016-05-27 15:38         ` Radim Krčmář
2016-05-31  7:53           ` Paolo Bonzini
2016-05-31 13:05             ` Radim Krčmář
     [not found]             ` <1317601464689200@webcorp01d.yandex-team.ru>
2016-05-31 13:16               ` [PATCH v3] " Radim Krčmář
2016-05-31 14:38                 ` [PATCH] " Dmitry Bilunov
2016-05-31 14:57                   ` Radim Krčmář
2016-05-27 15:28 ` Radim Krčmář

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160527152224.GA11721@potion \
    --to=rkrcmar@redhat.com \
    --cc=gleb@kernel.org \
    --cc=gsomlo@gmail.com \
    --cc=kmeaw@yandex-team.ru \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).