]> Git Repo - J-linux.git/commitdiff
Merge tag 'for-linus-6.10a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <[email protected]>
Fri, 24 May 2024 17:24:49 +0000 (10:24 -0700)
committerLinus Torvalds <[email protected]>
Fri, 24 May 2024 17:24:49 +0000 (10:24 -0700)
Pull xen updates from Juergen Gross:

 - a small cleanup in the drivers/xen/xenbus Makefile

 - a fix of the Xen xenstore driver to improve connecting to a late
   started Xenstore

 - an enhancement for better support of ballooning in PVH guests

 - a cleanup using try_cmpxchg() instead of open coding it

* tag 'for-linus-6.10a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  drivers/xen: Improve the late XenStore init protocol
  xen/xenbus: Use *-y instead of *-objs in Makefile
  xen/x86: add extra pages to unpopulated-alloc if available
  locking/x86/xen: Use try_cmpxchg() in xen_alloc_p2m_entry()

1  2 
arch/x86/xen/enlighten.c

diff --combined arch/x86/xen/enlighten.c
index 5f3a69f6ec340106fd9dda536edfb24af961cf71,b88722dfc4f8678f98e2c119ed016ec6971f640d..0305485edcd3ef68dd1ace7844fc0902967aa8b4
@@@ -1,5 -1,8 +1,5 @@@
  // SPDX-License-Identifier: GPL-2.0
  
 -#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
 -#include <linux/memblock.h>
 -#endif
  #include <linux/console.h>
  #include <linux/cpu.h>
  #include <linux/kexec.h>
@@@ -379,3 -382,36 +379,36 @@@ void __init xen_add_extra_mem(unsigned 
  
        memblock_reserve(PFN_PHYS(start_pfn), PFN_PHYS(n_pfns));
  }
+ #ifdef CONFIG_XEN_UNPOPULATED_ALLOC
+ int __init arch_xen_unpopulated_init(struct resource **res)
+ {
+       unsigned int i;
+       if (!xen_domain())
+               return -ENODEV;
+       /* Must be set strictly before calling xen_free_unpopulated_pages(). */
+       *res = &iomem_resource;
+       /*
+        * Initialize with pages from the extra memory regions (see
+        * arch/x86/xen/setup.c).
+        */
+       for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++) {
+               unsigned int j;
+               for (j = 0; j < xen_extra_mem[i].n_pfns; j++) {
+                       struct page *pg =
+                               pfn_to_page(xen_extra_mem[i].start_pfn + j);
+                       xen_free_unpopulated_pages(1, &pg);
+               }
+               /* Zero so region is not also added to the balloon driver. */
+               xen_extra_mem[i].n_pfns = 0;
+       }
+       return 0;
+ }
+ #endif
This page took 0.059286 seconds and 4 git commands to generate.