mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
trace: add virtio_set_status() trace event
The virtio device lifecycle can be observed by looking at the sequence of set status operations. This is especially important for catching the reset operation (status value 0), which resets the device and all virtqueues. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
689d7e2fad
commit
4e1837f855
3 changed files with 12 additions and 8 deletions
|
@ -135,14 +135,6 @@ struct VirtIODevice
|
|||
VMChangeStateEntry *vmstate;
|
||||
};
|
||||
|
||||
static inline void virtio_set_status(VirtIODevice *vdev, uint8_t val)
|
||||
{
|
||||
if (vdev->set_status) {
|
||||
vdev->set_status(vdev, val);
|
||||
}
|
||||
vdev->status = val;
|
||||
}
|
||||
|
||||
VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size,
|
||||
void (*handle_output)(VirtIODevice *,
|
||||
VirtQueue *));
|
||||
|
@ -190,6 +182,7 @@ int virtio_queue_get_num(VirtIODevice *vdev, int n);
|
|||
void virtio_queue_notify(VirtIODevice *vdev, int n);
|
||||
uint16_t virtio_queue_vector(VirtIODevice *vdev, int n);
|
||||
void virtio_queue_set_vector(VirtIODevice *vdev, int n, uint16_t vector);
|
||||
void virtio_set_status(VirtIODevice *vdev, uint8_t val);
|
||||
void virtio_reset(void *opaque);
|
||||
void virtio_update_irq(VirtIODevice *vdev);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue