Skip to content

nvme: nvme emulator does not advertise FLR support #1719

@mattkur

Description

@mattkur

When attempting to test #1714 , I noticed that vfio didn't allow OpenHCL to set the reset_method file in sysfs. This test was using the nvme emulator. Since the nvme emulator does not support FLR, vfio doesn't allow for modifying reset_method.

NvmeController uses a ConfigSpaceType0Emulator, which supports a set of capabilities. Add a new PciCapability for FLR support, hook it up to the config space emulator used by the NvmeController.

Open questions: should the device also report that it supports power management and the transactions pending flags?

  • Add common code to support the FLR capability (both handling and any config space updates required to report this support to the guest)
  • Modify NvmeController to use this.
  • Add unit tests where appropriate.
  • Make this support optional via a flag when constructing NvmeController.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions