Comment 5 for bug 1670315

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2017-03-06 15:21 EDT-------
(In reply to comment #10)
> > Next, I will look at ubuntu-1704 kernel to figure out which commits are
> > required for this to work.
>
> commit 3dbbaf200f532e01e56168b8339f2981f2cb1d67
> Author: Michael Roth <email address hidden>
> Date: Mon Feb 20 19:12:18 2017 -0600
>
> powerpc/pseries: Advertise Hot Plug Event support to firmware
>
> With the inclusion of commit 333f7b76865b ("powerpc/pseries: Implement
> indexed-count hotplug memory add") and commit 753843471cbb
> ("powerpc/pseries: Implement indexed-count hotplug memory remove"), we
> now have complete handling of the RTAS hotplug event format as described
> by PAPR via ACR "PAPR Changes for Hotplug RTAS Events".
>
> This capability is indicated by byte 6, bit 2 (5 in IBM numbering) of
> architecture option vector 5, and allows for greater control over
> cpu/memory/pci hot plug/unplug operations.
>
> Existing pseries kernels will utilize this capability based on the
> existence of the /event-sources/hot-plug-events DT property, so we
> only need to advertise it via CAS and do not need a corresponding
> FW_FEATURE_* value to test for.
>
> Signed-off-by: Michael Roth <email address hidden>
> Signed-off-by: Michael Ellerman <email address hidden>
>
> The above commit is missing from 1704 kernel. This commit is needed to fix
> the issue seen in this bugzilla. More importantly, this commit is needed for
> memory unplug support.
>
> Vipin - Can you follow up with Ubuntu and get this patch included into 1704
> kernel ?

Because QEMU will also use the flag set by the above patch as an indicator for memory unplug support, as well as count+indexed-based memory hotplug support, I think we'd also want to include the patches required for those memory hotplug operations as well. Otherwise memory hotplug/unplug may not function correctly with the patch applied.

The following list of commits should do it (from most recent to oldest commit):

3dbbaf2 powerpc/pseries: Advertise Hot Plug Event support to firmware
943db62 powerpc/pseries: Revert 'Auto-online hotplugged memory'
7538434 powerpc/pseries: Implement indexed-count hotplug memory remove
333f7b7 powerpc/pseries: Implement indexed-count hotplug memory add
673bc43 powerpc/pseries: Report DLPAR capabilities

The "Report DLPAR capabilities" one is optional for KVM, but may be needed in order for PowerVM guests to use the in-kernel mechanisms for cpu/memory.