From owner-svn-src-head@freebsd.org Thu May 7 17:25:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6841B2DF234; Thu, 7 May 2020 17:25:30 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49J0j628N9z4S7q; Thu, 7 May 2020 17:25:30 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1129) id 3B24315F81; Thu, 7 May 2020 17:25:30 +0000 (UTC) Date: Thu, 7 May 2020 17:25:30 +0000 From: Li-Wen Hsu To: Jessica Clarke Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r360722 - head/sys/dev/virtio/mmio Message-ID: <20200507172530.GA61260@freefall.freebsd.org> References: <202005062328.046NSp8x079151@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202005062328.046NSp8x079151@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2020 17:25:30 -0000 On Wed, May 06, 2020 at 23:28:51 +0000, Jessica Clarke wrote: > Author: jrtc27 > Date: Wed May 6 23:28:51 2020 > New Revision: 360722 > URL: https://svnweb.freebsd.org/changeset/base/360722 > > Log: > virtio_mmio: Support non-transitional version 2 devices > > The non-legacy virtio MMIO specification drops the use of PFNs and > replaces them with physical addresses. Whilst many implementations are > so-called transitional devices, also implementing the legacy > specification, TinyEMU[1] does not. Device-specific configuration > registers have also changed to being little-endian, and must be accessed > using a single aligned access for registers up to 32 bits, and two > 32-bit aligned accesses for 64-bit registers. > > [1] https://bellard.org/tinyemu/ > > Reviewed by: br, brooks (mentor) > Approved by: br, brooks (mentor) > Differential Revision: https://reviews.freebsd.org/D24681 > > Modified: > head/sys/dev/virtio/mmio/virtio_mmio.c > head/sys/dev/virtio/mmio/virtio_mmio.h Hi Jessica, It looks this commit breaks armv6 and armv7 builds: --- virtio_mmio.o --- /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:442:13: error: shift count >= width of type [-Werror,-Wshift-count-overflow] paddr >> 32); ^ ~~ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:127:44: note: expanded from macro 'vtmmio_write_config_4' VIRTIO_MMIO_PREWRITE(sc->platform, (o), (v)); \ ^ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:442:13: error: shift count >= width of type [-Werror,-Wshift-count-overflow] paddr >> 32); ^ ~~ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:128:34: note: expanded from macro 'vtmmio_write_config_4' bus_write_4((sc)->res[0], (o), (v)); \ ^ /usr/src/sys/sys/bus.h:919:59: note: expanded from macro 'bus_write_4' bus_space_write_4((r)->r_bustag, (r)->r_bushandle, (o), (v)) ^ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:442:13: error: shift count >= width of type [-Werror,-Wshift-count-overflow] paddr >> 32); ^ ~~ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:130:40: note: expanded from macro 'vtmmio_write_config_4' VIRTIO_MMIO_NOTE(sc->platform, (o), (v)); \ ^ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:448:13: error: shift count >= width of type [-Werror,-Wshift-count-overflow] paddr >> 32); ^ ~~ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:127:44: note: expanded from macro 'vtmmio_write_config_4' VIRTIO_MMIO_PREWRITE(sc->platform, (o), (v)); \ ^ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:448:13: error: shift count >= width of type [-Werror,-Wshift-count-overflow] paddr >> 32); ^ ~~ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:128:34: note: expanded from macro 'vtmmio_write_config_4' bus_write_4((sc)->res[0], (o), (v)); \ ^ /usr/src/sys/sys/bus.h:919:59: note: expanded from macro 'bus_write_4' bus_space_write_4((r)->r_bustag, (r)->r_bushandle, (o), (v)) ^ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:448:13: error: shift count >= width of type [-Werror,-Wshift-count-overflow] paddr >> 32); ^ ~~ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:130:40: note: expanded from macro 'vtmmio_write_config_4' VIRTIO_MMIO_NOTE(sc->platform, (o), (v)); \ ^ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:454:13: error: shift count >= width of type [-Werror,-Wshift-count-overflow] paddr >> 32); ^ ~~ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:127:44: note: expanded from macro 'vtmmio_write_config_4' VIRTIO_MMIO_PREWRITE(sc->platform, (o), (v)); \ ^ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:454:13: error: shift count >= width of type [-Werror,-Wshift-count-overflow] paddr >> 32); ^ ~~ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:128:34: note: expanded from macro 'vtmmio_write_config_4' bus_write_4((sc)->res[0], (o), (v)); \ ^ /usr/src/sys/sys/bus.h:919:59: note: expanded from macro 'bus_write_4' bus_space_write_4((r)->r_bustag, (r)->r_bushandle, (o), (v)) ^ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:454:13: error: shift count >= width of type [-Werror,-Wshift-count-overflow] paddr >> 32); ^ ~~ /usr/src/sys/dev/virtio/mmio/virtio_mmio.c:130:40: note: expanded from macro 'vtmmio_write_config_4' VIRTIO_MMIO_NOTE(sc->platform, (o), (v)); \ ^ https://ci.freebsd.org/job/FreeBSD-head-armv6-build/9109/console https://ci.freebsd.org/job/FreeBSD-head-armv7-build/9035/console Thanks, Li-Wen