From 27ce0f3afc9dd25d21b43bbce505157afd93d111 Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Mon, 20 Feb 2017 22:43:13 +0200 Subject: hw/virtio: fix Power Management Control Register for PCI Express virtio devices Make Power Management State flag 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 | 2 ++ 2 files changed, 6 insertions(+) (limited to 'include') diff --git a/include/hw/compat.h b/include/hw/compat.h index 0931aa59c4..90606f9fdb 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -30,6 +30,10 @@ .driver = "virtio-pci",\ .property = "x-pcie-lnkctl-init",\ .value = "off",\ + },{\ + .driver = "virtio-pci",\ + .property = "x-pcie-pm-init",\ + .value = "off",\ }, #define HW_COMPAT_2_7 \ diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h index 11c6247431..3d8f24b007 100644 --- a/include/hw/pci/pcie.h +++ b/include/hw/pci/pcie.h @@ -63,6 +63,8 @@ typedef enum { struct PCIExpressDevice { /* Offset of express capability in config space */ uint8_t exp_cap; + /* Offset of Power Management capability in config space */ + uint8_t pm_cap; /* SLOT */ bool hpev_notified; /* Logical AND of conditions for hot plug event. -- cgit v1.2.1