On Thu, 2007-07-26 at 13:03 +0300, Avi Kivity wrote:

> This is okay as a temporary measure, until the vcpu array is replaced by 
> a vcpu pointer array (when vcpu->valid can be replaced by vcpu != NULL).

Ack

> 
> 
> >     struct kvm *kvm;
> >     struct preempt_hook preempt_hook;
> >     int vcpu_id;
> > -   union {
> > -           struct vmcs *vmcs;
> > -           struct vcpu_svm *svm;
> > -   };
> > +   void *_priv;
> >   
> 
> The other cooks did this by embedding the one of the structures within 
> the other, which reduces indirections.

I don't understand what you mean.  Can you elaborate more?

> 
> > @@ -1664,7 +1664,7 @@ void load_msrs(struct vmx_msr_entry *e, int n)
> >  }
> >  EXPORT_SYMBOL_GPL(load_msrs);
> >  
> > -void save_msrs(struct vmx_msr_entry *e, int n)
> > +void save_msrs(struct kvm_msr_entry *e, int n)
> >  {
> >     int i;
> >   
> 
> This isn't actually used in svm, so we can keep the name vmx_msr_entry

Note that the structure really is called "kvm_msr_entry" and there was a
lingering typedef to name it "vmx_msr_entry" for places that still used
the vmx variant.  I just cleaned that up and got rid of the typedef.

>  
> and just move the function.

Ack.  If this can be done, I will move it.  I think I recall that it was
used in the core code which is why I didnt touch it already.


>   It need not be done in this patch.

Ack

> 
> > --- a/drivers/kvm/svm.c
> > +++ b/drivers/kvm/svm.c
> > @@ -49,6 +49,8 @@ MODULE_LICENSE("GPL");
> >  #define SVM_FEATURE_LBRV (1 << 1)
> >  #define SVM_DEATURE_SVML (1 << 2)
> >  
> > +#define svm(vcpu) ((struct vcpu_svm*)vcpu->_priv)
> > +
> >   
> 
> Inline function.

Ack

> 
> > };
> > +
> > +#define vmx(vcpu) ((struct vcpu_vmx*)vcpu->_priv)
> > +
> >   
> 
> Inline function.

Ack
> 
> 
> Patch looks good except for the extra indirection.  But maybe a later 
> patch can do that.  Paul?  Rusty?
> 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to