Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-24 Thread Jason Wang
On Thu, Nov 24, 2022 at 3:41 PM Michael S. Tsirkin wrote: > > On Thu, Nov 24, 2022 at 03:31:59PM +0800, Jason Wang wrote: > > On Thu, Nov 24, 2022 at 3:06 PM Michael S. Tsirkin wrote: > > > > > > On Thu, Nov 24, 2022 at 12:12:15PM +0800, Jason Wang wrote: > > > > On Wed, Nov 23, 2022 at 3:21 PM

Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-23 Thread Michael S. Tsirkin
On Thu, Nov 24, 2022 at 03:31:59PM +0800, Jason Wang wrote: > On Thu, Nov 24, 2022 at 3:06 PM Michael S. Tsirkin wrote: > > > > On Thu, Nov 24, 2022 at 12:12:15PM +0800, Jason Wang wrote: > > > On Wed, Nov 23, 2022 at 3:21 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Wed, Nov 23, 2022

Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-23 Thread Jason Wang
On Thu, Nov 24, 2022 at 3:06 PM Michael S. Tsirkin wrote: > > On Thu, Nov 24, 2022 at 12:12:15PM +0800, Jason Wang wrote: > > On Wed, Nov 23, 2022 at 3:21 PM Michael S. Tsirkin wrote: > > > > > > On Wed, Nov 23, 2022 at 03:08:25PM +0800, Jason Wang wrote: > > > > On Wed, Nov 23, 2022 at 2:15 PM

Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-23 Thread Michael S. Tsirkin
On Thu, Nov 24, 2022 at 12:12:15PM +0800, Jason Wang wrote: > On Wed, Nov 23, 2022 at 3:21 PM Michael S. Tsirkin wrote: > > > > On Wed, Nov 23, 2022 at 03:08:25PM +0800, Jason Wang wrote: > > > On Wed, Nov 23, 2022 at 2:15 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Wed, Nov 23, 2022

Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-23 Thread Jason Wang
On Wed, Nov 23, 2022 at 3:21 PM Michael S. Tsirkin wrote: > > On Wed, Nov 23, 2022 at 03:08:25PM +0800, Jason Wang wrote: > > On Wed, Nov 23, 2022 at 2:15 PM Michael S. Tsirkin wrote: > > > > > > On Wed, Nov 23, 2022 at 01:47:04PM +0800, Jason Wang wrote: > > > > On Wed, Nov 23, 2022 at 1:26 PM

Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-22 Thread Michael S. Tsirkin
On Wed, Nov 23, 2022 at 03:08:25PM +0800, Jason Wang wrote: > On Wed, Nov 23, 2022 at 2:15 PM Michael S. Tsirkin wrote: > > > > On Wed, Nov 23, 2022 at 01:47:04PM +0800, Jason Wang wrote: > > > On Wed, Nov 23, 2022 at 1:26 PM Jason Wang wrote: > > > > > > > > On Wed, Nov 23, 2022 at 12:28 AM

Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-22 Thread Jason Wang
On Wed, Nov 23, 2022 at 2:15 PM Michael S. Tsirkin wrote: > > On Wed, Nov 23, 2022 at 01:47:04PM +0800, Jason Wang wrote: > > On Wed, Nov 23, 2022 at 1:26 PM Jason Wang wrote: > > > > > > On Wed, Nov 23, 2022 at 12:28 AM Eric Auger wrote: > > > > > > > > Hi, > > > > > > > > On 11/22/22 10:43,

Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-22 Thread Michael S. Tsirkin
On Wed, Nov 23, 2022 at 01:47:04PM +0800, Jason Wang wrote: > On Wed, Nov 23, 2022 at 1:26 PM Jason Wang wrote: > > > > On Wed, Nov 23, 2022 at 12:28 AM Eric Auger wrote: > > > > > > Hi, > > > > > > On 11/22/22 10:43, Michael S. Tsirkin wrote: > > > > On Tue, Nov 22, 2022 at 11:01:11AM +0800,

Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-22 Thread Jason Wang
On Wed, Nov 23, 2022 at 1:26 PM Jason Wang wrote: > > On Wed, Nov 23, 2022 at 12:28 AM Eric Auger wrote: > > > > Hi, > > > > On 11/22/22 10:43, Michael S. Tsirkin wrote: > > > On Tue, Nov 22, 2022 at 11:01:11AM +0800, Jason Wang wrote: > > >> When vIOMMU is enabled, the vq->used_phys is actually

Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-22 Thread Jason Wang
On Wed, Nov 23, 2022 at 12:28 AM Eric Auger wrote: > > Hi, > > On 11/22/22 10:43, Michael S. Tsirkin wrote: > > On Tue, Nov 22, 2022 at 11:01:11AM +0800, Jason Wang wrote: > >> When vIOMMU is enabled, the vq->used_phys is actually the IOVA not > >> GPA. So we need to translate it to GPA before

Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-22 Thread Eric Auger
Hi, On 11/22/22 10:43, Michael S. Tsirkin wrote: > On Tue, Nov 22, 2022 at 11:01:11AM +0800, Jason Wang wrote: >> When vIOMMU is enabled, the vq->used_phys is actually the IOVA not >> GPA. So we need to translate it to GPA before the syncing otherwise we >> may hit the following crash since IOVA

Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-22 Thread Michael S. Tsirkin
On Tue, Nov 22, 2022 at 11:01:11AM +0800, Jason Wang wrote: > When vIOMMU is enabled, the vq->used_phys is actually the IOVA not > GPA. So we need to translate it to GPA before the syncing otherwise we > may hit the following crash since IOVA could be out of the scope of > the GPA log size. This

[PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-21 Thread Jason Wang
When vIOMMU is enabled, the vq->used_phys is actually the IOVA not GPA. So we need to translate it to GPA before the syncing otherwise we may hit the following crash since IOVA could be out of the scope of the GPA log size. This could be noted when using virtio-IOMMU with vhost using 1G memory.