Re: [RFC] Paravirt timer for KVM

Glauber de Oliveira Costa
2007-10-15T17:48:14Z

On 10/12/07, Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
>
> What makes you think this is page-aligned?

Nothing.

> > + if (kvm_hypercall1(KVM_HCALL_SET_SHARED_PAGE, shared_page))
> > + return;
>
> Here you're passing a virtual address across the guest/host interface,
> which is something we've previously agreed is bad.
And that's the reason for the "nothing". It was just the easier way,
and I'm not aware of any discussion in which it was agreed bad. I'll
dig into the archives, but it would be a lot easier if you give me
some pointers ;-)

for the overall picture, it does not really make a difference, so if
this is all that a bad idea, I can change it, no big deal.

> Are you intending this shared page to contain other data in the future,
> or is it just poorly named?

Well, this is still a work in progress, so the accurate answer should
be: Something in the middle, between "more data", and "poorly named".

I think more data can be in, but right now, everything I intend to
(maybe) put in is timer related, so a rename could go well anyway.

> > +struct kvm_hv_clock {
> > + int stable_tsc; /* use raw tsc for clock_read */
> > + unsigned long tsc_mult;
> > + struct timespec now;
> > + u64 last_tsc;
> > + /* That's the wall clock, not the water closet */
> > + struct timespec wc;
> > +};
>
> This isn't even good for x86: you're using "long" in a binary interface!
> You're also using timespec, and what sort of binary compatibility
> guarantees would you like to make about that?
>

Binary guarantees goes in version two ;-)
But c'mon, now that I'm starting to be able to make some merely
decents puns in english, I put one very well placed there, and you
come telling me about binary compatiblity?

Now seriously, the long is just my bad, but I'm not aware of any
complications regarding the timespec. You are welcome to enlighten me.
(Meanwhile, I'll go look at it)

--
Glauber de Oliveira Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."