aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_domain_restore.c
diff options
context:
space:
mode:
authorGeorge Dunlap <george.dunlap@eu.citrix.com>2013-06-18 15:11:03 +0100
committerIan Jackson <Ian.Jackson@eu.citrix.com>2013-06-24 12:20:29 +0100
commit703e150231e26079d72ecca76701a825e7b9b927 (patch)
tree3419aa781db8f4cce31348a16da2a979acefae52 /tools/libxc/xc_domain_restore.c
parent3458ab670f3043100f2c0ae5634c44226eb3d2ca (diff)
downloadxen-703e150231e26079d72ecca76701a825e7b9b927.tar.gz
xen-703e150231e26079d72ecca76701a825e7b9b927.tar.bz2
xen-703e150231e26079d72ecca76701a825e7b9b927.zip
hvmloader: Correct bug in low mmio region accounting
When deciding whether to map a device in low MMIO space (<4GiB), hvmloader compares it with "mmio_left", which is set to the size of the low MMIO range (pci_mem_end - pci_mem_start). However, even if it does map a device in high MMIO space, it still removes the size of its BAR from mmio_left. In reality we don't need to do a separate accounting of the low memory available -- this can be calculated from mem_resource. Just get rid of the variable and the duplicate accounting entirely. This will make the code more robust. Note also that the calculation of whether to move a device to 64-bit is fragile at the moment, depending on some unstated assumptions. State those assumptions in a comment for future reference. v5: - Add comment documenting fragility of the move-to-highmem check v3: - Use mem_resource values directly instead of doing duplicate accounting Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> CC: Stefano Stabellini <stefano.stabellini@citrix.com> CC: Hanweidong <hanweidong@huawei.com> CC: Keir Fraser <keir@xen.org>
Diffstat (limited to 'tools/libxc/xc_domain_restore.c')
0 files changed, 0 insertions, 0 deletions