hw/pc.c: Fix converting of ioport_register* to MemoryRegion
authorJulien Grall <julien.grall@citrix.com>
Wed, 9 Jan 2013 18:10:22 +0000 (18:10 +0000)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 11 Jan 2013 08:49:44 +0000 (09:49 +0100)
commitc02e1eac887b1b0aee7361b1fcf889e7d47fed9d
treeecb5c6bfc80436e1bb993d6c7827a0073beb4169
parenteb7ff6fb0bddb33991fa44586ac8e2e02019dc97
hw/pc.c: Fix converting of ioport_register* to MemoryRegion

The commit 258711 introduced MemoryRegion to replace ioport_region*
for ioport 80h and F0h.
A MemoryRegion needs to have both read and write callback otherwise a segfault
will occur when an access is made.

The previous behaviour of this both ioport is to return 0xffffffffffffffff.
So keep this behaviour.

Reported-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Julien Grall <julien.grall@citrix.com>
Tested-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/pc.c