qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] pci: fix bridge IO/BASE
@ 2012-03-04  9:46 Michael S. Tsirkin
  2012-03-04 10:27 ` Blue Swirl
  0 siblings, 1 reply; 41+ messages in thread
From: Michael S. Tsirkin @ 2012-03-04  9:46 UTC (permalink / raw)
  To: qemu-devel, Blue Swirl, Anthony Liguori, Mark Cave-Ayland
  Cc: Michael S. Tsirkin

commit 5caef97a16010f818ea8b950e2ee24ba876643ad introduced
a regression: we do not make IO base/limit upper 16
bit registers writeable, so we should report a 16 bit
IO range type, not a 32 bit one.
Note that PCI_PREF_RANGE_TYPE_32 is 0x0, but PCI_IO_RANGE_TYPE_32 is 0x1.

In particular, this broke sparc64.

Note: this just reverts to behaviour prior to the patch.
Making PCI_IO_BASE_UPPER16 and PCI_IO_LIMIT_UPPER16
registers writeable should, and seems to, work just as well, but
as no system seems to actually be interested in 32 bit IO,
let's not make unnecessary changes.

Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Mark, can you confirm that this fixes the bug for you?

---
 hw/pci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/pci.c b/hw/pci.c
index fee27fc..6d08cef 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -633,8 +633,8 @@ static void pci_init_mask_bridge(PCIDevice *d)
     memset(d->wmask + PCI_PREF_BASE_UPPER32, 0xff, 8);
 
     /* Supported memory and i/o types */
-    d->config[PCI_IO_BASE] |= PCI_IO_RANGE_TYPE_32;
-    d->config[PCI_IO_LIMIT] |= PCI_IO_RANGE_TYPE_32;
+    d->config[PCI_IO_BASE] |= PCI_IO_RANGE_TYPE_16;
+    d->config[PCI_IO_LIMIT] |= PCI_IO_RANGE_TYPE_16;
     pci_word_test_and_set_mask(d->config + PCI_PREF_MEMORY_BASE,
                                PCI_PREF_RANGE_TYPE_64);
     pci_word_test_and_set_mask(d->config + PCI_PREF_MEMORY_LIMIT,
-- 
1.7.9.111.gf3fb0

^ permalink raw reply related	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2012-03-06 13:42 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-04  9:46 [Qemu-devel] [PATCH] pci: fix bridge IO/BASE Michael S. Tsirkin
2012-03-04 10:27 ` Blue Swirl
2012-03-04 12:21   ` Michael S. Tsirkin
2012-03-04 12:37     ` Blue Swirl
2012-03-04 13:28       ` Michael S. Tsirkin
2012-03-04 13:38         ` Blue Swirl
2012-03-04 14:23           ` Michael S. Tsirkin
2012-03-04 14:35             ` Blue Swirl
2012-03-04 15:22               ` Michael S. Tsirkin
2012-03-04 17:07                 ` Blue Swirl
2012-03-04 17:35                   ` Michael S. Tsirkin
2012-03-04 19:51                     ` Blue Swirl
2012-03-04 20:02                       ` Michael S. Tsirkin
2012-03-04 20:32                         ` Blue Swirl
2012-03-04 21:28                           ` Michael S. Tsirkin
2012-03-04 21:54                             ` Blue Swirl
2012-03-04 22:29                               ` Michael S. Tsirkin
2012-03-05 18:34                                 ` Blue Swirl
2012-03-06 13:42                                   ` Michael S. Tsirkin
2012-03-04 21:56                       ` Mark Cave-Ayland
2012-03-04 15:41               ` Michael S. Tsirkin
2012-03-04 13:38       ` Michael S. Tsirkin
2012-03-04 12:28   ` Avi Kivity
2012-03-04 12:38     ` Blue Swirl
2012-03-04 12:41       ` Avi Kivity
2012-03-04 12:46         ` Blue Swirl
2012-03-04 13:21           ` Michael S. Tsirkin
2012-03-04 13:22         ` Michael S. Tsirkin
2012-03-04 13:33           ` Blue Swirl
2012-03-04 14:08             ` Michael S. Tsirkin
2012-03-04 14:26               ` Blue Swirl
2012-03-04 16:42                 ` Michael S. Tsirkin
2012-03-04 17:49                   ` Blue Swirl
2012-03-04 18:11                     ` Mark Cave-Ayland
2012-03-04 19:27                       ` Michael S. Tsirkin
2012-03-04 19:43                       ` Michael S. Tsirkin
2012-03-04 19:27                     ` Michael S. Tsirkin
2012-03-04 12:33   ` Michael S. Tsirkin
2012-03-04 12:35     ` Avi Kivity
2012-03-04 12:35     ` Michael S. Tsirkin
2012-03-04 12:42     ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).