From: Peter Xu <peterx@redhat.com>
To: Marcel Apfelbaum <marcel@redhat.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com, pbonzini@redhat.com,
ehabkost@redhat.com, davidkiarie4@gmail.com, jan.kiszka@web.de,
bd.aviv@gmail.com, alex.williamson@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 2/3] hw/iommu: enable iommu with -device
Date: Sun, 12 Jun 2016 12:27:54 +0800 [thread overview]
Message-ID: <20160612042754.GN1039@pxdev.xzpeter.org> (raw)
In-Reply-To: <1464898555-14914-3-git-send-email-marcel@redhat.com>
On Thu, Jun 02, 2016 at 11:15:54PM +0300, Marcel Apfelbaum wrote:
[...]
> static void vtd_realize(DeviceState *dev, Error **errp)
> {
> + PCIBus *bus = PC_MACHINE(qdev_get_machine())->bus;
> IntelIOMMUState *s = INTEL_IOMMU_DEVICE(dev);
>
> VTD_DPRINTF(GENERAL, "");
> @@ -2029,6 +2043,9 @@ static void vtd_realize(DeviceState *dev, Error **errp)
> s->vtd_as_by_busptr = g_hash_table_new_full(vtd_uint64_hash, vtd_uint64_equal,
> g_free, g_free);
> vtd_init(s);
> + sysbus_mmio_map(SYS_BUS_DEVICE(s), 0, Q35_HOST_BRIDGE_IOMMU_ADDR);
> + bus->iommu_fn = vtd_host_dma_iommu;
> + bus->iommu_opaque = dev;
Here, shall we still use pci_setup_iommu() to keep the two fields
private for pci framework?
Btw, I am rebasing Intel IR work onto this patchset, but encountered
issues (guest hang, or errornous interrupts) when guest specify more
than 1 vcpus (everything is cool as long as vcpu=1). Maybe there is
something wrong during the rebase, still investigating. Please shoot
if there is any clue.
Thanks,
-- peterx
next prev parent reply other threads:[~2016-06-12 4:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 20:15 [Qemu-devel] [PATCH v2 0/3] enable iommu with -device Marcel Apfelbaum
2016-06-02 20:15 ` [Qemu-devel] [PATCH v2 1/3] hw/pci: delay bus_master_enable_region initialization Marcel Apfelbaum
2016-06-08 11:16 ` Paolo Bonzini
2016-06-08 11:36 ` Marcel Apfelbaum
2016-06-02 20:15 ` [Qemu-devel] [PATCH v2 2/3] hw/iommu: enable iommu with -device Marcel Apfelbaum
2016-06-03 16:07 ` Michael S. Tsirkin
2016-06-05 8:46 ` Marcel Apfelbaum
2016-06-05 9:59 ` Michael S. Tsirkin
2016-06-05 10:21 ` Marcel Apfelbaum
2016-06-12 4:27 ` Peter Xu [this message]
2016-06-13 10:20 ` Marcel Apfelbaum
2016-06-13 13:04 ` Peter Xu
2016-06-02 20:15 ` [Qemu-devel] [PATCH v2 3/3] q35: allow dynamic sysbus Marcel Apfelbaum
2016-06-03 6:33 ` Markus Armbruster
2016-06-03 6:47 ` Marcel Apfelbaum
2016-06-08 2:56 ` Peter Xu
2016-06-08 11:18 ` Marcel Apfelbaum
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=20160612042754.GN1039@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=bd.aviv@gmail.com \
--cc=davidkiarie4@gmail.com \
--cc=ehabkost@redhat.com \
--cc=jan.kiszka@web.de \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).