mbox series

[v2,0/2] vhost: fix async address mapping

Message ID 20220119151016.9970-1-xuan.ding@intel.com (mailing list archive)
Headers
Series vhost: fix async address mapping |

Message

Ding, Xuan Jan. 19, 2022, 3:10 p.m. UTC
  From: Xuan Ding <xuan.ding@intel.com>

This patchset fixes the issue of incorrect DMA mapping in PA mode. 
Due to the ambiguity of host_phys_addr naming in the guest page
struct, rename it to host_iova.

v2:
* Change the order of patch.

Xuan Ding (2):
  vhost: rename field in guest page struct
  vhost: fix physical address mapping

 lib/vhost/vhost.h      |  11 ++--
 lib/vhost/vhost_user.c | 130 ++++++++++++++++++++---------------------
 lib/vhost/virtio_net.c |  11 ++--
 3 files changed, 75 insertions(+), 77 deletions(-)
  

Comments

Maxime Coquelin Feb. 1, 2022, 8:28 a.m. UTC | #1
On 1/19/22 16:10, xuan.ding@intel.com wrote:
> From: Xuan Ding <xuan.ding@intel.com>
> 
> This patchset fixes the issue of incorrect DMA mapping in PA mode.
> Due to the ambiguity of host_phys_addr naming in the guest page
> struct, rename it to host_iova.
> 
> v2:
> * Change the order of patch.

I'm not sure why you changed the order of the patches.
Now, the second one is the fix, so it will make the backport more
difficult. Either both are considered to be fixes. I think it can make 
sense as the renaming does not introduce risk of regression and will 
make backporting patches easier in the future.

Other solution is to reverse the order again, but I think tagging the
renaming as a fix is OK for me here.

What do you think?

Regards,
Maxime

> 
> Xuan Ding (2):
>    vhost: rename field in guest page struct
>    vhost: fix physical address mapping
> 
>   lib/vhost/vhost.h      |  11 ++--
>   lib/vhost/vhost_user.c | 130 ++++++++++++++++++++---------------------
>   lib/vhost/virtio_net.c |  11 ++--
>   3 files changed, 75 insertions(+), 77 deletions(-)
>
  
Kevin Traynor Feb. 1, 2022, 11:29 a.m. UTC | #2
On 01/02/2022 08:28, Maxime Coquelin wrote:
> 
> 
> On 1/19/22 16:10, xuan.ding@intel.com wrote:
>> From: Xuan Ding <xuan.ding@intel.com>
>>
>> This patchset fixes the issue of incorrect DMA mapping in PA mode.
>> Due to the ambiguity of host_phys_addr naming in the guest page
>> struct, rename it to host_iova.
>>
>> v2:
>> * Change the order of patch.
> 
> I'm not sure why you changed the order of the patches.
> Now, the second one is the fix, so it will make the backport more
> difficult. Either both are considered to be fixes. I think it can make
> sense as the renaming does not introduce risk of regression and will
> make backporting patches easier in the future.
> 
> Other solution is to reverse the order again, but I think tagging the
> renaming as a fix is OK for me here.
> 
> What do you think?
> 

Either way sounds ok to me, but can you also add stable tag(s). There 
isn't a stable tag on either patch at present. Thanks.

> Regards,
> Maxime
> 
>>
>> Xuan Ding (2):
>>     vhost: rename field in guest page struct
>>     vhost: fix physical address mapping
>>
>>    lib/vhost/vhost.h      |  11 ++--
>>    lib/vhost/vhost_user.c | 130 ++++++++++++++++++++---------------------
>>    lib/vhost/virtio_net.c |  11 ++--
>>    3 files changed, 75 insertions(+), 77 deletions(-)
>>
>
  
