From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxrwT-0002V7-Ks for qemu-devel@nongnu.org; Tue, 11 Apr 2017 05:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxrwO-0005Nx-6j for qemu-devel@nongnu.org; Tue, 11 Apr 2017 05:18:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35086) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cxrwN-0005Nc-WA for qemu-devel@nongnu.org; Tue, 11 Apr 2017 05:18:24 -0400 References: <1491612336-31066-1-git-send-email-anthony.xu@intel.com> <1491612336-31066-5-git-send-email-anthony.xu@intel.com> <4712D8F4B26E034E80552F30A67BE0B1A589E5@ORSMSX112.amr.corp.intel.com> From: Paolo Bonzini Message-ID: Date: Tue, 11 Apr 2017 17:18:19 +0800 MIME-Version: 1.0 In-Reply-To: <4712D8F4B26E034E80552F30A67BE0B1A589E5@ORSMSX112.amr.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] pam: setup pc.bios List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Xu, Anthony" , "qemu-devel@nongnu.org" On 11/04/2017 09:42, Xu, Anthony wrote: >> I think this is wrong, the high copy should remain read-only or pflash >> stops working when you remove PAM. > > I tried to set pc.bios as read-only and isa.bios as read&write, > it doesn't work. render_memory_region doesn't honor readonly > field of alias MemoryRegion. > > Two FlatRanges created for pc.bios and isa.bios point to the same > MemoryRegion pc.bios. Both get readonly from pc.bios. > Is this a bug or by design? Read-write can use an alias to become read-only, but read-only cannot use an alias to become read-write. Let's sort this out later. > Pc.bios and isa.bios are backed by the same memory block, > so it may cause CPU TLB alias, any issue here? No, it's okay. Paolo