[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Objec
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-ppc] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model |
Date: |
Wed, 25 Jan 2012 11:27:44 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2012-01-25 11:15, Paolo Bonzini wrote:
> On 01/25/2012 09:37 AM, Jan Kiszka wrote:
>>> > They're exactly the same size (16 lines). If you embed TypeInfo into
>>> > DeviceTypeInfo, and introduce a Device specific type registration
>>> > function, then you could do:
>>> >
>>> > static DeviceTypeInfo my_device_type_info = {
>>> > .type.name = TYPE_MY_DEVICE,
>>> > .type.parent = TYPE_PARENT_DEVICE,
>>> > .reset = my_device_reset,
>> And if you introduce some
>>
>> #define TYPE_UNIMPLEMENTED (void *)&dummy_variable
>>
>> you can easily express
>>
>> [.field = NULL] => use parent
>> .field = UNIMPLEMENTED => don't run any handler
>>
>
> I agree with Anthony, this would get really ugly where you are calling
> the functions and doing the class initialization.
I think we need to try it first.
There is a lot of repetition, and that gets boring at beat and ugly at
worst when doing it for hundreds of devices - compared to the number of
base classes we will have.
> It's a different
> style from what we're used to, granted, but the difference in code size
> is not relevant (not enough to introduce a level of macro magic, at
> least) and the diffstat in this series is misleading because qdev is
> left with temporary duplication for now.
I was looking at the final version Anthony pointed at.
Jan
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-ppc] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, (continued)
- Re: [Qemu-ppc] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Jan Kiszka, 2012/01/25
- Re: [Qemu-ppc] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Anthony Liguori, 2012/01/25
- Re: [Qemu-ppc] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Jan Kiszka, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Anthony Liguori, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Jan Kiszka, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Anthony Liguori, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Jan Kiszka, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Anthony Liguori, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Jan Kiszka, 2012/01/25
- Re: [Qemu-ppc] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Paolo Bonzini, 2012/01/25
- Re: [Qemu-ppc] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model,
Jan Kiszka <=
- Re: [Qemu-ppc] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Paolo Bonzini, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Anthony Liguori, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Jan Kiszka, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Anthony Liguori, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Andreas Färber, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Eric Blake, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Andreas Färber, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Avi Kivity, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Paul Brook, 2012/01/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model, Anthony Liguori, 2012/01/25