public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Emulate MSR_EBC_FREQUENCY_ID
@ 2010-09-09 10:06 Jes.Sorensen
  2010-09-09 10:06 ` [PATCH 1/2] Define MSR_EBC_FREQUENCY_ID Jes.Sorensen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jes.Sorensen @ 2010-09-09 10:06 UTC (permalink / raw)
  To: kvm; +Cc: avi

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Hi,

Discussed this with Juan and he spotted this place in
arch/x86/kernel/cpu/cpufreq/speedstep-lib.c which relies on the 'Core
Clock Frequency to System Bus Frequency Ratio', so leaving it set to 0
is not going to work. Reading the spec it also says that bits 31:24
are reserved on models 0-1, so it should be safe to set it for this
case.

Here is v2, which should hopefully do the right thing.

Cheers,
Jes


static unsigned int pentium4_get_frequency(void)
{
...
	rdmsr(0x2c, msr_lo, msr_hi);
...
	/* Multiplier. */
	mult = msr_lo >> 24;

	dprintk("P4 - FSB %u kHz; Multiplier %u; Speed %u kHz\n",
			fsb, mult, (fsb * mult));

	ret = (fsb * mult);
	return ret;

Jes Sorensen (2):
  Define MSR_EBC_FREQUENCY_ID
  Emulate MSR_EBC_FREQUENCY_ID

 arch/x86/include/asm/msr-index.h |    1 +
 arch/x86/kvm/x86.c               |   14 ++++++++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-09 19:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-09 10:06 [PATCH v2 0/2] Emulate MSR_EBC_FREQUENCY_ID Jes.Sorensen
2010-09-09 10:06 ` [PATCH 1/2] Define MSR_EBC_FREQUENCY_ID Jes.Sorensen
2010-09-09 10:06 ` [PATCH 2/2] Emulate MSR_EBC_FREQUENCY_ID Jes.Sorensen
2010-09-09 10:45 ` [PATCH v2 0/2] " Juan Quintela
2010-09-09 19:53 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox