svn commit: r360722 - head/sys/dev/virtio/mmio
Li-Wen Hsu
lwhsu at freebsd.org
Thu May 7 17:25:30 UTC 2020
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
More information about the svn-src-all
mailing list