All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 00/10] qemu-sparc queue 20201028
@ 2020-10-28  8:23 Mark Cave-Ayland
  2020-10-28  8:23 ` [PULL 01/10] sparc32-dma: use object_initialize_child() for espdma and ledma child objects Mark Cave-Ayland
                   ` (10 more replies)
  0 siblings, 11 replies; 62+ messages in thread
From: Mark Cave-Ayland @ 2020-10-28  8:23 UTC (permalink / raw)
  To: peter.maydell, qemu-devel; +Cc: Mark Cave-Ayland

The following changes since commit cfc1105649947f03134294a2448ce2b2e117456f:

  Merge remote-tracking branch 'remotes/philmd-gitlab/tags/acceptance-testing-20201026' into staging (2020-10-27 16:58:39 +0000)

are available in the Git repository at:

  git://github.com/mcayland/qemu.git tags/qemu-sparc-20201028

for you to fetch changes up to 0980307e705b5677d9b4158a0a0346abf5041f33:

  hw/pci-host/sabre: Simplify code initializing variable once (2020-10-28 07:59:26 +0000)

----------------------------------------------------------------
qemu-sparc queue

----------------------------------------------------------------
Mark Cave-Ayland (6):
      sparc32-dma: use object_initialize_child() for espdma and ledma child objects
      sparc32-ledma: use object_initialize_child() for lance child object
      sparc32-espdma: use object_initialize_child() for esp child object
      sparc32-ledma: don't reference nd_table directly within the device
      sabre: don't call sysbus_mmio_map() in sabre_realize()
      sabre: increase number of PCI bus IRQs from 32 to 64

Philippe Mathieu-Daudé (4):
      hw/display/tcx: Allow 64-bit accesses to framebuffer stippler and blitter
      hw/pci-host/sabre: Update documentation link
      hw/pci-host/sabre: Remove superfluous address range check
      hw/pci-host/sabre: Simplify code initializing variable once

 hw/display/tcx.c               | 18 +++++++++++++---
 hw/dma/sparc32_dma.c           | 49 +++++++++++++++++++++---------------------
 hw/pci-host/sabre.c            | 28 +++++-------------------
 hw/sparc/sun4m.c               | 21 +++++++++++-------
 hw/sparc64/sun4u.c             |  7 ++++++
 include/hw/sparc/sparc32_dma.h |  8 +++----
 6 files changed, 68 insertions(+), 63 deletions(-)


