[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Should the i8259 devices remain no-user?
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] Should the i8259 devices remain no-user? |
Date: |
Wed, 16 Oct 2013 11:51:53 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Paolo Bonzini <address@hidden> writes:
> Il 15/10/2013 14:43, Markus Armbruster ha scritto:
>> Paolo, or maybe Andreas,
>>
>> To go beyond RFC with this series, I need to explain why isa-i8259 and
>> kvm-i8259 cannot_instantiate_with_device_add_yet, or drop that. I'd
>> appreciate your help.
>>
>> Both are derived from TYPE_PIC_COMMON, which is derived from
>> TYPE_ISA_DEVICE.
>>
>> I figure isa-i8259 cannot_instantiate_with_device_add_yet, because it
>> sets global isa_pic and slave_pic. slave_pic appears to be a lame way
>> to wire the slave PIC to the master PIC behind QOM's back. isa_pic
>> appears to be a lame way to wire the master PIC to whatever it needs to
>> be wired to. Is that a fair description?
>
> Yes.
>
>> If yes, is it sufficient reason for
>> cannot_instantiate_with_device_add_yet?
>>
>> kvm-i8259 is the same device implemented with kernel support. Does it
>> have its own reason for cannot_instantiate_with_device_add_yet?
>>
>> If not, should it keep cannot_instantiate_with_device_add_yet for
>> symmetry with isa-i8259?
>
> Both i8259 implementations have to be matched with an appropriate array
> of qemu_irqs, such as the one returned by kvm_i8259_init. I think this
> is the reason why kvm-i8259 cannot be instantiated from the command-line.
Let me try to elaborate, to make sure I understand.
Unlike ordinary ISA devices, the i8259 devices need additional wiring,
done by code.
For instance, board code like pc_q35_init(), pc_piix.c's pc_init1(),
mips_malta_init(), ... wire up their IRQ input lines. The slave's IRQ
output line is wired to the master's IRQ2 in hw/intc/i8259.c for
isa-i8259, and the kernel for kvm-i8259. The master's IRQ output line
is wired up by board code (it's complicated).
Correct? If yes, I can turn it into a suitable comment.
- [Qemu-devel] [PATCH RFC 0/9] Clean up and fix no_user, armbru, 2013/10/10
- [Qemu-devel] [PATCH RFC 4/9] pci-host: Consistently set cannot_instantiate_with_device_add_yet, armbru, 2013/10/10
- [Qemu-devel] [PATCH RFC 2/9] sysbus: Set cannot_instantiate_with_device_add_yet, armbru, 2013/10/10
- [Qemu-devel] [PATCH RFC 9/9] qdev: Do not let the user try to device_add when it cannot work, armbru, 2013/10/10
- [Qemu-devel] [PATCH RFC 3/9] apic: Document why cannot_instantiate_with_device_add_yet, armbru, 2013/10/10
- [Qemu-devel] [PATCH RFC 1/9] qdev: Replace no_user by cannot_instantiate_with_device_add_yet, armbru, 2013/10/10
- [Qemu-devel] [PATCH RFC 8/9] isa: Clean up use of cannot_instantiate_with_device_add_yet, armbru, 2013/10/10
- [Qemu-devel] Should the i8259 devices remain no-user? (was: [PATCH RFC 8/9] isa: Clean up use of cannot_instantiate_with_device_add_yet), Markus Armbruster, 2013/10/15
- Re: [Qemu-devel] Should the i8259 devices remain no-user?, Paolo Bonzini, 2013/10/15
- Re: [Qemu-devel] Should the i8259 devices remain no-user?,
Markus Armbruster <=
- Re: [Qemu-devel] Should the i8259 devices remain no-user?, Paolo Bonzini, 2013/10/16
- Re: [Qemu-devel] Should the i8259 devices remain no-user?, Markus Armbruster, 2013/10/16
- Re: [Qemu-devel] Should the i8259 devices remain no-user?, BALATON Zoltan, 2013/10/16
- Re: [Qemu-devel] Should the i8259 devices remain no-user?, Paolo Bonzini, 2013/10/16
- Re: [Qemu-devel] fix clearing i8259 IRQ lines (Was: Should the i8259 devices remain no-user?), Matthew Ogilvie, 2013/10/26
- Re: [Qemu-devel] fix clearing i8259 IRQ lines (Was: Should the i8259 devices remain no-user?), BALATON Zoltan, 2013/10/29
[Qemu-devel] [PATCH RFC 5/9] ich9: Document why cannot_instantiate_with_device_add_yet, armbru, 2013/10/10