aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2022-11-22 15:01:36 +0000
committerGitHub <noreply@github.com>2022-11-22 15:01:36 +0000
commit360f6a6795a94d81b036c13a08595db944c1904c (patch)
treef26893500e120dd676204ae0ff6eafaf7720d304 /lib
parent229a1ea318a6604c46f8404d3c61802b3421421c (diff)
downloadlibvfio-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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pci.c b/lib/pci.c
index 5a0cd1a..b34226b 100644
--- a/lib/pci.c
+++ b/lib/pci.c
@@ -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;
}