From: Bharata B Rao Date: Mon, 3 Aug 2015 05:35:43 +0000 (+0530) Subject: spapr: Move memory hotplug to RTAS_LOG_V6_HP_ID_DRC_COUNT type X-Git-Tag: v2.5.0-rc0~108^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a417869;p=thirdparty%2Fqemu.git spapr: Move memory hotplug to RTAS_LOG_V6_HP_ID_DRC_COUNT type Till now memory hotplug used RTAS_LOG_V6_HP_ID_DRC_INDEX hotplug type which meant that we generated one hotplug type of EPOW event for every 256MB (SPAPR_MEMORY_BLOCK_SIZE). This quickly overruns the kernel rtas log buffer thus resulting in loss of memory hotplug events. Switch to RTAS_LOG_V6_HP_ID_DRC_COUNT hotplug type for memory so that we generate only one event per hotplug request. Signed-off-by: Bharata B Rao Reviewed-by: Michael Roth Reviewed-by: David Gibson Signed-off-by: David Gibson --- diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index d00513fc343..533c7adae18 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2062,9 +2062,9 @@ static void spapr_add_lmbs(DeviceState *dev, uint64_t addr, uint64_t size, drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc); drck->attach(drc, dev, fdt, fdt_offset, !dev->hotplugged, errp); - spapr_hotplug_req_add_by_index(drc); addr += SPAPR_MEMORY_BLOCK_SIZE; } + spapr_hotplug_req_add_by_count(SPAPR_DR_CONNECTOR_TYPE_LMB, nr_lmbs); } static void spapr_memory_plug(HotplugHandler *hotplug_dev, DeviceState *dev,