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

Re: [Xen-devel] [PATCH 5/9] xen: arm: Handle CP15 register traps from userspace





On 10/09/14 02:48, Ian Campbell wrote:
On Tue, 2014-09-09 at 16:42 -0700, Julien Grall wrote:
Hi Ian,

On 09/09/14 09:23, Ian Campbell wrote:
Previously userspace access to PM* would have been incorrectly (but benignly)
implemented as RAZ/WI when running on a 32-bit kernel and would cause a
hypervisor exception (host crash) when running a 64-bit kernel (this was
already solved via the fix to XSA-102).

CLIDR, CCSIDR, DCCISW, ACTLR, PMINTENSET, PMINTENCLR are EL1 only, attempts to
access from EL0 will trap to EL1 not to us, hence BUG_ON is appropriate now.

In the unlikely case it happens, I don't think it will harm Xen, but
only the guest. So is the BUG_ON really necessary on these registers?

I think we should use BUG_ON when we know that it will harm the Xen and
it's not possible to come back from the state.

AIUI it would be a hardware bug to see these traps in Xen. I think a
BUG_ON is acceptable for such an occurrence.

I would turn into an ASSERT to avoid checking it in non-debug build.

Regards,

--
Julien Grall

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