Add a comment about it in the source code.
-#define PM_TIMER_FREQUENCY 3579545
+#define PM_TIMER_FREQUENCY 3579545 // 3.579545 MHz clock required by
ACPI spec.
On Mon, Aug 13, 2012 at 12:46 PM, Gleb Natapov wrote:
> On Mon, Aug 13, 2012 at 12:37:11PM +0200, Gerd Hoffmann wrote:
>> Hi,
>>
>>
On Mon, Aug 13, 2012 at 12:37:11PM +0200, Gerd Hoffmann wrote:
> Hi,
>
> > Isnt pmtimer ioport usable? 14MHz.
>
> Can give it a try. 14 MHz looks wrong though, apci.h says:
>
> /* PM Timer ticks per second (HZ) */
> #define PM_TIMER_FREQUENCY 3579545
>
> Is this fixed? Or hardware specific
Hi,
> Isnt pmtimer ioport usable? 14MHz.
Can give it a try. 14 MHz looks wrong though, apci.h says:
/* PM Timer ticks per second (HZ) */
#define PM_TIMER_FREQUENCY 3579545
Is this fixed? Or hardware specific?
cheers,
Gerd
--
To unsubscribe from this list: send the line "unsubscribe kvm
On 08/09/2012 10:02 PM, Marcelo Tosatti wrote:
> On Thu, Aug 09, 2012 at 05:20:11PM +0300, Avi Kivity wrote:
>> On 08/09/2012 05:18 PM, Gerd Hoffmann wrote:
>> > Hi,
>> >
>> >>> So what do you suggest? The options I see are:
>> >>>
>> >>> (1) Use this patch (with alignment issue fixed of cour
On 08/09/2012 09:59 PM, Marcelo Tosatti wrote:
>>
>> > +wrmsr(msr, 0);
>> > +if (time.version < 2 || time.tsc_to_system_mul == 0)
>> > +return 0;
>> > +
>> > +/* go figure tsc frequency */
>> > +khz = pvclock_tsc_khz(&time);
>> > +dprintf(1, "Using kvmclock, msr 0x%x, t
On 08/10/2012 11:10 AM, Gerd Hoffmann wrote:
> Hi,
>
>>> (1) Use this patch (with alignment issue fixed of course).
>>> (2) Do a full kvmclock implementation. Feels a bit like overkill.
>>> (3) SeaBIOS can fallback to the PIT for timing on machines which
>>> have
On Fri, Aug 10, 2012 at 10:10:27AM +0200, Gerd Hoffmann wrote:
> Hi,
>
> >>> (1) Use this patch (with alignment issue fixed of course).
> >>> (2) Do a full kvmclock implementation. Feels a bit like overkill.
> >>> (3) SeaBIOS can fallback to the PIT for timing on machines which
> >>>
Hi,
>>> (1) Use this patch (with alignment issue fixed of course).
>>> (2) Do a full kvmclock implementation. Feels a bit like overkill.
>>> (3) SeaBIOS can fallback to the PIT for timing on machines which
>>> have no TSC. We could do that too in case we detect kvm ...
>>
>> What s
On Fri, Aug 10, 2012 at 10:18:00AM +0300, Gleb Natapov wrote:
> > can fix the in-kernel PIT issues with GRUB (see Michaels message) while
> > testing.
> >
> What message exactly?
>
found it.
--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
th
On Thu, Aug 09, 2012 at 04:09:13PM -0300, Marcelo Tosatti wrote:
> On Thu, Aug 09, 2012 at 05:01:34PM +0300, Avi Kivity wrote:
> > On 08/09/2012 04:57 PM, Gerd Hoffmann wrote:
> > > Hi,
> > >
> > >>> +u64 kvm_tsc_khz(void)
> > >>> +{
> > >>> +u32 eax, ebx, ecx, edx, msr;
> > >>> +struct
On Thu, Aug 09, 2012 at 03:53:24PM +0300, Avi Kivity wrote:
> On 08/09/2012 02:57 PM, Gerd Hoffmann wrote:
> > Use kvmclock for tsc calibration when running on kvm. Without this the
> > tsc frequency calibrated by seabios can be *way* off in case the virtual
> > machine is booted on a loaded host.
On Thu, Aug 09, 2012 at 05:01:34PM +0300, Avi Kivity wrote:
> On 08/09/2012 04:57 PM, Gerd Hoffmann wrote:
> > Hi,
> >
> >>> +u64 kvm_tsc_khz(void)
> >>> +{
> >>> +u32 eax, ebx, ecx, edx, msr;
> >>> +struct pvclock_vcpu_time_info time;
> >>> +u32 addr = (u32)(&time);
> >>> +u64 k
On Thu, Aug 09, 2012 at 05:20:11PM +0300, Avi Kivity wrote:
> On 08/09/2012 05:18 PM, Gerd Hoffmann wrote:
> > Hi,
> >
> >>> So what do you suggest? The options I see are:
> >>>
> >>> (1) Use this patch (with alignment issue fixed of course).
> >>> (2) Do a full kvmclock implementation. Fe
On 08/09/2012 05:18 PM, Gerd Hoffmann wrote:
> Hi,
>
>>> So what do you suggest? The options I see are:
>>>
>>> (1) Use this patch (with alignment issue fixed of course).
>>> (2) Do a full kvmclock implementation. Feels a bit like overkill.
>>> (3) SeaBIOS can fallback to the PIT for tim
On 08/09/2012 04:57 PM, Gerd Hoffmann wrote:
> Hi,
>
>>> +u64 kvm_tsc_khz(void)
>>> +{
>>> +u32 eax, ebx, ecx, edx, msr;
>>> +struct pvclock_vcpu_time_info time;
>>> +u32 addr = (u32)(&time);
>>> +u64 khz;
>>> +
>>> +/* check presence and figure msr number */
>>> +cpuid(K
Hi,
>> So what do you suggest? The options I see are:
>>
>> (1) Use this patch (with alignment issue fixed of course).
>> (2) Do a full kvmclock implementation. Feels a bit like overkill.
>> (3) SeaBIOS can fallback to the PIT for timing on machines which
>> have no TSC. We could
On 08/09/2012 05:12 PM, Gerd Hoffmann wrote:
> Hi,
>
>>> er, the documentation says 4 bytes (so stack alignment works). I
>>> distinctly remember having a large alignment requirement so we don't
>>> cross a page or slot boundary... something's wrong here.
>>
>> case MSR_KVM_SYSTEM_TIME: {
Hi,
>> er, the documentation says 4 bytes (so stack alignment works). I
>> distinctly remember having a large alignment requirement so we don't
>> cross a page or slot boundary... something's wrong here.
>
> case MSR_KVM_SYSTEM_TIME: {
[ ... ]
> So your tests worked by pure luck, but th
On 08/09/2012 05:01 PM, Avi Kivity wrote:
> On 08/09/2012 04:57 PM, Gerd Hoffmann wrote:
>> Hi,
>>
+u64 kvm_tsc_khz(void)
+{
+u32 eax, ebx, ecx, edx, msr;
+struct pvclock_vcpu_time_info time;
+u32 addr = (u32)(&time);
+u64 khz;
+
+/* ch
Hi,
>> +u64 kvm_tsc_khz(void)
>> +{
>> +u32 eax, ebx, ecx, edx, msr;
>> +struct pvclock_vcpu_time_info time;
>> +u32 addr = (u32)(&time);
>> +u64 khz;
>> +
>> +/* check presence and figure msr number */
>> +cpuid(KVM_CPUID_FEATURES, &eax, &ebx, &ecx, &edx);
>> +if (ea
It should be kHz not khz.
-msr, (u32)khz / 1000);
+msr, (u32)kHz / 1000);
On Thu, Aug 9, 2012 at 2:53 PM, Avi Kivity wrote:
> On 08/09/2012 02:57 PM, Gerd Hoffmann wrote:
>> Use kvmclock for tsc calibration when running on kvm. Without this the
>> tsc frequency calibrate
On 08/09/2012 02:57 PM, Gerd Hoffmann wrote:
> Use kvmclock for tsc calibration when running on kvm. Without this the
> tsc frequency calibrated by seabios can be *way* off in case the virtual
> machine is booted on a loaded host. I've seen seabios calibrating 27
> instead of ca. 2800 MHz, result
Use kvmclock for tsc calibration when running on kvm. Without this the
tsc frequency calibrated by seabios can be *way* off in case the virtual
machine is booted on a loaded host. I've seen seabios calibrating 27
instead of ca. 2800 MHz, resulting in timeouts being to short by factor
100. Which
23 matches
Mail list logo