diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2022-11-22 15:01:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-22 15:01:36 +0000 |
commit | 360f6a6795a94d81b036c13a08595db944c1904c (patch) | |
tree | f26893500e120dd676204ae0ff6eafaf7720d304 /lib | |
parent | 229a1ea318a6604c46f8404d3c61802b3421421c (diff) | |
download | libvfio-user-360f6a6795a94d81b036c13a08595db944c1904c.zip libvfio-user-360f6a6795a94d81b036c13a08595db944c1904c.tar.gz libvfio-user-360f6a6795a94d81b036c13a08595db944c1904c.tar.bz2 |
vfu_pci_init: initialize PCI config space flags (#724)
vfu_pci_init() sets the size of the PCI config space but not the flags;
vfu_realize_ctx() won't initialize the flags since the size if already
set. vfu_pci_init() must initialize flags as well.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pci.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -498,6 +498,7 @@ vfu_pci_init(vfu_ctx_t *vfu_ctx, vfu_pci_type_t pci_type, vfu_ctx->pci.type = pci_type; vfu_ctx->pci.config_space = cfg_space; vfu_ctx->reg_info[VFU_PCI_DEV_CFG_REGION_IDX].size = size; + vfu_ctx->reg_info[VFU_PCI_DEV_CFG_REGION_IDX].flags = VFU_REGION_FLAG_RW; return 0; } |