Re: [Xen-devel] [PATCH] arm:cpuerrata: Align a virtual address before unmap

2019-07-29 Thread Julien Grall
On 7/29/19 8:33 AM, Andrii Anisov wrote: Hello Julien, On 26.07.19 17:02, Julien Grall wrote: Hi, It looks like the vmap solution suggested by Andrew & I is a dead end. I still think we need to do something in the vmap regardless the alignment decision to avoid unwanted surprised (i.e the

Re: [Xen-devel] [PATCH] arm:cpuerrata: Align a virtual address before unmap

2019-07-29 Thread Andrii Anisov
Hello Julien, On 26.07.19 17:02, Julien Grall wrote: Hi, It looks like the vmap solution suggested by Andrew & I is a dead end. I still think we need to do something in the vmap regardless the alignment decision to avoid unwanted surprised (i.e the Page-table not in sync with the vmap state).

Re: [Xen-devel] [PATCH] arm:cpuerrata: Align a virtual address before unmap

2019-07-26 Thread Julien Grall
Hi, It looks like the vmap solution suggested by Andrew & I is a dead end. I still think we need to do something in the vmap regardless the alignment decision to avoid unwanted surprised (i.e the Page-table not in sync with the vmap state). We potentially want to add some ASSERT_UNREACHABLE()

Re: [Xen-devel] [PATCH] arm:cpuerrata: Align a virtual address before unmap

2019-07-18 Thread Andrii Anisov
On 18.07.19 17:20, Julien Grall wrote: As Andrew pointed out, this also makes the interface more consistent with how {,un}map_domain_page() currently works. OK, got it. BTW, in the x86 code they do apply PAGE_MASK to va before passing it to `vunmap()`. I would cleanup all those places as w

Re: [Xen-devel] [PATCH] arm:cpuerrata: Align a virtual address before unmap

2019-07-18 Thread Julien Grall
On 7/18/19 3:08 PM, Andrii Anisov wrote: Hello Julien, Hi, On 18.07.19 16:44, Julien Grall wrote: My suggestion about vunmap() still stands though. +1 for the vunmap solution. It was my initial idea. But, the issue is introduced by change 9cc0618. In particular, by the check in `xen_pt

Re: [Xen-devel] [PATCH] arm:cpuerrata: Align a virtual address before unmap

2019-07-18 Thread Andrii Anisov
Hello Julien, On 18.07.19 16:44, Julien Grall wrote: My suggestion about vunmap() still stands though. +1 for the vunmap solution. It was my initial idea. But, the issue is introduced by change 9cc0618. In particular, by the check in `xen_pt_update()` if ( !IS_ALIGNED(virt, PAGE_SIZE)

Re: [Xen-devel] [PATCH] arm:cpuerrata: Align a virtual address before unmap

2019-07-18 Thread Julien Grall
Hi, On 7/18/19 2:43 PM, Andrew Cooper wrote: On 18/07/2019 14:38, Andrew Cooper wrote: On 18/07/2019 14:22, Andrii Anisov wrote: From: Andrii Anisov After changes introduced by 9cc0618 we are able to vmap/vunmap page aligned addresses only. So if we add a page address remainder to the mapped

Re: [Xen-devel] [PATCH] arm:cpuerrata: Align a virtual address before unmap

2019-07-18 Thread Andrew Cooper
On 18/07/2019 14:38, Andrew Cooper wrote: > On 18/07/2019 14:22, Andrii Anisov wrote: >> From: Andrii Anisov >> >> After changes introduced by 9cc0618 we are able to vmap/vunmap >> page aligned addresses only. >> So if we add a page address remainder to the mapped virtual address, >> we have to ma

Re: [Xen-devel] [PATCH] arm:cpuerrata: Align a virtual address before unmap

2019-07-18 Thread Andrew Cooper
On 18/07/2019 14:22, Andrii Anisov wrote: > From: Andrii Anisov > > After changes introduced by 9cc0618 we are able to vmap/vunmap > page aligned addresses only. > So if we add a page address remainder to the mapped virtual address, > we have to mask it out before unmapping. > > Signed-off-by: And

[Xen-devel] [PATCH] arm:cpuerrata: Align a virtual address before unmap

2019-07-18 Thread Andrii Anisov
From: Andrii Anisov After changes introduced by 9cc0618 we are able to vmap/vunmap page aligned addresses only. So if we add a page address remainder to the mapped virtual address, we have to mask it out before unmapping. Signed-off-by: Andrii Anisov --- xen/arch/arm/cpuerrata.c | 2 +- 1 file