diff options
author | Juergen Gross <jgross@suse.com> | 2015-09-04 14:05:51 +0200 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2015-09-08 17:28:06 +0200 |
commit | 626d7508664c4bc8e67f496da4387ecd0c410b8c (patch) | |
tree | aa6f8868b6e18950a16dd8225c7e95a429a0dca9 /drivers/xen/balloon.c | |
parent | xen: limit memory to architectural maximum (diff) | |
download | linux-626d7508664c4bc8e67f496da4387ecd0c410b8c.tar.xz linux-626d7508664c4bc8e67f496da4387ecd0c410b8c.zip |
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>
Diffstat (limited to 'drivers/xen/balloon.c')
-rw-r--r-- | drivers/xen/balloon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index bf4a23c7c591..1fa633b2d556 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -638,9 +638,9 @@ static int __init balloon_init(void) * regions (see arch/x86/xen/setup.c). */ for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++) - if (xen_extra_mem[i].size) - balloon_add_region(PFN_UP(xen_extra_mem[i].start), - PFN_DOWN(xen_extra_mem[i].size)); + if (xen_extra_mem[i].n_pfns) + balloon_add_region(xen_extra_mem[i].start_pfn, + xen_extra_mem[i].n_pfns); return 0; } |