From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5453BC433DF for ; Sat, 22 Aug 2020 14:16:47 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F9C12072D for ; Sat, 22 Aug 2020 14:16:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hGxNGSVx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F9C12072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9UK6-0003eG-Bx for qemu-devel@archiver.kernel.org; Sat, 22 Aug 2020 10:16:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9UJE-0003Dl-Ni for qemu-devel@nongnu.org; Sat, 22 Aug 2020 10:15:56 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:39154) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k9UJC-0001zI-5j for qemu-devel@nongnu.org; Sat, 22 Aug 2020 10:15:52 -0400 Received: by mail-wr1-x443.google.com with SMTP id a5so4470880wrm.6 for ; Sat, 22 Aug 2020 07:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tthNWqNKiRI8yjia+C25buQpPNf0kP/fcyPzE0FdcZA=; b=hGxNGSVxHFR9R33V9ATVEwIhed88l6pKrk+GYrMQWBKSEJ2uLFIqwF+96/pG80KV5d THPrUFhH5qOLnvrgeG9FqAt1ZM3xzRrMimABNh5HD1WE3zFmUgHI8TTQbK1lNVzHAGCk Fa4ZusxYqVSIE1x/xBFGRUYRE5TSp8L/VPilAlKTxg0pIHPnm0tznd+3DJoqFq6C0uvb 8knnYr2UXzuz42XY19cVFjiDe+fOcMDTnZBtIxQz3/Swbar35zerr50qLer+h0btTv/Y od2ZJ7mOvOuSjLo5cj6hTUDSvkOo1CjNPsPTei0imvT9DjLEAuhADd2/qfkQn1bXAfQy QQfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=tthNWqNKiRI8yjia+C25buQpPNf0kP/fcyPzE0FdcZA=; b=G2QnwcVA/CI31ssVLpbNLblpGcOv7IhobhiebsnSnuRRQfU+Pm7VsRuYFS7jhD+EvK UhXOeFS5mH68t4TL0RTNqzf8JSI/U3Lejg/K9ZxrwFdsow5a7RuYlrMqqSimYCML/unb yDJUghsvLP8t8zVZWijI8S0HzAaJ2GLOdYAspPJbfFdFk3+nBKdwvBLFBoxWyXyqFLNr ukjqRij6wDQkJJsI4H52L4qFq4K6e0qdJDrx3zw9VIqBU1Hz6Ksbl06d7+BZKPOeJSYd 5HiJqSjuhugQPciBr0tszk7yhFJ9ETDqW9idKbN2rba08vgxIv7ur9P0yY2fmPQ+6EAy US0A== X-Gm-Message-State: AOAM533KrSRrwrL0INrtFhHVPdA+djaaE8S8w4W8mkf+Cmq89BvLAIb/ TBkCZXSwRr6xAEMKpzqUReQdBcMeJwU= X-Google-Smtp-Source: ABdhPJz22xDOM50+VnIQQnv3snRb00aTfmfZ8FI9IOgxFtQZCrJdft5pfihc43vWcWaAdb71m+JPkA== X-Received: by 2002:a5d:4a8a:: with SMTP id o10mr6823213wrq.327.1598105748101; Sat, 22 Aug 2020 07:15:48 -0700 (PDT) Received: from localhost.localdomain (121.red-81-40-121.staticip.rima-tde.net. [81.40.121.121]) by smtp.gmail.com with ESMTPSA id o128sm12353270wmo.39.2020.08.22.07.15.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Aug 2020 07:15:47 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH] hw/display/tcx: Allow 64-bit accesses to framebuffer stippler and blitter Date: Sat, 22 Aug 2020 16:15:45 +0200 Message-Id: <20200822141545.1314296-1-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Lorenz , 1892540@bugs.launchpad.net, Andreas Gustafsson , Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Gerd Hoffmann Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Buglink: https://bugs.launchpad.net/bugs/1892540 Fixes: 55d7bfe2293 ("tcx: Implement hardware acceleration") Signed-off-by: Philippe Mathieu-Daudé --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14401C433DF for ; Sat, 22 Aug 2020 14:26:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DCA872072D for ; Sat, 22 Aug 2020 14:26:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCA872072D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bugs.launchpad.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9UTD-0006CU-1h for qemu-devel@archiver.kernel.org; Sat, 22 Aug 2020 10:26:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9USg-0005nO-Pf for qemu-devel@nongnu.org; Sat, 22 Aug 2020 10:25:38 -0400 Received: from indium.canonical.com ([91.189.90.7]:49398) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k9USe-0002xx-FS for qemu-devel@nongnu.org; Sat, 22 Aug 2020 10:25:38 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.86_2 #2 (Debian)) id 1k9USc-0000bO-I4 for ; Sat, 22 Aug 2020 14:25:34 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 629AF2E807B for ; Sat, 22 Aug 2020 14:25:34 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Sat, 22 Aug 2020 14:15:45 -0000 From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <1892540@bugs.launchpad.net> To: qemu-devel@nongnu.org X-Launchpad-Notification-Type: bug X-Launchpad-Bug: product=qemu; status=New; importance=Undecided; assignee=None; X-Launchpad-Bug-Information-Type: Public X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: gson laurent-vivier philmd X-Launchpad-Bug-Reporter: Andreas Gustafsson (gson) X-Launchpad-Bug-Modifier: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9_=28philmd?= =?utf-8?q?=29?= References: <159803735569.2614.10182276398047269277.malonedeb@chaenomeles.canonical.com> Message-ID: <20200822141545.1314296-1-f4bug@amsat.org> Subject: [Bug 1892540] [RFC PATCH] hw/display/tcx: Allow 64-bit accesses to framebuffer stippler and blitter X-Launchpad-Message-Rationale: Subscriber (QEMU) @qemu-devel-ml X-Launchpad-Message-For: qemu-devel-ml Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="99c2d833c8d727fd05148486920aca032e908071"; Instance="production" X-Launchpad-Hash: 3f92d0957b4eeb0974a1ec428b13ad3875535515 Received-SPF: none client-ip=91.189.90.7; envelope-from=bounces@canonical.com; helo=indium.canonical.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/22 10:00:50 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bug 1892540 <1892540@bugs.launchpad.net> Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Message-ID: <20200822141545.jkyi6gZxHuM_9zS6brCkOSlJS9R3n85EPCB7AScJKPM@z> 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=3D1.= 31&r2=3D1.32 Reported-by: Andreas Gustafsson Buglink: https://bugs.launchpad.net/bugs/1892540 Fixes: 55d7bfe2293 ("tcx: Implement hardware acceleration") Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 =3D { .read =3D tcx_stip_readl, .write =3D tcx_stip_writel, .endianness =3D DEVICE_NATIVE_ENDIAN, - .valid =3D { + .impl =3D { .min_access_size =3D 4, .max_access_size =3D 4, }, + .valid =3D { + .min_access_size =3D 4, + .max_access_size =3D 8, + }, }; = static const MemoryRegionOps tcx_rstip_ops =3D { .read =3D tcx_stip_readl, .write =3D tcx_rstip_writel, .endianness =3D DEVICE_NATIVE_ENDIAN, - .valid =3D { + .impl =3D { .min_access_size =3D 4, .max_access_size =3D 4, }, + .valid =3D { + .min_access_size =3D 4, + .max_access_size =3D 8, + }, }; = static uint64_t tcx_blit_readl(void *opaque, hwaddr addr, @@ -650,10 +658,14 @@ static const MemoryRegionOps tcx_rblit_ops =3D { .read =3D tcx_blit_readl, .write =3D tcx_rblit_writel, .endianness =3D DEVICE_NATIVE_ENDIAN, - .valid =3D { + .impl =3D { .min_access_size =3D 4, .max_access_size =3D 4, }, + .valid =3D { + .min_access_size =3D 4, + .max_access_size =3D 8, + }, }; = static void tcx_invalidate_cursor_position(TCXState *s) -- = 2.26.2 -- = 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-spar= c.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=3D0xf0046b14 sfsr=3D0xb6 sfva= =3D0x54000000 [ 1.0000050] cpu0: data fault: pc=3D0xf0046b14 addr=3D0x54000000 sfsr= =3D0xb6 [ 1.0000050] panic: kernel fault [ 1.0000050] halted To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1892540/+subscriptions