xen: switch extra memory accounting to use pfns

Instead of using physical addresses for accounting of extra memory
areas available for ballooning switch to pfns as this is much less
error prone regarding partial pages.

Reported-by: Roger Pau Monné <roger.pau@citrix.com>
Tested-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
This commit is contained in:
Juergen Gross
2015-09-04 14:05:51 +02:00
committed by David Vrabel
parent cb9e444b5a
commit 626d750866
3 changed files with 49 additions and 41 deletions

View File

@@ -9,8 +9,8 @@ static inline unsigned long page_to_mfn(struct page *page)
}
struct xen_memory_region {
phys_addr_t start;
phys_addr_t size;
unsigned long start_pfn;
unsigned long n_pfns;
};
#define XEN_EXTRA_MEM_MAX_REGIONS 128 /* == E820MAX */