spapr: use count+index for memory hotplug
commit79b78a6bd47722ce23bc74287cd6322756698f09
authorMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 27 Oct 2016 02:20:29 +0000 (26 21:20 -0500)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 28 Oct 2016 00:17:35 +0000 (28 11:17 +1100)
treed59f7790f84d1a7f21a9af2b53b7107f6ae81fb1
parentafdbd403563fe91bccc9c8ddce84838817f06a66
spapr: use count+index for memory hotplug

Commit 0a417869:

    spapr: Move memory hotplug to RTAS_LOG_V6_HP_ID_DRC_COUNT type

dropped per-DRC/per-LMB hotplugs event in favor of a bulk add via a
single LMB count value. This was to avoid overrunning the guest EPOW
event queue with hotplug events. This works fine, but relies on the
guest exhaustively scanning for pluggable LMBs to satisfy the
requested count by issuing rtas-get-sensor(DR_ENTITY_SENSE, ...) calls
until all the LMBs associated with the DIMM are identified.

With newer support for dedicated hotplug event source, this queue
exhaustion is no longer as much of an issue due to implementation
details on the guest side, but we still try to avoid excessive hotplug
events by now supporting both a count and a starting index to avoid
unecessary work. This patch makes use of that approach when the
capability is available.

Cc: bharata@linux.vnet.ibm.com
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c