|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-block] [Qemu-devel] [PATCH v6 16/29] libqos: Use explicit QTestState for virtio operations |
Date: | Tue, 5 Sep 2017 14:43:41 +0200 |
> typedef struct QVirtioDevice {Adding QTestState to QVRingIndirectDesc and QVirtQueue sounds somewhat
> const QVirtioBus *bus;
> + QTestState *qts;
> /* Device type */
> uint16_t device_type;
> } QVirtioDevice;
> @@ -35,12 +36,14 @@ typedef struct QVirtQueue {
> uint16_t last_used_idx;
> bool indirect;
> bool event;
> + QTestState *qts;
> } QVirtQueue;
>
> typedef struct QVRingIndirectDesc {
> uint64_t desc; /* This points to an array fo struct vring_desc */
> uint16_t index;
> uint16_t elem;
> + QTestState *qts;
> } QVRingIndirectDesc;
ugly to me. I think they should either rather have a pointer to the
associated QVirtioDevice, or the functions where this is needed
(qvring_init() for example) should get a "QTestState *" parameter instead.
Just my 0.02 €.
Thomas
[Prev in Thread] | Current Thread | [Next in Thread] |