From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvA0p-00066S-8Y for qemu-devel@nongnu.org; Tue, 15 Jan 2013 12:09:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvA0k-0003IF-8v for qemu-devel@nongnu.org; Tue, 15 Jan 2013 12:09:23 -0500 Received: from cantor2.suse.de ([195.135.220.15]:35237 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvA0j-0003I0-Vo for qemu-devel@nongnu.org; Tue, 15 Jan 2013 12:09:18 -0500 Message-ID: <50F58D37.1030808@suse.de> Date: Tue, 15 Jan 2013 18:09:11 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1357334986-13941-1-git-send-email-hpoussin@reactos.org> <1357334986-13941-6-git-send-email-hpoussin@reactos.org> <50F18A02.2080706@suse.de> In-Reply-To: <50F18A02.2080706@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 05/10] xen_platform: do not use old_portio-style callbacks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: xen-devel , =?UTF-8?B?SGVydsOpIFBvdXNzaW5lYXU=?= , qemu-devel@nongnu.org Stefano, Am 12.01.2013 17:06, schrieb Andreas F=C3=A4rber: > Am 04.01.2013 22:29, schrieb Herv=C3=A9 Poussineau: >> Signed-off-by: Herv=C3=A9 Poussineau >> --- >> hw/xen_platform.c | 21 ++++++++++----------- >> 1 file changed, 10 insertions(+), 11 deletions(-) >> >> diff --git a/hw/xen_platform.c b/hw/xen_platform.c >> index e7611bb..02e0146 100644 >> --- a/hw/xen_platform.c >> +++ b/hw/xen_platform.c >> @@ -279,7 +279,8 @@ static void platform_fixed_ioport_init(PCIXenPlatf= ormState* s) >> =20 >> /* Xen Platform PCI Device */ >> =20 >> -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 =3D=3D 0) { >> return platform_fixed_ioport_readb(opaque, 0); >> @@ -288,30 +289,28 @@ static uint32_t xen_platform_ioport_readb(void *= opaque, uint32_t addr) >> } >> } >> =20 >> -static void xen_platform_ioport_writeb(void *opaque, uint32_t addr, u= int32_t val) >> +static void xen_platform_ioport_writeb(void *opaque, hwaddr addr, >> + uint64_t val, unsigned int siz= e) >> { >> PCIXenPlatformState *s =3D opaque; >> =20 >> 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; >> } >> } >> =20 >> -static MemoryRegionPortio xen_pci_portio[] =3D { >> - { 0, 0x100, 1, .read =3D xen_platform_ioport_readb, }, >> - { 0, 0x100, 1, .write =3D xen_platform_ioport_writeb, }, >> - PORTIO_END_OF_LIST() >> -}; >> - >> static const MemoryRegionOps xen_pci_io_ops =3D { >> - .old_portio =3D xen_pci_portio, >> + .read =3D xen_platform_ioport_readb, >> + .write =3D xen_platform_ioport_writeb, >> + .impl.min_access_size =3D 1, >> + .impl.max_access_size =3D 1, >> }; >> =20 >> static void platform_ioport_bar_setup(PCIXenPlatformState *d) >=20 > Thanks, applied to memory-ioport queue: > https://github.com/afaerber/qemu-cpu/commits/memory-ioport If you want to ack or object, now would be the time. :) https://github.com/afaerber/qemu-cpu/commit/016861a22283da3931c4b343e6d2d= f0dc123b6ef Cheers, Andreas >=20 > Is there some kind of guidance in which cases to use .impl vs. .valid > for the access sizes in these conversions? >=20 > Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg