diff options
author | Lukasz Maniak <lukasz.maniak@linux.intel.com> | 2022-05-09 16:16:09 +0200 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2022-06-23 23:24:28 +0200 |
commit | 44c2c09488db83b76cab8dd91f7319be82b2bd91 (patch) | |
tree | 95c64b69c73e8b50efb9a1c305e32aaf976e05df /hw/nvme/nvme.h | |
parent | 7db86fe2ed220c196061824e652b94e7a2acbabf (diff) |
hw/nvme: Add support for SR-IOV
This patch implements initial support for Single Root I/O Virtualization
on an NVMe device.
Essentially, it allows to define the maximum number of virtual functions
supported by the NVMe controller via sriov_max_vfs parameter.
Passing a non-zero value to sriov_max_vfs triggers reporting of SR-IOV
capability by a physical controller and ARI capability by both the
physical and virtual function devices.
NVMe controllers created via virtual functions mirror functionally
the physical controller, which may not entirely be the case, thus
consideration would be needed on the way to limit the capabilities of
the VF.
NVMe subsystem is required for the use of SR-IOV.
Signed-off-by: Lukasz Maniak <lukasz.maniak@linux.intel.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'hw/nvme/nvme.h')
-rw-r--r-- | hw/nvme/nvme.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/nvme/nvme.h b/hw/nvme/nvme.h index e41771604f..7e4bbd5606 100644 --- a/hw/nvme/nvme.h +++ b/hw/nvme/nvme.h @@ -24,7 +24,7 @@ #include "block/nvme.h" -#define NVME_MAX_CONTROLLERS 32 +#define NVME_MAX_CONTROLLERS 256 #define NVME_MAX_NAMESPACES 256 #define NVME_EUI64_DEFAULT ((uint64_t)0x5254000000000000) @@ -406,6 +406,7 @@ typedef struct NvmeParams { uint8_t zasl; bool auto_transition_zones; bool legacy_cmb; + uint8_t sriov_max_vfs; } NvmeParams; typedef struct NvmeCtrl { |