From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] Emulate MSR_EBC_FREQUENCY_ID
Date: Thu, 09 Sep 2010 10:55:28 +0200 [thread overview]
Message-ID: <4C88A100.60503@redhat.com> (raw)
In-Reply-To: <4C889AFB.3000106@redhat.com>
On 09/09/10 10:29, Jes Sorensen wrote:
> On 09/09/10 10:12, Avi Kivity wrote:
>> From the spec:
>>
>>> 31:24 Core Clock Frequency to System
>>> Bus Frequency Ratio. (R)
>>> The processor core clock
>>> frequency to system bus
>>> frequency ratio observed at the
>>> de-assertion of the reset pin.
>>
>> A frequency ratio of 0 might be unexpected by some guests.
>
> Problem with that one is that it is only for CPU models 2, 3, 4, 6.
> I haven't found a way to distinguish CPU models from within KVM, but
> maybe I am blind?
>
> Bits 31:24 are invalid on models 0 and 1.
Actually scratch that - the problem is that we are trying to emulate the
MSR because the guest thinks it's valid on the old CPU. However since we
don't know which CPU model the guest was expecting, there really isn't a
valid answer. Setting bits 31:24 to a divisor or 1 would probably be
safe, but there is no guarantee that other guests might not expect the
MSR to return 0 in those bits for other cases.
I can spin a patch that does that, I am just not convinced it's any
safer. Let me know what you prefer.
Jes
prev parent reply other threads:[~2010-09-09 8:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-09 7:33 [PATCH] Emulate MSR_EBC_FREQUENCY_ID Jes.Sorensen
2010-09-09 8:12 ` Avi Kivity
2010-09-09 8:29 ` Jes Sorensen
2010-09-09 8:55 ` Jes Sorensen [this message]
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=4C88A100.60503@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
/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