Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 May 2020 17:25:30 +0000
From:      Li-Wen Hsu <lwhsu@freebsd.org>
To:        Jessica Clarke <jrtc27@freebsd.org>
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>
In-Reply-To: <202005062328.046NSp8x079151@repo.freebsd.org>
References:  <202005062328.046NSp8x079151@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200507172530.GA61260>