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: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 1/3] Add PhysicalMemoryRegion type
Date: Wed, 27 May 2009 18:07:29 +0300
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Christoph Hellwig wrote:
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.

Good idea.  I'll make is so.

It's a little different from current qemu style, but I don't this that should be a problem.

--
error compiling committee.c: too many arguments to function





reply via email to

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