From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au>,
Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH qemu 1/5] memory/iommu: QOM'fy IOMMU MemoryRegion
Date: Thu, 30 Mar 2017 15:00:52 +0200 [thread overview]
Message-ID: <183be420-3192-56b7-eb76-29a2830c7244@redhat.com> (raw)
In-Reply-To: <20170330124707.28142-2-aik@ozlabs.ru>
On 30/03/2017 14:47, Alexey Kardashevskiy wrote:
> @@ -633,7 +663,7 @@ static inline bool memory_region_is_iommu(MemoryRegion *mr)
> if (mr->alias) {
> return memory_region_is_iommu(mr->alias);
> }
> - return mr->iommu_ops;
> + return object_dynamic_cast(OBJECT(mr), TYPE_IOMMU_MEMORY_REGION) != NULL;
> }
This is going to be too slow for all the places where fast paths use
address_space_translate. You need a (slightly hackish) bool iommu flag
in MemoryRegion, and a regular C cast rather than the type-safe
IOMMU_MEMORY_REGION(mr) in address_space_translate.
You can set the flag in iommu_memory_region_instance_init for example.
Paolo
next prev parent reply other threads:[~2017-03-30 13:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 12:47 [Qemu-devel] [RFC PATCH qemu 0/5] vfio-pci, spapr: Allow in-kernel acceleration Alexey Kardashevskiy
2017-03-30 12:47 ` [Qemu-devel] [RFC PATCH qemu 1/5] memory/iommu: QOM'fy IOMMU MemoryRegion Alexey Kardashevskiy
2017-03-30 13:00 ` Paolo Bonzini [this message]
2017-03-30 12:47 ` [Qemu-devel] [RFC PATCH qemu 2/5] spapr-iommu: Subclass TYPE_IOMMU_MEMORY_REGION Alexey Kardashevskiy
2017-03-30 13:00 ` Paolo Bonzini
2017-03-31 11:47 ` Alexey Kardashevskiy
2017-03-31 12:03 ` Paolo Bonzini
2017-03-30 12:47 ` [Qemu-devel] [RFC PATCH qemu 3/5] vfio-pci: Reorder group-to-container attaching Alexey Kardashevskiy
2017-03-30 12:47 ` [Qemu-devel] [RFC PATCH qemu 4/5] vfio/spapr: Add a notifier for PPC64 HV/PR KVM about new group attached to LIOBN Alexey Kardashevskiy
2017-03-30 12:47 ` [Qemu-devel] [RFC PATCH qemu 5/5] spapr/iommu: Enable in-kernel TCE acceleration via VFIO KVM device Alexey Kardashevskiy
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=183be420-3192-56b7-eb76-29a2830c7244@redhat.com \
--to=pbonzini@redhat.com \
--cc=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).