qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 07/14] vfio/spapr: Create DMA window dynamically


From: David Gibson
Subject: Re: [Qemu-devel] [PULL 07/14] vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2)
Date: Tue, 12 Jul 2016 15:26:17 +1000
User-agent: Mutt/1.6.1 (2016-04-27)

On Mon, Jul 11, 2016 at 03:51:44PM +0200, Paolo Bonzini wrote:
> 
> 
> On 05/07/2016 07:31, David Gibson wrote:
> > +    ret = ioctl(container->fd, VFIO_IOMMU_SPAPR_TCE_CREATE, &create);
> > +    if (ret) {
> > +        error_report("Failed to create a window, ret = %d (%m)", ret);
> > +        return -errno;
> > +    }
> > +
> > +    if (create.start_addr != section->offset_within_address_space) {
> > +        vfio_spapr_remove_window(container, create.start_addr);
> > +
> > +        error_report("Host doesn't support DMA window at %"HWADDR_PRIx", 
> > must be %"PRIx64,
> > +                     section->offset_within_address_space,
> > +                     (uint64_t)create.start_addr);
> > +        ioctl(container->fd, VFIO_IOMMU_SPAPR_TCE_REMOVE, &remove);
> 
> Was this ioctl left there by mistake?  It passes the address of the
> remove *function* to VFIO_IOMMU_SPAPR_TCE_REMOVE.

Heh, good catch.  I've posted a fix for this.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]