Am 10.08.2011 um 05:35 schrieb David Gibson <da...@gibson.dropbear.id.au>:

> On Tue, Aug 09, 2011 at 06:39:30PM +0200, Alexander Graf wrote:
>> One of the things we can't fake on PPC is the timer speed. So
>> we need to extract the frequency information from the host and
>> put it back into the guest device tree.
>> 
>> Luckily, we already have functions for that from the non-pseries
>> targets, so all we need to do is to connect the dots and the guest
>> suddenly gets to know its real timer speeds.
>> 
>> Signed-off-by: Alexander Graf <ag...@suse.de>
>> ---
>> hw/spapr.c |    8 ++++----
>> 1 files changed, 4 insertions(+), 4 deletions(-)
>> 
>> diff --git a/hw/spapr.c b/hw/spapr.c
>> index d56697a..a73f38a 100644
>> --- a/hw/spapr.c
>> +++ b/hw/spapr.c
>> @@ -140,6 +140,8 @@ static void *spapr_create_fdt_skel(const char *cpu_model,
>>         char *nodename;
>>         uint32_t segs[] = {cpu_to_be32(28), cpu_to_be32(40),
>>                            0xffffffff, 0xffffffff};
>> +        uint32_t tbfreq = kvm_enabled() ? kvmppc_get_tbfreq() : 
>> TIMEBASE_FREQ;
>> +        uint32_t cpufreq = kvm_enabled() ? kvmppc_get_clockfreq() : 
>> 1000000000;
> 
> Um.. I see the kvmppc_get_tbfreq() function but not the
> kvmppc_get_clockfreq() function in my tree (pulled from upstream this
> morning).  Is that something new in your ppc patch queue?

Yes, it's part of the SMP patch set for e500 :)

Alex

> 

Reply via email to