|
From: | Anthony Liguori |
Subject: | [Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map |
Date: | Mon, 26 Apr 2010 13:54:35 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0 |
On 04/26/2010 01:49 PM, Marcelo Tosatti wrote:
On Mon, Apr 26, 2010 at 01:27:30PM -0500, Anthony Liguori wrote:On 04/26/2010 12:59 PM, Marcelo Tosatti wrote:Which allows drivers to register an mmaped region into ram block mappings. To be used by device assignment driver.This doesn't make much sense to me. Do you use this like: qemu_ram_map(64k, ptr); assert(qemu_ram_alloc(64k) == ptr);No. hw/device-assignment.c in qemu-kvm mmaps /sys/bus/pci/devices/x:y:z/resourcen (the PCI devices memory regions) to the guest.
I understand, but how do you use qemu_ram_map() to actually map that memory to a given PCI device resource? I assume you rely on it getting put on the front of the list so that the next qemu_ram_alloc() will be at that location.
Regards, Anthony Liguori
If so, I think this is not the best API. I'd rather see qemu_ram_map() register a symbolic name for the region and for there to be a qemu_ram_alloc() variant that allocated by name. Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |