Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2017-01-30 Thread Stefano Stabellini
On Fri, 9 Dec 2016, Tamas K Lengyel wrote: > The only caller of this function is get_page_from_gva which already takes > a vcpu pointer as input. Pass this along to make the function in-line with > its intended use-case. > > Signed-off-by: Tamas K Lengyel Reviewed-by: Stefano Stabellini > ---

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2017-01-03 Thread Tamas K Lengyel
On Fri, Dec 9, 2016 at 12:59 PM, Tamas K Lengyel wrote: > The only caller of this function is get_page_from_gva which already takes > a vcpu pointer as input. Pass this along to make the function in-line with > its intended use-case. > > Signed-off-by: Tamas K Lengyel > --- > Cc: Stefano Stabelli

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-15 Thread Julien Grall
Hi George, On 15/12/16 04:54, George Dunlap wrote: On Wed, Dec 14, 2016 at 8:05 PM, Julien Grall wrote: Note that ARM does not provide any hardware instruction to translate an IPA (guest physical address) to a PA. So we have a walker there. We also a walk for debugging guest page table (thoug

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-14 Thread George Dunlap
On Wed, Dec 14, 2016 at 8:05 PM, Julien Grall wrote: >>> Note that ARM does not provide any hardware instruction to translate >>> an IPA (guest physical address) to a PA. So we have a walker there. >>> >>> We also a walk for debugging guest page table (though only when it is >>> using LPAE). I gue

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-14 Thread Julien Grall
Hi Andrew, On 13/12/16 19:39, Andrew Cooper wrote: On 13/12/16 18:41, Julien Grall wrote: On 13/12/16 18:28, Andrew Cooper wrote: On 12/12/16 23:47, Tamas K Lengyel wrote: Newer versions of VT-x/SVM may provide additional information on a vmexit, which include a guest physical address relevant

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-13 Thread Andrew Cooper
On 13/12/16 18:41, Julien Grall wrote: > Hi Andrew, > > On 13/12/16 18:28, Andrew Cooper wrote: >> On 12/12/16 23:47, Tamas K Lengyel wrote: >>> It works on x86 because, IIRC, you do a software page table walking. Although, I don't think you have particular write/read access checking

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-13 Thread Julien Grall
Hi Andrew, On 13/12/16 18:28, Andrew Cooper wrote: On 12/12/16 23:47, Tamas K Lengyel wrote: It works on x86 because, IIRC, you do a software page table walking. Although, I don't think you have particular write/read access checking on x86. I don't recall there being any software page walkin

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-13 Thread Tamas K Lengyel
On Tue, Dec 13, 2016 at 5:50 AM, Julien Grall wrote: > Hello Tamas, > > On 12/12/16 23:47, Tamas K Lengyel wrote: >> >> On Mon, Dec 12, 2016 at 2:28 PM, Julien Grall >> wrote: >>> >>> On 12/12/2016 19:41, Tamas K Lengyel wrote: On Mon, Dec 12, 2016 at 12:11 PM, Julien Grall wrote:

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-13 Thread Andrew Cooper
On 12/12/16 23:47, Tamas K Lengyel wrote: > >> It works on x86 because, IIRC, you do a software page table walking. >> Although, I don't think you have particular write/read access checking on >> x86. > I don't recall there being any software page walking being involved on > x86. Why would that be

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-13 Thread Tamas K Lengyel
On Tue, Dec 13, 2016 at 5:50 AM, Julien Grall wrote: > Hello Tamas, > > On 12/12/16 23:47, Tamas K Lengyel wrote: >> >> On Mon, Dec 12, 2016 at 2:28 PM, Julien Grall >> wrote: >>> >>> On 12/12/2016 19:41, Tamas K Lengyel wrote: On Mon, Dec 12, 2016 at 12:11 PM, Julien Grall wrote:

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-13 Thread Julien Grall
Hello Tamas, On 12/12/16 23:47, Tamas K Lengyel wrote: On Mon, Dec 12, 2016 at 2:28 PM, Julien Grall wrote: On 12/12/2016 19:41, Tamas K Lengyel wrote: On Mon, Dec 12, 2016 at 12:11 PM, Julien Grall wrote: On 12/12/16 18:42, Tamas K Lengyel wrote: On Mon, Dec 12, 2016 at 4:46 AM, Julien Gr

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-12 Thread Tamas K Lengyel
On Mon, Dec 12, 2016 at 2:28 PM, Julien Grall wrote: > Hi Tamas, > > > On 12/12/2016 19:41, Tamas K Lengyel wrote: >> >> On Mon, Dec 12, 2016 at 12:11 PM, Julien Grall >> wrote: >>> >>> Hi Tamas, >>> >>> On 12/12/16 18:42, Tamas K Lengyel wrote: On Mon, Dec 12, 2016 at 4:46 AM, Jul

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-12 Thread Julien Grall
Hi Tamas, On 12/12/2016 19:41, Tamas K Lengyel wrote: On Mon, Dec 12, 2016 at 12:11 PM, Julien Grall wrote: Hi Tamas, On 12/12/16 18:42, Tamas K Lengyel wrote: On Mon, Dec 12, 2016 at 4:46 AM, Julien Grall wrote: The translation VA to IPA (guest physical address) is done using hardware.

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-12 Thread Tamas K Lengyel
On Mon, Dec 12, 2016 at 12:11 PM, Julien Grall wrote: > Hi Tamas, > > On 12/12/16 18:42, Tamas K Lengyel wrote: >> >> On Mon, Dec 12, 2016 at 4:46 AM, Julien Grall >> wrote: >>> >>> The translation VA to IPA (guest physical address) is done using >>> hardware. >>> If the underlying memory of the

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-12 Thread Julien Grall
Hi Tamas, On 12/12/16 18:42, Tamas K Lengyel wrote: On Mon, Dec 12, 2016 at 4:46 AM, Julien Grall wrote: The translation VA to IPA (guest physical address) is done using hardware. If the underlying memory of the stage-1 page table is protected, so the translation will fail. Given that this fun

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-12 Thread Tamas K Lengyel
On Mon, Dec 12, 2016 at 4:46 AM, Julien Grall wrote: > > > On 12/12/16 07:47, Tamas K Lengyel wrote: >> >> >> >> On Dec 12, 2016 00:42, "Jan Beulich" > > wrote: >> >> >>> On 09.12.16 at 20:59, > > wrote: >> > --- a/xen/arch/a

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-12 Thread Julien Grall
On 12/12/16 07:47, Tamas K Lengyel wrote: On Dec 12, 2016 00:42, "Jan Beulich" mailto:jbeul...@suse.com>> wrote: >>> On 09.12.16 at 20:59, mailto:tamas.leng...@zentific.com>> wrote: > --- a/xen/arch/arm/p2m.c > +++ b/xen/arch/arm/p2m.c > @@ -1461,7 +1461,8 @@ mfn_t gfn_to_mfn

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-11 Thread Tamas K Lengyel
On Dec 12, 2016 00:42, "Jan Beulich" wrote: >>> On 09.12.16 at 20:59, wrote: > --- a/xen/arch/arm/p2m.c > +++ b/xen/arch/arm/p2m.c > @@ -1461,7 +1461,8 @@ mfn_t gfn_to_mfn(struct domain *d, gfn_t gfn) > * we indeed found a conflicting mem_access setting. > */ > static struct page_info* > -p

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-11 Thread Jan Beulich
>>> On 09.12.16 at 20:59, wrote: > --- a/xen/arch/arm/p2m.c > +++ b/xen/arch/arm/p2m.c > @@ -1461,7 +1461,8 @@ mfn_t gfn_to_mfn(struct domain *d, gfn_t gfn) > * we indeed found a conflicting mem_access setting. > */ > static struct page_info* > -p2m_mem_access_check_and_get_page(vaddr_t gva,

[Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-09 Thread Tamas K Lengyel
The only caller of this function is get_page_from_gva which already takes a vcpu pointer as input. Pass this along to make the function in-line with its intended use-case. Signed-off-by: Tamas K Lengyel --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/p2m.c | 11 ++- 1 file