aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/vhost-user-rng.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2022-11-22 09:59:26 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2022-11-22 09:59:27 -0500
commitccb8d593e0cd9c04c77f962a23fc7b6929c7573e (patch)
tree637b3fd6b6c270c63065dc5ab22a35cd04cfdd5c /hw/virtio/vhost-user-rng.c
parentd3e9c79acc079a657e8afcbbdb9e139b98073fb1 (diff)
parentb7c61789e653086618d1825858a97b3d9891e822 (diff)
Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging
pc,virtio: regression, test fixes fixes regressions: virtio error message triggered by seabios failure in vhost due to VIRTIO_F_RING_RESET broken keyboard under seabios some biosbits test fixes there's still a known regression with migration and vsock, not fixed yet. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # -----BEGIN PGP SIGNATURE----- # # iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmN8os4PHG1zdEByZWRo # YXQuY29tAAoJECgfDbjSjVRpw+UH/2JOoxqzkkq4QyV5PzmjsiyyMbrBqFSOTro2 # 98k9MwxNWHIk6fi3FVIz+LX1EdwDbMl44IHQ88xo7k39V7ThvVvLfjaQySSeoCfE # 04++AvkOQ/O8W7sob17r2iPWIHKPIndq8uB652T89o1I/nhmFMsUkdRWmVQ3XsDk # DnPZxjBQnKY0oSvBd7SmSI3C+eA4lF1tht50ZxmOshLx4OSjK/maFVpIyLsUGTMn # 6OMxKffDjfvw5z94+pGN1RQm9xu7OwtFZyUnH16xoQUmWSXjzcYXUZ3buTY+eAyJ # I5j9ox27Cqn1wGcypUiTCKLIExEMBfvNY4ovyRa1xvW+MXluVyE= # =bF2U # -----END PGP SIGNATURE----- # gpg: Signature made Tue 22 Nov 2022 05:22:06 EST # 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 * tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: virtio: disable error for out of spec queue-enable acpi/tests/avocado/bits: keep the work directory when BITS_DEBUG is set in env tests/avocado: configure acpi-bits to use avocado timeout MAINTAINERS: add mst to list of biosbits maintainers tests: acpi: x86: update expected DSDT after moving PRQx fields in _SB scope acpi: x86: move RPQx field back to _SB scope tests: acpi: whitelist DSDT before moving PRQx to _SB scope vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/virtio/vhost-user-rng.c')
-rw-r--r--hw/virtio/vhost-user-rng.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/virtio/vhost-user-rng.c b/hw/virtio/vhost-user-rng.c
index 8b47287875..f9084cde58 100644
--- a/hw/virtio/vhost-user-rng.c
+++ b/hw/virtio/vhost-user-rng.c
@@ -16,6 +16,11 @@
#include "qemu/error-report.h"
#include "standard-headers/linux/virtio_ids.h"
+static const int feature_bits[] = {
+ VIRTIO_F_RING_RESET,
+ VHOST_INVALID_FEATURE_BIT
+};
+
static void vu_rng_start(VirtIODevice *vdev)
{
VHostUserRNG *rng = VHOST_USER_RNG(vdev);
@@ -106,8 +111,10 @@ static void vu_rng_set_status(VirtIODevice *vdev, uint8_t status)
static uint64_t vu_rng_get_features(VirtIODevice *vdev,
uint64_t requested_features, Error **errp)
{
- /* No feature bits used yet */
- return requested_features;
+ VHostUserRNG *rng = VHOST_USER_RNG(vdev);
+
+ return vhost_get_features(&rng->vhost_dev, feature_bits,
+ requested_features);
}
static void vu_rng_handle_output(VirtIODevice *vdev, VirtQueue *vq)