Hello Sergej,
On 04/07/2016 12:45, Sergej Proskurin wrote:
Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de>
---
Cc: Stefano Stabellini <sstabell...@kernel.org>
Cc: Julien Grall <julien.gr...@arm.com>
---
xen/arch/arm/p2m.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 96892a5..de97a12 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -51,7 +51,8 @@ static bool_t p2m_mapping(lpae_t pte)
void p2m_dump_info(struct domain *d)
{
- struct p2m_domain *p2m = &d->arch.p2m;
+ struct vcpu *v = current;
This is wrong, p2m_dump_info can be called with d != current->domain.
Please try to look at how the caller may use the function before doing
any modification.
In this case, I think you want to dump the info for the hostp2m and
every altp2ms.
+ struct p2m_domain *p2m = altp2m_active(d) ? p2m_get_altp2m(v) :
p2m_get_hostp2m(d);
spin_lock(&p2m->lock);
printk("p2m mappings for domain %d (vmid %d):\n",
@@ -71,7 +72,8 @@ void memory_type_changed(struct domain *d)
void dump_p2m_lookup(struct domain *d, paddr_t addr)
{
- struct p2m_domain *p2m = &d->arch.p2m;
+ struct vcpu *v = current;
Ditto.
+ struct p2m_domain *p2m = altp2m_active(d) ? p2m_get_altp2m(v) :
p2m_get_hostp2m(d);
printk("dom%d IPA 0x%"PRIpaddr"\n", d->domain_id, addr);
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel