aboutsummaryrefslogtreecommitdiff
path: root/include/block/nvme.h
diff options
context:
space:
mode:
authorŁukasz Gieryk <lukasz.gieryk@linux.intel.com>2022-05-09 16:16:16 +0200
committerKlaus Jensen <k.jensen@samsung.com>2022-06-23 23:24:29 +0200
commit746d42b13368e18856dccf16bd39e04d02feec09 (patch)
treee03dfb4ab84bb19092d9a1b375f97dc72fcc37f6 /include/block/nvme.h
parentaa817713376195cc5cd861183fc7f953a7b60d5d (diff)
hw/nvme: Initialize capability structures for primary/secondary controllers
With four new properties: - sriov_v{i,q}_flexible, - sriov_max_v{i,q}_per_vf, one can configure the number of available flexible resources, as well as the limits. The primary and secondary controller capability structures are initialized accordingly. Since the number of available queues (interrupts) now varies between VF/PF, BAR size calculation is also adjusted. Signed-off-by: Łukasz Gieryk <lukasz.gieryk@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>
Diffstat (limited to 'include/block/nvme.h')
-rw-r--r--include/block/nvme.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/block/nvme.h b/include/block/nvme.h
index 94efd32578..58d08d5c2a 100644
--- a/include/block/nvme.h
+++ b/include/block/nvme.h
@@ -1576,6 +1576,11 @@ typedef struct QEMU_PACKED NvmePriCtrlCap {
uint8_t rsvd80[4016];
} NvmePriCtrlCap;
+typedef enum NvmePriCtrlCapCrt {
+ NVME_CRT_VQ = 1 << 0,
+ NVME_CRT_VI = 1 << 1,
+} NvmePriCtrlCapCrt;
+
typedef struct QEMU_PACKED NvmeSecCtrlEntry {
uint16_t scid;
uint16_t pcid;