From: "Wahlig, Elsie" Subject: RE: HW Virtualization Abstraction Layer Work Underway Date: Mon, 6 Jun 2005 22:48:41 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Content-class: urn:content-classes:message List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Nakajima, Jun" , Keir Fraser , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org =20 Nakajima, Jun wrote:=20 >=20 > That's right. One thing we should do is to have a common I/O=20 > VMEXIT and MMIO handler. The first-level trap handlers (like=20 > vmx_asm_vmexit_handler or vmx_vmexit_handler) are very=20 > specific to each H/W assist architecture, but we should be=20 > able to define common handlers for these (by slightly=20 > modifying the VMX code).=20 The MMIO handler code (handle_mmio entry point in vmx_platform.c) has been refactored as generic (now hval_platform.c). The I/O VMEXIT code handler in vmx_io.c has also been refactored and is now hval_io.c (new hval_io_assist/hval_intr_assist/hval_do_resume entry points). The current vmx exit handler can't be made more generic for SVM. This will be in the patch that is coming. =20 >=20 > >=20 > > I dislike the name HVAL though -- it's not very=20 > informative. Something=20 > > like hwassist, vmassist, hw_vm, or many others would all be=20 > preferable=20 > > imo. > >=20 > > -- Keir >=20 > I don't like the name HVAL, either, because of the same=20 > reason. What we are doing is to have _additional_ or=20 > dedicated interfaces exposed in Xen to provide full=20 > virtualization in support of H/W assist virtualization.=20 >=20 HWASSIST was our original name for it, but was deemed to be too long. =20 The names with the vm letters hit many false positives when grepping code,=20 so we avoided all names with 'vm'. Since this was defining an interface,=20 HVAL was one we went with. Now if the name matters, we can make it HWASSIST. =20 > BTW, I don't think the following is the right abstaraction=20 > because the original arch_vmx_struct was intended to maintain=20 > the architectural state, and it can be different on other H/W=20 > assist virtualization. In fact, we need to add more things to=20 > support 64-bit guests. The struct virtual_platform_def (and=20 > flags) should moved out of the architectual state, and=20 > probably arch_svm_struct needs to defined sperately. =20 >=20 > struct arch_hval_struct { > union { > struct vmcs_struct *vmcs; //vmx > struct vmcb_struct *vmcb; //svm > } > unsigned long flags; /* VMCS/VMCB flags */ > unsigned long cpu_cr2; > unsigned long cpu_cr3; > unsigned long cpu_state; > struct virtual_platform_def hval_platform; > } =20 I don't see why we would need both a arch_vmx_struct and an arch_svm_struct at one time.=20 That physical platform wont ever be built. The goal is to abstract out the hardware=20 and need only maintain one of the control blocks during it's runtime. Does your arch Need a different vmcs for 64-bits? =20 Elsie Wahlig