From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Subject: Re: [Patch][RFC]Split kvm_vcpu to support new archs. Date: Fri, 12 Oct 2007 10:37:20 +0200 Message-ID: <470F3240.7060008@linux.vnet.ibm.com> References: <42DFA526FC41B1429CE7279EF83C6BDC808C85@pdsmsx415.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: "Zhang, Xiantao" , Avi Kivity , kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDC808C85-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Zhang, Xiantao wrote: > --- /dev/null > +++ b/drivers/kvm/kvm_arch.h [...] > +struct kvm_arch_vcpu{ > + = > + u64 host_tsc; > + = > + unsigned long regs[NR_VCPU_REGS]; /* for rsp: > vcpu_load_rsp_rip() */ > + unsigned long rip; /* needs vcpu_load_rsp_rip() */ > + > + unsigned long cr0; > + unsigned long cr2; > + unsigned long cr3; > + unsigned long cr4; > + unsigned long cr8; > + u64 pdptrs[4]; /* pae */ > + u64 shadow_efer; > + u64 apic_base; > + struct kvm_lapic *apic; /* kernel irqchip context */ > + > + u64 ia32_misc_enable_msr; > + > + = > + struct i387_fxsave_struct host_fx_image; > + struct i387_fxsave_struct guest_fx_image; > + int fpu_active; > + int guest_fpu_loaded; > + > + gva_t mmio_fault_cr2; > + = > + struct { > + int active; > + u8 save_iopl; > + struct kvm_save_segment { > + u16 selector; > + unsigned long base; > + u32 limit; > + u32 ar; > + } tr, es, ds, fs, gs; > + } rmode; [...] As far as I can see without applying it, that split is ok for powerpc. I ha= d a similar approach in my local patch queue too. Minor differences in which elements of the structs are arch dependent or no= t can be changed in small patches later ;-) But the file kvm_arch.h name confuses me a bit - I assume you had the comin= g asm split in mind where every architecture can define it's asm/kvm_arch.h. Since we don't have that asm structure for kvm yet, the changes you made to= kvm_arch.h may be better located at the x86.h atm. -- = Gr=FCsse / regards, = Christian Ehrhardt IBM Linux Technology Center, Open Virtualization +49 7031/16-3385 Ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org Ehrhardt-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Johann Weihen = Gesch=E4ftsf=FChrung: Herbert Kircher = Sitz der Gesellschaft: B=F6blingen Registergericht: Amtsgericht Stuttgart, HRB 243294 ------------------------------------------------------------------------- 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/