diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2021-04-06 13:22:51 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2021-04-06 13:22:51 +0100 |
| commit | 259e909790c83995436938a2b7af464b5d63d4c3 (patch) | |
| tree | bd6668b5d28b6b2c50e0034ca4c6935296140c4f /hw/pci/pcie.c | |
| parent | 109918d24a3bb9ed3d05beb34ea4ac6be443c138 (diff) | |
| parent | d83f46d189a26fa32434139954d264326f199a45 (diff) | |
| download | focaccia-qemu-259e909790c83995436938a2b7af464b5d63d4c3.tar.gz focaccia-qemu-259e909790c83995436938a2b7af464b5d63d4c3.zip | |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc,virtio: last minute bugfixes Two last minute bugfixes. They are both designed to prevent compatibility headaches down the road. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Tue 06 Apr 2021 12:13:07 BST # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: virtio-pci: compat page aligned ATS x86: rename oem-id and oem-table-id properties Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/pci/pcie.c')
| -rw-r--r-- | hw/pci/pcie.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index a733e2fb87..fd0fa157e8 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -963,16 +963,18 @@ void pcie_dev_ser_num_init(PCIDevice *dev, uint16_t offset, uint64_t ser_num) pci_set_quad(dev->config + offset + pci_dsn_cap, ser_num); } -void pcie_ats_init(PCIDevice *dev, uint16_t offset) +void pcie_ats_init(PCIDevice *dev, uint16_t offset, bool aligned) { pcie_add_capability(dev, PCI_EXT_CAP_ID_ATS, 0x1, offset, PCI_EXT_CAP_ATS_SIZEOF); dev->exp.ats_cap = offset; - /* Invalidate Queue Depth 0, Page Aligned Request 1 */ - pci_set_word(dev->config + offset + PCI_ATS_CAP, - PCI_ATS_CAP_PAGE_ALIGNED); + /* Invalidate Queue Depth 0 */ + if (aligned) { + pci_set_word(dev->config + offset + PCI_ATS_CAP, + PCI_ATS_CAP_PAGE_ALIGNED); + } /* STU 0, Disabled by default */ pci_set_word(dev->config + offset + PCI_ATS_CTRL, 0); |