^ permalink raw reply	[flat|nested] 62+ messages in thread
* [PATCH for-5.2] hw/display/tcx: add missing 64-bit access for framebuffer blitter
@ 2020-11-20  8:17 ` Mark Cave-Ayland
  0 siblings, 0 replies; 62+ messages in thread
From: Mark Cave-Ayland @ 2020-11-20  8:17 UTC (permalink / raw)
  To: f4bug, gson, 1892540, qemu-devel

Commit ae5643ecc6 "hw/display/tcx: Allow 64-bit accesses to framebuffer stippler
and blitter" enabled 64-bit access for the TCX framebuffer stippler and blitter
but missed applying the change to one of the blitter MemoryRegions.

Whilst the original change works for me on my local NetBSD test image, the latest
NetBSD ISO panics on startup without this fix.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fixes: ae5643ecc6 ("hw/display/tcx: Allow 64-bit accesses to framebuffer stippler and blitter")
Buglink: https://bugs.launchpad.net/bugs/1892540
---
 hw/display/tcx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index 878ecc8c50..3799d29b75 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -649,10 +649,14 @@ static const MemoryRegionOps tcx_blit_ops = {
     .read = tcx_blit_readl,
     .write = tcx_blit_writel,
     .endianness = DEVICE_NATIVE_ENDIAN,
-    .valid = {
+    .impl = {
         .min_access_size = 4,
         .max_access_size = 4,
     },
+    .valid = {
+        .min_access_size = 4,
+        .max_access_size = 8,
+    },
 };
 
 static const MemoryRegionOps tcx_rblit_ops = {
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 62+ messages in thread
* [PATCH v3] hw/display/tcx: Allow 64-bit accesses to framebuffer stippler and blitter
@ 2020-10-24 20:51 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 62+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-24 20:51 UTC (permalink / raw)
  To: Mark Cave-Ayland, qemu-devel
  Cc: Michael Lorenz, Andreas Gustafsson, 1892540, Richard Henderson,
	Laurent Vivier, Philippe Mathieu-Daudé,
	Michael S . Tsirkin, Gerd Hoffmann

The S24/TCX datasheet is listed as "Unable to locate" on [1].

However the NetBSD revision 1.32 of the driver introduced
64-bit accesses to the stippler and blitter [2]. It is safe
to assume these memory regions are 64-bit accessible.
QEMU implementation is 32-bit, so fill the 'impl' fields.

Michael Lorenz (author of the NetBSD code [2]) provided us with more
information in [3]:

> IIRC the real hardware *requires* 64bit accesses for stipple and
> blitter operations to work. For stipples you write a 64bit word into
> STIP space, the address defines where in the framebuffer you want to
> draw, the data contain a 32bit bitmask, foreground colour and a ROP.
> BLIT space works similarly, the 64bit word contains an offset were to
> read pixels from, and how many you want to copy.
>
> One more thing since there seems to be some confusion - 64bit accesses
> on the framebuffer are fine as well. TCX/S24 is *not* an SBus device,
> even though its node says it is.
> S24 is a card that plugs into a special slot on the SS5 mainboard,
> which is shared with an SBus slot and looks a lot like a horizontal
> UPA slot. Both S24 and TCX are accessed through the Micro/TurboSPARC's
> AFX bus which is 64bit wide and intended for graphics.
> Early FFB docs even mentioned connecting to both AFX and UPA,
> no idea if that was ever realized in hardware though.

[1] http://web.archive.org/web/20111209011516/http://wikis.sun.com/display/FOSSdocs/Home
[2] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/sbus/tcx.c.diff?r1=1.31&r2=1.32
[3] https://www.mail-archive.com/qemu-devel@nongnu.org/msg734928.html

Reported-by: Andreas Gustafsson <gson@gson.org>
Buglink: https://bugs.launchpad.net/bugs/1892540
Fixes: 55d7bfe2293 ("tcx: Implement hardware acceleration")
Tested-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Andreas Gustafsson <gson@gson.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Since v2:
- added Michael's memories
- added R-b/T-b tags

Since v1:
- added missing uncommitted staged changes... (tcx_blit_ops)
---
 hw/display/tcx.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index c9d5e45cd1f..878ecc8c506 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -549,20 +549,28 @@ static const MemoryRegionOps tcx_stip_ops = {
     .read = tcx_stip_readl,
     .write = tcx_stip_writel,
     .endianness = DEVICE_NATIVE_ENDIAN,
-    .valid = {
+    .impl = {
         .min_access_size = 4,
         .max_access_size = 4,
     },
+    .valid = {
+        .min_access_size = 4,
+        .max_access_size = 8,
+    },
 };
 
 static const MemoryRegionOps tcx_rstip_ops = {
     .read = tcx_stip_readl,
     .write = tcx_rstip_writel,
     .endianness = DEVICE_NATIVE_ENDIAN,
-    .valid = {
+    .impl = {
         .min_access_size = 4,
         .max_access_size = 4,
     },
+    .valid = {
+        .min_access_size = 4,
+        .max_access_size = 8,
+    },
 };
 
 static uint64_t tcx_blit_readl(void *opaque, hwaddr addr,
@@ -651,10 +659,14 @@ static const MemoryRegionOps tcx_rblit_ops = {
     .read = tcx_blit_readl,
     .write = tcx_rblit_writel,
     .endianness = DEVICE_NATIVE_ENDIAN,
-    .valid = {
+    .impl = {
         .min_access_size = 4,
         .max_access_size = 4,
     },
+    .valid = {
+        .min_access_size = 4,
+        .max_access_size = 8,
+    },
 };
 
 static void tcx_invalidate_cursor_position(TCXState *s)
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 62+ messages in thread
* [RFC PATCH] hw/display/tcx: Allow 64-bit accesses to framebuffer stippler and blitter
@ 2020-08-22 14:15 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 62+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-08-22 14:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael Lorenz, 1892540, Andreas Gustafsson, Mark Cave-Ayland,
	Philippe Mathieu-Daudé,
	Laurent Vivier, Gerd Hoffmann

The S24/TCX datasheet is listed as "Unable to locate" on [1].

However the NetBSD revision 1.32 of the driver introduced
64-bit accesses to the stippler and blitter [2]. It is safe
to assume these memory regions are 64-bit accessible.
QEMU implementation is 32-bit, so fill the 'impl' fields.

[1] http://web.archive.org/web/20111209011516/http://wikis.sun.com/display/FOSSdocs/Home
[2] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/sbus/tcx.c.diff?r1=1.31&r2=1.32

Reported-by: Andreas Gustafsson <gson@gson.org>
Buglink: https://bugs.launchpad.net/bugs/1892540
Fixes: 55d7bfe2293 ("tcx: Implement hardware acceleration")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/display/tcx.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index 1fb45b1aab8..96c6898b149 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -548,20 +548,28 @@ static const MemoryRegionOps tcx_stip_ops = {
     .read = tcx_stip_readl,
     .write = tcx_stip_writel,
     .endianness = DEVICE_NATIVE_ENDIAN,
-    .valid = {
+    .impl = {
         .min_access_size = 4,
         .max_access_size = 4,
     },
+    .valid = {
+        .min_access_size = 4,
+        .max_access_size = 8,
+    },
 };
 
 static const MemoryRegionOps tcx_rstip_ops = {
     .read = tcx_stip_readl,
     .write = tcx_rstip_writel,
     .endianness = DEVICE_NATIVE_ENDIAN,
-    .valid = {
+    .impl = {
         .min_access_size = 4,
         .max_access_size = 4,
     },
+    .valid = {
+        .min_access_size = 4,
+        .max_access_size = 8,
+    },
 };
 
 static uint64_t tcx_blit_readl(void *opaque, hwaddr addr,
@@ -650,10 +658,14 @@ static const MemoryRegionOps tcx_rblit_ops = {
     .read = tcx_blit_readl,
     .write = tcx_rblit_writel,
     .endianness = DEVICE_NATIVE_ENDIAN,
-    .valid = {
+    .impl = {
         .min_access_size = 4,
         .max_access_size = 4,
     },
+    .valid = {
+        .min_access_size = 4,
+        .max_access_size = 8,
+    },
 };
 
 static void tcx_invalidate_cursor_position(TCXState *s)
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 62+ messages in thread
* [Bug 1892540] [NEW] qemu can no longer boot NetBSD/sparc
@ 2020-08-21 19:15 Andreas Gustafsson
  2020-08-22 10:50 ` [Bug 1892540] " Laurent Vivier
                   ` (5 more replies)
  0 siblings, 6 replies; 62+ messages in thread
From: Andreas Gustafsson @ 2020-08-21 19:15 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Booting NetBSD/sparc in qemu no longer works.  It broke between qemu
version 5.0.0 and 5.1.0, and a bisection identified the following as the
offending commit:

  [5d971f9e672507210e77d020d89e0e89165c8fc9] memory: Revert "memory:
accept mismatching sizes in memory_region_access_valid"

It's still broken as of 7fd51e68c34fcefdb4d6fd646ed3346f780f89f4.

To reproduce, run

  wget http://ftp.netbsd.org/pub/NetBSD/NetBSD-9.0/images/NetBSD-9.0-sparc.iso
  qemu-system-sparc -nographic -cdrom NetBSD-9.0-sparc.iso -boot d

The expected behavior is that the guest boots to the prompt

  Installation medium to load the additional utilities from:

The observed behavior is a panic:

  [   1.0000050] system[0]: trap 0x29: pc=0xf0046b14 sfsr=0xb6 sfva=0x54000000
  [   1.0000050] cpu0: data fault: pc=0xf0046b14 addr=0x54000000 sfsr=0xb6<PERR=0x0,LVL=0x0,AT=0x5,FT=0x5,FAV,OW>
  [   1.0000050] panic: kernel fault
  [   1.0000050] halted

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1892540

Title:
  qemu can no longer boot NetBSD/sparc

Status in QEMU:
  New

Bug description:
  Booting NetBSD/sparc in qemu no longer works.  It broke between qemu
  version 5.0.0 and 5.1.0, and a bisection identified the following as
  the offending commit:

    [5d971f9e672507210e77d020d89e0e89165c8fc9] memory: Revert "memory:
  accept mismatching sizes in memory_region_access_valid"

  It's still broken as of 7fd51e68c34fcefdb4d6fd646ed3346f780f89f4.

  To reproduce, run

    wget http://ftp.netbsd.org/pub/NetBSD/NetBSD-9.0/images/NetBSD-9.0-sparc.iso
    qemu-system-sparc -nographic -cdrom NetBSD-9.0-sparc.iso -boot d

  The expected behavior is that the guest boots to the prompt

    Installation medium to load the additional utilities from:

  The observed behavior is a panic:

    [   1.0000050] system[0]: trap 0x29: pc=0xf0046b14 sfsr=0xb6 sfva=0x54000000
    [   1.0000050] cpu0: data fault: pc=0xf0046b14 addr=0x54000000 sfsr=0xb6<PERR=0x0,LVL=0x0,AT=0x5,FT=0x5,FAV,OW>
    [   1.0000050] panic: kernel fault
    [   1.0000050] halted

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1892540/+subscriptions


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

end of thread, other threads:[~2020-12-10  8:55 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28  8:23 [PULL 00/10] qemu-sparc queue 20201028 Mark Cave-Ayland
2020-10-28  8:23 ` [PULL 01/10] sparc32-dma: use object_initialize_child() for espdma and ledma child objects Mark Cave-Ayland
2020-10-28  8:23 ` [PULL 02/10] sparc32-ledma: use object_initialize_child() for lance child object Mark Cave-Ayland
2020-10-28  8:23 ` [PULL 03/10] sparc32-espdma: use object_initialize_child() for esp " Mark Cave-Ayland
2020-10-28  8:23 ` [PULL 04/10] sparc32-ledma: don't reference nd_table directly within the device Mark Cave-Ayland
2020-10-28  8:23 ` [PULL 05/10] sabre: don't call sysbus_mmio_map() in sabre_realize() Mark Cave-Ayland
2020-10-28  8:23 ` [PULL 06/10] hw/display/tcx: Allow 64-bit accesses to framebuffer stippler and blitter Mark Cave-Ayland
2020-10-28  8:23   ` [Bug 1892540] " Mark Cave-Ayland
2020-11-20 16:16   ` Philippe Mathieu-Daudé
2020-10-28  8:23 ` [PULL 07/10] sabre: increase number of PCI bus IRQs from 32 to 64 Mark Cave-Ayland
2020-10-28  8:23 ` [PULL 08/10] hw/pci-host/sabre: Update documentation link Mark Cave-Ayland
2020-10-28  8:23 ` [PULL 09/10] hw/pci-host/sabre: Remove superfluous address range check Mark Cave-Ayland
2020-10-28  8:23 ` [PULL 10/10] hw/pci-host/sabre: Simplify code initializing variable once Mark Cave-Ayland
2020-10-31 14:42 ` [PULL 00/10] qemu-sparc queue 20201028 Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2020-11-20  8:17 [PATCH for-5.2] hw/display/tcx: add missing 64-bit access for framebuffer blitter Mark Cave-Ayland
2020-11-20  8:17 ` [Bug 1892540] " Mark Cave-Ayland
2020-11-20 10:18 ` Philippe Mathieu-Daudé
2020-11-20 10:18   ` [Bug 1892540] " Philippe Mathieu-Daudé
2020-11-23  8:14 ` Mark Cave-Ayland
2020-11-23  8:14   ` [Bug 1892540] " Mark Cave-Ayland
2020-10-24 20:51 [PATCH v3] hw/display/tcx: Allow 64-bit accesses to framebuffer stippler and blitter Philippe Mathieu-Daudé
2020-10-24 20:51 ` [Bug 1892540] " Philippe Mathieu-Daudé
2020-10-25 10:55 ` Mark Cave-Ayland
2020-10-25 10:55   ` [Bug 1892540] " Mark Cave-Ayland
2020-10-25 11:42   ` Philippe Mathieu-Daudé
2020-10-25 11:42     ` [Bug 1892540] " Philippe Mathieu-Daudé
2020-08-22 14:15 [RFC PATCH] " Philippe Mathieu-Daudé
2020-08-22 14:15 ` [Bug 1892540] " Philippe Mathieu-Daudé
2020-08-21 19:15 [Bug 1892540] [NEW] qemu can no longer boot NetBSD/sparc Andreas Gustafsson
2020-08-22 10:50 ` [Bug 1892540] " Laurent Vivier
2020-08-22 14:21 ` [RFC PATCH v2] hw/display/tcx: Allow 64-bit accesses to framebuffer stippler and blitter Philippe Mathieu-Daudé
2020-08-22 14:21   ` [Bug 1892540] " Philippe Mathieu-Daudé
2020-08-29 15:41   ` Richard Henderson
2020-08-29 16:13     ` Michael
2020-08-29 16:45       ` Philippe Mathieu-Daudé
2020-08-29 16:45         ` [Bug 1892540] " Philippe Mathieu-Daudé
2020-08-29 21:04         ` Michael
2020-08-30  7:32         ` Mark Cave-Ayland
2020-08-30  7:32           ` [Bug 1892540] " Mark Cave-Ayland
2020-10-24 20:53           ` Philippe Mathieu-Daudé
2020-10-24 20:53             ` [Bug 1892540] " Philippe Mathieu-Daudé
2020-08-30  6:18   ` [Bug 1892540] " mst
2020-08-30  6:18     ` mst
2020-08-30  6:18     ` mst
2020-09-01 10:04     ` Philippe Mathieu-Daudé
2020-09-01 10:04       ` Philippe Mathieu-Daudé
2020-09-01 10:04       ` Philippe Mathieu-Daudé
2020-08-30  6:59   ` Andreas Gustafsson
2020-08-30  6:59     ` [Bug 1892540] " Andreas Gustafsson
2020-09-01 10:03     ` Philippe Mathieu-Daudé
2020-09-01 10:03       ` [Bug 1892540] " Philippe Mathieu-Daudé
2020-09-01 10:04       ` Andreas Gustafsson
2020-09-01 10:04         ` [Bug 1892540] " Andreas Gustafsson
2020-10-21  9:25         ` Mark Cave-Ayland
2020-10-21  9:25           ` [Bug 1892540] " Mark Cave-Ayland
2020-08-22 14:36 ` [Bug 1892540] Re: qemu can no longer boot NetBSD/sparc Philippe Mathieu-Daudé
2020-11-21 23:46 ` Peter Maydell
2020-11-22 11:05   ` Mark Cave-Ayland
2020-11-22 11:05     ` Mark Cave-Ayland
2020-11-23 11:39   ` mst
2020-11-23  8:20 ` Mark Cave-Ayland
2020-12-10  8:42 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.