From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnpR9-0003R4-TX for qemu-devel@nongnu.org; Mon, 10 Nov 2014 08:55:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XnpR3-0002ns-Ho for qemu-devel@nongnu.org; Mon, 10 Nov 2014 08:55:19 -0500 Message-ID: <5460C3A9.30706@redhat.com> Date: Mon, 10 Nov 2014 14:54:49 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1415395125-18926-1-git-send-email-agraf@suse.de> <20141110133101.194f5ea0@nial.usersys.redhat.com> <5460BACA.9000702@suse.de> In-Reply-To: <5460BACA.9000702@suse.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] kvm: Fix memory slot page alignment logic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , Igor Mammedov Cc: qemu-stable@nongnu.org, qemu-ppc@nongnu.org, stuart.yoder@freescale.com, kvm@vger.kernel.org, qemu-devel@nongnu.org On 10/11/2014 14:16, Alexander Graf wrote: > No, because in that case you would map something as RAM that really > isn't RAM. > > Imagine you have the following memory layout: > > 0x1000 page size > > 1) 0x00000 - 0x10000 RAM > 2) 0x10000 - 0x10100 MMIO > 3) 0x10100 - 0x20000 RAM > > Then you want to map 1) as memory slot and 4) from 0x11000 onwards as > memory slot. > > You can't map the page from 0x10000 - 0x11000 as memory slot, because > part of it is MMIO. Right. The partial RAM page remains marked as MMIO as far as KVM is concerned, so accesses are slow and you cannot run code from it. However, it is fundamental that MMIO areas are not marked as RAM. Paolo