From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J4fSe-00078T-FE for qemu-devel@nongnu.org; Tue, 18 Dec 2007 11:38:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J4fSc-00077f-W4 for qemu-devel@nongnu.org; Tue, 18 Dec 2007 11:38:28 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4fSc-00077V-Lw for qemu-devel@nongnu.org; Tue, 18 Dec 2007 11:38:26 -0500 Received: from il.qumranet.com ([82.166.9.18]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J4fSb-0006nJ-MW for qemu-devel@nongnu.org; Tue, 18 Dec 2007 11:38:26 -0500 Message-ID: <4767F780.6030909@qumranet.com> Date: Tue, 18 Dec 2007 18:38:24 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/2 v2][UPDATED] Direct IDE I/O References: <11979293592467@bull.net> <47670010.6090409@bellard.org> <200712180003.49328.paul@codesourcery.com> In-Reply-To: <200712180003.49328.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Laurent Vivier Paul Brook wrote: >> 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. >> > > In general it may also be unsafe to do async writes directly to guest memory > because you break the atomicity of loads/stores. > > But that is true on real hardware as well, I think. The guest cannot expect atomicity if it dmas into the memory it is accessing. Also, it would be a rare guest that accesses memory while dma is active. -- error compiling committee.c: too many arguments to function