Skip to content
  • Jason Wang's avatar
    b37556ed
    vhost: switch to use IOTLB v2 format · b37556ed
    Jason Wang authored
    
    
    This patch tries to switch to use new kernel IOTLB format V2. Previous
    version may have inconsistent ABI between 32bit and 64bit machines
    because of the hole after type field. Refer kernel commit
    ("429711aec282 vhost: switch to use new message format") for more
    information.
    
    To enable this feature, qemu need to use a new ioctl
    VHOST_SET_BACKEND_FEATURE with VHOST_BACKEND_F_IOTLB_MSG_V2 bit. A new
    vhost setting backend features ops was introduced. And when we try to
    set features for vhost dev, we will examine the support of new IOTLB
    format and enable it. This process is total transparent to guest,
    which means we can have different IOTLB message type in src and dst
    during migration.
    
    The conversion of IOTLB message is straightforward, just check the
    type and behave accordingly.
    
    Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
    Message-Id: <20200907104903.31551-3-jasowang@redhat.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    b37556ed
    vhost: switch to use IOTLB v2 format
    Jason Wang authored
    
    
    This patch tries to switch to use new kernel IOTLB format V2. Previous
    version may have inconsistent ABI between 32bit and 64bit machines
    because of the hole after type field. Refer kernel commit
    ("429711aec282 vhost: switch to use new message format") for more
    information.
    
    To enable this feature, qemu need to use a new ioctl
    VHOST_SET_BACKEND_FEATURE with VHOST_BACKEND_F_IOTLB_MSG_V2 bit. A new
    vhost setting backend features ops was introduced. And when we try to
    set features for vhost dev, we will examine the support of new IOTLB
    format and enable it. This process is total transparent to guest,
    which means we can have different IOTLB message type in src and dst
    during migration.
    
    The conversion of IOTLB message is straightforward, just check the
    type and behave accordingly.
    
    Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
    Message-Id: <20200907104903.31551-3-jasowang@redhat.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Loading