From: Pierre Morel <pmorel@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, marcel@redhat.com, cohuck@redhat.com,
zyimin@linux.vnet.ibm.com
Subject: [Qemu-devel] [PATCH v1][RFC] pci: Set PCI-bus device entry before initializing bus master
Date: Thu, 5 Oct 2017 14:36:22 +0200 [thread overview]
Message-ID: <1507206983-16096-1-git-send-email-pmorel@linux.vnet.ibm.com> (raw)
When initializing the PCI-bus master pci_init_bus_master(PCIDevice *)
calls pci_device_iommu_address_space(PCIDevice *) which in turn calls
iommu_bus->iommu_fn(bus, opaque,devfn)
If the device entry of the PCI-bus is not initialized to point to the
PCIDevice structure, the iommu_fn() function, getting only bus and
devno, is unable to retrieve the PCIDevice.
Usually it is not a problem as the DMA address space is depending of
the BUS but in an architecture like S390x, each PCI Device can have
its own DMA address space.
Being able to setup the DMA address space at the right moment will
greatly simplify the hotplug implementation for these architectures.
This patch proposes to setup the bus device entry before calling
pci_init_bus_master() and reset the entry in case of error.
Pierre Morel (1):
pci: Set PCI-bus device entry before initializing bus master
hw/pci/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
2.7.4
next reply other threads:[~2017-10-05 12:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-05 12:36 Pierre Morel [this message]
2017-10-05 12:36 ` [Qemu-devel] [PATCH v1] pci: Set PCI-bus device entry before initializing bus master Pierre Morel
2017-10-09 8:42 ` Yi Min Zhao
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=1507206983-16096-1-git-send-email-pmorel@linux.vnet.ibm.com \
--to=pmorel@linux.vnet.ibm.com \
--cc=cohuck@redhat.com \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zyimin@linux.vnet.ibm.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).