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

Re: [Xen-devel] [PATCH 19/22] xen/arm: p2m: Inline p2m_load_VTTBR into p2m_restore_state





On 22/07/16 09:07, Sergej Proskurin wrote:
Hi Julien,

Hello Sergej,

On 07/20/2016 06:11 PM, Julien Grall wrote:
p2m_restore_state is the last caller of p2m_load_VTTBR and already check
if the vCPU does not belong to the idle domain.

Note that it is likely possible to remove some isb in the function
p2m_restore_state, however this is not the purpose of this patch. So the
numerous isb have been left.


Right now, I don't see any issues with removing the p2m_load_VTTBR
function in combination with changes applied to flush_tlb_domain in your
patch #18 and #17. However, I am not entirely sure whether it makes
sense to entirely remove the function and replicate the VTTBR loading
functionality across multiple functions. Why don't we just provide a
struct p2m_domain* to p2m_load_VTTBR (potentially with a backpointer to
the associated domain, as it is shown in the arm/altp2m patch) and use
the function inline?

Because ideally this function should take a p2m in parameter and a p2m cannot belong to an idle domain. So the function would be:

WRITE_SYSREG64(p2m->vttbr, VTTBR_EL2);
isb();

However, in the case of p2m_restore_state the isb() is not necessary and will impact the performance. Yes, I know the function contains a lots of pointless isb(), this needs to be fixed at some point.

So overall, this function is not necessary.

Regards,

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