• Jiri Pirko's avatar
    virtio_pci_modern: use completion instead of busy loop to wait on admin cmd result · 4c3b54af
    Jiri Pirko authored
    Currently, the code waits in a busy loop on every admin virtqueue issued
    command to get a reply. That prevents callers from issuing multiple
    commands in parallel.
    
    To overcome this limitation, introduce a virtqueue event callback for
    admin virtqueue. For every issued command, use completion mechanism
    to wait on a reply. In the event callback, trigger the completion
    is done for every incoming reply.
    
    Alongside with that, introduce a spin lock to protect the admin
    virtqueue operations.
    Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
    Message-Id: <20240716113552.80599-13-jiri@resnulli.us>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    4c3b54af
virtio_pci_common.c 20.5 KB