Re: [Qemu-devel] [RFC v2 00/20] Memory API

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

 



On 06/27/2011 08:21 AM, Avi Kivity wrote:
As expected, this is taking longer than expected, so I'm releasing something
less complete than I'd have liked.  Not even all of the PC machine is
converted, but the difficult parts are (cirrus).  It appears to work well.

The major change compared to v1 is the introduction of
memory_region_init_alias(), which defines a memory region in terms of another.
With the current API, the ability to alias is provided by address arithmetic
on ram_addr_t:

   ram_addr = qemu_ram_alloc(...);
   cpu_register_physical_memory(..., ram_addr, size, ...);
   /* alias: */
   cpu_register_physical_memory(..., ram_addr + offset, another_size, ...);

With the new API, you have to create an alias:

   memory_region_init_ram(&mem, ...);
   memory_region_register_subregion(...,&mem);
   /* alias: */
   memory_region_init_alias(&alias, ...,&mem, offset, another_size);
   memory_region_register_subregion(...,&alias);

What's the rationale for explicit aliasing verses registering the same region to two different address spaces?

Regards,

Anthony Liguori
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux