From d584f1b9ca7452ed8d6cd80f7fccd79d667ae49b Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Mon, 20 Feb 2017 22:43:12 +0200 Subject: hw/virtio: fix Link Control Register for PCI Express virtio devices Make several Link Control Register flags writable to conform with the PCI Express spec. Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/compat.h | 4 ++++ include/hw/pci/pcie.h | 3 +++ 2 files changed, 7 insertions(+) (limited to 'include') diff --git a/include/hw/compat.h b/include/hw/compat.h index c98776a..0931aa5 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -26,6 +26,10 @@ .driver = "virtio-pci",\ .property = "x-pcie-deverr-init",\ .value = "off",\ + },{\ + .driver = "virtio-pci",\ + .property = "x-pcie-lnkctl-init",\ + .value = "off",\ }, #define HW_COMPAT_2_7 \ diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h index 163c519..11c6247 100644 --- a/include/hw/pci/pcie.h +++ b/include/hw/pci/pcie.h @@ -96,6 +96,9 @@ uint8_t pcie_cap_flags_get_vector(PCIDevice *dev); void pcie_cap_deverr_init(PCIDevice *dev); void pcie_cap_deverr_reset(PCIDevice *dev); +void pcie_cap_lnkctl_init(PCIDevice *dev); +void pcie_cap_lnkctl_reset(PCIDevice *dev); + void pcie_cap_slot_init(PCIDevice *dev, uint16_t slot); void pcie_cap_slot_reset(PCIDevice *dev); void pcie_cap_slot_write_config(PCIDevice *dev, -- cgit v1.1