Gianni Tedesco
2010-Nov-10 13:40 UTC
[Xen-devel] [PATCH]: Allow HVM guests to use entire address space
HVM guests are allowed to use the entire virtual address space for whatever they want, without any Xen hole. __addr_ok() is therefore always true for such guests. Signed-off-by: Steven Smith <steven.smith@eu.citrix.com> diff -r 7188d1e4b0e1 xen/include/asm-x86/x86_64/uaccess.h --- a/xen/include/asm-x86/x86_64/uaccess.h Tue Nov 09 12:00:05 2010 +0000 +++ b/xen/include/asm-x86/x86_64/uaccess.h Wed Nov 10 13:34:52 2010 +0000 @@ -20,7 +20,8 @@ void free_compat_arg_xlat(unsigned int c * non-canonical address (and thus fault) before ever reaching VIRT_START. */ #define __addr_ok(addr) \ - (((unsigned long)(addr) < (1UL<<48)) || \ + (is_hvm_vcpu(current) || \ + ((unsigned long)(addr) < (1UL<<48)) || \ ((unsigned long)(addr) >= HYPERVISOR_VIRT_END)) #define access_ok(addr, size) \ @@ -30,6 +31,7 @@ void free_compat_arg_xlat(unsigned int c (access_ok(addr, (count)*(size))) #define __compat_addr_ok(d, addr) \ + (is_hvm_vcpu(current) || \ ((unsigned long)(addr) < HYPERVISOR_COMPAT_VIRT_START(d)) #define __compat_access_ok(d, addr, size) \ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2010-Nov-10 13:46 UTC
Re: [Xen-devel] [PATCH]: Allow HVM guests to use entire address space
On 10/11/2010 13:40, "Gianni Tedesco" <gianni.tedesco@citrix.com> wrote:> HVM guests are allowed to use the entire virtual address space for > whatever they want, without any Xen hole. __addr_ok() is therefore > always true for such guests.This one got nacked and the bug was instead fixed by xen-unstable:21456 aka xen-4.0-testing:21169. So we don''t need this patch, thank you. ;-) -- Keir> Signed-off-by: Steven Smith <steven.smith@eu.citrix.com> > > diff -r 7188d1e4b0e1 xen/include/asm-x86/x86_64/uaccess.h > --- a/xen/include/asm-x86/x86_64/uaccess.h Tue Nov 09 12:00:05 2010 +0000 > +++ b/xen/include/asm-x86/x86_64/uaccess.h Wed Nov 10 13:34:52 2010 +0000 > @@ -20,7 +20,8 @@ void free_compat_arg_xlat(unsigned int c > * non-canonical address (and thus fault) before ever reaching VIRT_START. > */ > #define __addr_ok(addr) \ > - (((unsigned long)(addr) < (1UL<<48)) || \ > + (is_hvm_vcpu(current) || \ > + ((unsigned long)(addr) < (1UL<<48)) || \ > ((unsigned long)(addr) >= HYPERVISOR_VIRT_END)) > > #define access_ok(addr, size) \ > @@ -30,6 +31,7 @@ void free_compat_arg_xlat(unsigned int c > (access_ok(addr, (count)*(size))) > > #define __compat_addr_ok(d, addr) \ > + (is_hvm_vcpu(current) || \ > ((unsigned long)(addr) < HYPERVISOR_COMPAT_VIRT_START(d)) > > #define __compat_access_ok(d, addr, size) \ > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gianni Tedesco
2010-Nov-10 13:55 UTC
Re: [Xen-devel] [PATCH]: Allow HVM guests to use entire address space
On Wed, 2010-11-10 at 13:46 +0000, Keir Fraser wrote:> On 10/11/2010 13:40, "Gianni Tedesco" <gianni.tedesco@citrix.com> wrote: > > > HVM guests are allowed to use the entire virtual address space for > > whatever they want, without any Xen hole. __addr_ok() is therefore > > always true for such guests. > > This one got nacked and the bug was instead fixed by xen-unstable:21456 aka > xen-4.0-testing:21169. So we don''t need this patch, thank you. ;-) > > -- KeirAha, good to know, I will make appropriate changes our end. Gianni _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel