mirror of https://gitee.com/openkylin/qemu.git
VFIO fixes 2017-07-17
- Init re-order to better support hot-add on SPAR (Alexey Kardashevskiy) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQIcBAABAgAGBQJZbR79AAoJECObm247sIsiIIEQAKPUWHWIpI+SNflxVg82U1Mi SIvfAAXpHTojCLlZlXJMgWtiAXQ9ciMvTXy/NQkrhTMRpna/2iC3Iu0N8xjN61Nk 1Zlf7RlB5QCTuKCY1ven1bX9hQ59Kws9tbd2G2eGUKW/gSAxH1BVrHjPJxjvfIJC gGwEurCeYz15tgXeIR8tftI9SuqqL0h7nLP8NPH90Jam6DgcHGVfn7gFIEuuX8Yj m3erYv5KPw+o+QvQPOQ9GebyZB7CjPqDGxX//TMPtnEfxZmAE5QpwexwQpUrIN0X lxRmcPHeX/2tx2vlqmRJhR4QjUKVrQUJXOqstwZ5UlsNkbeX6EOx6Pkp2TDNajVh iVsEan5+TqtOoquJGhAvy02ub+5tWP9hZB4oJXb9E7eqUoy/SMZFra+3fmQyj17K buCOeEX9cbsF8rZU1Fp+1grEA/IZwTjVDB+XFn1L/JgIsd41obATMwnI5WXxUmB1 DsnB/kGQrX+CX0cmQgOMHXtJex9PnHwh1Gf/tyN6bGZkdZBGaYz0GCV6zqvboVdG Vg7rfNOGpQdAFkw2IPfPn6PX2C8TBQ+wAW0B3eY7zmESkIwCUyJx72g3IJKfTd7v 0DBVIiAaN2YJIlM1f7gvhOypZb2s2nF735ZYmFclEweOlBiF9NIg1sjxYez78iTU B1KDk2SAHwuwet80kl1t =Mu8i -----END PGP SIGNATURE----- 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:
commit
9d836fc552
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue