On Thu, Jun 08, 2017 at 05:30:57PM +0200, Paolo Bonzini wrote:
1;4602;0c>
>
> On 08/06/2017 16:58, David Gibson wrote:
> > So, doing that via the standard macro wrappers would be slow, because
> > it does type verification. However, looking up the class function is
> > fundamentally:
> >
> >
On 08/06/2017 16:58, David Gibson wrote:
> So, doing that via the standard macro wrappers would be slow, because
> it does type verification. However, looking up the class function is
> fundamentally:
>
> ((IOMMUMemoryRegionClass *)(((Object *)mr)->class))->translate
>
> i.e. two pointer
On Thu, Jun 08, 2017 at 03:59:27PM +0200, Paolo Bonzini wrote:
>
>
> On 08/06/2017 09:42, David Gibson wrote:
> > So.. this seems like an only halfway QOMification. The main init
> > function still takes an ops structure, whereas the QOMish way to do
> > this would be to have the base IOMMUMemor
On Fri, Jun 09, 2017 at 12:28:35AM +1000, Alexey Kardashevskiy wrote:
> On 08/06/17 17:42, David Gibson wrote:
> > On Wed, Jun 07, 2017 at 06:32:43PM +1000, Alexey Kardashevskiy wrote:
> >> This defines new QOM object - IOMMUMemoryRegion - with MemoryRegion
> >> as a parent.
> >>
> >> This moves IO
On 08/06/2017 16:28, Alexey Kardashevskiy wrote:
>>> +void memory_region_init_iommu_type(const char *mrtypename,
>>> + IOMMUMemoryRegion *iommu_mr,
>>> + Object *owner,
>>> + const MemoryRegionIO
On 08/06/17 17:42, David Gibson wrote:
> On Wed, Jun 07, 2017 at 06:32:43PM +1000, Alexey Kardashevskiy wrote:
>> This defines new QOM object - IOMMUMemoryRegion - with MemoryRegion
>> as a parent.
>>
>> This moves IOMMU-related fields from MR to IOMMU MR. However to avoid
>> dymanic QOM casting in
On 08/06/2017 09:42, David Gibson wrote:
> So.. this seems like an only halfway QOMification. The main init
> function still takes an ops structure, whereas the QOMish way to do
> this would be to have the base IOMMUMemoryRegion be an abstract class,
> and have the IOMMUOps pointers as part of t
On Wed, Jun 07, 2017 at 06:32:43PM +1000, Alexey Kardashevskiy wrote:
> This defines new QOM object - IOMMUMemoryRegion - with MemoryRegion
> as a parent.
>
> This moves IOMMU-related fields from MR to IOMMU MR. However to avoid
> dymanic QOM casting in fast path (address_space_translate, etc),
>
This defines new QOM object - IOMMUMemoryRegion - with MemoryRegion
as a parent.
This moves IOMMU-related fields from MR to IOMMU MR. However to avoid
dymanic QOM casting in fast path (address_space_translate, etc),
this adds an @is_iommu boolean flag to MR and provides new helper to
do simple cas