[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 17:26:02 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 08/06/2015 17:19, Igor Mammedov wrote:
> + assert(!subregion->hva_mapped);
> if (rsvd_hva.mr) {
> + subregion->hva_mapped = true;
> qemu_ram_remap_hva(mr->ram_addr,
> memory_region_get_ram_ptr(rsvd_hva.mr) +
> rsvd_hva.offset_within_region);
> @@ -1788,6 +1790,15 @@ void memory_region_del_subregion(MemoryRegion *mr,
> {
> memory_region_transaction_begin();
> assert(subregion->container == mr);
> +
> + if (mr->ram) {
"if (subregion->hva_mapped)" I think would replace this "if" and the one
below.
Paolo
> + MemoryRegionSection rsvd_hva = memory_region_find_hva_range(mr);
> +
> + if (rsvd_hva.mr) {
> + qemu_ram_unmap_hva(mr->ram_addr);
> + }
> + }
> +
- [Qemu-devel] [RFC v2 1/6] memory: get rid of memory_region_destructor_ram_from_ptr(), (continued)
[Qemu-devel] [RFC v2 4/6] hostmem: return recreated MemoryRegion if current can't be reused, Igor Mammedov, 2015/06/08
[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 <=
- 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, 2015/06/08
- 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