mbox series

[v8,00/12] hw/nvme: SR-IOV with Virtualization Enhancements

Message ID 20220509141620.3868733-1-lukasz.maniak@linux.intel.com
Headers show
Series hw/nvme: SR-IOV with Virtualization Enhancements | expand

Message

Lukasz Maniak May 9, 2022, 2:16 p.m. UTC
Changes since v7:
- Fixed description of hw/acpi: Make the PCI hot-plug aware of SR-IOV
- Added description to docs: Add documentation for SR-IOV and
  Virtualization Enhancements
- Added Reviewed-by and Acked-by tags
- Rebased on master

Lukasz Maniak (4):
  hw/nvme: Add support for SR-IOV
  hw/nvme: Add support for Primary Controller Capabilities
  hw/nvme: Add support for Secondary Controller List
  docs: Add documentation for SR-IOV and Virtualization Enhancements

Łukasz Gieryk (8):
  hw/nvme: Implement the Function Level Reset
  hw/nvme: Make max_ioqpairs and msix_qsize configurable in runtime
  hw/nvme: Remove reg_size variable and update BAR0 size calculation
  hw/nvme: Calculate BAR attributes in a function
  hw/nvme: Initialize capability structures for primary/secondary
    controllers
  hw/nvme: Add support for the Virtualization Management command
  hw/nvme: Update the initalization place for the AER queue
  hw/acpi: Make the PCI hot-plug aware of SR-IOV

 docs/system/devices/nvme.rst |  82 +++++
 hw/acpi/pcihp.c              |   6 +-
 hw/nvme/ctrl.c               | 673 ++++++++++++++++++++++++++++++++---
 hw/nvme/ns.c                 |   2 +-
 hw/nvme/nvme.h               |  55 ++-
 hw/nvme/subsys.c             |  75 +++-
 hw/nvme/trace-events         |   6 +
 include/block/nvme.h         |  65 ++++
 include/hw/pci/pci_ids.h     |   1 +
 9 files changed, 909 insertions(+), 56 deletions(-)

Comments

Lukasz Maniak May 16, 2022, 3:25 p.m. UTC | #1
On Mon, May 09, 2022 at 04:16:08PM +0200, Lukasz Maniak wrote:
> Changes since v7:
> - Fixed description of hw/acpi: Make the PCI hot-plug aware of SR-IOV
> - Added description to docs: Add documentation for SR-IOV and
>   Virtualization Enhancements
> - Added Reviewed-by and Acked-by tags
> - Rebased on master
> 
> Lukasz Maniak (4):
>   hw/nvme: Add support for SR-IOV
>   hw/nvme: Add support for Primary Controller Capabilities
>   hw/nvme: Add support for Secondary Controller List
>   docs: Add documentation for SR-IOV and Virtualization Enhancements
> 
> Łukasz Gieryk (8):
>   hw/nvme: Implement the Function Level Reset
>   hw/nvme: Make max_ioqpairs and msix_qsize configurable in runtime
>   hw/nvme: Remove reg_size variable and update BAR0 size calculation
>   hw/nvme: Calculate BAR attributes in a function
>   hw/nvme: Initialize capability structures for primary/secondary
>     controllers
>   hw/nvme: Add support for the Virtualization Management command
>   hw/nvme: Update the initalization place for the AER queue
>   hw/acpi: Make the PCI hot-plug aware of SR-IOV
> 
>  docs/system/devices/nvme.rst |  82 +++++
>  hw/acpi/pcihp.c              |   6 +-
>  hw/nvme/ctrl.c               | 673 ++++++++++++++++++++++++++++++++---
>  hw/nvme/ns.c                 |   2 +-
>  hw/nvme/nvme.h               |  55 ++-
>  hw/nvme/subsys.c             |  75 +++-
>  hw/nvme/trace-events         |   6 +
>  include/block/nvme.h         |  65 ++++
>  include/hw/pci/pci_ids.h     |   1 +
>  9 files changed, 909 insertions(+), 56 deletions(-)
> 
> -- 
> 2.25.1
> 

Hi Klaus,

Should we consider this series ready to merge?

