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

Re: [Xen-devel] [PATCH 3 of 6] arm: avoid memory write in switch to Hyp mode



At 10:07 +0100 on 01 Jun (1338545250), Ian Campbell wrote:
> > +   mrs   r0, cpsr               /* Copy the CPSR */
> > +   add   r0, r0, #0x4           /* 0x16 (Monitor) -> 0x1a (Hyp) */
> > +   msr   spsr_cxsf, r0          /* into the SPSR */
> 
> Not that it matters much but I think this could have been sprs_c to just
> update spsr[0:7] (which is all you wanted to touch). In fact I reckon
> you could have just done:
>       mov r0, #0x1a|SPSR_I|SPSR_F
>       msr spsr_c, r0

I considered that, but I don't think that anything in the path so far
will have initialised this mode's SPSR to a sensible value, and I didn't
want to accidentally turn on big-endian mode or some such.

Cheers,

Tim.

_______________________________________________
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®.