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