qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/3] Add PhysicalMemoryRegion type


From: Christoph Hellwig
Subject: Re: [Qemu-devel] [PATCH 1/3] Add PhysicalMemoryRegion type
Date: Wed, 27 May 2009 16:16:44 +0200
User-agent: Mutt/1.3.28i

On Sun, May 24, 2009 at 12:29:33PM +0300, Avi Kivity wrote:
> +struct PhysicalMemoryRegion {
> +    target_phys_addr_t start_addr;
> +    target_phys_addr_t size;
> +    ram_addr_t ram_addr;
> +    ram_addr_t region_offset;
> +};
> +
> +PhysicalMemoryRegion *physical_memory_region_register(
> +    target_phys_addr_t start_addr,
> +    target_phys_addr_t size,
> +    ram_addr_t ram_addr)
> +{
> +    return physical_memory_region_register_offset(start_addr, size, 
> ram_addr, 0);
> +}

Wouldn't it be much easier if the client allocated the
PhysicalMemoryRegion and just passed a pointer to it into
physical_memory_region_register?  That would also take care of the
physical_memory_region_register vs
physical_memory_region_register_offset split as the non-offset case
would just not fill out the region_offset field and be done with it.





reply via email to

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