Message ID | 20200309100009.17624-1-kraxel@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] stdvga+bochs-display: add dummy mmio handler | expand |
Patchew URL: https://patchew.org/QEMU/20200309100009.17624-1-kraxel@redhat.com/ Hi, This series failed the docker-clang@ubuntu build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash make docker-image-ubuntu V=1 NETWORK=1 time make docker-test-clang@ubuntu SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END === LINK qemu-io LINK qemu-edid LINK fsdev/virtfs-proxy-helper /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 LINK scsi/qemu-pr-helper LINK qemu-bridge-helper LINK virtiofsd --- CC alpha-softmmu/hw/virtio/vhost-vsock.o CC hppa-softmmu/hw/virtio/vhost-vsock-pci.o CC mips-softmmu/hw/virtio/virtio-iommu.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC arm-softmmu/hw/vfio/calxeda-xgmac.o CC mips64-softmmu/hw/virtio/virtio-crypto-pci.o CC hppa-softmmu/hw/virtio/vhost-user-blk-pci.o --- CC mips-softmmu/hw/virtio/virtio-input-host-pci.o CC mips64-softmmu/hw/virtio/vhost-scsi-pci.o CC mips64-softmmu/hw/virtio/virtio-input-host-pci.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC alpha-softmmu/hw/virtio/virtio-balloon-pci.o CC aarch64-softmmu/hw/virtio/virtio-balloon.o CC mips64el-softmmu/cpus.o --- CC moxie-softmmu/accel/stubs/hax-stub.o CC aarch64-softmmu/target/arm/cpu.o CC mipsel-softmmu/target/mips/helper.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC mipsel-softmmu/target/mips/op_helper.o CC arm-softmmu/target/arm/gdbstub.o CC mips64el-softmmu/target/mips/mips-semi.o --- CC or1k-softmmu/accel/qtest.o CC mips64el-softmmu/target/mips/machine.o CC mipsel-softmmu/target/mips/cp0_helper.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC or1k-softmmu/accel/stubs/hax-stub.o CC aarch64-softmmu/target/arm/gdbstub.o CC mips64el-softmmu/target/mips/cp0_timer.o --- CC nios2-softmmu/accel/tcg/translate-all.o CC nios2-softmmu/accel/tcg/translator.o GEN arm-softmmu/target/arm/decode-t32.inc.c /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC ppc-softmmu/balloon.o CC moxie-softmmu/dump/dump.o CC or1k-softmmu/hw/core/machine-qmp-cmds.o --- CC moxie-softmmu/hw/core/machine-qmp-cmds.o CC nios2-softmmu/dump/dump.o CC ppc-softmmu/memory.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC or1k-softmmu/hw/net/rocker/qmp-norocker.o CC or1k-softmmu/hw/openrisc/pic_cpu.o CC nios2-softmmu/hw/core/machine-qmp-cmds.o --- GEN ppc64-softmmu/config-devices.h GEN ppc64-softmmu/config-target.h CC ppc64-softmmu/exec.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 GEN trace/generated-helpers.c CC or1k-softmmu/qapi/qapi-commands-misc-target.o CC aarch64-softmmu/trace/control-target.o --- CC ppc-softmmu/hw/scsi/vhost-scsi.o CC or1k-softmmu/target/openrisc/translate.o CC or1k-softmmu/target/openrisc/disas.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC nios2-softmmu/trace/control-target.o CC riscv32-softmmu/fpu/softfloat.o CC nios2-softmmu/softmmu/main.o --- GEN sh4-softmmu/config-devices.h GEN sh4-softmmu/config-target.h CC sh4-softmmu/exec.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC sh4-softmmu/exec-vary.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC ppc64-softmmu/accel/tcg/cputlb.o CC riscv32-softmmu/memory.o CC riscv64-softmmu/tcg/tcg.o --- CC s390x-softmmu/hw/virtio/virtio-input-pci.o CC sh4-softmmu/qapi/qapi-types-misc-target.o CC ppc64-softmmu/hw/ppc/ppc_booke.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC s390x-softmmu/hw/virtio/virtio-rng-pci.o CC sh4-softmmu/qapi/qapi-types.o CC x86_64-softmmu/hw/block/virtio-blk.o --- CC riscv64-softmmu/hw/riscv/sifive_uart.o CC s390x-softmmu/hw/virtio/virtio-balloon-pci.o CC x86_64-softmmu/hw/block/vhost-user-blk.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC sparc64-softmmu/hw/virtio/virtio-balloon-pci.o CC riscv64-softmmu/hw/riscv/spike.o CC sh4-softmmu/qapi/qapi-visit-machine-target.o --- CC ppc-softmmu/target/ppc/timebase_helper.o CC riscv64-softmmu/qapi/qapi-visit.o CC ppc-softmmu/target/ppc/misc_helper.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC s390x-softmmu/hw/s390x/sclpcpu.o CC riscv64-softmmu/qapi/qapi-events-machine-target.o CC x86_64-softmmu/hw/display/virtio-gpu-pci.o --- CC ppc64-softmmu/hw/ppc/pnv_xscom.o GEN xtensaeb-softmmu/hmp-commands.h GEN xtensaeb-softmmu/hmp-commands-info.h /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 GEN xtensaeb-softmmu/config-devices.h GEN xtensaeb-softmmu/config-target.h CC xtensaeb-softmmu/exec.o --- CC xtensa-softmmu/tcg/tcg-op-gvec.o GEN trace/generated-helpers.c CC ppc64-softmmu/hw/ppc/pnv_bmc.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC x86_64-softmmu/hw/virtio/vhost-user.o CC s390x-softmmu/hw/s390x/ccw-device.o CC aarch64-linux-user/tcg/tcg-common.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC xtensaeb-softmmu/tcg/tcg-op-vec.o CC aarch64-linux-user/tcg/optimize.o CC sparc64-softmmu/trace/control-target.o --- CC xtensa-softmmu/tcg/optimize.o CC aarch64-linux-user/fpu/softfloat.o CC sparc64-softmmu/softmmu/main.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC ppc64-softmmu/hw/ppc/pnv_pnor.o CC xtensaeb-softmmu/tcg/tcg-common.o CC s390x-softmmu/hw/s390x/s390-pci-inst.o --- CC ppc64-softmmu/hw/ppc/spapr_rtas_ddw.o CC xtensa-softmmu/disas.o CC s390x-softmmu/hw/s390x/s390-skeys.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC xtensaeb-softmmu/fpu/softfloat.o CC x86_64-softmmu/hw/virtio/virtio-crypto-pci.o CC s390x-softmmu/hw/s390x/s390-stattrib.o --- CC xtensaeb-softmmu/migration/ram.o CC x86_64-softmmu/hw/virtio/virtio-balloon-pci.o CC ppc64-softmmu/hw/ppc/prep_systemio.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC xtensa-softmmu/migration/ram.o CC x86_64-softmmu/hw/virtio/virtio-iommu-pci.o CC xtensaeb-softmmu/accel/qtest.o --- CC armeb-linux-user/linux-user/arm/nwfpe/double_cpdo.o CC arm-linux-user/linux-user/arm/nwfpe/extended_cpdo.o GEN trace/generated-helpers.c /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 GEN aarch64_be-linux-user/target/arm/decode-vfp-uncond.inc.c CC xtensa-softmmu/hw/virtio/vhost-vsock.o CC arm-linux-user/target/arm/arm-semi.o --- CC aarch64_be-linux-user/target/arm/pauth_helper.o CC arm-linux-user/target/arm/neon_helper.o CC xtensaeb-softmmu/hw/xtensa/xtfpga.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC cris-linux-user/tcg/tcg-op-vec.o GEN armeb-linux-user/target/arm/decode-t32.inc.c CC arm-linux-user/target/arm/m_helper.o --- CC xtensa-softmmu/target/xtensa/core-dc232b.o CC mips64-linux-user/tcg/tcg-op-gvec.o CC mips64-linux-user/tcg/tcg-common.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC microblazeel-linux-user/thunk.o CC i386-linux-user/linux-user/linuxload.o CC microblaze-linux-user/accel/stubs/hax-stub.o --- CC i386-linux-user/target/i386/smm_helper.o CC i386-linux-user/target/i386/svm_helper.o CC xtensa-softmmu/target/xtensa/helper.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC m68k-linux-user/target/m68k/softfloat.o LINK hppa-linux-user/qemu-hppa CC mips64el-linux-user/tcg/tcg-op-vec.o --- CC mipsel-linux-user/disas.o CC nios2-linux-user/tcg/tcg-op-gvec.o CC nios2-linux-user/tcg/tcg-common.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 LINK microblazeel-linux-user/qemu-microblazeel CC nios2-linux-user/tcg/optimize.o LINK mips-linux-user/qemu-mips --- CC f128_add.o CC f128_sub.o CC f128_mul.o /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 CC f128_mulAdd.o LINK tests/test-visitor-serialization CC f128_div.o --- LINK tests/test-throttle AR libsoftfloat.a LINK tests/test-thread-pool /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 LINK tests/test-hbitmap /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 LINK tests/test-bdrv-drain LINK fp-test /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 LINK tests/test-bdrv-graph-mod /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 LINK tests/test-blockjob LINK tests/test-blockjob-txn LINK tests/test-block-backend /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 LINK tests/test-block-iothread /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 LINK tests/test-image-locking LINK tests/test-x86-cpuid LINK tests/test-xbzrle LINK tests/test-vmstate /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 LINK tests/test-cutils /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 LINK tests/test-shift128 LINK tests/test-mul64 LINK tests/test-int128 --- LINK tests/test-crypto-hash LINK tests/test-crypto-hmac LINK tests/test-crypto-cipher /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 LINK tests/test-crypto-secret LINK tests/test-crypto-tlscredsx509 LINK tests/test-crypto-tlssession --- FLOAT TEST le_quiet FLOAT TEST add FLOAT TEST sub /usr/bin/ld: /lib/x86_64-linux-gnu/libtirpc.so.3: warning: common of `rpc_createerr@@GLIBC_2.2.5' overridden by definition from /lib/x86_64-linux-gnu/libc.so.6 FLOAT TEST mul FLOAT TEST mulAdd FLOAT TEST uint-to-float --- dbus-daemon[7893]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry ** ERROR:/tmp/qemu-test/src/tests/qtest/dbus-vmstate-test.c:114:get_connection: assertion failed (err == NULL): The connection is closed (g-io-error-quark, 18) ERROR - Bail out! ERROR:/tmp/qemu-test/src/tests/qtest/dbus-vmstate-test.c:114:get_connection: assertion failed (err == NULL): The connection is closed (g-io-error-quark, 18) Aborted (core dumped) cleaning up pid 7893 make: *** [/tmp/qemu-test/src/tests/Makefile.include:632: check-qtest-i386] Error 1 make: *** Waiting for unfinished jobs.... Looking for expected file 'tests/data/acpi/pc/FACP.memhp' --- dbus-daemon[9236]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry ** ERROR:/tmp/qemu-test/src/tests/qtest/dbus-vmstate-test.c:114:get_connection: assertion failed (err == NULL): The connection is closed (g-io-error-quark, 18) cleaning up pid 9236 Aborted (core dumped) ERROR - Bail out! ERROR:/tmp/qemu-test/src/tests/qtest/dbus-vmstate-test.c:114:get_connection: assertion failed (err == NULL): The connection is closed (g-io-error-quark, 18) make: *** [/tmp/qemu-test/src/tests/Makefile.include:632: check-qtest-x86_64] Error 1 TEST check-qtest-arm: tests/qtest/test-hmp TEST check-qtest-arm: tests/qtest/qos-test TEST check-qtest-aarch64: tests/qtest/test-hmp --- raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=6c3ae320ae0b4309bad680c32b70d98b', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-qmnsrwk1/src/docker-src.2020-03-09-06.07.39.3886:/var/tmp/qemu:z,ro', 'qemu:ubuntu', '/var/tmp/qemu/run', 'test-clang']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=6c3ae320ae0b4309bad680c32b70d98b make[1]: *** [docker-run] Error 1 make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-qmnsrwk1/src' make: *** [docker-run-test-clang@ubuntu] Error 2 real 19m30.931s user 0m8.851s The full log is available at http://patchew.org/logs/20200309100009.17624-1-kraxel@redhat.com/testing.docker-clang@ubuntu/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
On Mon, Mar 9, 2020 at 3:00 AM Gerd Hoffmann <kraxel@redhat.com> wrote: > > The bochs-display mmio bar has some sub-regions with the actual hardware > registers. What happens when the guest access something outside those > regions depends on the archirecture. On x86 those reads succeed (and > return 0xff I think). On risc-v qemu aborts. > > This patch adds handlers for the parent region, to make the wanted > behavior explicit and to make things consistent across architectures. > > v2: > - use existing unassigned_io_ops. > - also cover stdvga. > > Cc: Alistair Francis <alistair23@gmail.com> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> + QEMU stable. Can this be back ported to 5.0? Without this patch the bochs device doesn't work with RISC-V. Alistair > --- > hw/display/bochs-display.c | 4 ++-- > hw/display/vga-pci.c | 8 ++++---- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c > index 62085f9fc063..70eb619ef424 100644 > --- a/hw/display/bochs-display.c > +++ b/hw/display/bochs-display.c > @@ -284,8 +284,8 @@ static void bochs_display_realize(PCIDevice *dev, Error **errp) > memory_region_init_io(&s->qext, obj, &bochs_display_qext_ops, s, > "qemu extended regs", PCI_VGA_QEXT_SIZE); > > - memory_region_init(&s->mmio, obj, "bochs-display-mmio", > - PCI_VGA_MMIO_SIZE); > + memory_region_init_io(&s->mmio, obj, &unassigned_io_ops, NULL, > + "bochs-display-mmio", PCI_VGA_MMIO_SIZE); > memory_region_add_subregion(&s->mmio, PCI_VGA_BOCHS_OFFSET, &s->vbe); > memory_region_add_subregion(&s->mmio, PCI_VGA_QEXT_OFFSET, &s->qext); > > diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c > index b34632467399..6b9db86e363c 100644 > --- a/hw/display/vga-pci.c > +++ b/hw/display/vga-pci.c > @@ -249,8 +249,8 @@ static void pci_std_vga_realize(PCIDevice *dev, Error **errp) > > /* mmio bar for vga register access */ > if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_MMIO)) { > - memory_region_init(&d->mmio, NULL, "vga.mmio", > - PCI_VGA_MMIO_SIZE); > + memory_region_init_io(&d->mmio, OBJECT(dev), &unassigned_io_ops, NULL, > + "vga.mmio", PCI_VGA_MMIO_SIZE); > > if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) { > qext = true; > @@ -285,8 +285,8 @@ static void pci_secondary_vga_realize(PCIDevice *dev, Error **errp) > s->con = graphic_console_init(DEVICE(dev), 0, s->hw_ops, s); > > /* mmio bar */ > - memory_region_init(&d->mmio, OBJECT(dev), "vga.mmio", > - PCI_VGA_MMIO_SIZE); > + memory_region_init_io(&d->mmio, OBJECT(dev), &unassigned_io_ops, NULL, > + "vga.mmio", PCI_VGA_MMIO_SIZE); > > if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) { > qext = true; > -- > 2.18.2 >
On Fri, Aug 21, 2020 at 11:33 AM Alistair Francis <alistair23@gmail.com> wrote: > > On Mon, Mar 9, 2020 at 3:00 AM Gerd Hoffmann <kraxel@redhat.com> wrote: > > > > The bochs-display mmio bar has some sub-regions with the actual hardware > > registers. What happens when the guest access something outside those > > regions depends on the archirecture. On x86 those reads succeed (and > > return 0xff I think). On risc-v qemu aborts. > > > > This patch adds handlers for the parent region, to make the wanted > > behavior explicit and to make things consistent across architectures. > > > > v2: > > - use existing unassigned_io_ops. > > - also cover stdvga. > > > > Cc: Alistair Francis <alistair23@gmail.com> > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > > + QEMU stable. > > Can this be back ported to 5.0? Sorry, I meant 4.2 Alistair > > Without this patch the bochs device doesn't work with RISC-V. > > Alistair > > > --- > > hw/display/bochs-display.c | 4 ++-- > > hw/display/vga-pci.c | 8 ++++---- > > 2 files changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c > > index 62085f9fc063..70eb619ef424 100644 > > --- a/hw/display/bochs-display.c > > +++ b/hw/display/bochs-display.c > > @@ -284,8 +284,8 @@ static void bochs_display_realize(PCIDevice *dev, Error **errp) > > memory_region_init_io(&s->qext, obj, &bochs_display_qext_ops, s, > > "qemu extended regs", PCI_VGA_QEXT_SIZE); > > > > - memory_region_init(&s->mmio, obj, "bochs-display-mmio", > > - PCI_VGA_MMIO_SIZE); > > + memory_region_init_io(&s->mmio, obj, &unassigned_io_ops, NULL, > > + "bochs-display-mmio", PCI_VGA_MMIO_SIZE); > > memory_region_add_subregion(&s->mmio, PCI_VGA_BOCHS_OFFSET, &s->vbe); > > memory_region_add_subregion(&s->mmio, PCI_VGA_QEXT_OFFSET, &s->qext); > > > > diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c > > index b34632467399..6b9db86e363c 100644 > > --- a/hw/display/vga-pci.c > > +++ b/hw/display/vga-pci.c > > @@ -249,8 +249,8 @@ static void pci_std_vga_realize(PCIDevice *dev, Error **errp) > > > > /* mmio bar for vga register access */ > > if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_MMIO)) { > > - memory_region_init(&d->mmio, NULL, "vga.mmio", > > - PCI_VGA_MMIO_SIZE); > > + memory_region_init_io(&d->mmio, OBJECT(dev), &unassigned_io_ops, NULL, > > + "vga.mmio", PCI_VGA_MMIO_SIZE); > > > > if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) { > > qext = true; > > @@ -285,8 +285,8 @@ static void pci_secondary_vga_realize(PCIDevice *dev, Error **errp) > > s->con = graphic_console_init(DEVICE(dev), 0, s->hw_ops, s); > > > > /* mmio bar */ > > - memory_region_init(&d->mmio, OBJECT(dev), "vga.mmio", > > - PCI_VGA_MMIO_SIZE); > > + memory_region_init_io(&d->mmio, OBJECT(dev), &unassigned_io_ops, NULL, > > + "vga.mmio", PCI_VGA_MMIO_SIZE); > > > > if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) { > > qext = true; > > -- > > 2.18.2 > >
diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c index 62085f9fc063..70eb619ef424 100644 --- a/hw/display/bochs-display.c +++ b/hw/display/bochs-display.c @@ -284,8 +284,8 @@ static void bochs_display_realize(PCIDevice *dev, Error **errp) memory_region_init_io(&s->qext, obj, &bochs_display_qext_ops, s, "qemu extended regs", PCI_VGA_QEXT_SIZE); - memory_region_init(&s->mmio, obj, "bochs-display-mmio", - PCI_VGA_MMIO_SIZE); + memory_region_init_io(&s->mmio, obj, &unassigned_io_ops, NULL, + "bochs-display-mmio", PCI_VGA_MMIO_SIZE); memory_region_add_subregion(&s->mmio, PCI_VGA_BOCHS_OFFSET, &s->vbe); memory_region_add_subregion(&s->mmio, PCI_VGA_QEXT_OFFSET, &s->qext); diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index b34632467399..6b9db86e363c 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -249,8 +249,8 @@ static void pci_std_vga_realize(PCIDevice *dev, Error **errp) /* mmio bar for vga register access */ if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_MMIO)) { - memory_region_init(&d->mmio, NULL, "vga.mmio", - PCI_VGA_MMIO_SIZE); + memory_region_init_io(&d->mmio, OBJECT(dev), &unassigned_io_ops, NULL, + "vga.mmio", PCI_VGA_MMIO_SIZE); if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) { qext = true; @@ -285,8 +285,8 @@ static void pci_secondary_vga_realize(PCIDevice *dev, Error **errp) s->con = graphic_console_init(DEVICE(dev), 0, s->hw_ops, s); /* mmio bar */ - memory_region_init(&d->mmio, OBJECT(dev), "vga.mmio", - PCI_VGA_MMIO_SIZE); + memory_region_init_io(&d->mmio, OBJECT(dev), &unassigned_io_ops, NULL, + "vga.mmio", PCI_VGA_MMIO_SIZE); if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) { qext = true;
The bochs-display mmio bar has some sub-regions with the actual hardware registers. What happens when the guest access something outside those regions depends on the archirecture. On x86 those reads succeed (and return 0xff I think). On risc-v qemu aborts. This patch adds handlers for the parent region, to make the wanted behavior explicit and to make things consistent across architectures. v2: - use existing unassigned_io_ops. - also cover stdvga. Cc: Alistair Francis <alistair23@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/display/bochs-display.c | 4 ++-- hw/display/vga-pci.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)