mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
hw/virtio: derive vhost-user-rng from vhost-user-base
Now we can take advantage of our new base class and make vhost-user-rng a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240104210945.1223134-4-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
64a312a273
commit
233412bf7a
3 changed files with 31 additions and 285 deletions
|
@ -12,22 +12,13 @@
|
|||
#include "hw/virtio/virtio.h"
|
||||
#include "hw/virtio/vhost.h"
|
||||
#include "hw/virtio/vhost-user.h"
|
||||
#include "chardev/char-fe.h"
|
||||
#include "hw/virtio/vhost-user-base.h"
|
||||
|
||||
#define TYPE_VHOST_USER_RNG "vhost-user-rng"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(VHostUserRNG, VHOST_USER_RNG)
|
||||
|
||||
struct VHostUserRNG {
|
||||
/*< private >*/
|
||||
VirtIODevice parent;
|
||||
CharBackend chardev;
|
||||
struct vhost_virtqueue *vhost_vq;
|
||||
struct vhost_dev vhost_dev;
|
||||
VhostUserState vhost_user;
|
||||
VirtQueue *req_vq;
|
||||
bool connected;
|
||||
|
||||
/*< public >*/
|
||||
VHostUserBase parent_obj;
|
||||
};
|
||||
|
||||
#endif /* QEMU_VHOST_USER_RNG_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue