Re: [PATCH v2 08/15] hw/nvme: Implement the Function Level Reset

2021-11-17 Thread Łukasz Gieryk
On Tue, Nov 16, 2021 at 01:28:19PM -0800, Keith Busch wrote: > On Tue, Nov 16, 2021 at 04:34:39PM +0100, Łukasz Gieryk wrote: > > if (!pci_is_vf(>parent_obj) && n->params.sriov_max_vfs) { > > -pcie_sriov_pf_disable_vfs(>parent_obj); > > +if (rst != NVME_RESET_CONTROLLER) { > >

Re: [PATCH v2 08/15] hw/nvme: Implement the Function Level Reset

2021-11-16 Thread Keith Busch
On Tue, Nov 16, 2021 at 04:34:39PM +0100, Łukasz Gieryk wrote: > if (!pci_is_vf(>parent_obj) && n->params.sriov_max_vfs) { > -pcie_sriov_pf_disable_vfs(>parent_obj); > +if (rst != NVME_RESET_CONTROLLER) { > +pcie_sriov_pf_disable_vfs(>parent_obj); Shouldn't this

[PATCH v2 08/15] hw/nvme: Implement the Function Level Reset

2021-11-16 Thread Łukasz Gieryk
This patch implements the Function Level Reset, a feature currently not implemented for the Nvme device, while listed as a mandatory ("shall") in the 1.4 spec. The implementation reuses FLR-related building blocks defined for the pci-bridge module, and follows the same logic: - FLR capability