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

Re: [Xen-devel] [PATCH 16/22] xen/arm: p2m: Move the vttbr field from arch_domain to p2m_domain





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

Hello Sergej,

On 07/20/2016 06:10 PM, Julien Grall wrote:
The field vttbr holds the base address of the translation table for
guest. Its value will depends on how the p2m has been initialized and
will only be used by the code code.

So move the field from arch_domain to p2m_domain. This will also ease
the implementation of altp2m.
---
 xen/arch/arm/p2m.c           | 11 +++++++----
 xen/arch/arm/traps.c         |  2 +-
 xen/include/asm-arm/domain.h |  1 -
 xen/include/asm-arm/p2m.h    |  3 +++
 4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index c407e6a..c52081a 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -107,10 +107,14 @@ void dump_p2m_lookup(struct domain *d, paddr_t addr)

 static void p2m_load_VTTBR(struct domain *d)
 {
+    struct p2m_domain *p2m = &d->arch.p2m;
+

This is ok to me. Further altp2m implementation can easily extend this
code base.

Also, as your patch (patch #17) as well eliminates the possibility that
the idle domain reaches this function the following check could be
potentially removed (as far as I know, p2m_load_VTTBR is reached only
through p2m_restore_state).

I will not remove this check because this is not the goal of this patch and each patch should boot Xen without any dependencies on a follow-up patch: p2m_load_VTTBR is used flush_tlb_domain until patch #18 and p2m_restore_state does not yet have the is_idle_* check (it will be added in patch #17).

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