Hi, The "devices" means there are multiple vhost_dev. After further research, I found the problem only happens in status. Vhot-vdpa layer set status ACKNOWLEDGE, DRIVER, and FEATURES_OK only once by checking vhost_vdpa_first_dev(). However, it set status DRIVER_OK only once by checking if the device is the last, whose code is dev->vq_index + dev->nvqs != dev->vq_index_end in vhost_vdpa_dev_start(). I think these are the causes of the problem. Thank you!
On Mon, Apr 24, 2023 at 3:04 PM Eugenio Perez Martin <epere...@redhat.com> wrote: > > On Sat, Apr 22, 2023 at 8:39 AM Shao-Chien Chiang <ray90...@gmail.com> wrote: > > > > Hi, > > > > I found a problem about cache. > > > > If there are several devices operating the same backend device, the > > cache might be inconsistent. > > > > Hi Shao-Chien, > > What do you mean by "several devices operating the same backend > device". The guest only sees "one virtio device per vhost-vdpa backend > device". > > Thanks! > > > I think we could handle this by checking if a device is the first > > device, but I'm not sure it will be feasible. > > > > Is there any better approach to this problem? > > > > Thank you! > > >