Skip to content

Commit b25a30f

Browse files
chejianjlijinxia
authored andcommitted
dm: add default handling in pci_emul_capwrite
Virtio 1.0 introduced several PCIY_VENDOR capabilities. When trying to write to these capabilities no action is taken so the registers in the capability of VIRTIO_PCI_CAP_PCI_CFG such as bar, offset and length remain the default value 0. Later a read or write of pci_cfg_data needs these information to perform the indirect read or write to the bar region. Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Reviewed-by: Hao Li <hao.l.li@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Kevin Tian <kevin.tian@intel.com>
1 parent f0729cd commit b25a30f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

devicemodel/hw/pci/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,7 @@ pci_emul_capwrite(struct pci_vdev *dev, int offset, int bytes, uint32_t val)
10861086
pciecap_cfgwrite(dev, capoff, offset, bytes, val);
10871087
break;
10881088
default:
1089+
CFGWRITE(dev, offset, val, bytes);
10891090
break;
10901091
}
10911092
}

0 commit comments

Comments
 (0)