1/* 2 * vhost-vdpa.h 3 * 4 * Copyright(c) 2017-2018 Intel Corporation. 5 * Copyright(c) 2020 Red Hat, Inc. 6 * 7 * This work is licensed under the terms of the GNU GPL, version 2 or later. 8 * See the COPYING file in the top-level directory. 9 * 10 */ 11 12#ifndef HW_VIRTIO_VHOST_VDPA_H 13#define HW_VIRTIO_VHOST_VDPA_H 14 15#include "hw/virtio/virtio.h" 16#include "standard-headers/linux/vhost_types.h" 17 18typedef struct VhostVDPAHostNotifier { 19 MemoryRegion mr; 20 void *addr; 21} VhostVDPAHostNotifier; 22 23typedef struct vhost_vdpa { 24 int device_fd; 25 int index; 26 uint32_t msg_type; 27 bool iotlb_batch_begin_sent; 28 MemoryListener listener; 29 struct vhost_vdpa_iova_range iova_range; 30 struct vhost_dev *dev; 31 VhostVDPAHostNotifier notifier[VIRTIO_QUEUE_MAX]; 32} VhostVDPA; 33 34#endif 35