From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH 09/24] PVH xen: Introduce PVH guest type and some basic changes. Date: Thu, 18 Jul 2013 11:28:05 -0700 Message-ID: <20130718112805.4e556ea8@mantra.us.oracle.com> References: <1374114788-27652-1-git-send-email-mukesh.rathor@oracle.com> <1374114788-27652-10-git-send-email-mukesh.rathor@oracle.com> <51E7FF1302000078000E5FA4@nat28.tlf.novell.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 1Uzsw1-0000Wf-2v for xen-devel@lists.xenproject.org; Thu, 18 Jul 2013 18:28:13 +0000 In-Reply-To: <51E7FF1302000078000E5FA4@nat28.tlf.novell.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: Jan Beulich Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Thu, 18 Jul 2013 13:43:31 +0100 "Jan Beulich" wrote: > >>> On 18.07.13 at 04:32, Mukesh Rathor > >>> wrote: > > Chagnes in V8: > > Same spelling typo in all of the change title lines... > > > - Got to VMCS for DPL check instead of checking the rpl in > > guest_kernel_mode. Note, we drop the const qualifier from > > vcpu_show_registers() to accomodate the hvm function call in > > guest_kernel_mode(). > > - Also, hvm_kernel_mode is put in hvm.c because it's called from > > guest_kernel_mode in regs.h which is a pretty early header > > include. Hence, we can't place it in hvm.h like other similar > > functions. > > Are you saying that because you tried it, or just because it looks > like so? The use of the function is in a macro, and hence if the > macro isn't used too early this could still work out. I say this > because the function would clearly benefit from getting inlined. I tried a lot. I tried putting the function in hvm.h, but then that needs to be included in regs.h, which won't work at all since regs.h is a very early header. The other alternative, to put hvm_kernel_mode in regs.h itself, but then it calls hvm_get_segment_register() for which either I need to include hvm.h in regs.h, not possible, or add proto for hvm_get_segment_register(). But then the args to hvm_get_segment_register() also need their headers. So, in the end this seemed to be the best/only way. thanks Mukesh