From patchwork Tue Jan 15 18:47:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 212297 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E26B32C008F for ; Wed, 16 Jan 2013 05:48:34 +1100 (EST) Received: from localhost ([::1]:40311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvBYn-0005NQ-1A for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2013 13:48:33 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvBYR-0005Bd-35 for qemu-devel@nongnu.org; Tue, 15 Jan 2013 13:48:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvBYP-00016P-Bc for qemu-devel@nongnu.org; Tue, 15 Jan 2013 13:48:10 -0500 Received: from cantor2.suse.de ([195.135.220.15]:40241 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvBYP-00016E-3G for qemu-devel@nongnu.org; Tue, 15 Jan 2013 13:48:09 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 2236DA51B7; Tue, 15 Jan 2013 19:48:08 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2013 19:47:56 +0100 Message-Id: <1358275677-20590-3-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1358275677-20590-1-git-send-email-afaerber@suse.de> References: <1358275677-20590-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: "open list:X86" , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Stefano Stabellini Subject: [Qemu-devel] [PATCH 2/3] xen_platform: Do not use old_portio-style callbacks X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Hervé Poussineau Signed-off-by: Hervé Poussineau Signed-off-by: Andreas Färber --- hw/xen_platform.c | 21 ++++++++++----------- 1 Datei geändert, 10 Zeilen hinzugefügt(+), 11 Zeilen entfernt(-) 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)