From: David Gibson <david@gibson.dropbear.id.au>
To: mdroth@linux.vnet.ibm.com
Cc: bharata@linux.vnet.ibm.com, sursingh@redhat.com, groug@kaod.org,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
David Gibson <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [RFC 2/3] spapr: Start hotplugged PCI devices in ISOLATED state
Date: Tue, 6 Jun 2017 23:05:33 +1000 [thread overview]
Message-ID: <20170606130534.11019-3-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20170606130534.11019-1-david@gibson.dropbear.id.au>
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 <david@gibson.dropbear.id.au>
---
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, DeviceState *d, void *fdt,
}
g_assert(fdt || coldplug);
- /* 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) == SPAPR_DR_CONNECTOR_TYPE_PCI) {
- drc->isolation_state = SPAPR_DR_ISOLATION_STATE_UNISOLATED;
- }
drc->dr_indicator = SPAPR_DR_INDICATOR_ACTIVE;
drc->dev = d;
--
2.9.4
next prev parent reply other threads:[~2017-06-06 13:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 13:05 [Qemu-devel] [RFC 0/3] spapr: DRC cleanups (part IV) David Gibson
2017-06-06 13:05 ` [Qemu-devel] [RFC 1/3] spapr: Fold spapr_phb_add_pci_device() into its only caller David Gibson
2017-06-06 21:37 ` Michael Roth
2017-06-07 1:33 ` David Gibson
2017-06-07 22:59 ` Michael Roth
2017-06-06 13:05 ` David Gibson [this message]
2017-06-07 22:49 ` [Qemu-devel] [RFC 2/3] spapr: Start hotplugged PCI devices in ISOLATED state Michael Roth
2017-06-07 23:31 ` Michael Roth
2017-06-08 1:39 ` David Gibson
2017-06-06 13:05 ` [Qemu-devel] [RFC 3/3] spapr: Eliminate DRC 'signalled' state variable David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170606130534.11019-3-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=bharata@linux.vnet.ibm.com \
--cc=groug@kaod.org \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=sursingh@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).