mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
virtio: make virtio device's structures public.
These structures must be made public to avoid two memory allocations for refactored virtio devices. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 1363624648-16906-2-git-send-email-fred.konrad@greensocs.com Changes V4 <- V3: * Rebased on current git. Changes V3 <- V2: * Style correction spotted by Andreas (virtio-scsi.h). * Style correction for virtio-net.h. Changes V2 <- V1: * Move the dataplane include into the header (virtio-blk). Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
e531761d63
commit
f1b24e840f
12 changed files with 159 additions and 160 deletions
|
@ -16,25 +16,6 @@
|
|||
#include "hw/virtio-rng.h"
|
||||
#include "qemu/rng.h"
|
||||
|
||||
typedef struct VirtIORNG {
|
||||
VirtIODevice vdev;
|
||||
|
||||
DeviceState *qdev;
|
||||
|
||||
/* Only one vq - guest puts buffer(s) on it when it needs entropy */
|
||||
VirtQueue *vq;
|
||||
|
||||
VirtIORNGConf *conf;
|
||||
|
||||
RngBackend *rng;
|
||||
|
||||
/* We purposefully don't migrate this state. The quota will reset on the
|
||||
* destination as a result. Rate limiting is host state, not guest state.
|
||||
*/
|
||||
QEMUTimer *rate_limit_timer;
|
||||
int64_t quota_remaining;
|
||||
} VirtIORNG;
|
||||
|
||||
static bool is_guest_ready(VirtIORNG *vrng)
|
||||
{
|
||||
if (virtio_queue_ready(vrng->vq)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue