[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent |
Date: |
Mon, 08 Jun 2015 19:06:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 08/06/2015 18:25, Michael S. Tsirkin wrote:
> > issue is that we have to re-reserve HVA region first so no other allocation
> > would claim gap and the only way I found was just to call mmap() on it
> > which as side effect invalidates MemoryRegion's backing RAM.
>
> Well the only point we need to mmap is where we'd unmap
> normally, if that's not safe then unmapping wouldn't
> be safe either?
I think it is it possible to map slot 2 at address 0x12340000 right
after unmapping slot 1 at the same address but before an RCU grace
period has expired.
If this is possible, then you can have two DIMMs trying to mmap
themselves at the same address.
Probably you need to stop using object_child_foreach in
hw/mem/pc-dimm.c, and instead build your own list. An object can keep a
"weak" reference to itself in the list, and remove itself from the list
at instance_finalize time.
Paolo
- Re: [Qemu-devel] [RFC v2 1/6] memory: get rid of memory_region_destructor_ram_from_ptr(), (continued)
- [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent, Igor Mammedov, 2015/06/08
- Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent, Paolo Bonzini, 2015/06/08
- Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent, Paolo Bonzini, 2015/06/08
- Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent, Igor Mammedov, 2015/06/08
- Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent, Michael S. Tsirkin, 2015/06/08
- Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent,
Paolo Bonzini <=
- Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent, Igor Mammedov, 2015/06/09
- Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent, Paolo Bonzini, 2015/06/17
- Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent, Igor Mammedov, 2015/06/17
- Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent, Michael S. Tsirkin, 2015/06/17
- Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent, Paolo Bonzini, 2015/06/17
- Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent, Michael S. Tsirkin, 2015/06/17
[Qemu-devel] [RFC v2 2/6] memory: introduce MemoryRegion container with reserved HVA range, Igor Mammedov, 2015/06/08
[Qemu-devel] [RFC v2 6/6] pc: fix QEMU crashing when more than ~50 memory hotplugged, Igor Mammedov, 2015/06/08
[Qemu-devel] [RFC v2 5/6] pc: reserve hotpluggable memory range with memory_region_init_hva_range(), Igor Mammedov, 2015/06/08