lkml.org 
[lkml]   [2011]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 4/6] KVM-GST: KVM Steal time registration
From
Date
On Tue, 2011-02-15 at 16:41 +0200, Avi Kivity wrote:
> > +static int kvm_register_steal_time(void)
> > +{
> > + int cpu = smp_processor_id();
> > + int low, high, ret;
> > + struct kvm_steal_time *st =&per_cpu(steal_time, cpu);
> > +
> > + if (!hypervisor_steal_time)
> > + return 0;
>
> You're using hypervisor_steal_time to communicate the existence of the
> feature. Yuck.

Yeah, ideally we make steal_time_clock() a proper paravirt op with:

u64 native_steal_time_clock(int cpu)
{
WARN_ONCE(1, "Using steal_time_clock() on actual hardware..\n");
return 0;
}

And use paravirt_enabled() to avoid calling it where possible. Then once
we have all the jump_label stuff sorted we can make paravirt_enabled() a
static_branch() and it'll just go away on native.




\
 
 \ /
  Last update: 2011-02-15 16:51    [W:0.138 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site