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

Re: [Xen-devel] [PATCH v2] arm/p2m: Fix regression during domain shutdown with active mem_access



Hello Tamas,

On 25/01/2017 00:16, Tamas K Lengyel wrote:
The change in commit 438c5fe4f0c introduced a regression for domains where
mem_acces is or was active. When relinquish_p2m_mapping attempts to clear
a page where the order is not 0 the following ASSERT is triggered:

    ASSERT(!p2m->mem_access_enabled || page_order == 0);

This regression was unfortunately not caught during testing in preparation
for the 4.8 release.

In this patch we adjust the ASSERT to not trip when the domain
is being shutdown.

Ideally this fix would be part of Xen 4.8.1.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@xxxxxxxxxxxx>
---
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Julien Grall <julien.grall@xxxxxxx>

v2: Add dying domain check to assert
---
 xen/arch/arm/p2m.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 09ceb378a5..d9fdfe9a2e 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -993,7 +993,8 @@ static int __p2m_set_entry(struct p2m_domain *p2m,
      * The radix-tree can only work on 4KB. This is only used when
      * memaccess is enabled.

Please update the comment to reflect the change in the assert.

      */
-    ASSERT(!p2m->mem_access_enabled || page_order == 0);
+    ASSERT(!p2m->mem_access_enabled || page_order == 0 ||
+           p2m->domain->is_dying == DOMDYING_dying);

You don't need to check the value of is_dying. p2m->domain->is_dying is enough here.

     /*
      * The access type should always be p2m_access_rwx when the mapping
      * is removed.


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