qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v1 4/7] pci: switch iommu to using the memory API


From: Avi Kivity
Subject: Re: [Qemu-devel] [RFC v1 4/7] pci: switch iommu to using the memory API
Date: Mon, 15 Oct 2012 12:31:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

On 10/13/2012 11:13 AM, Blue Swirl wrote:
>>  struct PCIBus {
>>      BusState qbus;
>> -    PCIDMAContextFunc dma_context_fn;
>> -    void *dma_context_opaque;
>> +    PCIIOMMUFunc iommu_fn;
>> +    PCIIOMMUDestructorFunc iommu_dtor_fn;
>> +    void *iommu_opaque;
> 
> Maybe the opaque could be avoided (in later patches) by clever use of
> container_of() by the functions to get the parent structure?

Indeed yes.  This requires replacing pci_bus_new() and
pci_register_bus() by a conventional pci_bus_init().  I think it's the
right direction to move and the memory API always uses caller-managed
allocation and objects, instead of API-managed allocation and
pointers/handles.


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



reply via email to

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