qemu-e2k/hw/virtio
Alexander Duyck 20a4da0f23 virtio-balloon: Prevent guest from starting a report when we didn't request one
Based on code review it appears possible for the driver to force the device
out of a stopped state when hinting by repeating the last ID it was
provided.

Prevent this by only allowing a transition to the start state when we are
in the requested state. This way the driver is only allowed to send one
descriptor that will transition the device into the start state. All others
will leave it in the stop state once it has finished.

Fixes: c13c4153f7 ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT")
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Message-Id: <20200720175115.21935.99563.stgit@localhost.localdomain>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2020-07-22 07:57:07 -04:00
..
Kconfig virtio-mem: Paravirtualized memory hot(un)plug 2020-07-03 07:57:04 -04:00
Makefile.objs vhost-vdpa: introduce vhost-vdpa backend 2020-07-07 07:59:51 -04:00
trace-events virtio,acpi: features, fixes, cleanups. 2020-07-07 17:37:44 +01:00
vhost-backend.c vhost-vdpa: introduce vhost-vdpa backend 2020-07-07 07:59:51 -04:00
vhost-scsi-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-stub.c vhost-user: simplify vhost_user_init/vhost_user_cleanup 2019-03-12 21:22:31 -04:00
vhost-user-blk-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-user-fs-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-user-fs.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
vhost-user-input-pci.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
vhost-user-scsi-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-user-vsock-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-user-vsock.c virtio: add vhost-user-vsock base device 2020-06-12 10:17:06 -04:00
vhost-user.c Stop vhost-user sending uninitialized mmap_offsets 2020-06-24 17:18:28 -04:00
vhost-vdpa.c vhost-vdpa: fix the compile issue without kvm 2020-07-08 06:16:48 -04:00
vhost-vsock-common.c vhost-vsock: add vhost-vsock-common abstraction 2020-06-12 10:17:06 -04:00
vhost-vsock-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-vsock.c vhost-vsock: add vhost-vsock-common abstraction 2020-06-12 10:17:06 -04:00
vhost.c vhost: implement vhost_force_iommu method 2020-07-03 07:57:04 -04:00
virtio-9p-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-balloon-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-balloon.c virtio-balloon: Prevent guest from starting a report when we didn't request one 2020-07-22 07:57:07 -04:00
virtio-blk-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-bus.c virtio: notify virtqueue via host notifier when available 2019-11-06 06:35:00 -05:00
virtio-crypto-pci.c virtio: Drop broken and superfluous object_property_set_link() 2020-07-22 07:57:07 -04:00
virtio-crypto.c qom: Change object_get_canonical_path_component() not to malloc 2020-07-21 16:23:43 +02:00
virtio-input-host-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-input-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-iommu-pci.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
virtio-iommu.c virtio-iommu: Fix coverity issue in virtio_iommu_handle_command() 2020-07-13 14:36:08 +01:00
virtio-mem-pci.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
virtio-mem-pci.h virtio-pci: Send qapi events when the virtio-mem size changes 2020-07-03 07:57:04 -04:00
virtio-mem.c qom: Change object_get_canonical_path_component() not to malloc 2020-07-21 16:23:43 +02:00
virtio-mmio.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
virtio-net-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-pci.c virtio-pci: implement queue_enabled method 2020-07-03 07:57:04 -04:00
virtio-pci.h virtio-pci: Add Function Level Reset support 2019-09-04 06:33:10 -04:00
virtio-pmem-pci.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
virtio-pmem-pci.h virtio-pci: Proxy for virtio-pmem 2019-07-04 17:00:32 -04:00
virtio-pmem.c qom: Change object_get_canonical_path_component() not to malloc 2020-07-21 16:23:43 +02:00
virtio-rng-pci.c virtio: Drop broken and superfluous object_property_set_link() 2020-07-22 07:57:07 -04:00
virtio-rng.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
virtio-scsi-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-serial-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio.c virtio-bus: introduce queue_enabled method 2020-07-03 07:57:04 -04:00