Re: [PATCH v4 3/8] KVM Guest: Add VCPU running/pre-empted state for guest

Nikunj A Dadhania
2012-08-27T04:25:34Z

On Fri, 24 Aug 2012 12:02:27 -0300, Marcelo Tosatti <mtosatti@redhat.com> wrote:
> On Fri, Aug 24, 2012 at 11:09:39AM +0530, Nikunj A Dadhania wrote:
> > On Thu, 23 Aug 2012 06:36:43 -0300, Marcelo Tosatti <mtosatti@redhat.com> wrote:
> > > On Tue, Aug 21, 2012 at 04:56:35PM +0530, Nikunj A. Dadhania wrote:
[...]

> > > > @@ -469,6 +500,11 @@ void __init kvm_guest_init(void)
> > > > if (kvm_para_has_feature(KVM_FEATURE_PV_EOI))
> > > > apic_set_eoi_write(kvm_guest_apic_eoi_write);
> > > >
> > > > +#ifdef CONFIG_PARAVIRT_TLB_FLUSH
> > > > + if (kvm_para_has_feature(KVM_FEATURE_VCPU_STATE))
> > > > + has_vcpu_state = 1;
> > > > +#endif
> > >
> > > Why only this hunk guarded by CONFIG_PARAVIRT_TLB_FLUSH and not
> > > the rest of the code?
> > >
> > The guest should have been compiled with CONFIG_PARAVIRT_TLB_FLUSH, as
> > the config also brings in HAVE_RCU_TABLE_FREE code into picture. We
> > should not enable this code without HAVE_RCU_TABLE_FREE.
> >
> > Did not want to spray this across all the code, as the compiler will
> > take care of throwing out the kvm_tlb_flush_others
> >
> > > Is there a switch to enable/disable this feature on the kernel
> > > command line?
> > >
> > No, havent added it.
> >
> > > Grep for early_param in kvm.c.
> > >
> > Let me know if that is required.
>
> Yes, please add it. Its useful.
>
Done, will send it in my next version.

Nikunj