[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory reg
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself |
Date: |
Mon, 18 Feb 2013 17:16:43 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
Il 15/02/2013 19:38, Peter Maydell ha scritto:
>>> But these memory regions belong to this device -- we own them and
>>> >> they won't go away until the device is destroyed [which is never,
>>> >> as it happens, for this device.] More generally, if it's valid
>>> >> for us to hold a MemoryRegion* and call memory_region_get_ram_ptr()
>>> >> in the read/write function, it's just as valid to keep the ram pointer:
>>> >> the two have exactly matching lifetimes, unless I'm missing something.
>> >
>> > No, you're not: "In practice it should be handled just fine by reference
>> > counting, but I still find it harder to wrap my head around it".
> I'm still confused. Memory regions aren't reference counted.
> We're the device, we own the MemoryRegion, we can happily
> do whatever we like with it for the lifetime of the device.
Yes: reference counting of the device.
> I don't propose to change this patch for v2 of this series,
> since there doesn't seem to be any need to do so.
Fair enough.
Paolo
- Re: [Qemu-devel] [PATCH 3/5] milkymist-minimac2: Just expose buffers as a sysbus mmio region, (continued)
- [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Peter Maydell, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Andreas Färber, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Paolo Bonzini, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Peter Maydell, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Paolo Bonzini, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Peter Maydell, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Paolo Bonzini, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Peter Maydell, 2013/02/15
- Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself,
Paolo Bonzini <=
Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself, Michael Walle, 2013/02/17