mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
hw/nvme: Allocate sec-ctrl-list as a dynamic array
To prevent further bumping up the number of maximum VF te support, this patch allocates a dynamic array (NvmeCtrl *)->sec_ctrl_list based on number of VF supported by sriov_max_vfs property. Reviewed-by: Klaus Jensen <k.jensen@samsung.com> Signed-off-by: Minwoo Im <minwoo.im@samsung.com> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
This commit is contained in:
parent
1a494d119a
commit
c6159d0e38
3 changed files with 5 additions and 10 deletions
|
@ -7868,12 +7868,6 @@ static bool nvme_check_params(NvmeCtrl *n, Error **errp)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (params->sriov_max_vfs > NVME_MAX_VFS) {
|
||||
error_setg(errp, "sriov_max_vfs must be between 0 and %d",
|
||||
NVME_MAX_VFS);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (params->cmb_size_mb) {
|
||||
error_setg(errp, "CMB is not supported with SR-IOV");
|
||||
return false;
|
||||
|
@ -8485,7 +8479,7 @@ static Property nvme_props[] = {
|
|||
DEFINE_PROP_UINT8("zoned.zasl", NvmeCtrl, params.zasl, 0),
|
||||
DEFINE_PROP_BOOL("zoned.auto_transition", NvmeCtrl,
|
||||
params.auto_transition_zones, true),
|
||||
DEFINE_PROP_UINT8("sriov_max_vfs", NvmeCtrl, params.sriov_max_vfs, 0),
|
||||
DEFINE_PROP_UINT16("sriov_max_vfs", NvmeCtrl, params.sriov_max_vfs, 0),
|
||||
DEFINE_PROP_UINT16("sriov_vq_flexible", NvmeCtrl,
|
||||
params.sriov_vq_flexible, 0),
|
||||
DEFINE_PROP_UINT16("sriov_vi_flexible", NvmeCtrl,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue