Re: [Xen-devel] [PATCH V2] libxc: fix xc_translate_foreign_address()

2017-04-05 Thread Julien Grall
On 05/04/17 16:03, Wei Liu wrote: On Wed, Apr 05, 2017 at 03:58:05PM +0100, Julien Grall wrote: Hi Razvan, On 05/04/17 15:53, Razvan Cojocaru wrote: Currently xc_translate_foreign_address() only checks for the PSE bit on level 2 entries (that's 2 MB pages on x64 and 32-bit with PAE, and 4 MB

Re: [Xen-devel] [PATCH V2] libxc: fix xc_translate_foreign_address()

2017-04-05 Thread Razvan Cojocaru
On 04/05/2017 06:56 PM, Wei Liu wrote: > On Wed, Apr 05, 2017 at 06:53:33PM +0300, Razvan Cojocaru wrote: >> On 04/05/2017 06:03 PM, Wei Liu wrote: >>> On Wed, Apr 05, 2017 at 03:58:05PM +0100, Julien Grall wrote: Hi Razvan, On 05/04/17 15:53, Razvan Cojocaru wrote: > Currently x

Re: [Xen-devel] [PATCH V2] libxc: fix xc_translate_foreign_address()

2017-04-05 Thread Wei Liu
On Wed, Apr 05, 2017 at 06:53:33PM +0300, Razvan Cojocaru wrote: > On 04/05/2017 06:03 PM, Wei Liu wrote: > > On Wed, Apr 05, 2017 at 03:58:05PM +0100, Julien Grall wrote: > >> Hi Razvan, > >> > >> On 05/04/17 15:53, Razvan Cojocaru wrote: > >>> Currently xc_translate_foreign_address() only checks

Re: [Xen-devel] [PATCH V2] libxc: fix xc_translate_foreign_address()

2017-04-05 Thread Razvan Cojocaru
On 04/05/2017 06:03 PM, Wei Liu wrote: > On Wed, Apr 05, 2017 at 03:58:05PM +0100, Julien Grall wrote: >> Hi Razvan, >> >> On 05/04/17 15:53, Razvan Cojocaru wrote: >>> Currently xc_translate_foreign_address() only checks for the PSE bit on >>> level 2 entries (that's 2 MB pages on x64 and 32-bit w

Re: [Xen-devel] [PATCH V2] libxc: fix xc_translate_foreign_address()

2017-04-05 Thread Wei Liu
On Wed, Apr 05, 2017 at 03:58:05PM +0100, Julien Grall wrote: > Hi Razvan, > > On 05/04/17 15:53, Razvan Cojocaru wrote: > > Currently xc_translate_foreign_address() only checks for the PSE bit on > > level 2 entries (that's 2 MB pages on x64 and 32-bit with PAE, and 4 MB > > pages on 32-bit). But

Re: [Xen-devel] [PATCH V2] libxc: fix xc_translate_foreign_address()

2017-04-05 Thread Razvan Cojocaru
Hello Julien, > On 05/04/17 15:53, Razvan Cojocaru wrote: >> Currently xc_translate_foreign_address() only checks for the PSE bit on >> level 2 entries (that's 2 MB pages on x64 and 32-bit with PAE, and 4 MB >> pages on 32-bit). But the Linux kernel sometimes uses 1 GB pages. This >> patch fixes t

Re: [Xen-devel] [PATCH V2] libxc: fix xc_translate_foreign_address()

2017-04-05 Thread Julien Grall
Hi Razvan, On 05/04/17 15:53, Razvan Cojocaru wrote: Currently xc_translate_foreign_address() only checks for the PSE bit on level 2 entries (that's 2 MB pages on x64 and 32-bit with PAE, and 4 MB pages on 32-bit). But the Linux kernel sometimes uses 1 GB pages. This patch fixes that, by checkin

[Xen-devel] [PATCH V2] libxc: fix xc_translate_foreign_address()

2017-04-05 Thread Razvan Cojocaru
Currently xc_translate_foreign_address() only checks for the PSE bit on level 2 entries (that's 2 MB pages on x64 and 32-bit with PAE, and 4 MB pages on 32-bit). But the Linux kernel sometimes uses 1 GB pages. This patch fixes that, by checking the PSE bit on level 3 entries if the guest has 4 tran