x86/paging: paging_set_allocation() is init-only
authorJan Beulich <jbeulich@suse.com>
Mon, 1 Apr 2019 09:09:43 +0000 (11:09 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 1 Apr 2019 09:09:43 +0000 (11:09 +0200)
This is needed for Dom0 creation only, therefore it gets additionally
framed by an #ifdef.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/x86/mm/paging.c

index 21db3eceb68a2e4fc7bf3c5c6f0ffc7196d5ff1a..9b0f268e742a4e83318c348ae7d938e6237eab4f 100644 (file)
@@ -950,7 +950,9 @@ int paging_write_p2m_entry(struct p2m_domain *p2m, unsigned long gfn,
     return rc;
 }
 
-int paging_set_allocation(struct domain *d, unsigned int pages, bool *preempted)
+#ifdef CONFIG_HVM
+int __init paging_set_allocation(struct domain *d, unsigned int pages,
+                                 bool *preempted)
 {
     int rc;
 
@@ -965,6 +967,7 @@ int paging_set_allocation(struct domain *d, unsigned int pages, bool *preempted)
 
     return rc;
 }
+#endif
 
 /*
  * Local variables: