From nobody Mon Feb 9 07:29:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496754448209367.4975870940616; Tue, 6 Jun 2017 06:07:28 -0700 (PDT) Received: from localhost ([::1]:38345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIECf-0006yF-Lr for importer@patchew.org; Tue, 06 Jun 2017 09:07:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIEB4-0005xg-8I for qemu-devel@nongnu.org; Tue, 06 Jun 2017 09:05:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIEB3-0000ri-4P for qemu-devel@nongnu.org; Tue, 06 Jun 2017 09:05:42 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:43407) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dIEB2-0000qT-Nu; Tue, 06 Jun 2017 09:05:41 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3whsPF3zKlz9rxm; Tue, 6 Jun 2017 23:05:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1496754337; bh=k7Z8IRUC4PJufV0LXeSxZicWZ1ZlSzASFhW4QvvEy7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HxL2gL9BnrJpRoX50FBnzhVJaIOSdjhMwfBjcVV/u+NA1A2r8AIQLP9gyArQmuKkT uqnRdB9vaJi3BeiDT4XO9eCM27bOLvd+ca/yTgm1Iqf5O8Z0qdAKZStXR9Re41VUIS fDrJI4GKay2ypDqWYWPGRuLjduZtgI7U7gThdOgo= From: David Gibson To: mdroth@linux.vnet.ibm.com Date: Tue, 6 Jun 2017 23:05:32 +1000 Message-Id: <20170606130534.11019-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170606130534.11019-1-david@gibson.dropbear.id.au> References: <20170606130534.11019-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [RFC 1/3] spapr: Fold spapr_phb_add_pci_device() into its only caller X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sursingh@redhat.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This function is fairly short, and so is its only caller. There's no particular logical distinction between them, so fold them together. Signed-off-by: David Gibson --- hw/ppc/spapr_pci.c | 53 ++++++++++++++++++++++----------------------------= --- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 46e736d..a216f61 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1344,30 +1344,6 @@ static int spapr_create_pci_child_dt(sPAPRPHBState *= phb, PCIDevice *dev, return offset; } =20 -static void spapr_phb_add_pci_device(sPAPRDRConnector *drc, - sPAPRPHBState *phb, - PCIDevice *pdev, - Error **errp) -{ - DeviceState *dev =3D DEVICE(pdev); - void *fdt =3D NULL; - int fdt_start_offset =3D 0, fdt_size; - - fdt =3D create_device_tree(&fdt_size); - fdt_start_offset =3D spapr_create_pci_child_dt(phb, pdev, fdt, 0); - if (!fdt_start_offset) { - error_setg(errp, "Failed to create pci child device tree node"); - goto out; - } - - spapr_drc_attach(drc, DEVICE(pdev), - fdt, fdt_start_offset, !dev->hotplugged, errp); -out: - if (*errp) { - g_free(fdt); - } -} - /* Callback to be called during DRC release. */ void spapr_phb_remove_pci_device_cb(DeviceState *dev) { @@ -1429,6 +1405,8 @@ static void spapr_phb_hot_plug_child(HotplugHandler *= plug_handler, Error *local_err =3D NULL; PCIBus *bus =3D PCI_BUS(qdev_get_parent_bus(DEVICE(pdev))); uint32_t slotnr =3D PCI_SLOT(pdev->devfn); + void *fdt =3D NULL; + int fdt_start_offset, fdt_size; =20 /* if DR is disabled we don't need to do anything in the case of * hotplug or coldplug callbacks @@ -1438,10 +1416,10 @@ static void spapr_phb_hot_plug_child(HotplugHandler= *plug_handler, * we need to let them know it's not enabled */ if (plugged_dev->hotplugged) { - error_setg(errp, QERR_BUS_NO_HOTPLUG, + error_setg(&local_err, QERR_BUS_NO_HOTPLUG, object_get_typename(OBJECT(phb))); } - return; + goto out; } =20 g_assert(drc); @@ -1452,16 +1430,23 @@ static void spapr_phb_hot_plug_child(HotplugHandler= *plug_handler, */ if (plugged_dev->hotplugged && bus->devices[PCI_DEVFN(slotnr, 0)] && PCI_FUNC(pdev->devfn) !=3D 0) { - error_setg(errp, "PCI: slot %d function 0 already ocuppied by %s," + error_setg(&local_err, "PCI: slot %d function 0 already ocuppied b= y %s," " additional functions can no longer be exposed to gues= t.", slotnr, bus->devices[PCI_DEVFN(slotnr, 0)]->name); - return; + goto out; } =20 - spapr_phb_add_pci_device(drc, phb, pdev, &local_err); + fdt =3D create_device_tree(&fdt_size); + fdt_start_offset =3D spapr_create_pci_child_dt(phb, pdev, fdt, 0); + if (!fdt_start_offset) { + error_setg(&local_err, "Failed to create pci child device tree nod= e"); + goto out; + } + + spapr_drc_attach(drc, DEVICE(pdev), fdt, fdt_start_offset, + !plugged_dev->hotplugged, &local_err); if (local_err) { - error_propagate(errp, local_err); - return; + goto out; } =20 /* If this is function 0, signal hotplug for all the device functions. @@ -1485,6 +1470,12 @@ static void spapr_phb_hot_plug_child(HotplugHandler = *plug_handler, } } } + +out: + if (local_err) { + error_propagate(errp, local_err); + g_free(fdt); + } } =20 static void spapr_phb_hot_unplug_child(HotplugHandler *plug_handler, --=20 2.9.4 From nobody Mon Feb 9 07:29:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496754530300387.6886649949794; Tue, 6 Jun 2017 06:08:50 -0700 (PDT) Received: from localhost ([::1]:38353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIEE0-000068-1C for importer@patchew.org; Tue, 06 Jun 2017 09:08:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIEBA-00061C-R7 for qemu-devel@nongnu.org; Tue, 06 Jun 2017 09:05:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIEB3-0000rf-3z for qemu-devel@nongnu.org; Tue, 06 Jun 2017 09:05:48 -0400 Received: from ozlabs.org ([103.22.144.67]:35655) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dIEB2-0000qY-Nc; Tue, 06 Jun 2017 09:05:41 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3whsPF4vjmz9s7h; Tue, 6 Jun 2017 23:05:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1496754337; bh=QDS+Zp+dL++ULv82uI3AFg3HyAUOvDBusrON3o4W304=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gPpn4EeC0tMWOfHWwg/CiXrDbz4qkoZElr3LS9+hWNx3IryckHxBWUPuezm+Pl6NS MKv235pCoyi4wPTEv3lT7PZVHWosYMCIRFsyMRFo2kokLGnkVzyBxHPBZ7XYUSGDux 2N+1BenmWOZyI5mUc9w+UWmwjXQWlqFXNXQhc2eI= From: David Gibson To: mdroth@linux.vnet.ibm.com Date: Tue, 6 Jun 2017 23:05:33 +1000 Message-Id: <20170606130534.11019-3-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170606130534.11019-1-david@gibson.dropbear.id.au> References: <20170606130534.11019-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [RFC 2/3] spapr: Start hotplugged PCI devices in ISOLATED state X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sursingh@redhat.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" PCI DRCs, and only PCI DRCs, are immediately moved to UNISOLATED isolation state once the device is attached. This has been there from the initial implementation, and it's not clear why. The state diagram in PAPR 13.4 suggests PCI devices should start in ISOLATED state until the guest moves them into UNISOLATED, and the code in the guest-side drmgr tool seems to work that way too. Signed-off-by: David Gibson Reviewed-by: Michael Roth --- hw/ppc/spapr_drc.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index c73fae0..22f9224 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -291,16 +291,6 @@ void spapr_drc_attach(sPAPRDRConnector *drc, DeviceSta= te *d, void *fdt, } g_assert(fdt || coldplug); =20 - /* NOTE: setting initial isolation state to UNISOLATED means we can't - * detach unless guest has a userspace/kernel that moves this state - * back to ISOLATED in response to an unplug event, or this is done - * manually by the admin prior. if we force things while the guest - * may be accessing the device, we can easily crash the guest, so we - * we defer completion of removal in such cases to the reset() hook. - */ - if (spapr_drc_type(drc) =3D=3D SPAPR_DR_CONNECTOR_TYPE_PCI) { - drc->isolation_state =3D SPAPR_DR_ISOLATION_STATE_UNISOLATED; - } drc->dr_indicator =3D SPAPR_DR_INDICATOR_ACTIVE; =20 drc->dev =3D d; --=20 2.9.4 From nobody Mon Feb 9 07:29:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496754446194366.60741815813276; Tue, 6 Jun 2017 06:07:26 -0700 (PDT) Received: from localhost ([::1]:38346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIECf-0006yR-IY for importer@patchew.org; Tue, 06 Jun 2017 09:07:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIEB4-0005xi-Vn for qemu-devel@nongnu.org; Tue, 06 Jun 2017 09:05:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIEB3-0000rz-Fl for qemu-devel@nongnu.org; Tue, 06 Jun 2017 09:05:42 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:49227) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dIEB2-0000qk-Qu; Tue, 06 Jun 2017 09:05:41 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3whsPG0MhBz9s7p; Tue, 6 Jun 2017 23:05:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1496754338; bh=SIezAeyhypxPFnJ3bpS7M/ydqSQ/l/l0fpFuSzeQmjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mFI6UH8cBv3gcA3OUmsx0i+JAHIsX0ah+NQ2+Kq2MH4XBbJajO/FMb1d+fSeIOfuo Ep0l3WU8AJoeT6uKHCX3jSQz/ZBmSlYYw/xeiVAxcB+io3PwdVXbVlqedTNisOyerR njdIuB78pRUpEWgtZGf8HH/X4Jccqik5cmDLi5QU= From: David Gibson To: mdroth@linux.vnet.ibm.com Date: Tue, 6 Jun 2017 23:05:34 +1000 Message-Id: <20170606130534.11019-4-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170606130534.11019-1-david@gibson.dropbear.id.au> References: <20170606130534.11019-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [RFC 3/3] spapr: Eliminate DRC 'signalled' state variable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sursingh@redhat.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The 'signalled' field in the DRC appears to be entirely a torturous workaround for the fact that PCI devices were started in UNISOLATED state for unclear reasons. 1) 'signalled' is already meaningless for logical (so far, all non PCI) DRCs. It's always set to true (at least at any point it might be tested), and can't be assigned any real meaning due to the way signalling works for logical DRCs. 2) For PCI DRCs, the only time signalled would be false is when non-zero functions of a multifunction device are hotplugged, followed by function zero (the other way around is explicitly not permitted). In that case the secondary function DRCs are attached, but the notification isn't sent to the guest until function 0 is plugged. 3) signalled being false is used to allow a DRC detach to switch mode back to ISOLATED state, which allows a secondary function to be hotplugged then unplugged with function 0 never inserted. Without this a secondary function starting in UNISOLATED state couldn't be detached again without function 0 being inserted, all the functions configured by the guest, then sent back to ISOLATED state. 4) But now that PCI DRCs start in ISOLATED state, there's nothing to be done. If the guest doesn't get the notification, it won't switch the device to UNISOLATED state, so nothing prevents it from being unplugged. If the guest does move it to UNISOLATED state without the signal (due to a manual drmgr call, for instance) then it really isn't safe to unplug it. So, this patch removes the signalled variable and all code related to it. Signed-off-by: David Gibson --- hw/ppc/spapr_drc.c | 45 +-----------------------------------------= --- hw/ppc/spapr_events.c | 10 ---------- include/hw/ppc/spapr_drc.h | 2 -- 3 files changed, 1 insertion(+), 56 deletions(-) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 22f9224..7c778cf 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -155,12 +155,6 @@ static uint32_t set_allocation_state(sPAPRDRConnector = *drc, return RTAS_OUT_SUCCESS; } =20 -/* has the guest been notified of device attachment? */ -static void set_signalled(sPAPRDRConnector *drc) -{ - drc->signalled =3D true; -} - /* * dr-entity-sense sensor value * returned via get-sensor-state RTAS calls @@ -297,17 +291,6 @@ void spapr_drc_attach(sPAPRDRConnector *drc, DeviceSta= te *d, void *fdt, drc->fdt =3D fdt; drc->fdt_start_offset =3D fdt_start_offset; drc->configured =3D coldplug; - /* 'logical' DR resources such as memory/cpus are in some cases treated - * as a pool of resources from which the guest is free to choose from - * based on only a count. for resources that can be assigned in this - * fashion, we must assume the resource is signalled immediately - * since a single hotplug request might make an arbitrary number of - * such attached resources available to the guest, as opposed to - * 'physical' DR resources such as PCI where each device/resource is - * signalled individually. - */ - drc->signalled =3D (spapr_drc_type(drc) !=3D SPAPR_DR_CONNECTOR_TYPE_P= CI) - ? true : coldplug; =20 if (spapr_drc_type(drc) !=3D SPAPR_DR_CONNECTOR_TYPE_PCI) { drc->awaiting_allocation =3D true; @@ -323,26 +306,6 @@ void spapr_drc_detach(sPAPRDRConnector *drc, DeviceSta= te *d, Error **errp) { trace_spapr_drc_detach(spapr_drc_index(drc)); =20 - /* if we've signalled device presence to the guest, or if the guest - * has gone ahead and configured the device (via manually-executed - * device add via drmgr in guest, namely), we need to wait - * for the guest to quiesce the device before completing detach. - * Otherwise, we can assume the guest hasn't seen it and complete the - * detach immediately. Note that there is a small race window - * just before, or during, configuration, which is this context - * refers mainly to fetching the device tree via RTAS. - * During this window the device access will be arbitrated by - * associated DRC, which will simply fail the RTAS calls as invalid. - * This is recoverable within guest and current implementations of - * drmgr should be able to cope. - */ - if (!drc->signalled && !drc->configured) { - /* if the guest hasn't seen the device we can't rely on it to - * set it back to an isolated state via RTAS, so do it here manual= ly - */ - drc->isolation_state =3D SPAPR_DR_ISOLATION_STATE_ISOLATED; - } - if (drc->isolation_state !=3D SPAPR_DR_ISOLATION_STATE_ISOLATED) { trace_spapr_drc_awaiting_isolated(spapr_drc_index(drc)); drc->awaiting_release =3D true; @@ -431,10 +394,6 @@ static void reset(DeviceState *d) drck->set_allocation_state(drc, SPAPR_DR_ALLOCATION_STATE_UNUS= ABLE); } } - - if (drck->dr_entity_sense(drc) =3D=3D SPAPR_DR_ENTITY_SENSE_PRESENT) { - drck->set_signalled(drc); - } } =20 static bool spapr_drc_needed(void *opaque) @@ -459,7 +418,7 @@ static bool spapr_drc_needed(void *opaque) case SPAPR_DR_CONNECTOR_TYPE_LMB: rc =3D !((drc->isolation_state =3D=3D SPAPR_DR_ISOLATION_STATE_UNI= SOLATED) && (drc->allocation_state =3D=3D SPAPR_DR_ALLOCATION_STATE_USA= BLE) && - drc->configured && drc->signalled && !drc->awaiting_release= ); + drc->configured && !drc->awaiting_release); break; case SPAPR_DR_CONNECTOR_TYPE_PHB: case SPAPR_DR_CONNECTOR_TYPE_VIO: @@ -481,7 +440,6 @@ static const VMStateDescription vmstate_spapr_drc =3D { VMSTATE_BOOL(configured, sPAPRDRConnector), VMSTATE_BOOL(awaiting_release, sPAPRDRConnector), VMSTATE_BOOL(awaiting_allocation, sPAPRDRConnector), - VMSTATE_BOOL(signalled, sPAPRDRConnector), VMSTATE_END_OF_LIST() } }; @@ -594,7 +552,6 @@ static void spapr_dr_connector_class_init(ObjectClass *= k, void *data) drck->set_isolation_state =3D set_isolation_state; drck->set_allocation_state =3D set_allocation_state; drck->release_pending =3D release_pending; - drck->set_signalled =3D set_signalled; /* * Reason: it crashes FIXME find and document the real reason */ diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c index 171aedc..587a3da 100644 --- a/hw/ppc/spapr_events.c +++ b/hw/ppc/spapr_events.c @@ -475,13 +475,6 @@ static void spapr_powerdown_req(Notifier *n, void *opa= que) RTAS_LOG_TYPE_EPOW)= )); } =20 -static void spapr_hotplug_set_signalled(uint32_t drc_index) -{ - sPAPRDRConnector *drc =3D spapr_drc_by_index(drc_index); - sPAPRDRConnectorClass *drck =3D SPAPR_DR_CONNECTOR_GET_CLASS(drc); - drck->set_signalled(drc); -} - static void spapr_hotplug_req_event(uint8_t hp_id, uint8_t hp_action, sPAPRDRConnectorType drc_type, union drc_identifier *drc_id) @@ -528,9 +521,6 @@ static void spapr_hotplug_req_event(uint8_t hp_id, uint= 8_t hp_action, switch (drc_type) { case SPAPR_DR_CONNECTOR_TYPE_PCI: hp->hotplug_type =3D RTAS_LOG_V6_HP_TYPE_PCI; - if (hp->hotplug_action =3D=3D RTAS_LOG_V6_HP_ACTION_ADD) { - spapr_hotplug_set_signalled(drc_id->index); - } break; case SPAPR_DR_CONNECTOR_TYPE_LMB: hp->hotplug_type =3D RTAS_LOG_V6_HP_TYPE_MEMORY; diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h index ec0256b..b68e8a6 100644 --- a/include/hw/ppc/spapr_drc.h +++ b/include/hw/ppc/spapr_drc.h @@ -200,7 +200,6 @@ typedef struct sPAPRDRConnector { sPAPRConfigureConnectorState *ccs; =20 bool awaiting_release; - bool signalled; bool awaiting_allocation; bool awaiting_allocation_skippable; =20 @@ -226,7 +225,6 @@ typedef struct sPAPRDRConnectorClass { =20 /* QEMU interfaces for managing hotplug operations */ bool (*release_pending)(sPAPRDRConnector *drc); - void (*set_signalled)(sPAPRDRConnector *drc); } sPAPRDRConnectorClass; =20 uint32_t spapr_drc_index(sPAPRDRConnector *drc); --=20 2.9.4