public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Arch cleanup v5
@ 2007-07-27 12:13 Gregory Haskins
       [not found] ` <20070727121250.9876.36599.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Gregory Haskins @ 2007-07-27 12:13 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

(Note the last "v3" I sent out was a duplicate v3...it should have been v4)

This series includes the following changes from v4(v3)

Patch #1: I have folded Rusty's cleanup in (thanks Rusty!)
Patch #2: Rebased on Rusty's changes
Patch #3: Dropped

Signed-off-by: Gregory Haskins <ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>

-------------------------------------------------------------------------
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/

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] KVM: Remove arch specific components from the general code
@ 2007-07-26 15:18 Gregory Haskins
  0 siblings, 0 replies; 12+ messages in thread
From: Gregory Haskins @ 2007-07-26 15:18 UTC (permalink / raw)
  To: anthony-rdkfGonbjUSkNkDKm+mE6A; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Thu, 2007-07-26 at 10:04 -0500, Anthony Liguori wrote:
> Gregory Haskins wrote:
> > Signed-off-by: Gregory Haskins <ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
> > ---
> >
> >  drivers/kvm/kvm.h      |   31 -----
> >  drivers/kvm/kvm_main.c |   26 +---
> >  drivers/kvm/kvm_svm.h  |    3 
> >  drivers/kvm/svm.c      |  322 +++++++++++++++++++++++++-----------------------
> >  drivers/kvm/vmx.c      |  236 +++++++++++++++++++++--------------
> >  5 files changed, 320 insertions(+), 298 deletions(-)
> >  
> >  struct kvm_vcpu {
> > +	int valid;
> >  	struct kvm *kvm;
> >  	int vcpu_id;
> > -	union {
> > -		struct vmcs *vmcs;
> > -		struct vcpu_svm *svm;
> > -	};
> > +	void *_priv;
> >   
> 
> How are you planning on going about switching to container_of()?  Commit 
> this, commit Rusty's stuff, then commit a fix or commit Rusty's stuff, 
> then update your patch set?

It will work either way, at Avi's discretion.

> 
> >  static void svm_inject_gp(struct kvm_vcpu *vcpu, unsigned error_code)
> >  {
> > -	vcpu->svm->vmcb->control.event_inj = 	SVM_EVTINJ_VALID |
> > +	svm(vcpu)->vmcb->control.event_inj = 	SVM_EVTINJ_VALID |
> >  						SVM_EVTINJ_VALID_ERR |
> >  						SVM_EVTINJ_TYPE_EXEPT |
> >  						GP_VECTOR;
> > -	vcpu->svm->vmcb->control.event_inj_err = error_code;
> > +	svm(vcpu)->vmcb->control.event_inj_err = error_code;
> >  }
> 
> I'm willing to concede on using the name "svm()" here although I think 
> it's a terrible function name but I really think it's important to store 
> a reference to this instead of using it as if it's an lvalue.  So I 
> would change this to:
> 
> struct vcpu_svm *svm = svm(vcpu);
> 
> svm->vmcb->control.event_inj =   ....;
> 
> I think this is much easier to grok than having svm(vcpu) calls all over 
> the place as psuedo-lvalues.

Heh...funny you should say that.  My first pass did exactly what you are
suggesting. :)  Then I felt as though the code was a little cleaner to
do it the way it stands now, so I changed it all.  I am not really
married to either form, so whatever people want is fine.




-------------------------------------------------------------------------
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/

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH 0/2] Arch cleanup v3
@ 2007-07-26 14:51 Gregory Haskins
       [not found] ` <20070726144602.4847.64724.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Gregory Haskins @ 2007-07-26 14:51 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: ghaskins-Et1tbQHTxzrQT0dZR+AlfA

I have rebased the patch series on top of kvm.git HEAD origin/master (before I
was on the preempt-hooks branch) and am now including a patch to cleanup a
race condition on VMX w.r.t. VMCS management.  I have a third patch that
changes vcpu->_priv over to container_of as discussed, but its dependent on
Rusty's vcpu array cleanup so its not ready for prime-time yet.  Once we have
his patch in its final form, I will send out the third patch as well.

Until then, this patch series is self-sufficient and can be applied if
desired.  It builds fine, and has been boot tested on VMX with windows and
linux. 

Signed-off-by: Gregory Haskins <ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>


-------------------------------------------------------------------------
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/

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-07-29  7:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-27 12:13 [PATCH 0/2] Arch cleanup v5 Gregory Haskins
     [not found] ` <20070727121250.9876.36599.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-07-27 12:13   ` [PATCH 1/2] KVM: Remove arch specific components from the general code Gregory Haskins
     [not found]     ` <20070727121309.9876.76020.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-07-29  7:48       ` Avi Kivity
2007-07-27 12:13   ` [PATCH 2/2] KVM: Clean up VMCLEAR/VMPTRLD code on VMX Gregory Haskins
     [not found]     ` <20070727121315.9876.96646.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-07-28  0:09       ` Nakajima, Jun
2007-07-29  7:50       ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2007-07-26 15:18 [PATCH 1/2] KVM: Remove arch specific components from the general code Gregory Haskins
2007-07-26 14:51 [PATCH 0/2] Arch cleanup v3 Gregory Haskins
     [not found] ` <20070726144602.4847.64724.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-07-26 14:52   ` [PATCH 1/2] KVM: Remove arch specific components from the general code Gregory Haskins
     [not found]     ` <20070726145204.4847.53350.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-07-26 15:04       ` Anthony Liguori
     [not found]         ` <46A8B816.7080303-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-07-26 15:10           ` Avi Kivity
2007-07-26 17:44           ` Paul Turner
2007-07-26 23:54           ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox