From 360f6a6795a94d81b036c13a08595db944c1904c Mon Sep 17 00:00:00 2001 From: Thanos Makatos Date: Tue, 22 Nov 2022 15:01:36 +0000 Subject: 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 Reviewed-by: John Levon --- lib/pci.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') 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; } -- cgit v1.1