* [Qemu-devel] [PULL for-2.11 0/1] VFIO: Fix vfio-kvm device group registration
@ 2017-12-06 17:02 Alex Williamson
2017-12-06 17:03 ` [Qemu-devel] [PULL for-2.11 1/1] vfio: Fix vfio-kvm " Alex Williamson
2017-12-06 19:07 ` [Qemu-devel] [PULL for-2.11 0/1] VFIO: Fix vfio-kvm device " Peter Maydell
0 siblings, 2 replies; 3+ messages in thread
From: Alex Williamson @ 2017-12-06 17:02 UTC (permalink / raw)
To: qemu-devel
The following changes since commit 2babfe0c9241c239272a03fec785165a50e8288c:
Update version for v2.11.0-rc4 release (2017-12-05 16:36:46 +0000)
are available in the git repository at:
git://github.com/awilliam/qemu-vfio.git tags/vfio-fixes-20171206.0
for you to fetch changes up to 13e6ae741cc0848a1819f435e2251d6d0bfae3e1:
vfio: Fix vfio-kvm group registration (2017-12-05 13:22:45 -0700)
----------------------------------------------------------------
VFIO fix for v2.11-final
- Fix bug failing to register all but the first group attached to
a container with kvm-vfio device (Alex Williamson)
----------------------------------------------------------------
Alex Williamson (1):
vfio: Fix vfio-kvm group registration
hw/vfio/common.c | 1 +
1 file changed, 1 insertion(+)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PULL for-2.11 1/1] vfio: Fix vfio-kvm group registration
2017-12-06 17:02 [Qemu-devel] [PULL for-2.11 0/1] VFIO: Fix vfio-kvm device group registration Alex Williamson
@ 2017-12-06 17:03 ` Alex Williamson
2017-12-06 19:07 ` [Qemu-devel] [PULL for-2.11 0/1] VFIO: Fix vfio-kvm device " Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Alex Williamson @ 2017-12-06 17:03 UTC (permalink / raw)
To: qemu-devel
Commit 8c37faa475f3 ("vfio-pci, ppc64/spapr: Reorder group-to-container
attaching") moved registration of groups with the vfio-kvm device from
vfio_get_group() to vfio_connect_container(), but it missed the case
where a group is attached to an existing container and takes an early
exit. Perhaps this is a less common case on ppc64/spapr, but on x86
(without viommu) all groups are connected to the same container and
thus only the first group gets registered with the vfio-kvm device.
This becomes a problem if we then hot-unplug the devices associated
with that first group and we end up with KVM being misinformed about
any vfio connections that might remain. Fix by including the call to
vfio_kvm_device_add_group() in this early exit path.
Fixes: 8c37faa475f3 ("vfio-pci, ppc64/spapr: Reorder group-to-container attaching")
Cc: qemu-stable@nongnu.org # qemu-2.10+
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Peter Xu <peterx@redhat.com>
Tested-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
hw/vfio/common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 7b2924c0ef19..7007878e345e 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -968,6 +968,7 @@ static int vfio_connect_container(VFIOGroup *group, AddressSpace *as,
if (!ioctl(group->fd, VFIO_GROUP_SET_CONTAINER, &container->fd)) {
group->container = container;
QLIST_INSERT_HEAD(&container->group_list, group, container_next);
+ vfio_kvm_device_add_group(group);
return 0;
}
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PULL for-2.11 0/1] VFIO: Fix vfio-kvm device group registration
2017-12-06 17:02 [Qemu-devel] [PULL for-2.11 0/1] VFIO: Fix vfio-kvm device group registration Alex Williamson
2017-12-06 17:03 ` [Qemu-devel] [PULL for-2.11 1/1] vfio: Fix vfio-kvm " Alex Williamson
@ 2017-12-06 19:07 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2017-12-06 19:07 UTC (permalink / raw)
To: Alex Williamson; +Cc: QEMU Developers
On 6 December 2017 at 17:02, Alex Williamson <alex.williamson@redhat.com> wrote:
> The following changes since commit 2babfe0c9241c239272a03fec785165a50e8288c:
>
> Update version for v2.11.0-rc4 release (2017-12-05 16:36:46 +0000)
>
> are available in the git repository at:
>
> git://github.com/awilliam/qemu-vfio.git tags/vfio-fixes-20171206.0
>
> for you to fetch changes up to 13e6ae741cc0848a1819f435e2251d6d0bfae3e1:
>
> vfio: Fix vfio-kvm group registration (2017-12-05 13:22:45 -0700)
>
> ----------------------------------------------------------------
> VFIO fix for v2.11-final
>
> - Fix bug failing to register all but the first group attached to
> a container with kvm-vfio device (Alex Williamson)
>
> ----------------------------------------------------------------
I'm afraid this has missed the boat for 2.11, since we've
already cut what we think should be the final rc. It would
have to be a really critical regression since 2.10...
thanks
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-06 19:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 17:02 [Qemu-devel] [PULL for-2.11 0/1] VFIO: Fix vfio-kvm device group registration Alex Williamson
2017-12-06 17:03 ` [Qemu-devel] [PULL for-2.11 1/1] vfio: Fix vfio-kvm " Alex Williamson
2017-12-06 19:07 ` [Qemu-devel] [PULL for-2.11 0/1] VFIO: Fix vfio-kvm device " Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.