mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
vhost: add method vhost_set_vring_err
Kernel and user vhost may report virtqueue errors via eventfd. This is only reliable way to get notification about protocol error. Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Message-Id: <20220623161325.18813-2-vsementsov@yandex-team.ru> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Roman Kagan <rvkagan@yandex-team.ru>
This commit is contained in:
parent
71e3d00482
commit
60dc3c5be9
3 changed files with 16 additions and 0 deletions
|
@ -1313,6 +1313,11 @@ static int vhost_user_set_vring_call(struct vhost_dev *dev,
|
|||
return vhost_set_vring_file(dev, VHOST_USER_SET_VRING_CALL, file);
|
||||
}
|
||||
|
||||
static int vhost_user_set_vring_err(struct vhost_dev *dev,
|
||||
struct vhost_vring_file *file)
|
||||
{
|
||||
return vhost_set_vring_file(dev, VHOST_USER_SET_VRING_ERR, file);
|
||||
}
|
||||
|
||||
static int vhost_user_get_u64(struct vhost_dev *dev, int request, uint64_t *u64)
|
||||
{
|
||||
|
@ -2616,6 +2621,7 @@ const VhostOps user_ops = {
|
|||
.vhost_get_vring_base = vhost_user_get_vring_base,
|
||||
.vhost_set_vring_kick = vhost_user_set_vring_kick,
|
||||
.vhost_set_vring_call = vhost_user_set_vring_call,
|
||||
.vhost_set_vring_err = vhost_user_set_vring_err,
|
||||
.vhost_set_features = vhost_user_set_features,
|
||||
.vhost_get_features = vhost_user_get_features,
|
||||
.vhost_set_owner = vhost_user_set_owner,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue