]> xenbits.xensource.com Git - people/royger/linux.git/commitdiff
Refresh of memory_pvh_dom0 wip.balloon4
authorRoger Pau Monne <roger.pau@citrix.com>
Mon, 30 Mar 2020 15:53:45 +0000 (17:53 +0200)
committerRoger Pau Monne <roger.pau@citrix.com>
Mon, 30 Mar 2020 18:02:53 +0000 (20:02 +0200)
drivers/xen/balloon.c

index 8f3becb2c01e64504ea83b5a6a3f69e3d2c24b0c..1d2b931382b8a4926907d44563ddb980ae9ec021 100644 (file)
@@ -251,6 +251,8 @@ static struct resource *additional_memory_resource(phys_addr_t size)
        struct resource *res;
        int ret;
 
+pr_emerg("Adding %llu additional memory\n", size);
+
        res = kzalloc(sizeof(*res), GFP_KERNEL);
        if (!res)
                return NULL;
@@ -352,7 +354,7 @@ static enum bp_state reserve_additional_memory(void)
        mutex_lock(&balloon_mutex);
 
        if (rc) {
-               pr_warn("Cannot add additional memory (%i)\n", rc);
+               pr_emerg("Cannot add additional memory (%i)\n", rc);
                goto err;
        }
 
@@ -370,10 +372,14 @@ static void xen_online_page(struct page *page, unsigned int order)
        unsigned long start_pfn = page_to_pfn(page);
        struct page *p;
 
-       pr_debug("Online %lu pages starting at pfn 0x%lx\n", size, start_pfn);
+       pr_emerg("Online %lu pages starting at pfn 0x%lx\n", size, start_pfn);
        mutex_lock(&balloon_mutex);
        for (i = 0; i < size; i++) {
                p = pfn_to_page(start_pfn + i);
+               if (PageOffline(p)) {
+                       pr_emerg("Page %lu was offline\n", start_pfn + i);
+                       __ClearPageOffline(p);
+               }
                balloon_append(p);
        }
        mutex_unlock(&balloon_mutex);