From: Gerd Hoffmann <kraxel@redhat.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net, virtualization@lists.osdl.org
Subject: Re: [PATCH 3/4] kvm/host: fix paravirt clocksource to be compatible with xen.
Date: Fri, 16 May 2008 09:47:12 +0200 [thread overview]
Message-ID: <482D3C00.80707@redhat.com> (raw)
In-Reply-To: <48294B5B.8020706@qumranet.com>
Avi Kivity wrote:
>> + struct timespec now,sys,boot;
>
> Add spaces.
Done.
>> +#if 0
>> + /* Hmm, getboottime() isn't exported to modules ... */
>> + getboottime(&boot);
>> +#else
>> + now = current_kernel_time();
>> + ktime_get_ts(&sys);
>> + boot = ns_to_timespec(timespec_to_ns(&now) - timespec_to_ns(&sys));
>> +#endif
>> + wc.wc_sec = boot.tv_sec;
>> + wc.wc_nsec = boot.tv_nsec;
>
> Please drop the #if 0.
Done, and added a comment for the calculation.
>> +static uint32_t div_frac(uint32_t dividend, uint32_t divisor)
>> +{
>> + uint32_t quotient, remainder;
>> +
>> + __asm__ ( "divl %4"
>> + : "=a" (quotient), "=d" (remainder)
>> + : "0" (0), "1" (dividend), "r" (divisor) );
>> + return quotient;
>> +}
>>
>
> do_div()?
No, this one does something else. Already tried to get rid of that one
before ;)
> pr_debug() or something?
Done.
>> + kvm_set_time_scale(tsc_khz, &vcpu->arch.hv_clock);
>>
> What if the tsc frequency changes later on? we need to adjust the
> multiplier, no?
We better do that, yes.
New patch series prepared and tested, will be posted in a moment ...
cheers,
Gerd
--
http://kraxel.fedorapeople.org/xenner/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-05-16 7:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-08 11:48 [PATCH 0/4] paravirt clock series Gerd Hoffmann
2008-05-08 11:48 ` [PATCH 1/4] Add helper functions for paravirtual clocksources Gerd Hoffmann
2008-05-08 11:48 ` [PATCH 2/4] Make xen use the generic paravirt clocksource code Gerd Hoffmann
2008-05-08 11:48 ` [PATCH 3/4] kvm/host: fix paravirt clocksource to be compatible with xen Gerd Hoffmann
2008-05-13 8:03 ` [kvm-devel] " Avi Kivity
2008-05-16 7:47 ` Gerd Hoffmann [this message]
2008-05-18 6:05 ` Avi Kivity
2008-05-21 15:24 ` Avi Kivity
2008-05-08 11:48 ` [PATCH 4/4] kvm/guest: fix paravirt clocksource to be compartible " Gerd Hoffmann
-- strict thread matches above, loose matches on Subject: below --
2008-05-16 8:01 [PATCH 0/4] paravirt clock source patches, #3 Gerd Hoffmann
2008-05-16 8:01 ` [PATCH 3/4] kvm/host: fix paravirt clocksource to be compatible with xen Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=482D3C00.80707@redhat.com \
--to=kraxel@redhat.com \
--cc=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=virtualization@lists.osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).