[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region owner
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership |
Date: |
Sun, 2 Jun 2013 17:12:03 +0100 |
On 2 June 2013 16:43, Paolo Bonzini <address@hidden> wrote:
> Reference counting the region piggybacks on reference counting of a QOM
> object, the "owner" of the region. The owner API is designed so that
> it will be called as little as possible. Unowned subregions will get a
> region if memory_region_set_owner is called after the subregion is added.
> This is in general the common case already; often setting the owner can
> be delegated to a bus-specific API that already takes a DeviceState
> (for example pci_register_bar or sysbus_init_mmio).
This feels a bit fragile to me -- there doesn't seem to be
a clear rule for who has to set the owner of a region or
when they have to do it, or for ensuring that it doesn't
get forgotten altogether.
What happens if I take a MemoryRegion* that another device
has exposed to me as a sysbus mmio region (and so claimed
ownership of) and pass it to pci_register_bar()? Who owns
it at that point? [That's a legitimate thing to do, I think,
though I don't suppose anybody does it at the moment.
Sysbus MMIOs aren't only for mapping in the system address
space, they're a general way for one device to expose a
MemoryRegion * for use by another device.]
thanks
-- PMM
- [Qemu-devel] [PATCH 09/15] isa/portio: allow setting an owner, (continued)
- [Qemu-devel] [PATCH 09/15] isa/portio: allow setting an owner, Paolo Bonzini, 2013/06/02
- [Qemu-devel] [PATCH 10/15] vga: add memory_region_set_owner calls, Paolo Bonzini, 2013/06/02
- [Qemu-devel] [PATCH 11/15] pci-assign: add memory_region_set_owner calls, Paolo Bonzini, 2013/06/02
- [Qemu-devel] [PATCH 12/15] vfio: add memory_region_set_owner calls, Paolo Bonzini, 2013/06/02
- [Qemu-devel] [PATCH 13/15] exec: check MRU in qemu_ram_addr_from_host, Paolo Bonzini, 2013/06/02
- [Qemu-devel] [PATCH 14/15] memory: return MemoryRegion from qemu_ram_addr_from_host, Paolo Bonzini, 2013/06/02
- [Qemu-devel] [PATCH 15/15] memory: ref/unref memory across address_space_map/unmap, Paolo Bonzini, 2013/06/02
- Re: [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership, Paolo Bonzini, 2013/06/03
- Re: [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership, Peter Maydell, 2013/06/03
- Re: [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership, Paolo Bonzini, 2013/06/03
- Re: [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership, Peter Maydell, 2013/06/03
- Re: [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership, Paolo Bonzini, 2013/06/03
- Re: [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership, Peter Maydell, 2013/06/03
- Re: [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership, Paolo Bonzini, 2013/06/03