* [Qemu-devel] [PATCH] vfio/spapr: Remove stale ioctl() call
@ 2016-07-12 5:26 David Gibson
2016-07-12 6:07 ` Alexey Kardashevskiy
0 siblings, 1 reply; 2+ messages in thread
From: David Gibson @ 2016-07-12 5:26 UTC (permalink / raw)
To: aik, pbonzini; +Cc: agraf, alex.williamson, qemu-ppc, qemu-devel, David Gibson
This ioctl() call to VFIO_IOMMU_SPAPR_TCE_REMOVE was left over from an
earlier version of the code and has since been folded into
vfio_spapr_remove_window().
It wasn't caught because although the argument structure has been removed,
the libc function remove() means this didn't trigger a compile failure.
The ioctl() was also almost certain to fail silently and harmlessly with
the bogus argument, so this wasn't caught in testing.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
hw/vfio/spapr.c | 1 -
1 file changed, 1 deletion(-)
Alexey, I've already put this tentatively into ppc-for-2.7, but I'd
appreciate an ack before I send my next pull request.
diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c
index 0af3423..7443d34 100644
--- a/hw/vfio/spapr.c
+++ b/hw/vfio/spapr.c
@@ -177,7 +177,6 @@ int vfio_spapr_create_window(VFIOContainer *container,
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);
return -EINVAL;
}
trace_vfio_spapr_create_window(create.page_shift,
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] vfio/spapr: Remove stale ioctl() call
2016-07-12 5:26 [Qemu-devel] [PATCH] vfio/spapr: Remove stale ioctl() call David Gibson
@ 2016-07-12 6:07 ` Alexey Kardashevskiy
0 siblings, 0 replies; 2+ messages in thread
From: Alexey Kardashevskiy @ 2016-07-12 6:07 UTC (permalink / raw)
To: David Gibson, pbonzini; +Cc: agraf, alex.williamson, qemu-ppc, qemu-devel
On 12/07/16 15:26, David Gibson wrote:
> This ioctl() call to VFIO_IOMMU_SPAPR_TCE_REMOVE was left over from an
> earlier version of the code and has since been folded into
> vfio_spapr_remove_window().
>
> It wasn't caught because although the argument structure has been removed,
> the libc function remove() means this didn't trigger a compile failure.
> The ioctl() was also almost certain to fail silently and harmlessly with
> the bogus argument, so this wasn't caught in testing.
>
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> hw/vfio/spapr.c | 1 -
> 1 file changed, 1 deletion(-)
>
> Alexey, I've already put this tentatively into ppc-for-2.7, but I'd
> appreciate an ack before I send my next pull request.
>
> diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c
> index 0af3423..7443d34 100644
> --- a/hw/vfio/spapr.c
> +++ b/hw/vfio/spapr.c
> @@ -177,7 +177,6 @@ int vfio_spapr_create_window(VFIOContainer *container,
> 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);
> return -EINVAL;
> }
> trace_vfio_spapr_create_window(create.page_shift,
>
--
Alexey
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-12 6:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-12 5:26 [Qemu-devel] [PATCH] vfio/spapr: Remove stale ioctl() call David Gibson
2016-07-12 6:07 ` Alexey Kardashevskiy
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).