Carsten Otte wrote:
> The patch below removes individual control register definitions from
> struct kvm_vcpu and replaces them with an array similar to general
> purpose registers.
> When splitting kvm_vcpu in architecture dependent and architecture
> independent parts, this will allow to keep the control registers in the
> architecture independent struct even if we have different control
> registers on different architectures.
> This is tested on svm, unfortunately I don't have a vmx capable machine
> at hand.
>   


I don't think we should aim for keeping control registers in an arch 
independent manner, since there is nothing common among the different 
architectures in that area.  For x86, keeping them in an array is not 
helpful since the individual control registers have nothing to do with 
each other.  Also, for most things like the fpu and segment registers 
this trick won't work.

I suggest keeping them in an arch dependent structure (struct 
kvm_vcpu_arch) in <asm/kvm.h>.  We can then access them through a member 
as vcpu->arch.cr0, etc.


-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to