Am 10.06.2012 19:33, schrieb Anthony Liguori:
> On 06/10/2012 10:57 AM, Andreas Färber wrote:
>> From: Andreas Färber<andreas.faer...@web.de>
>>
>> Allows us to access PCIHostState QOM-style with PCI_HOST() macro.
>>
>> Update PReP Raven PCI to derive from this type.
>>
>> Signed-off-by: Anthony Liguori<aligu...@us.ibm.com>
>> Signed-off-by: Wanpeng Li<l...@linux.vnet.ibm.com>
>> Signed-off-by: Andreas Färber<andreas.faer...@web.de>
>> Reviewed-by: Anthony Liguori<aligu...@us.ibm.com>
>> ---
>>   hw/pci_host.c |   11 +++++++++++
>>   hw/pci_host.h |    3 +++
>>   hw/prep_pci.c |    4 ++--
>>   3 files changed, 16 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/pci_host.c b/hw/pci_host.c
>> index 8041778..347bfa6 100644
>> --- a/hw/pci_host.c
>> +++ b/hw/pci_host.c
>> @@ -165,4 +165,15 @@ const MemoryRegionOps pci_host_data_be_ops = {
>>       .endianness = DEVICE_BIG_ENDIAN,
>>   };
>>
>> +static const TypeInfo pci_host_type_info = {
>> +    .name = TYPE_PCI_HOST,
>> +    .parent = TYPE_SYS_BUS_DEVICE,
>> +    .instance_size = sizeof(PCIHostState),
>> +};
> 
> Any reason why PCIHost can't have TYPE_DEVICE as the the parent?

Many current users rely on SysBus functionality like MMIO and IRQs.

A conversion to TYPE_DEVICE can be done as part of your SysBus removal
series.

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