qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory regio


From: Avi Kivity
Subject: Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API
Date: Fri, 20 May 2011 12:28:44 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10

On 05/20/2011 12:11 AM, Stefan Hajnoczi wrote:
On Thu, May 19, 2011 at 3:12 PM, Avi Kivity<address@hidden>  wrote:
>  +struct MemoryRegion {
>  +    /* All fields are private - violators will be prosecuted */
>  +    const MemoryRegionOps *ops;
>  +    MemoryRegion *parent;

In the case where a region is aliased (mapped twice into the address
space at different addresses) I need two MemoryRegions?

Yes.

The
MemoryRegion describes an actual mapping in the<parent, addr,
ram_addr>  tuple, not just the attributes of the region (ops, size,
...).

Correct. The region is not just a read-only descriptor. memory_region_add_subregion() can be used only once on a region (unless you _del_subregion() in between).

(it also follows from the fact that there is no separate opaque for registration, and from the fact that RAM is owned by the region, not provided as part of registration).

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]