vhost: support ASID in IOTLB API
This patches allows userspace to send ASID based IOTLB message to vhost. This idea is to use the reserved u32 field in the existing V2 IOTLB message. Vhost device should advertise this capability via VHOST_BACKEND_F_IOTLB_ASID backend feature. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Gautam Dawar <gdawar@xilinx.com> Message-Id: <20220330180436.24644-10-gdawar@xilinx.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
1cb108994c
commit
91233ad711
4 changed files with 29 additions and 9 deletions
|
|
@ -87,7 +87,7 @@ struct vhost_msg {
|
|||
|
||||
struct vhost_msg_v2 {
|
||||
__u32 type;
|
||||
__u32 reserved;
|
||||
__u32 asid;
|
||||
union {
|
||||
struct vhost_iotlb_msg iotlb;
|
||||
__u8 padding[64];
|
||||
|
|
@ -157,5 +157,9 @@ struct vhost_vdpa_iova_range {
|
|||
#define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
|
||||
/* IOTLB can accept batching hints */
|
||||
#define VHOST_BACKEND_F_IOTLB_BATCH 0x2
|
||||
/* IOTLB can accept address space identifier through V2 type of IOTLB
|
||||
* message
|
||||
*/
|
||||
#define VHOST_BACKEND_F_IOTLB_ASID 0x3
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue