Skip to content
Commit 4c3b54af authored by Jiri Pirko's avatar Jiri Pirko Committed by Michael S. Tsirkin
Browse files

virtio_pci_modern: use completion instead of busy loop to wait on admin cmd result



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>
parent 7090f2b5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment