From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RW34p-0001I9-FN for qemu-devel@nongnu.org; Thu, 01 Dec 2011 04:37:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RW34o-0004W6-GE for qemu-devel@nongnu.org; Thu, 01 Dec 2011 04:37:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RW34o-0004UA-6n for qemu-devel@nongnu.org; Thu, 01 Dec 2011 04:37:10 -0500 Date: Thu, 1 Dec 2011 11:37:06 +0200 From: Gleb Natapov Message-ID: <20111201093706.GA13420@redhat.com> References: <1322666781-6108-1-git-send-email-afaerber@suse.de> <4ED7490C.7050505@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <4ED7490C.7050505@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] exec.c: Fix subpage memory access to RAM MemoryRegion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Andreas =?utf-8?Q?F=C3=A4rber?= , qemu-devel@nongnu.org On Thu, Dec 01, 2011 at 11:29:48AM +0200, Avi Kivity wrote: > On 11/30/2011 05:26 PM, Andreas F=C3=A4rber wrote: > > Commit 95c318f5e1f88d7e5bcc6deac17330fd4806a2d3 (Fix segfault in mmio > > subpage handling code.) prevented a segfault by making all subpage > > registrations over an existing memory page perform an unassigned access. > > Symptoms were writes not taking effect and reads returning zero. > > > > Very small page sizes are not currently supported either, > > so subpage memory areas cannot fully be avoided. > > > > Therefore change the previous fix to use a new IO_MEM_SUBPAGE_RAM > > instead of IO_MEM_UNASSIGNED. Suggested by Avi. > > > > >=20 > Looks reasonable. Should go into 1.1. Should we backport it to > 1.0.blah? From 95c318f's description, it doesn't happen in normal > circumstances. >=20 To reproduce that I mappped subpage PCI bar over RAM IIRC. For KVM the memory in a subpage will not be accessible even with this fix since memory slots have page granularity and KVM can't execute code from MMIO (yet?). Andreas do you have real scenario where this fix is needed? -- Gleb.