|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 22/38] arm: implement vcpu_show_execution_state
On Wed, 2012-06-20 at 14:53 +0100, Ian Campbell wrote:
> On Wed, 2012-06-06 at 18:26 +0100, Stefano Stabellini wrote:
> > > @@ -334,6 +360,26 @@ void show_execution_state(struct cpu_user_regs *regs)
> > > show_stack(regs);
> > > }
> > >
> > > +void vcpu_show_execution_state(struct vcpu *v)
> > > +{
> > > + printk("*** Dumping Dom%d vcpu#%d state: ***\n",
> > > + v->domain->domain_id, v->vcpu_id);
> > > +
> > > + if ( v == current )
> > > + {
> > > + show_execution_state(guest_cpu_user_regs());
> > > + return;
> > > + }
> > > +
> > > + vcpu_pause(v); /* acceptably dangerous */
> > > +
> > > + vcpu_show_registers(v);
> > > + if ( !usr_mode(&v->arch.cpu_info->guest_cpu_user_regs) )
> > > + show_guest_stack(&v->arch.cpu_info->guest_cpu_user_regs);
> >
> > isn't the if condition inverted?
>
> I think what I'm trying to do here is only dump the stack if the guest
> was in one of the privileged modes (i.e. not user mode).
>
> I don't really recall why -- I guess I figured the usermode stack was
> not likely to be all that useful.
It looks like I just copied the behaviour of x86, which has:
if ( guest_kernel_mode(v, &v->arch.user_regs) )
show_guest_stack(v, &v->arch.user_regs);
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |