From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dong, Eddie" Subject: RE: [PATCH 06/16] vmx: nest: handling VMX instruction exits Date: Wed, 15 Sep 2010 14:49:08 +0800 Message-ID: <1A42CE6F5F474C41B63392A5F80372B22A8C214A@shsmsx501.ccr.corp.intel.com> References: <1A42CE6F5F474C41B63392A5F80372B22A8C201F@shsmsx501.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , Tim Deegan , "He, Qing" Cc: "xen-devel@lists.xensource.com" , "Dong, Eddie" List-Id: xen-devel@lists.xenproject.org Keir Fraser wrote: > On 15/09/2010 05:55, "Dong, Eddie" wrote: >=20 >>>> +enum x86_segment sreg_to_index[] =3D { >>>> + [VMX_SREG_ES] =3D x86_seg_es, >>>> + [VMX_SREG_CS] =3D x86_seg_cs, >>>> + [VMX_SREG_SS] =3D x86_seg_ss, >>>> + [VMX_SREG_DS] =3D x86_seg_ds, >>>> + [VMX_SREG_FS] =3D x86_seg_fs, >>>> + [VMX_SREG_GS] =3D x86_seg_gs, >>>> +}; >>>=20 >>> Since you dislike adding new namespaces and translations, I'm sure >>> you can get rid of these. :) It might even simplify some of the >>> macros below. >>=20 >> True, some dupcation here. Regarding following definition in >> x86_emulate.c, we can reuse. >=20 > AFAICS if you must have your own extra instruction decoder, a few > register translation definitions and arrays is the least of it > really. I'd rather keep x86_emulate clean and separate rather than > become intertwined with another emulator. >=20 > What is wrong with simply extending x86_emulate to handle these > VMX-related instructions? We've dealt with emulators provided by > Intel guys in the past and frankly they were full of holes. >=20 Certainly fine to move those VMX instruction emulation to hvm/emulate.c as = if you don't think that is VMX specific :) Will do. Thx, Eddie