From: "Jan Beulich" Subject: Re: [PATCH RFC v12 15/21] pvh: Set up more PV stuff in set_info_guest Date: Fri, 20 Sep 2013 15:58:34 +0100 Message-ID: <523C7EBA02000078000F50A9@nat28.tlf.novell.com> References: <1379089521-25720-1-git-send-email-george.dunlap@eu.citrix.com> <1379089521-25720-16-git-send-email-george.dunlap@eu.citrix.com> <5239E01C02000078000F4746@nat28.tlf.novell.com> <523C60A9.6050908@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VN29w-0000Hi-26 for xen-devel@lists.xenproject.org; Fri, 20 Sep 2013 14:58:16 +0000 In-Reply-To: <523C60A9.6050908@eu.citrix.com> Content-Disposition: inline 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: xen-devel , Keir Fraser , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 20.09.13 at 16:50, George Dunlap wrote: > On 18/09/13 16:17, Jan Beulich wrote: >>>>> On 13.09.13 at 18:25, George Dunlap wrote: >>> +int vmx_pvh_vcpu_boot_set_info(struct vcpu *v, >>> + struct vcpu_guest_context *ctxtp) >>> +{ >>> + if ( ctxtp->ldt_base || ctxtp->ldt_ents || >>> + ctxtp->user_regs.cs || ctxtp->user_regs.ss || ctxtp->user_regs.es || >>> + ctxtp->user_regs.ds || ctxtp->user_regs.fs || ctxtp->user_regs.gs || >>> + *ctxtp->gdt_frames || ctxtp->gdt_ents || >> Don't know why I didn't spot this earlier, but the gdt_frames check >> is pointless when gdt_ents is verified to be zero. > > You know, looking at this again -- is there a reason we can't just put > this in hvm_set_info_guest()? It's already only called from that one > place, only a few lines before. There doesn't really seem to be a need > to have yet another function for just a few lines. Indeed - only the VMX specific piece belongs here; everything else should be in the generic wrapper (which perhaps then won't be a simple wrapper anymore). Jan