From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [ANNOUNCE] kvm-14 release Date: Thu, 22 Feb 2007 12:12:17 -0600 Message-ID: <45DDDD01.7030802@us.ibm.com> References: <45D98390.6060001@qumranet.com> <45DA25D9.1060509@aurel32.net> <45DA9FFA.2020009@qumranet.com> <45DB7514.3040409@aurel32.net> <45DBFD6E.2060507@qumranet.com> <45DC51E3.7010205@aurel32.net> <45DC54B5.9080608@qumranet.com> <45DC5D4E.5000300@bull.net> <45DC65C9.6010104@codemonkey.ws> <45DDC641.3030001@bull.net> <45DDC6F3.8080104@qumranet.com> <45DDD21F.4080202@codemonkey.ws> <45DDD30D.4000809@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , Laurent Vivier To: Avi Kivity Return-path: In-Reply-To: <45DDD30D.4000809-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Avi Kivity wrote: > Anthony Liguori wrote: >> Avi Kivity wrote: >>> Laurent Vivier wrote: >>>> There are remaining issues : libposix-aio uses kernel AIO, so files >>>> must be >>>> opened using O_DIRECT and buffers must be aligned. libposix-aio is >>>> able to >>>> manage other cases but this has a performance cost. >>>> >>>> >>> >>> Because the guest is also doing dma, the buffers are expected to be >>> aligned (it might be different if using pio, but unlikely). >> >> The IDE emulation always uses a temporary buffer. This is partially >> because you cannot always rely on being able to use an offset on >> phys_ram_base (when doing user only emulation). > > Why is that? Well, user won't do IDE emulation, but cpu_physical_memory_rw has to jump through more hoops for IDE. What's more relevant though, is it's possible for the guest to setup DMA to device memory, in which case, you need to route the IO to callbacks. That's pretty unlikely though so I think we can stream line it so that we maintain correctness while also getting less copies. Regards, Anthony Liguori > >> >> We can pretty easily patch this code though to use the DMA address >> directly instead of the temporary buffer in the non PIO case. We >> still have to define a raw_pread() that is capable of emulating >> sector alignment though since Linux will use PIO at first. > > Sure. It seems worthwhile for mainline qemu too. > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV