Re: [RFC] Paravirt timer for KVM

Anthony Liguori
2007-10-12T18:58:48Z

Jeremy Fitzhardinge wrote:
> Glauber de Oliveira Costa wrote:
>
>> My next TODOs with it are:
>> * Get SMP working
>> * Try something for stolen time, as jeremy's last suggestion for anthony's patch
>> * Measure the time it takes for a hypercall, and subtract this time
>> for calculating the expiry time for the timer event.
>>
>>
>
>
>> diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
>> index d474cd6..fd758f9 100644
>> --- a/arch/i386/kernel/setup.c
>> +++ b/arch/i386/kernel/setup.c
>> @@ -46,6 +46,7 @@
>> #include <linux/crash_dump.h>
>> #include <linux/dmi.h>
>> #include <linux/pfn.h>
>> +#include <linux/kvm_para.h>
>>
>> #include <video/edid.h>
>>
>> @@ -579,6 +580,9 @@ void __init setup_arch(char **cmdline_p)
>> vmi_init();
>> #endif
>>
>> +#ifdef CONFIG_KVM_CLOCK
>> + kvmclock_init();
>> +#endif
>>
>>
>
> Why is this necessary? Can't you hook one of the existing pvops?
>

Something needs to install the pvops in the first place. Instead of
adding a kvmclock_init(), it would probably be better to add a single
kvm_para_init() (as I did in my previous series) and initialize the
pv_ops for the clock there.

Regards,

Anthony Liguori

> J