From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [V10 PATCH 08/23] PVH xen: Introduce PVH guest type and some basic changes. Date: Tue, 6 Aug 2013 16:26:46 -0700 Message-ID: <20130806162646.6c55bf47@mantra.us.oracle.com> References: <1374631171-15224-1-git-send-email-mukesh.rathor@oracle.com> <1374631171-15224-9-git-send-email-mukesh.rathor@oracle.com> <5200FE6402000078000E99A1@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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.xen@gmail.com" , "xen-devel@lists.xensource.com" , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Tue, 6 Aug 2013 13:06:37 +0100 George Dunlap wrote: > On Tue, Aug 6, 2013 at 12:47 PM, Jan Beulich > wrote: > >>>> On 06.08.13 at 13:29, George Dunlap > >>>> wrote: > >> On Wed, Jul 24, 2013 at 2:59 AM, Mukesh Rathor > >> wrote: > >>> --- a/xen/arch/x86/x86_64/traps.c > >>> +++ b/xen/arch/x86/x86_64/traps.c > >>> @@ -141,7 +141,7 @@ void show_registers(struct cpu_user_regs > >>> *regs) } > >>> } > >>> > >>> -void vcpu_show_registers(const struct vcpu *v) > >>> +void vcpu_show_registers(struct vcpu *v) > >> > >> Rather than doing this (which could potentially mask a bug in which > >> something actually *does* get changed), wouldn't it make more > >> sense to make hvm_kernel_mode (and hvm_get_segment_register) be > >> const? > > > > That's what I suggested first too, but which turned out not to > > work: Down the call tree there is a use of v where a pointer to > > non-const is required (iirc in VMX specific code). > > Then the changelog should say that, preferably the exact function > where non-const is needed, so people know why that's necessary without > having to do their own looking. And the changelog does say it: "Note, we drop the const qualifier from vcpu_show_registers() to accomodate the hvm function call in guest_kernel_mode()." -Mukesh