Thanks,
Lukasz
Klaus Jensen May 17, 2022, 11:04 a.m. UTC | #2
On May 16 17:25, Lukasz Maniak wrote:
> On Mon, May 09, 2022 at 04:16:08PM +0200, Lukasz Maniak wrote:
> > Changes since v7:
> > - Fixed description of hw/acpi: Make the PCI hot-plug aware of SR-IOV
> > - Added description to docs: Add documentation for SR-IOV and
> >   Virtualization Enhancements
> > - Added Reviewed-by and Acked-by tags
> > - Rebased on master
> > 
> > Lukasz Maniak (4):
> >   hw/nvme: Add support for SR-IOV
> >   hw/nvme: Add support for Primary Controller Capabilities
> >   hw/nvme: Add support for Secondary Controller List
> >   docs: Add documentation for SR-IOV and Virtualization Enhancements
> > 
> > Łukasz Gieryk (8):
> >   hw/nvme: Implement the Function Level Reset
> >   hw/nvme: Make max_ioqpairs and msix_qsize configurable in runtime
> >   hw/nvme: Remove reg_size variable and update BAR0 size calculation
> >   hw/nvme: Calculate BAR attributes in a function
> >   hw/nvme: Initialize capability structures for primary/secondary
> >     controllers
> >   hw/nvme: Add support for the Virtualization Management command
> >   hw/nvme: Update the initalization place for the AER queue
> >   hw/acpi: Make the PCI hot-plug aware of SR-IOV
> > 
> >  docs/system/devices/nvme.rst |  82 +++++
> >  hw/acpi/pcihp.c              |   6 +-
> >  hw/nvme/ctrl.c               | 673 ++++++++++++++++++++++++++++++++---
> >  hw/nvme/ns.c                 |   2 +-
> >  hw/nvme/nvme.h               |  55 ++-
> >  hw/nvme/subsys.c             |  75 +++-
> >  hw/nvme/trace-events         |   6 +
> >  include/block/nvme.h         |  65 ++++
> >  include/hw/pci/pci_ids.h     |   1 +
> >  9 files changed, 909 insertions(+), 56 deletions(-)
> > 
> > -- 
> > 2.25.1
> > 
> 
> Hi Klaus,
> 
> Should we consider this series ready to merge?
> 

Hi Lukasz and Lukasz :)

Yes, I'm queing this up.

I found a problem when used with SPDK introduced by the "hw/nvme: Add
support for the Virtualization Management command" patch. However, it's
not really a problem in your patch, its related to the general handling
of CSTS and CC in nvme_write_bar(). I'll follow up with a patch on top
of this series and when reviewed, I'll apply this series and that patch
to nvme-next together.

Thanks for following through on this major feature! :)


Klaus
Keith Busch May 17, 2022, 1:49 p.m. UTC | #3
On Tue, May 17, 2022 at 01:04:56PM +0200, Klaus Jensen wrote:
> > 
> > Should we consider this series ready to merge?
> > 
> 
> Hi Lukasz and Lukasz :)
> 
> Yes, I'm queing this up.

FWIW, this looks good to me. I was hoping to give it a test run, but I don't
think I'll get to that for another week or two, so don't wait for me if you
think you've sorted out your recent observation.
Lukasz Maniak May 19, 2022, 12:14 p.m. UTC | #4
On Tue, May 17, 2022 at 01:04:56PM +0200, Klaus Jensen wrote:
> On May 16 17:25, Lukasz Maniak wrote:
> > On Mon, May 09, 2022 at 04:16:08PM +0200, Lukasz Maniak wrote:
> > > Changes since v7:
> > > - Fixed description of hw/acpi: Make the PCI hot-plug aware of SR-IOV
> > > - Added description to docs: Add documentation for SR-IOV and
> > >   Virtualization Enhancements
> > > - Added Reviewed-by and Acked-by tags
> > > - Rebased on master
> > > 
> > > Lukasz Maniak (4):
> > >   hw/nvme: Add support for SR-IOV
> > >   hw/nvme: Add support for Primary Controller Capabilities
> > >   hw/nvme: Add support for Secondary Controller List
> > >   docs: Add documentation for SR-IOV and Virtualization Enhancements
> > > 
> > > Łukasz Gieryk (8):
> > >   hw/nvme: Implement the Function Level Reset
> > >   hw/nvme: Make max_ioqpairs and msix_qsize configurable in runtime
> > >   hw/nvme: Remove reg_size variable and update BAR0 size calculation
> > >   hw/nvme: Calculate BAR attributes in a function
> > >   hw/nvme: Initialize capability structures for primary/secondary
> > >     controllers
> > >   hw/nvme: Add support for the Virtualization Management command
> > >   hw/nvme: Update the initalization place for the AER queue
> > >   hw/acpi: Make the PCI hot-plug aware of SR-IOV
> > > 
> > >  docs/system/devices/nvme.rst |  82 +++++
> > >  hw/acpi/pcihp.c              |   6 +-
> > >  hw/nvme/ctrl.c               | 673 ++++++++++++++++++++++++++++++++---
> > >  hw/nvme/ns.c                 |   2 +-
> > >  hw/nvme/nvme.h               |  55 ++-
> > >  hw/nvme/subsys.c             |  75 +++-
> > >  hw/nvme/trace-events         |   6 +
> > >  include/block/nvme.h         |  65 ++++
> > >  include/hw/pci/pci_ids.h     |   1 +
> > >  9 files changed, 909 insertions(+), 56 deletions(-)
> > > 
> > > -- 
> > > 2.25.1
> > > 
> > 
> > Hi Klaus,
> > 
> > Should we consider this series ready to merge?
> > 
> 
> Hi Lukasz and Lukasz :)
> 
> Yes, I'm queing this up.
> 
> I found a problem when used with SPDK introduced by the "hw/nvme: Add
> support for the Virtualization Management command" patch. However, it's
> not really a problem in your patch, its related to the general handling
> of CSTS and CC in nvme_write_bar(). I'll follow up with a patch on top
> of this series and when reviewed, I'll apply this series and that patch
> to nvme-next together.
> 

