aboutsummaryrefslogtreecommitdiff
path: root/hw/xen_platform.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-01-15 16:54:41 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2013-01-15 16:54:41 -0600
commit8ec12ec734da08a945a05e2b0f89d2639048c771 (patch)
tree9272fbd6b3603cc343eb4395531064384fa4bd2a /hw/xen_platform.c
parent58a864dec23f9052a5379a3ce81566e065c14afa (diff)
parentc3a29809e4d8924a0cfffd7f1af3c2f3c46f5889 (diff)
downloadqemu-8ec12ec734da08a945a05e2b0f89d2639048c771.zip
qemu-8ec12ec734da08a945a05e2b0f89d2639048c771.tar.gz
qemu-8ec12ec734da08a945a05e2b0f89d2639048c771.tar.bz2
Merge remote-tracking branch 'afaerber/memory-ioport' into staging
* afaerber/memory-ioport: acpi_piix4: Do not use old_portio-style callbacks xen_platform: Do not use old_portio-style callbacks hw/dma.c: Fix conversion of ioport_register* to MemoryRegion Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/xen_platform.c')
-rw-r--r--hw/xen_platform.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/hw/xen_platform.c b/hw/xen_platform.c
index ca66047..8866468 100644
--- a/hw/xen_platform.c
+++ b/hw/xen_platform.c
@@ -279,7 +279,8 @@ static void platform_fixed_ioport_init(PCIXenPlatformState* s)
/* Xen Platform PCI Device */
-static uint32_t xen_platform_ioport_readb(void *opaque, uint32_t addr)
+static uint64_t xen_platform_ioport_readb(void *opaque, hwaddr addr,
+ unsigned int size)
{
if (addr == 0) {
return platform_fixed_ioport_readb(opaque, 0);
@@ -288,30 +289,28 @@ static uint32_t xen_platform_ioport_readb(void *opaque, uint32_t addr)
}
}
-static void xen_platform_ioport_writeb(void *opaque, uint32_t addr, uint32_t val)
+static void xen_platform_ioport_writeb(void *opaque, hwaddr addr,
+ uint64_t val, unsigned int size)
{
PCIXenPlatformState *s = opaque;
switch (addr) {
case 0: /* Platform flags */
- platform_fixed_ioport_writeb(opaque, 0, val);
+ platform_fixed_ioport_writeb(opaque, 0, (uint32_t)val);
break;
case 8:
- log_writeb(s, val);
+ log_writeb(s, (uint32_t)val);
break;
default:
break;
}
}
-static MemoryRegionPortio xen_pci_portio[] = {
- { 0, 0x100, 1, .read = xen_platform_ioport_readb, },
- { 0, 0x100, 1, .write = xen_platform_ioport_writeb, },
- PORTIO_END_OF_LIST()
-};
-
static const MemoryRegionOps xen_pci_io_ops = {
- .old_portio = xen_pci_portio,
+ .read = xen_platform_ioport_readb,
+ .write = xen_platform_ioport_writeb,
+ .impl.min_access_size = 1,
+ .impl.max_access_size = 1,
};
static void platform_ioport_bar_setup(PCIXenPlatformState *d)