From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpHTR-0002rJ-Pj for qemu-devel@nongnu.org; Wed, 19 Jun 2013 08:26:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpHTQ-0007vo-OO for qemu-devel@nongnu.org; Wed, 19 Jun 2013 08:26:53 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:45412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpHTQ-0007vY-ER for qemu-devel@nongnu.org; Wed, 19 Jun 2013 08:26:52 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 19 Jun 2013 13:22:28 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 127E117D8025 for ; Wed, 19 Jun 2013 13:28:13 +0100 (BST) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r5JCQbnw58523660 for ; Wed, 19 Jun 2013 12:26:37 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r5JCQlgu013187 for ; Wed, 19 Jun 2013 06:26:47 -0600 Message-ID: <51C1A385.5070702@de.ibm.com> Date: Wed, 19 Jun 2013 14:26:45 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1371642264-17704-1-git-send-email-armbru@redhat.com> <1371642264-17704-6-git-send-email-armbru@redhat.com> In-Reply-To: <1371642264-17704-6-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/8] exec: Drop incorrect & dead S390 code in qemu_ram_remap() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: peter.maydell@linaro.org, stefano.stabellini@eu.citrix.com, mtosatti@redhat.com, qemu-devel@nongnu.org, agraf@suse.de, pbonzini@redhat.com, afaerber@suse.de, rth@twiddle.net On 19/06/13 13:44, Markus Armbruster wrote: > Old S390 KVM wants guest RAM mapped in a peculiar way. Commit 6b02494 > implemented that. > > When qemu_ram_remap() got added in commit cd19cfa, its code carefully > mimicked the allocation code: peculiar way if defined(TARGET_S390X) && > defined(CONFIG_KVM), else normal way. > > For new S390 KVM, we actually want the normal way. Commit fdec991 > changed qemu_ram_alloc_from_ptr() accordingly, but forgot to update > qemu_ram_remap(). If qemu_ram_alloc_from_ptr() maps RAM the normal > way, but qemu_ram_remap() remaps it the peculiar way, remapping > changes protection and flags, which it shouldn't. > > Fortunately, this can't happen, as we never remap on S390. > > Replace the incorrect code with an assertion. > > Thanks to Christian Borntraeger for help with assessing the bug's > (non-)impact. > > Signed-off-by: Markus Armbruster Acked-by: Christian Borntraeger