Thank you, will do a review.

> Thanks for following through on this major feature! :)

We are very pleased to contribute to such an important and robust
project :)

Lukasz

> 
> 
> Klaus
Klaus Jensen June 8, 2022, 8:28 a.m. UTC | #5
On May  9 16:16, Lukasz Maniak wrote:
> Changes since v7:
> - Fixed description of hw/acpi: Make the PCI hot-plug aware of SR-IOV
> - Added description to docs: Add documentation for SR-IOV and
>   Virtualization Enhancements
> - Added Reviewed-by and Acked-by tags
> - Rebased on master
> 
> Lukasz Maniak (4):
>   hw/nvme: Add support for SR-IOV
>   hw/nvme: Add support for Primary Controller Capabilities
>   hw/nvme: Add support for Secondary Controller List
>   docs: Add documentation for SR-IOV and Virtualization Enhancements
> 
> Łukasz Gieryk (8):
>   hw/nvme: Implement the Function Level Reset
>   hw/nvme: Make max_ioqpairs and msix_qsize configurable in runtime
>   hw/nvme: Remove reg_size variable and update BAR0 size calculation
>   hw/nvme: Calculate BAR attributes in a function
>   hw/nvme: Initialize capability structures for primary/secondary
>     controllers
>   hw/nvme: Add support for the Virtualization Management command
>   hw/nvme: Update the initalization place for the AER queue
>   hw/acpi: Make the PCI hot-plug aware of SR-IOV
> 
>  docs/system/devices/nvme.rst |  82 +++++
>  hw/acpi/pcihp.c              |   6 +-
>  hw/nvme/ctrl.c               | 673 ++++++++++++++++++++++++++++++++---
>  hw/nvme/ns.c                 |   2 +-
>  hw/nvme/nvme.h               |  55 ++-
>  hw/nvme/subsys.c             |  75 +++-
>  hw/nvme/trace-events         |   6 +
>  include/block/nvme.h         |  65 ++++
>  include/hw/pci/pci_ids.h     |   1 +
>  9 files changed, 909 insertions(+), 56 deletions(-)
> 
> -- 
> 2.25.1
> 

Thanks!

Applied to nvme-next along with v3 of the CSTS fix.
Lukasz Maniak June 8, 2022, 10:38 a.m. UTC | #6
On Wed, Jun 08, 2022 at 10:28:55AM +0200, Klaus Jensen wrote:
> On May  9 16:16, Lukasz Maniak wrote:
> > Changes since v7:
> > - Fixed description of hw/acpi: Make the PCI hot-plug aware of SR-IOV
> > - Added description to docs: Add documentation for SR-IOV and
> >   Virtualization Enhancements
> > - Added Reviewed-by and Acked-by tags
> > - Rebased on master
> > 
> > Lukasz Maniak (4):
> >   hw/nvme: Add support for SR-IOV
> >   hw/nvme: Add support for Primary Controller Capabilities
> >   hw/nvme: Add support for Secondary Controller List
> >   docs: Add documentation for SR-IOV and Virtualization Enhancements
> > 
> > Łukasz Gieryk (8):
> >   hw/nvme: Implement the Function Level Reset
> >   hw/nvme: Make max_ioqpairs and msix_qsize configurable in runtime
> >   hw/nvme: Remove reg_size variable and update BAR0 size calculation
> >   hw/nvme: Calculate BAR attributes in a function
> >   hw/nvme: Initialize capability structures for primary/secondary
> >     controllers
> >   hw/nvme: Add support for the Virtualization Management command
> >   hw/nvme: Update the initalization place for the AER queue
> >   hw/acpi: Make the PCI hot-plug aware of SR-IOV
> > 
> >  docs/system/devices/nvme.rst |  82 +++++
> >  hw/acpi/pcihp.c              |   6 +-
> >  hw/nvme/ctrl.c               | 673 ++++++++++++++++++++++++++++++++---
> >  hw/nvme/ns.c                 |   2 +-
> >  hw/nvme/nvme.h               |  55 ++-
> >  hw/nvme/subsys.c             |  75 +++-
> >  hw/nvme/trace-events         |   6 +
> >  include/block/nvme.h         |  65 ++++
> >  include/hw/pci/pci_ids.h     |   1 +
> >  9 files changed, 909 insertions(+), 56 deletions(-)
> > 
> > -- 
> > 2.25.1
> > 
> 
> Thanks!
> 
> Applied to nvme-next along with v3 of the CSTS fix.

Yay! That's great news.

Thank you :)