From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buSjP-0004bD-4i for qemu-devel@nongnu.org; Wed, 12 Oct 2016 19:14:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buSjK-0000Ta-RH for qemu-devel@nongnu.org; Wed, 12 Oct 2016 19:14:38 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:43910 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buSjK-0000TI-LY for qemu-devel@nongnu.org; Wed, 12 Oct 2016 19:14:34 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9CNDbhE027029 for ; Wed, 12 Oct 2016 19:14:34 -0400 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0b-001b2d01.pphosted.com with ESMTP id 261tmaadgj-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 12 Oct 2016 19:14:34 -0400 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Oct 2016 19:14:33 -0400 From: Michael Roth Date: Wed, 12 Oct 2016 18:13:48 -0500 Message-Id: <1476314039-9520-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH 00/11] spapr: option vector re-work and memory unplug support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, david@gibson.dropbear.id.au, nfont@linux.vnet.ibm.com, jallen@linux.vnet.ibm.com This series is based on David's ppc-for-2.8 branch, and is also available from: https://github.com/mdroth/qemu/commits/spapr-hotplug-event-update Patches 1-4 address various deficiencies in how we currently handle option vectors via ibm,client-architecture-support. This is done here in preparation for a new option vector bit introduced later in this series, as well as a number of future option vector bits related to other features, but I can break this out into a separate series if preferred. Patches 5-8 add support for an updated event format for hotplug events, which includes a new way to specify a range of DRCs/LMBs to hotplug/unplug using a starting position and count, which is necessary for memory unplug. The format for this new event format is still in draft form, but slated for inclusion in the PAPR/LoPAPR. Patches 9-11 add support for memory unplug using the new event format. In addition to kernel 4.8 or later, there are a number of patches required to enable support on the guest kernel side. I've including the minimum set of patches in my branch here: https://github.com/mdroth/linux/commits/spapr-hotplug-event-update *powerpc/pseries: advertise Hot Plug Event support to firmware powerpc/pseries: Implement indexed-count hotplug memory remove powerpc/pseries: Implement indexed-count hotplug memory add Note that there is currently an issue that arises when attempting to offline an LMB that was onlined using a guest kernel's auto-onlining mechanism, which can prevent full completion of memory unplug requests. This is being investigated, but for the purposes of testing this can be worked around currently by disabling auto-onlining in guests via: "echo offline >/sys/devices/system/memory/auto_online_blocks" and instead onlining the blocks manually or via udev. docs/specs/ppc-spapr-hotplug.txt | 55 ++++++++++--- hw/ppc/Makefile.objs | 2 +- hw/ppc/spapr.c | 237 ++++++++++++++++++++++++++++++++++++++++++++++++------ hw/ppc/spapr_drc.c | 17 ++++ hw/ppc/spapr_events.c | 222 ++++++++++++++++++++++++++++++++++++++++----------- hw/ppc/spapr_hcall.c | 70 +++++++--------- hw/ppc/spapr_ovec.c | 244 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ include/hw/ppc/spapr.h | 15 +++- include/hw/ppc/spapr_ovec.h | 67 ++++++++++++++++ 9 files changed, 804 insertions(+), 125 deletions(-)