From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH RFC v12 14/21] pvh: read_descriptor for PVH guests. Date: Fri, 13 Sep 2013 17:40:35 +0100 Message-ID: <52334003.8060700@eu.citrix.com> References: <1379089521-25720-1-git-send-email-george.dunlap@eu.citrix.com> <1379089521-25720-15-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1379089521-25720-15-git-send-email-george.dunlap@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Keir Fraser , Tim Deegan , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 13/09/13 17:25, George Dunlap wrote: > This is in preparation for enabling emulated privops for PVH guests. > > This one unfortunately has a bit more of an impedance mismatch: > > * For PV, the selector is hard-coded in by passing #name in the > #define. For PVH, we have to do a switch statement. > > * For PV, given the desrciptor, it can read the resulting base, limit, > &c directly; for PVH, we have to read the values currently loaded in the vmcs. > > This leads to a rather awkward construct where we *both* read the > descriptor, *and* specify a selector, and introduce an intermediate function, > read_descriptor_sel. > > Unfortunately, without introducing a rather pointless switch() > statement to the PV path similar to the one in the PVH path, there's > no way to make this less awkward. If anyone has any clever ideas about this one, feel free to chime in... -George