From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: Re: [PATCH 07/14] Nested Virtualization: trap Date: Mon, 23 Aug 2010 18:03:01 +0200 Message-ID: <201008231803.01394.Christoph.Egger@amd.com> References: <1A42CE6F5F474C41B63392A5F80372B22A3E5B97@shsmsx501.ccr.corp.intel.com> <1A42CE6F5F474C41B63392A5F80372B22A3E6083@shsmsx501.ccr.corp.intel.com> <20100819143056.GH20252@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20100819143056.GH20252@whitby.uk.xensource.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tim Deegan Cc: "xen-devel@lists.xensource.com" , "Dong, Eddie" List-Id: xen-devel@lists.xenproject.org On Thursday 19 August 2010 16:30:56 Tim Deegan wrote: > At 14:53 +0100 on 19 Aug (1282229594), Dong, Eddie wrote: > > I see the real > > code start from "exitcode = nestedhvm_exception2exitcode(trapnr);" > > (half of this function code is just for wrapper check.). The real work > > is ~20LOC. However we added at least 2 new wrapper APIs: > > nestedhvm_exception2exitcode & nestedhvm_exception2exitcode. > > That's one. :) And it wouldn't be needed if the call to arch-specific > code to cause a vmexit and the test for interception took trapnr > directly (which they probably could). > > If the new namespace of vmexit codes goes away entirely, that's fine by > me, btw. Using namespace is the C-way to "define" a class and prevents namespace pollution for other things in the future. > Maybe the generic code can pass exit codes as opaque numbers, > with a few flags to steer it? Christoph, what do you think? You'll > have the best idea of how useful the new namespace is. Look at the nh_structdata patch, you find a nh_forcevmexit structure within nestedhvm. It contains the generic exit code and additional information for the conversion and the vmexit injection code in exitinfo1 and exitinfo2. The meanings of exitinfo1 and exitinfo2 are directly related to the generic exitcode in use and are described in the nh_core patch in the C comments within the enum nestedhvm_intercepts. Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632