Re: [RFC PATCH v2 3/3] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration

2021-01-31 Thread Shenming Lu
On 2021/1/27 22:21, Alex Williamson wrote: > On Wed, 27 Jan 2021 19:27:35 +0800 > Shenming Lu wrote: > >> On 2021/1/27 5:36, Alex Williamson wrote: >>> On Wed, 9 Dec 2020 16:09:19 +0800 >>> Shenming Lu wrote: >>> Different from the normal situation when the guest starts, we can

Re: [RFC PATCH v2 3/3] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration

2021-01-27 Thread Alex Williamson
On Wed, 27 Jan 2021 19:27:35 +0800 Shenming Lu wrote: > On 2021/1/27 5:36, Alex Williamson wrote: > > On Wed, 9 Dec 2020 16:09:19 +0800 > > Shenming Lu wrote: > > > >> Different from the normal situation when the guest starts, we can > >> know the max unmasked vetctor (at the beginning)

Re: [RFC PATCH v2 3/3] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration

2021-01-27 Thread Shenming Lu
On 2021/1/27 5:36, Alex Williamson wrote: > On Wed, 9 Dec 2020 16:09:19 +0800 > Shenming Lu wrote: > >> Different from the normal situation when the guest starts, we can >> know the max unmasked vetctor (at the beginning) after msix_load() >> in VFIO migration. So in order to avoid ineffectively

Re: [RFC PATCH v2 3/3] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration

2021-01-26 Thread Alex Williamson
On Wed, 9 Dec 2020 16:09:19 +0800 Shenming Lu wrote: > Different from the normal situation when the guest starts, we can > know the max unmasked vetctor (at the beginning) after msix_load() > in VFIO migration. So in order to avoid ineffectively disabling and s/ineffectively/inefficiently/?

[RFC PATCH v2 3/3] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration

2020-12-09 Thread Shenming Lu
Different from the normal situation when the guest starts, we can know the max unmasked vetctor (at the beginning) after msix_load() in VFIO migration. So in order to avoid ineffectively disabling and enabling vectors repeatedly, let's allocate all needed vectors first and then enable these