virtio-pci.c (8607f5c3072caeebbe0217df28651fffd3a79fd9) | virtio-pci.c (615c4ed20598ab3eda5e071ba7ba2a5bf70be59f) |
---|---|
1/* 2 * Virtio PCI Bindings 3 * 4 * Copyright IBM, Corp. 2007 5 * Copyright (c) 2009 CodeSourcery 6 * 7 * Authors: 8 * Anthony Liguori <aliguori@us.ibm.com> --- 1801 unchanged lines hidden (view full) --- 1810 pos = pci_add_capability(pci_dev, PCI_CAP_ID_PM, 0, PCI_PM_SIZEOF); 1811 assert(pos > 0); 1812 1813 /* 1814 * Indicates that this function complies with revision 1.2 of the 1815 * PCI Power Management Interface Specification. 1816 */ 1817 pci_set_word(pci_dev->config + pos + PCI_PM_PMC, 0x3); | 1/* 2 * Virtio PCI Bindings 3 * 4 * Copyright IBM, Corp. 2007 5 * Copyright (c) 2009 CodeSourcery 6 * 7 * Authors: 8 * Anthony Liguori <aliguori@us.ibm.com> --- 1801 unchanged lines hidden (view full) --- 1810 pos = pci_add_capability(pci_dev, PCI_CAP_ID_PM, 0, PCI_PM_SIZEOF); 1811 assert(pos > 0); 1812 1813 /* 1814 * Indicates that this function complies with revision 1.2 of the 1815 * PCI Power Management Interface Specification. 1816 */ 1817 pci_set_word(pci_dev->config + pos + PCI_PM_PMC, 0x3); |
1818 1819 if (proxy->flags & VIRTIO_PCI_FLAG_ATS) { 1820 pcie_ats_init(pci_dev, 256); 1821 } 1822 |
|
1818 } else { 1819 /* 1820 * make future invocations of pci_is_express() return false 1821 * and pci_config_size() return PCI_CONFIG_SPACE_SIZE. 1822 */ 1823 pci_dev->cap_present &= ~QEMU_PCI_CAP_EXPRESS; 1824 } 1825 --- 37 unchanged lines hidden (view full) --- 1863 DEFINE_PROP_BIT("modern-pio-notify", VirtIOPCIProxy, flags, 1864 VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, false), 1865 DEFINE_PROP_BIT("x-disable-pcie", VirtIOPCIProxy, flags, 1866 VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, false), 1867 DEFINE_PROP_BIT("page-per-vq", VirtIOPCIProxy, flags, 1868 VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, false), 1869 DEFINE_PROP_BOOL("x-ignore-backend-features", VirtIOPCIProxy, 1870 ignore_backend_features, false), | 1823 } else { 1824 /* 1825 * make future invocations of pci_is_express() return false 1826 * and pci_config_size() return PCI_CONFIG_SPACE_SIZE. 1827 */ 1828 pci_dev->cap_present &= ~QEMU_PCI_CAP_EXPRESS; 1829 } 1830 --- 37 unchanged lines hidden (view full) --- 1868 DEFINE_PROP_BIT("modern-pio-notify", VirtIOPCIProxy, flags, 1869 VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, false), 1870 DEFINE_PROP_BIT("x-disable-pcie", VirtIOPCIProxy, flags, 1871 VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, false), 1872 DEFINE_PROP_BIT("page-per-vq", VirtIOPCIProxy, flags, 1873 VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, false), 1874 DEFINE_PROP_BOOL("x-ignore-backend-features", VirtIOPCIProxy, 1875 ignore_backend_features, false), |
1876 DEFINE_PROP_BIT("ats", VirtIOPCIProxy, flags, 1877 VIRTIO_PCI_FLAG_ATS_BIT, false), |
|
1871 DEFINE_PROP_END_OF_LIST(), 1872}; 1873 1874static void virtio_pci_dc_realize(DeviceState *qdev, Error **errp) 1875{ 1876 VirtioPCIClass *vpciklass = VIRTIO_PCI_GET_CLASS(qdev); 1877 VirtIOPCIProxy *proxy = VIRTIO_PCI(qdev); 1878 PCIDevice *pci_dev = &proxy->pci_dev; --- 697 unchanged lines hidden --- | 1878 DEFINE_PROP_END_OF_LIST(), 1879}; 1880 1881static void virtio_pci_dc_realize(DeviceState *qdev, Error **errp) 1882{ 1883 VirtioPCIClass *vpciklass = VIRTIO_PCI_GET_CLASS(qdev); 1884 VirtIOPCIProxy *proxy = VIRTIO_PCI(qdev); 1885 PCIDevice *pci_dev = &proxy->pci_dev; --- 697 unchanged lines hidden --- |