From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Emulate MSR_EBC_FREQUENCY_ID Date: Thu, 09 Sep 2010 11:12:42 +0300 Message-ID: <4C8896FA.1040103@redhat.com> References: <1284017626-30542-1-git-send-email-Jes.Sorensen@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Jes.Sorensen@redhat.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:7542 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751300Ab0IIIMp (ORCPT ); Thu, 9 Sep 2010 04:12:45 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o898Cj6r016079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 9 Sep 2010 04:12:45 -0400 In-Reply-To: <1284017626-30542-1-git-send-email-Jes.Sorensen@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/09/2010 10:33 AM, Jes.Sorensen@redhat.com wrote: > From: Jes Sorensen > > Some operating systems store data about the host processor at the > time of installation, and when booted on a more uptodate cpu tries > to read MSR_EBC_FREQUENCY_ID. This has been found with XP. > > > index f47db25..78fa8a0 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -1641,6 +1641,14 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata) > case MSR_K8_INT_PENDING_MSG: > case MSR_AMD64_NB_CFG: > case MSR_FAM10H_MMIO_CONF_BASE: > + /* > + * MSR_EBC_FREQUENCY_ID > + * Conservative value valid for even the basic CPU models. > + * Models 0,1: 000 in bits 23:21 indicating a bus speed of > + * 100MHz, model 2 000 in bits 18:16 indicating 100MHz, > + * and 266MHz for model 3, or 4. > + */ > + case MSR_EBC_FREQUENCY_ID: > data = 0; > break; > case MSR_MTRRcap: 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. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.