[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 18/18] PVH xen: introduce vmx_pvh.c



On Tue, 09 Jul 2013 08:31:24 +0100
"Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> >>> On 09.07.13 at 02:01, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
> >>> wrote:
> > On Mon, 8 Jul 2013 16:09:55 -0700
> > Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:
> > 
> >> On Mon, 08 Jul 2013 09:31:17 +0100
> >> "Jan Beulich" <JBeulich@xxxxxxxx> 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 *);
 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.