diff options
author | Juergen Gross <jgross@suse.com> | 2015-09-04 15:05:51 +0300 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2015-09-08 18:28:06 +0300 |
commit | 626d7508664c4bc8e67f496da4387ecd0c410b8c (patch) | |
tree | aa6f8868b6e18950a16dd8225c7e95a429a0dca9 /drivers/xen/balloon.c | |
parent | cb9e444b5aaa900bb4310da411315b6947c53e37 (diff) | |
download | linux-626d7508664c4bc8e67f496da4387ecd0c410b8c.tar.xz |
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; } |