From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH 18/18] PVH xen: introduce vmx_pvh.c Date: Tue, 9 Jul 2013 17:33:10 -0700 Message-ID: <20130709173310.76132081@mantra.us.oracle.com> References: <1372118507-16864-1-git-send-email-mukesh.rathor@oracle.com> <1372118507-16864-19-git-send-email-mukesh.rathor@oracle.com> <51C991F502000078000E04E5@nat28.tlf.novell.com> <20130627183501.25bafddd@mantra.us.oracle.com> <51CD742902000078000E17D0@nat28.tlf.novell.com> <20130705183124.32d043f5@mantra.us.oracle.com> <51DA94F502000078000E328E@nat28.tlf.novell.com> <20130708160955.64bd62fb@mantra.us.oracle.com> <20130708170155.628f0ed2@mantra.us.oracle.com> <51DBD86C02000078000E37B2@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51DBD86C02000078000E37B2@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 Tue, 09 Jul 2013 08:31:24 +0100 "Jan Beulich" wrote: > >>> On 09.07.13 at 02:01, Mukesh Rathor > >>> wrote: > > On Mon, 8 Jul 2013 16:09:55 -0700 > > Mukesh Rathor wrote: > > > >> On Mon, 08 Jul 2013 09:31:17 +0100 > >> "Jan Beulich" wrote: ....... > Fine with me, except (as said before) ... > > > --- a/xen/arch/x86/hvm/hvm.c > > +++ b/xen/arch/x86/hvm/hvm.c > > @@ -4642,6 +4642,14 @@ enum hvm_intblk > > nhvm_interrupt_blocked(struct vcpu *v) return > > hvm_funcs.nhvm_intr_blocked(v); } > > > > +bool_t hvm_kernel_mode(const struct vcpu *v) > > +{ > > + struct segment_register seg; > > + > > + hvm_get_segment_register((struct vcpu *)v, x86_seg_ss, &seg); > > .. for this cast. Like I said in prev email, changing the cast is very hard, as it trickles down all the way to vcpu_runnable thru SVM and VMX and would need changing vcpu_runnable itself and all callers of it. So, I can either leave the cast, or better just remove "const" from the sole caller using it, please LMK: diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c index d2f7209..dae8261 100644 --- 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) { const struct cpu_user_regs *regs = &v->arch.user_regs; unsigned long crs[8]; diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h index c3f9f8e..22a72df 100644 --- a/xen/include/asm-x86/domain.h +++ b/xen/include/asm-x86/domain.h @@ -447,7 +447,7 @@ struct arch_vcpu #define hvm_svm hvm_vcpu.u.svm void vcpu_show_execution_state(struct vcpu *); -void vcpu_show_registers(const struct vcpu *); +void vcpu_show_registers(struct vcpu *);