mirror of
https://github.com/qemu/qemu.git
synced 2024-12-14 15:03:33 +08:00
ee071f67f7
The guest can disable or never enable Device-TLB. In these cases, it can't be used even if enabled in QEMU. So, check Device-TLB state before registering IOMMU notifier and select unmap flag depending on that. Also, implement a way to change IOMMU notifier flag if Device-TLB state is changed. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2001312 Signed-off-by: Viktor Prutyanov <viktor@daynix.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20230626091258.24453-2-viktor@daynix.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
22 lines
345 B
C
22 lines
345 B
C
#include "qemu/osdep.h"
|
|
#include "hw/virtio/vhost.h"
|
|
#include "hw/virtio/vhost-user.h"
|
|
|
|
bool vhost_has_free_slot(void)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
bool vhost_user_init(VhostUserState *user, CharBackend *chr, Error **errp)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void vhost_user_cleanup(VhostUserState *user)
|
|
{
|
|
}
|
|
|
|
void vhost_toggle_device_iotlb(VirtIODevice *vdev)
|
|
{
|
|
}
|