From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKQwB-0000GE-By for Qemu-devel@nongnu.org; Mon, 03 Mar 2014 06:21:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKQw2-0007e3-KD for Qemu-devel@nongnu.org; Mon, 03 Mar 2014 06:21:35 -0500 Received: from mail-qc0-x234.google.com ([2607:f8b0:400d:c01::234]:58948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKQw2-0007dy-FY for Qemu-devel@nongnu.org; Mon, 03 Mar 2014 06:21:26 -0500 Received: by mail-qc0-f180.google.com with SMTP id x3so1330286qcv.11 for ; Mon, 03 Mar 2014 03:21:26 -0800 (PST) Sender: Paolo Bonzini Message-ID: <531465B1.1090605@redhat.com> Date: Mon, 03 Mar 2014 12:21:21 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <6777CD901FD53644B082307CD745FB8326AC9348@SACEXCMBX02-PRD.hq.netapp.com> <530AC892.2080109@ozlabs.ru> <5311D2DD.4090904@ozlabs.ru> <531251CB.10102@redhat.com> <5313E1AD.5050409@ozlabs.ru> <53143E50.5060205@redhat.com> <53145DD4.4040101@ozlabs.ru> In-Reply-To: <53145DD4.4040101@ozlabs.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] e1000 memory corruption in guest OS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy , "Hoyer, David" , "Qemu-devel@nongnu.org" Cc: "Moyer, Keith" , "Best, Tish" Il 03/03/2014 11:47, Alexey Kardashevskiy ha scritto: > > > Sorry, I am not following you here. Does KVM map things not page-aligned? > > > > Look in exec.c for xen_enabled(). Xen's implementation of > > address_space_map/unmap is completely different. > > Honestly cannot see much difference in the current QEMU... void *qemu_get_ram_ptr(ram_addr_t addr) { RAMBlock *block = qemu_get_ram_block(addr); if (xen_enabled()) { /* We need to check if the requested address is in the RAM * because we don't want to map the entire memory in QEMU. * In that case just map until the end of the page. */ if (block->offset == 0) { return xen_map_cache(addr, 0, 0); } else if (block->host == NULL) { block->host = xen_map_cache(block->offset, block->length, 1); } } return block->host + (addr - block->offset); } Paolo