diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-07-11 13:47:28 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-07-11 13:47:28 +0100 |
commit | 29741be341d50e4311e42ca3199f9b0bcfd4f5d2 (patch) | |
tree | b2ee1051648337a875b31b875ea38b81d38a942c /hw/vfio/common.c | |
parent | b5ed2e11ef39a308dcbef46f66774557b4a41fce (diff) | |
parent | 47985727e383eee191a39cc007541c17cd8680ee (diff) |
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-updates-20170710.0' into staging
VFIO fixes 2017-07-10
- Don't iterate over non-realized devices (Alex Williamson)
- Add PCIe capability version fixup (Alex Williamson)
# gpg: Signature made Mon 10 Jul 2017 20:06:11 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-20170710.0:
vfio/pci: Fixup v0 PCIe capabilities
vfio: Test realized when using VFIOGroup.device_list iterator
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/vfio/common.c')
-rw-r--r-- | hw/vfio/common.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c index b9abe77f5a..29923e4990 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -858,13 +858,15 @@ void vfio_reset_handler(void *opaque) QLIST_FOREACH(group, &vfio_group_list, next) { QLIST_FOREACH(vbasedev, &group->device_list, next) { - vbasedev->ops->vfio_compute_needs_reset(vbasedev); + if (vbasedev->dev->realized) { + vbasedev->ops->vfio_compute_needs_reset(vbasedev); + } } } QLIST_FOREACH(group, &vfio_group_list, next) { QLIST_FOREACH(vbasedev, &group->device_list, next) { - if (vbasedev->needs_reset) { + if (vbasedev->dev->realized && vbasedev->needs_reset) { vbasedev->ops->vfio_hot_reset_multi(vbasedev); } } |