[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map
From: |
Cam Macdonell |
Subject: |
[Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map |
Date: |
Tue, 27 Apr 2010 08:28:15 -0600 |
On Mon, Apr 26, 2010 at 12:54 PM, Anthony Liguori <address@hidden> wrote:
> 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.
In my shared memory patch, I passed the offset returned from
qemu_ram_mmap to cpu_register_physical_memory from within the map
function passed to pci_register_bar. Could the same not be done? Is
there something incorrect with this approach?
>
> 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
>>>
>>>
>
>
- Re: [Qemu-devel] Re: [PATCH 06/10] kvm: remove explicit kvm_arch_reset_vcpu from kvm_init_vcpu, (continued)
- [Qemu-devel] [PATCH 03/10] kvm: handle internal error, Marcelo Tosatti, 2010/04/26
- [Qemu-devel] [PATCH 05/10] kvm_init_vcpu requires global lock held, Marcelo Tosatti, 2010/04/26
- [Qemu-devel] [PATCH 04/10] kvm: allow qemu to set EPT identity mapping address, Marcelo Tosatti, 2010/04/26
- [Qemu-devel] [PATCH 08/10] introduce leul_to_cpu, Marcelo Tosatti, 2010/04/26
- [Qemu-devel] [PATCH 10/10] introduce qemu_ram_map, Marcelo Tosatti, 2010/04/26
[Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map, Anthony Liguori, 2010/04/26
- [Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map, Marcelo Tosatti, 2010/04/26
- [Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map, Anthony Liguori, 2010/04/26
- [Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map, Marcelo Tosatti, 2010/04/26
- Re: [Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map, Anthony Liguori, 2010/04/26
- Re: [Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map, Marcelo Tosatti, 2010/04/26
[Qemu-devel] Re: [PATCH 10/10] introduce qemu_ram_map, Cam Macdonell, 2010/04/27
[Qemu-devel] [PATCH 01/10] KVM: x86: Add debug register saving and restoring, Marcelo Tosatti, 2010/04/26