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

Re: [Xen-devel] [PATCH v2 02/19] xen/arm: Remove vwfi while setting HCR_EL2 in init_traps



Hi Stefano,

On 03/30/2017 11:29 PM, Stefano Stabellini wrote:
I tried on different boards, and it gets stuck when initializing stage-2 page
table configuration on each CPU (see setup_virt_paging). The secondary CPUs
don't receive the SGI.

Reading a bit more the ARM ARM (D7.2.33 in ARM DDI 0487A.k_iss10775), HCR_EL2
is unknown at reset. Whilst I already knew that, I would have expected to have
no impact on EL2 (at least in the non-VHE case). However, the value of the
{A,I,F}MO bits will affect the routing of physical IRQs to Xen.

I have only gone quickly through the spec, so it might be possible to have
other necessary bits. It might be good to keep initialization here until
someone sit in front of the spec for few hours and check everything.

So in this case I would prefer to keep the helper avoiding to have declared
twice the same flags. Stefano any opinions?

I don't particularly care whether we keep the helper or not. From what
you say we need to set HCR_EL2 in init_traps, but given that's only
temporary, we don't necessarily need to write the same set of flags: for
example HCR_TWI|HCR_TWE are useless at this stage. A minimal set would
suffice. Either way, it's fine by me.

If we don't write the same set of flags, we need some documentation in the code to explain why those flags are set for initialization (I suspect a lot of them are not necessary) and that HCR flags whilst a domain is running are set somewhere else.

Otherwise this is a call to miss setting some HCR flags in the right place.

That's why I suggested a helper (or a global variable), a single place to get the default HCR flags rather than spreading.

Cheers,

--
Julien Grall

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

 


Rackspace

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