xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/bigmem: eliminate struct domain address width restriction
@ 2015-08-26  7:41 Jan Beulich
  2015-08-26  8:55 ` Andrew Cooper
  2015-09-01 10:57 ` Ian Campbell
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Beulich @ 2015-08-26  7:41 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Keir Fraser

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

PDX-es are 64 bits wide in that case, and hence no limit needs to be
enforced.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -204,6 +204,7 @@ smap_check_policy_t smap_policy_change(s
     return old_policy;
 }
 
+#ifndef CONFIG_BIGMEM
 /*
  * The hole may be at or above the 44-bit boundary, so we need to determine
  * the total bit count until reaching 32 significant (not squashed out) bits
@@ -225,10 +226,12 @@ static unsigned int __init noinline _dom
 
     return bits;
 }
+#endif
 
 struct domain *alloc_domain_struct(void)
 {
     struct domain *d;
+#ifndef CONFIG_BIGMEM
     /*
      * We pack the PDX of the domain structure into a 32-bit field within
      * the page_info structure. Hence the MEMF_bits() restriction.
@@ -237,12 +240,16 @@ struct domain *alloc_domain_struct(void)
 
     if ( unlikely(!bits) )
          bits = _domain_struct_bits();
+#else
+# define bits 0
+#endif
 
     BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE);
     d = alloc_xenheap_pages(0, MEMF_bits(bits));
     if ( d != NULL )
         clear_page(d);
     return d;
+#undef bits
 }
 
 void free_domain_struct(struct domain *d)




[-- Attachment #2: x86-bigmem-no-struct-domain-limit.patch --]
[-- Type: text/plain, Size: 1342 bytes --]

x86/bigmem: eliminate struct domain address width restriction

PDX-es are 64 bits wide in that case, and hence no limit needs to be
enforced.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -204,6 +204,7 @@ smap_check_policy_t smap_policy_change(s
     return old_policy;
 }
 
+#ifndef CONFIG_BIGMEM
 /*
  * The hole may be at or above the 44-bit boundary, so we need to determine
  * the total bit count until reaching 32 significant (not squashed out) bits
@@ -225,10 +226,12 @@ static unsigned int __init noinline _dom
 
     return bits;
 }
+#endif
 
 struct domain *alloc_domain_struct(void)
 {
     struct domain *d;
+#ifndef CONFIG_BIGMEM
     /*
      * We pack the PDX of the domain structure into a 32-bit field within
      * the page_info structure. Hence the MEMF_bits() restriction.
@@ -237,12 +240,16 @@ struct domain *alloc_domain_struct(void)
 
     if ( unlikely(!bits) )
          bits = _domain_struct_bits();
+#else
+# define bits 0
+#endif
 
     BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE);
     d = alloc_xenheap_pages(0, MEMF_bits(bits));
     if ( d != NULL )
         clear_page(d);
     return d;
+#undef bits
 }
 
 void free_domain_struct(struct domain *d)

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-01 12:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26  7:41 [PATCH] x86/bigmem: eliminate struct domain address width restriction Jan Beulich
2015-08-26  8:55 ` Andrew Cooper
2015-09-01 10:57 ` Ian Campbell
2015-09-01 11:58   ` Jan Beulich
2015-09-01 12:14     ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).