OSDN Git Service

stdvga+bochs-display: add dummy mmio handler
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 9 Mar 2020 10:00:09 +0000 (11:00 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 16 Mar 2020 11:40:47 +0000 (12:40 +0100)
commitf872c76296b991fde4db5fb87a1cfbd8d4c22c88
treeaef7f565484e336b94800982ecf3497947168806
parent61c265f0660ee476985808c8aa7915617c44fd53
stdvga+bochs-display: add dummy mmio handler

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>
Message-id: 20200309100009.17624-1-kraxel@redhat.com
hw/display/bochs-display.c
hw/display/vga-pci.c