As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <[email protected]>
Cc: Gleb Natapov <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
virt/kvm/assigned-dev.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c
index 8db4370..92e25e9 100644
--- a/virt/kvm/assigned-dev.c
+++ b/virt/kvm/assigned-dev.c
@@ -395,8 +395,9 @@ static int assigned_device_enable_host_msix(struct kvm *kvm,
if (dev->entries_nr == 0)
return r;
- r = pci_enable_msix(dev->dev, dev->host_msix_entries, dev->entries_nr);
- if (r)
+ r = pci_enable_msix_range(dev->dev, dev->host_msix_entries,
+ dev->entries_nr, dev->entries_nr);
+ if (r < 0)
return r;
for (i = 0; i < dev->entries_nr; i++) {
--
1.7.7.6
Il 19/02/2014 11:15, Alexander Gordeev ha scritto:
> As result of deprecation of MSI-X/MSI enablement functions
> pci_enable_msix() and pci_enable_msi_block() all drivers
> using these two interfaces need to be updated to use the
> new pci_enable_msi_range() and pci_enable_msix_range()
> interfaces.
>
> Signed-off-by: Alexander Gordeev <[email protected]>
> Cc: Gleb Natapov <[email protected]>
> Cc: Paolo Bonzini <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> virt/kvm/assigned-dev.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c
> index 8db4370..92e25e9 100644
> --- a/virt/kvm/assigned-dev.c
> +++ b/virt/kvm/assigned-dev.c
> @@ -395,8 +395,9 @@ static int assigned_device_enable_host_msix(struct kvm *kvm,
> if (dev->entries_nr == 0)
> return r;
>
> - r = pci_enable_msix(dev->dev, dev->host_msix_entries, dev->entries_nr);
> - if (r)
> + r = pci_enable_msix_range(dev->dev, dev->host_msix_entries,
> + dev->entries_nr, dev->entries_nr);
> + if (r < 0)
> return r;
>
> for (i = 0; i < dev->entries_nr; i++) {
>
Acked-by: Paolo Bonzini <[email protected]>
Hi Paolo et al,
Based on recently accepted to the mainline pci_enable_msix_exact() function,
I am sending a updated version of the patch. Please, let me know if it does
not work for you and you need and incremental update from the previous version.
Thanks!
--
Regards,
Alexander Gordeev
[email protected]
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.
Signed-off-by: Alexander Gordeev <[email protected]>
Cc: Gleb Natapov <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
virt/kvm/assigned-dev.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c
index 8db4370..bf06577 100644
--- a/virt/kvm/assigned-dev.c
+++ b/virt/kvm/assigned-dev.c
@@ -395,7 +395,8 @@ static int assigned_device_enable_host_msix(struct kvm *kvm,
if (dev->entries_nr == 0)
return r;
- r = pci_enable_msix(dev->dev, dev->host_msix_entries, dev->entries_nr);
+ r = pci_enable_msix_exact(dev->dev,
+ dev->host_msix_entries, dev->entries_nr);
if (r)
return r;
--
1.7.7.6
--
Regards,
Alexander Gordeev
[email protected]
Il 21/02/2014 18:05, Alexander Gordeev ha scritto:
> As result of deprecation of MSI-X/MSI enablement functions
> pci_enable_msix() and pci_enable_msi_block() all drivers
> using these two interfaces need to be updated to use the
> new pci_enable_msi_range() or pci_enable_msi_exact()
> and pci_enable_msix_range() or pci_enable_msix_exact()
> interfaces.
>
> Signed-off-by: Alexander Gordeev <[email protected]>
> Cc: Gleb Natapov <[email protected]>
> Cc: Paolo Bonzini <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> virt/kvm/assigned-dev.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c
> index 8db4370..bf06577 100644
> --- a/virt/kvm/assigned-dev.c
> +++ b/virt/kvm/assigned-dev.c
> @@ -395,7 +395,8 @@ static int assigned_device_enable_host_msix(struct kvm *kvm,
> if (dev->entries_nr == 0)
> return r;
>
> - r = pci_enable_msix(dev->dev, dev->host_msix_entries, dev->entries_nr);
> + r = pci_enable_msix_exact(dev->dev,
> + dev->host_msix_entries, dev->entries_nr);
> if (r)
> return r;
>
>
It's okay, but it's not clear to me whether I should include this patch
or someone else will. :)
Paolo
On Fri, Feb 21, 2014 at 06:11:29PM +0100, Paolo Bonzini wrote:
> It's okay, but it's not clear to me whether I should include this
> patch or someone else will. :)
Please, include it.
Thanks!
> Paolo
--
Regards,
Alexander Gordeev
[email protected]
Il 21/02/2014 19:56, Alexander Gordeev ha scritto:
> On Fri, Feb 21, 2014 at 06:11:29PM +0100, Paolo Bonzini wrote:
>> It's okay, but it's not clear to me whether I should include this
>> patch or someone else will. :)
>
> Please, include it.
And where do I get pci_enable_msix_exact? When will pci_enable_msix
disappear?
So, do I have to pull something (which I'd rather not, since pulling the
wrong thing in a submaintainer tree will make Linus angry), or should I
do it in the next merge window after pci_enable_msix_exact gets in?
All in all, it seems much simpler to me if the linux-pci tree just
includes the whole patch series with my Acked-by.
Paolo
> Thanks!
>
>> Paolo
>
On Fri, Feb 21, 2014 at 10:36:25PM +0100, Paolo Bonzini wrote:
> Il 21/02/2014 19:56, Alexander Gordeev ha scritto:
> >On Fri, Feb 21, 2014 at 06:11:29PM +0100, Paolo Bonzini wrote:
> >>It's okay, but it's not clear to me whether I should include this
> >>patch or someone else will. :)
> >
> >Please, include it.
>
> And where do I get pci_enable_msix_exact? When will pci_enable_msix
> disappear?
Commit d158fc7 ("Merge tag 'pci-v3.14-fixes-1'") in Linus's tree has it.
pci_enable_msix() is going to be removed once all drivers updated with
new interface.
> So, do I have to pull something (which I'd rather not, since pulling
> the wrong thing in a submaintainer tree will make Linus angry), or
> should I do it in the next merge window after pci_enable_msix_exact
> gets in?
So it is already in.
> All in all, it seems much simpler to me if the linux-pci tree just
> includes the whole patch series with my Acked-by.
>
> Paolo
>
> >Thanks!
> >
> >>Paolo
> >
>
--
Regards,
Alexander Gordeev
[email protected]
Il 22/02/2014 09:50, Alexander Gordeev ha scritto:
> Commit d158fc7 ("Merge tag 'pci-v3.14-fixes-1'") in Linus's tree has it.
>
> pci_enable_msix() is going to be removed once all drivers updated with
> new interface.
>
>> > So, do I have to pull something (which I'd rather not, since pulling
>> > the wrong thing in a submaintainer tree will make Linus angry), or
>> > should I do it in the next merge window after pci_enable_msix_exact
>> > gets in?
> So it is already in.
It is not, because maintainer branches are not rebased. KVM development
is based on 3.14-rc1, and will not get that commit until the first 3.15
pull request is sent to Linux.
No big deal, I'll include this patch in a second 3.15 pull request.
Paolo
On Sat, Feb 22, 2014 at 09:58:10AM +0100, Paolo Bonzini wrote:
> Il 22/02/2014 09:50, Alexander Gordeev ha scritto:
> >Commit d158fc7 ("Merge tag 'pci-v3.14-fixes-1'") in Linus's tree has it.
> >
> >pci_enable_msix() is going to be removed once all drivers updated with
> >new interface.
> >
> >>> So, do I have to pull something (which I'd rather not, since pulling
> >>> the wrong thing in a submaintainer tree will make Linus angry), or
> >>> should I do it in the next merge window after pci_enable_msix_exact
> >>> gets in?
> >So it is already in.
>
> It is not, because maintainer branches are not rebased. KVM
> development is based on 3.14-rc1, and will not get that commit until
> the first 3.15 pull request is sent to Linux.
>
> No big deal, I'll include this patch in a second 3.15 pull request.
Hi Paolo,
I believe it is safe to pull it now?
Thanks!
> Paolo
> > >>> So, do I have to pull something (which I'd rather not, since pulling
> > >>> the wrong thing in a submaintainer tree will make Linus angry), or
> > >>> should I do it in the next merge window after pci_enable_msix_exact
> > >>> gets in?
> > >So it is already in.
> >
> > It is not, because maintainer branches are not rebased. KVM
> > development is based on 3.14-rc1, and will not get that commit until
> > the first 3.15 pull request is sent to Linux.
> >
> > No big deal, I'll include this patch in a second 3.15 pull request.
>
> Hi Paolo,
>
> I believe it is safe to pull it now?
Yup, vacation got in the way of doing this during the merge window but I
can safely send this for -rc next week. It was on my todo list.
Paolo
Il 21/02/2014 18:05, Alexander Gordeev ha scritto:
> As result of deprecation of MSI-X/MSI enablement functions
> pci_enable_msix() and pci_enable_msi_block() all drivers
> using these two interfaces need to be updated to use the
> new pci_enable_msi_range() or pci_enable_msi_exact()
> and pci_enable_msix_range() or pci_enable_msix_exact()
> interfaces.
>
> Signed-off-by: Alexander Gordeev <[email protected]>
> Cc: Gleb Natapov <[email protected]>
> Cc: Paolo Bonzini <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> virt/kvm/assigned-dev.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c
> index 8db4370..bf06577 100644
> --- a/virt/kvm/assigned-dev.c
> +++ b/virt/kvm/assigned-dev.c
> @@ -395,7 +395,8 @@ static int assigned_device_enable_host_msix(struct kvm *kvm,
> if (dev->entries_nr == 0)
> return r;
>
> - r = pci_enable_msix(dev->dev, dev->host_msix_entries, dev->entries_nr);
> + r = pci_enable_msix_exact(dev->dev,
> + dev->host_msix_entries, dev->entries_nr);
> if (r)
> return r;
>
>
Applying this to kvm/master (i.e. for 3.15), thanks.
Paolo