From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu3bW-0004mt-Ne for qemu-devel@nongnu.org; Sat, 12 Jan 2013 11:06:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tu3bM-00020D-1F for qemu-devel@nongnu.org; Sat, 12 Jan 2013 11:06:42 -0500 Received: from cantor2.suse.de ([195.135.220.15]:48180 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu3bL-000203-O3 for qemu-devel@nongnu.org; Sat, 12 Jan 2013 11:06:31 -0500 Message-ID: <50F18A02.2080706@suse.de> Date: Sat, 12 Jan 2013 17:06:26 +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> In-Reply-To: <1357334986-13941-6-git-send-email-hpoussin@reactos.org> 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: =?UTF-8?B?SGVydsOpIFBvdXNzaW5lYXU=?= Cc: xen-devel , Stefano Stabellini , qemu-devel@nongnu.org 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(-) >=20 > 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(PCIXenPlatfo= rmState* 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 *o= paque, uint32_t addr) > } > } > =20 > -static void xen_platform_ioport_writeb(void *opaque, uint32_t addr, ui= nt32_t val) > +static void xen_platform_ioport_writeb(void *opaque, hwaddr addr, > + uint64_t val, unsigned int size= ) > { > 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) Thanks, applied to memory-ioport queue: https://github.com/afaerber/qemu-cpu/commits/memory-ioport Is there some kind of guidance in which cases to use .impl vs. .valid for the access sizes in these conversions? 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