diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2021-03-03 16:55:15 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2021-03-03 16:55:15 +0000 |
| commit | c40ae5a3ee387b13116948cbfe7824f03311db7e (patch) | |
| tree | 2875222df3e41a2a1cf0811801e87317be943ac9 /hw/virtio/vhost.c | |
| parent | 07dbfdd290cea5d75d3e21948dc54fdb6f5174ac (diff) | |
| parent | 1d8d014e936a49795de95a35a2a1ab8000ab2e5b (diff) | |
| download | focaccia-qemu-c40ae5a3ee387b13116948cbfe7824f03311db7e.tar.gz focaccia-qemu-c40ae5a3ee387b13116948cbfe7824f03311db7e.zip | |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc,virtio,pci: bug fixes Fixes all over the place. Specifically this fixes a bug which made windows guests lose device config (such as the configured fixed IP) after upgrading to the new QEMU. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Tue 02 Mar 2021 14:19:51 GMT # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: vhost: simplify vhost_dev_init() fail_busyloop label hw/pci: Have safer pcie_bus_realize() by checking error path virtio-net: handle zero mac for a vdpa peer i386/acpi: restore device paths for pre-5.1 vms Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/virtio/vhost.c')
| -rw-r--r-- | hw/virtio/vhost.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 6e17d631f7..2a01662b08 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1388,18 +1388,16 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque, error_report("vhost backend memory slots limit is less" " than current number of present memory slots"); r = -1; - if (busyloop_timeout) { - goto fail_busyloop; - } else { - goto fail; - } + goto fail_busyloop; } return 0; fail_busyloop: - while (--i >= 0) { - vhost_virtqueue_set_busyloop_timeout(hdev, hdev->vq_index + i, 0); + if (busyloop_timeout) { + while (--i >= 0) { + vhost_virtqueue_set_busyloop_timeout(hdev, hdev->vq_index + i, 0); + } } fail: hdev->nvqs = n_initialized_vqs; |