Skip to content
  • Laurent Vivier's avatar
    a5ebce38
    qmp: add QMP command x-query-virtio · a5ebce38
    Laurent Vivier authored
    
    
    This new command lists all the instances of VirtIODevices with
    their canonical QOM path and name.
    
    [Jonah: @virtio_list duplicates information that already exists in
     the QOM composition tree. However, extracting necessary information
     from this tree seems to be a bit convoluted.
    
     Instead, we still create our own list of realized virtio devices
     but use @qmp_qom_get with the device's canonical QOM path to confirm
     that the device exists and is realized. If the device exists but
     is actually not realized, then we remove it from our list (for
     synchronicity to the QOM composition tree).
    
     Also, the QMP command @x-query-virtio is redundant as @qom-list
     and @qom-get are sufficient to search '/machine/' for realized
     virtio devices. However, @x-query-virtio is much more convenient
     in listing realized virtio devices.]
    
    Signed-off-by: default avatarLaurent Vivier <lvivier@redhat.com>
    Signed-off-by: default avatarJonah Palmer <jonah.palmer@oracle.com>
    Message-Id: <1660220684-24909-2-git-send-email-jonah.palmer@oracle.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    a5ebce38
    qmp: add QMP command x-query-virtio
    Laurent Vivier authored
    
    
    This new command lists all the instances of VirtIODevices with
    their canonical QOM path and name.
    
    [Jonah: @virtio_list duplicates information that already exists in
     the QOM composition tree. However, extracting necessary information
     from this tree seems to be a bit convoluted.
    
     Instead, we still create our own list of realized virtio devices
     but use @qmp_qom_get with the device's canonical QOM path to confirm
     that the device exists and is realized. If the device exists but
     is actually not realized, then we remove it from our list (for
     synchronicity to the QOM composition tree).
    
     Also, the QMP command @x-query-virtio is redundant as @qom-list
     and @qom-get are sufficient to search '/machine/' for realized
     virtio devices. However, @x-query-virtio is much more convenient
     in listing realized virtio devices.]
    
    Signed-off-by: default avatarLaurent Vivier <lvivier@redhat.com>
    Signed-off-by: default avatarJonah Palmer <jonah.palmer@oracle.com>
    Message-Id: <1660220684-24909-2-git-send-email-jonah.palmer@oracle.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Loading