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

Re: [Xen-devel] [PATCH v4 01/39] arm/p2m: Introduce p2m_(switch|restore)_vttbr_and_(g|s)et_flags



Hi Sergej,

On 30/08/17 19:32, Sergej Proskurin wrote:
This commit introduces macros for switching and restoring the vttbr
considering the currently set irq flags. We define these macros, as the
following commits will use the associated functionality multiple times
throughout different files.

Signed-off-by: Sergej Proskurin <proskurin@xxxxxxxxxxxxx>
---
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Julien Grall <julien.grall@xxxxxxx>
---
v4: Save the content of VTTBR_EL2 inside of the introduced macro
     "p2m_switch_vttbr_and_get_flags".

     Move the introduced macros into ./xen/include/asm-arm/p2m.h, as they will
     be used by different files in the future commits.

I don't like the idea of moving such macros in p2m.h because it expose the underlying implementation of P2M.

A better solution would be introduce a helper to translate from a guest VA to guest PA in p2m.c. This helper will switch to the host P2M if necessary.

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