qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 1/2] Add TEWS TPCI200 IndustryPack emulation


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v4 1/2] Add TEWS TPCI200 IndustryPack emulation
Date: Tue, 08 Jan 2013 17:22:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Am 08.01.2013 16:57, schrieb Alberto Garcia:
> On Tue, Jan 08, 2013 at 02:55:56PM +0100, Andreas Färber wrote:
> 
>> IPACK_DEVICE()
>>
>> You have them defined in the header, please use them consistently.
>>
>> Also, please avoid accessing internals like &s->bus.qbus
>> (BUS(s->bus)) or &s->dev.qdev (DEVICE(s->dev)).
> 
> Ok, I'm using all the defined macros and replaced all instances of
> DO_UPCAST() with their checked equivalents.
> 
> I also removed all accesses to internals.
> 
> And I defined ipack_bus_new_inplace() (in the spirit of
> pci_bus_new_inplace()) and updated tpci200_initfn().
> 
> Tell me if there's anything else I should change, else I can post the
> new patches.

Haven't looked at the latest 2/2 patch yet, same might apply there.
Otherwise no issues spotted in 1/2.

>> Another thing to check (could be a follow-up) is whether the initfn
>> can be split into instance_init (e.g., pci_set_*?) and initfn.
> 
> What's exactly that for in this case?

QOM realize. My recent RFC only touched ISA but PCI will have to be
converted at some point as well: instance_init can do any trivial field
initializations (that cannot fail), whereas initfn / realizefn will be
run after any management interactions (and might be unrealized and
realized again - that's Advanced Magic though). If you don't spot
anything obvious then better get the device in first, it's not yet urgent.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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