Maxime Coquelin Feb. 4, 2022, 10:43 a.m. UTC | #3
On 2/1/22 12:29, Kevin Traynor wrote:
> On 01/02/2022 08:28, Maxime Coquelin wrote:
>>
>>
>> On 1/19/22 16:10, xuan.ding@intel.com wrote:
>>> From: Xuan Ding <xuan.ding@intel.com>
>>>
>>> This patchset fixes the issue of incorrect DMA mapping in PA mode.
>>> Due to the ambiguity of host_phys_addr naming in the guest page
>>> struct, rename it to host_iova.
>>>
>>> v2:
>>> * Change the order of patch.
>>
>> I'm not sure why you changed the order of the patches.
>> Now, the second one is the fix, so it will make the backport more
>> difficult. Either both are considered to be fixes. I think it can make
>> sense as the renaming does not introduce risk of regression and will
>> make backporting patches easier in the future.
>>
>> Other solution is to reverse the order again, but I think tagging the
>> renaming as a fix is OK for me here.
>>
>> What do you think?
>>
> 
> Either way sounds ok to me, but can you also add stable tag(s). There 
> isn't a stable tag on either patch at present. Thanks.

OK, will do.

Thanks Kevin,
Maxime

>> Regards,
>> Maxime
>>
>>>
>>> Xuan Ding (2):
>>>     vhost: rename field in guest page struct
>>>     vhost: fix physical address mapping
>>>
>>>    lib/vhost/vhost.h      |  11 ++--
>>>    lib/vhost/vhost_user.c | 130 
>>> ++++++++++++++++++++---------------------
>>>    lib/vhost/virtio_net.c |  11 ++--
>>>    3 files changed, 75 insertions(+), 77 deletions(-)
>>>
>>
>
  
Maxime Coquelin Feb. 4, 2022, 10:56 a.m. UTC | #4
On 1/19/22 16:10, xuan.ding@intel.com wrote:
> From: Xuan Ding <xuan.ding@intel.com>
> 
> This patchset fixes the issue of incorrect DMA mapping in PA mode.
> Due to the ambiguity of host_phys_addr naming in the guest page
> struct, rename it to host_iova.
> 
> v2:
> * Change the order of patch.
> 
> Xuan Ding (2):
>    vhost: rename field in guest page struct
>    vhost: fix physical address mapping
> 
>   lib/vhost/vhost.h      |  11 ++--
>   lib/vhost/vhost_user.c | 130 ++++++++++++++++++++---------------------
>   lib/vhost/virtio_net.c |  11 ++--
>   3 files changed, 75 insertions(+), 77 deletions(-)
> 

I was willing to apply the series, but it does not apply.
Could you please rebase with taking our comments into account?

Thanks,
Maxime
  
Ding, Xuan Feb. 11, 2022, 2:48 a.m. UTC | #5
Hi Maxime & Kevin,

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: 2022年2月4日 18:57
> To: Ding, Xuan <xuan.ding@intel.com>; Xia, Chenbo <chenbo.xia@intel.com>
> Cc: dev@dpdk.org; Hu, Jiayu <jiayu.hu@intel.com>; Wang, YuanX
> <yuanx.wang@intel.com>
> Subject: Re: [PATCH v2 0/2] vhost: fix async address mapping
> 
> 
> 
> On 1/19/22 16:10, xuan.ding@intel.com wrote:
> > From: Xuan Ding <xuan.ding@intel.com>
> >
> > This patchset fixes the issue of incorrect DMA mapping in PA mode.
> > Due to the ambiguity of host_phys_addr naming in the guest page
> > struct, rename it to host_iova.
> >
> > v2:
> > * Change the order of patch.
 
The consideration of changing the order here is to avoid the fix patch
using the previous variable name(host_phys_addr), so rename the variable first.

> >
> > Xuan Ding (2):
> >    vhost: rename field in guest page struct
> >    vhost: fix physical address mapping
> >
> >   lib/vhost/vhost.h      |  11 ++--
> >   lib/vhost/vhost_user.c | 130 ++++++++++++++++++++---------------------
> >   lib/vhost/virtio_net.c |  11 ++--
> >   3 files changed, 75 insertions(+), 77 deletions(-)
> >
> 
> I was willing to apply the series, but it does not apply.
> Could you please rebase with taking our comments into account?
 
Thanks for your comments, I will send a new patch set applied with your comments.

Regards,
Xuan

> 
> Thanks,
> Maxime