From 746d42b13368e18856dccf16bd39e04d02feec09 Mon Sep 17 00:00:00 2001 From: Łukasz Gieryk Date: Mon, 9 May 2022 16:16:16 +0200 Subject: 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 Acked-by: Michael S. Tsirkin Reviewed-by: Klaus Jensen Signed-off-by: Klaus Jensen --- include/block/nvme.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/block') 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; -- cgit v1.2.3-55-g7522