diff options
author | Bharata B Rao | 2016-06-10 07:14:48 +0200 |
---|---|---|
committer | David Gibson | 2016-06-14 05:20:01 +0200 |
commit | d0e5a8f2937de66778d94c20a8fc5cf43501fa04 (patch) | |
tree | 4b5ff0e7a997bae3b58ef16f52c57faf49bdf50c /xen-common.c | |
parent | macio: call dma_memory_unmap() at the end of each DMA transfer (diff) | |
download | qemu-d0e5a8f2937de66778d94c20a8fc5cf43501fa04.tar.gz qemu-d0e5a8f2937de66778d94c20a8fc5cf43501fa04.tar.xz qemu-d0e5a8f2937de66778d94c20a8fc5cf43501fa04.zip |
spapr: Ensure all LMBs are represented in ibm,dynamic-memory
Memory hotplug can fail for some combinations of RAM and maxmem when
DDW is enabled in the presence of devices like nec-usb-xhci. DDW depends
on maximum addressable memory returned by guest and this value is currently
being calculated wrongly by the guest kernel routine memory_hotplug_max().
While there is an attempt to fix the guest kernel, this patch works
around the problem within QEMU itself.
memory_hotplug_max() routine in the guest kernel arrives at max
addressable memory by multiplying lmb-size with the lmb-count obtained
from ibm,dynamic-memory property. There are two assumptions here:
- All LMBs are part of ibm,dynamic memory: This is not true for PowerKVM
where only hot-pluggable LMBs are present in this property.
- The memory area comprising of RAM and hotplug region is contiguous: This
needn't be true always for PowerKVM as there can be gap between
boot time RAM and hotplug region.
To work around this guest kernel bug, ensure that ibm,dynamic-memory
has information about all the LMBs (RMA, boot-time LMBs, future
hotpluggable LMBs, and dummy LMBs to cover the gap between RAM and
hotpluggable region).
RMA is represented separately by memory@0 node. Hence mark RMA LMBs
and also the LMBs for the gap b/n RAM and hotpluggable region as
reserved and as having no valid DRC so that these LMBs are not considered
by the guest.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'xen-common.c')
0 files changed, 0 insertions, 0 deletions