From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5Z29-0003YD-1g for qemu-devel@nongnu.org; Sun, 26 Aug 2012 05:21:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T5Z26-00068t-K8 for qemu-devel@nongnu.org; Sun, 26 Aug 2012 05:21:28 -0400 Received: from mout.web.de ([212.227.17.11]:55735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5Z26-00068d-AA for qemu-devel@nongnu.org; Sun, 26 Aug 2012 05:21:26 -0400 Message-ID: <5039EA0D.4030806@web.de> Date: Sun, 26 Aug 2012 11:19:09 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <26cea9d1d7137ffbf0d133e0e553b6b79c9d1e6d.1345549695.git.julien.grall@citrix.com> In-Reply-To: <26cea9d1d7137ffbf0d133e0e553b6b79c9d1e6d.1345549695.git.julien.grall@citrix.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigBDD128068C752EBEAE56DCAB" Subject: Re: [Qemu-devel] [PATCH V5 3/8] hw/cirrus_vga.c: replace register_ioport* List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Julien Grall Cc: Stefano.Stabellini@eu.citrix.com, qemu-devel@nongnu.org, avi@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBDD128068C752EBEAE56DCAB Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2012-08-22 14:27, Julien Grall wrote: > This patch replaces all register_ioport* with portio_*. It permits to > use the new Memory stuff like listener. >=20 > Signed-off-by: Julien Grall > --- > hw/cirrus_vga.c | 42 ++++++++++++++++++++++++------------------ > 1 files changed, 24 insertions(+), 18 deletions(-) >=20 > diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c > index e8dcc6b..adfc855 100644 > --- a/hw/cirrus_vga.c > +++ b/hw/cirrus_vga.c > @@ -200,6 +200,7 @@ typedef void (*cirrus_fill_t)(struct CirrusVGAState= *s, > typedef struct CirrusVGAState { > VGACommonState vga; > =20 > + MemoryRegion cirrus_vga_io; > MemoryRegion cirrus_linear_io; > MemoryRegion cirrus_linear_bitblt_io; > MemoryRegion cirrus_mmio_io; > @@ -2528,12 +2529,15 @@ static uint32_t cirrus_vga_ioport_read(void *op= aque, uint32_t addr) > return val; > } > =20 > -static void cirrus_vga_ioport_write(void *opaque, uint32_t addr, uint3= 2_t val) > +static void cirrus_vga_ioport_write(void *opaque, target_phys_addr_t a= ddr, > + uint64_t val, unsigned size) > { > CirrusVGAState *c =3D opaque; > VGACommonState *s =3D &c->vga; > int index; > =20 > + addr +=3D 0x3b0; > + > /* check port range access depending on color/monochrome mode */ > if (vga_ioport_invalid(s, addr)) { > return; > @@ -2657,7 +2661,7 @@ static void cirrus_mmio_write(void *opaque, targe= t_phys_addr_t addr, > if (addr >=3D 0x100) { > cirrus_mmio_blt_write(s, addr - 0x100, val); > } else { > - cirrus_vga_ioport_write(s, addr + 0x3c0, val); > + cirrus_vga_ioport_write(s, addr + 0x10, val, size); > } > } > =20 > @@ -2783,8 +2787,18 @@ static const MemoryRegionOps cirrus_linear_io_op= s =3D { > }, > }; > =20 > +static const MemoryRegionOps cirrus_vga_io_ops =3D { > + .write =3D cirrus_vga_ioport_write, Missing .read. Crashes immediately when you test it. Jan --------------enigBDD128068C752EBEAE56DCAB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlA56g0ACgkQitSsb3rl5xSPNACg2xfJuCln/3CA54Bgqz0DKazs 9u4AoMJyG5s088cQlq83on5t7K85mZWT =2bGE -----END PGP SIGNATURE----- --------------enigBDD128068C752EBEAE56DCAB--