OSDN Git Service

hw/nvme: Add support for Secondary Controller List
authorLukasz Maniak <lukasz.maniak@linux.intel.com>
Mon, 9 May 2022 14:16:11 +0000 (16:16 +0200)
committerKlaus Jensen <k.jensen@samsung.com>
Thu, 23 Jun 2022 21:24:28 +0000 (23:24 +0200)
commit99f48ae7aea70fb080f04bf1cc846cd6450bd11a
treeeeec8913da9527008b6b192cf8412765e43d1519
parent5e6f963f018f2ebb16c0f9586f17811163d62b4a
hw/nvme: Add support for Secondary Controller List

Introduce handling for Secondary Controller List (Identify command with
CNS value of 15h).

Secondary controller ids are unique in the subsystem, hence they are
reserved by it upon initialization of the primary controller to the
number of sriov_max_vfs.

ID reservation requires the addition of an intermediate controller slot
state, so the reserved controller has the address 0xFFFF.
A secondary controller is in the reserved state when it has no virtual
function assigned, but its primary controller is realized.
Secondary controller reservations are released to NULL when its primary
controller is unregistered.

Signed-off-by: Lukasz Maniak <lukasz.maniak@linux.intel.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
hw/nvme/ctrl.c
hw/nvme/ns.c
hw/nvme/nvme.h
hw/nvme/subsys.c
hw/nvme/trace-events
include/block/nvme.h