qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 3/9] spapr_pci: Introduce a finish_realize()


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] [PATCH v3 3/9] spapr_pci: Introduce a finish_realize() callback
Date: Thu, 29 May 2014 11:53:32 +1000
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/29/2014 01:11 AM, Alexander Graf wrote:
> 
> On 27.05.14 07:36, Alexey Kardashevskiy wrote:
>> The spapr-pci PHB initializes IOMMU for emulated devices only.
>> The upcoming VFIO support will do it different. However both emulated
>> and VFIO PHB types share most of the initialization code.
>> For the type specific things a new finish_realize() callback is
>> introduced.
>>
>> This introduces sPAPRPHBClass derived from PCIHostBridgeClass and
>> adds the callback pointer.
>>
>> This implements finish_realize() for emulated devices.
>>
>> Signed-off-by: Alexey Kardashevskiy <address@hidden>
> 
> This patch breaks compilation on some of my test hosts:

Rats... Sorry about that. What is that host? I need to setup one for
myself. I test my stuff to compile on x86_64 (for TCG-ppc, TCG-ppc64 and
cross for ppc64) and do not hit this.


> 
> 05/28 12:41:34 ERROR|     utils:0144| [stderr] In file included from
> /usr/local/autotest/tmp/virt/src/qemu/hw/ppc/spapr.c:45:
> 05/28 12:41:34 ERROR|     utils:0144| [stderr]
> /usr/local/autotest/tmp/virt/src/qemu/include/hw/pci-host/spapr.h:77:
> error: redefinition of typedef ‘sPAPRPHBState’
> 05/28 12:41:34 ERROR|     utils:0144| [stderr]
> /usr/local/autotest/tmp/virt/src/qemu/include/hw/pci-host/spapr.h:43:
> error: previous declaration of ‘sPAPRPHBState’ was here
> 05/28 12:41:34 ERROR|     utils:0144| [stderr] make[1]: ***
> [hw/ppc/spapr.o] Error 1
> 05/28 12:41:34 ERROR|     utils:0144| [stderr] make: ***
> [subdir-ppc64-softmmu] Error 2
> 
> 
> I've squashed the following patch into this one to make it compile:
> 
> diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
> index ab29281..0f428a1 100644
> --- a/include/hw/pci-host/spapr.h
> +++ b/include/hw/pci-host/spapr.h
> @@ -48,7 +48,7 @@ struct sPAPRPHBClass {
> void (*finish_realize)(sPAPRPHBState *sphb, Error **errp);
> };
> 
> -typedef struct sPAPRPHBState {
> +struct sPAPRPHBState {
> PCIHostState parent_obj;
> 
> int32_t index;
> @@ -76,7 +76,7 @@ typedef struct sPAPRPHBState {
> } msi_table[SPAPR_MSIX_MAX_DEVS];
> 
> QLIST_ENTRY(sPAPRPHBState) list;
> -} sPAPRPHBState;
> +};
> 
> #define SPAPR_PCI_BASE_BUID 0x800000020000000ULL
> 
> 
> Alex
> 


-- 
Alexey



reply via email to

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