mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-updates-20170717.0' into staging
VFIO fixes 2017-07-17 - Init re-order to better support hot-add on SPAR (Alexey Kardashevskiy) # gpg: Signature made Mon 17 Jul 2017 21:33:01 BST # gpg: using RSA key 0x239B9B6E3BB08B22 # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" # gpg: aka "Alex Williamson <alex@shazbot.org>" # gpg: aka "Alex Williamson <alwillia@redhat.com>" # gpg: aka "Alex Williamson <alex.l.williamson@gmail.com>" # Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B 8A90 239B 9B6E 3BB0 8B22 * remotes/awilliam/tags/vfio-updates-20170717.0: vfio-pci, ppc64/spapr: Reorder group-to-container attaching Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
+11
-8
@@ -1109,6 +1109,14 @@ static int vfio_connect_container(VFIOGroup *group, AddressSpace *as,
|
||||
goto free_container_exit;
|
||||
}
|
||||
|
||||
vfio_kvm_device_add_group(group);
|
||||
|
||||
QLIST_INIT(&container->group_list);
|
||||
QLIST_INSERT_HEAD(&space->containers, container, next);
|
||||
|
||||
group->container = container;
|
||||
QLIST_INSERT_HEAD(&container->group_list, group, container_next);
|
||||
|
||||
container->listener = vfio_memory_listener;
|
||||
|
||||
memory_listener_register(&container->listener, container->space->as);
|
||||
@@ -1122,14 +1130,11 @@ static int vfio_connect_container(VFIOGroup *group, AddressSpace *as,
|
||||
|
||||
container->initialized = true;
|
||||
|
||||
QLIST_INIT(&container->group_list);
|
||||
QLIST_INSERT_HEAD(&space->containers, container, next);
|
||||
|
||||
group->container = container;
|
||||
QLIST_INSERT_HEAD(&container->group_list, group, container_next);
|
||||
|
||||
return 0;
|
||||
listener_release_exit:
|
||||
QLIST_REMOVE(group, container_next);
|
||||
QLIST_REMOVE(container, next);
|
||||
vfio_kvm_device_del_group(group);
|
||||
vfio_listener_release(container);
|
||||
|
||||
free_container_exit:
|
||||
@@ -1234,8 +1239,6 @@ VFIOGroup *vfio_get_group(int groupid, AddressSpace *as, Error **errp)
|
||||
|
||||
QLIST_INSERT_HEAD(&vfio_group_list, group, next);
|
||||
|
||||
vfio_kvm_device_add_group(group);
|
||||
|
||||
return group;
|
||||
|
||||
close_fd_exit:
|
||||
|
||||
Reference in New Issue
Block a user