From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J4ZAm-0003RF-GF for qemu-devel@nongnu.org; Tue, 18 Dec 2007 04:55:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J4ZAj-0003R0-J0 for qemu-devel@nongnu.org; Tue, 18 Dec 2007 04:55:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4ZAj-0003Qx-Du for qemu-devel@nongnu.org; Tue, 18 Dec 2007 04:55:33 -0500 Received: from ecfrec.frec.bull.fr ([129.183.4.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J4ZAi-0007QM-2n for qemu-devel@nongnu.org; Tue, 18 Dec 2007 04:55:32 -0500 Subject: Re: [Qemu-devel] [PATCH 2/2 v2][UPDATED] Direct IDE I/O From: Laurent Vivier In-Reply-To: <200712180003.49328.paul@codesourcery.com> References: <11979293592467@bull.net> <47670010.6090409@bellard.org> <200712180003.49328.paul@codesourcery.com> Date: Tue, 18 Dec 2007 10:55:30 +0100 Message-Id: <1197971730.6657.3.camel@frecb07144> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Hffo5q2321+yHS1rfdmh" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org --=-Hffo5q2321+yHS1rfdmh Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Le mardi 18 d=C3=A9cembre 2007 =C3=A0 00:03 +0000, Paul Brook a =C3=A9crit = : > On Monday 17 December 2007, Fabrice Bellard wrote: > > Laurent Vivier wrote: > > > This patch enhances the "-drive ,cache=3Doff" mode with IDE drive emu= lation > > > by removing the buffer used in the IDE emulation. > > > --- > > > block.c | 10 +++ > > > block.h | 2 > > > block_int.h | 1 > > > cpu-all.h | 1 > > > exec.c | 19 ++++++ > > > hw/ide.c | 176 > > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- vl.c = =20 > > > | 1 > > > 7 files changed, 204 insertions(+), 6 deletions(-) > > > [...] > > > > Unfortunately it is more complicated to write to the CPU memory. In > > particular, specific action should be done when translated code is > > present. A consistent API must include something like cpu_page_lock() / > > unlock(). Look at cpu_physical_memory_rw() to see the various issues > > which must be handled. Moreover, it would be better to add bus specific > > APIs (at least for PCI), but I can accept a CPU memory API for now. >=20 > In general it may also be unsafe to do async writes directly to guest mem= ory=20 > because you break the atomicity of loads/stores. Thank you for your comments. I had some doubts on this patch too. I will not resend it. I will resend only the first one corrected with comments from Fabrice (malloc()/free()). Regards, Laurent --=20 ----------------- Laurent.Vivier@bull.net ------------------ "La perfection est atteinte non quand il ne reste rien =C3=A0 ajouter mais quand il ne reste rien =C3=A0 enlever." Saint Exup=C3=A9ry --=-Hffo5q2321+yHS1rfdmh Content-Type: application/pgp-signature; name=signature.asc Content-Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHZ5kS9Kffa9pFVzwRAt6RAKC65U993+pOjPpG9nyBKbX66WTUlQCgn9tB J2cMr96DFswFp54FPy+a7Iw= =j06J -----END PGP SIGNATURE----- --=-Hffo5q2321+yHS1rfdmh--