[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 00/15] Refactor PC machine to take advantage of QO
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [RFC 00/15] Refactor PC machine to take advantage of QOM |
Date: |
Sun, 29 Jan 2012 12:42:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 |
On 01/26/2012 09:36 PM, Anthony Liguori wrote:
> On 01/26/2012 01:12 PM, Peter Maydell wrote:
>> On 26 January 2012 19:00, Anthony Liguori<address@hidden> wrote:
>>> We need to modeled MemoryRegions and qemu_irq in QOM too.
>>
>> +1 : this ought to let us get rid of SysBus...
>>
>>> MemoryRegions
>>> shouldn't be that difficult. Our habit of passing qemu_irq's as
>>> arrays without
>>> an explicit size will probably require some refactoring but in
>>> principle,
>>> supporting irqs should be easy too.
>>
>> I think that there are probably a lot of cases where we're using an
>> array
>> of qemu_irqs now but should be using separately named signals of some
>> sort
>> instead (particularly where we're using them for things which aren't
>> actually
>> IRQs...)
>
> I started hacking up a Pin object that used a Notifier. It's pretty
> easy to plumb that to an existing qemu_irq so I think that's the way
> to go.
>
> That way we could incrementally remove qemu_irq usage.
>
> I started with this path but the pc initialization was so fubar that I
> ran into too many problems. Now I think I can go back and do it again
> and it will be more reasonable given this refactoring.
>
> At a high level, a Pin object looks and feels like a qemu_irq.
> There's a pin_raise, pin_set_level, etc. But there is also a
> pin_get_level() (it's stateful) and there's a
> pin_add_level_change_notifier() which allows you to register.
>
> Pins are objects so they can be added to the composition tree which
> means they can be addressed. If you have a truly unidirectional path,
> then you can just use a child and link and connect them that way.
>
Like. But note: like a MemoryRegion, a Pin reflects state held
elsewhere, so it should not be saved/restored.
--
error compiling committee.c: too many arguments to function
- [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition, (continued)
- [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition, Anthony Liguori, 2012/01/26
- [Qemu-devel] [PATCH 05/15] piix: create the HPET and RTC through composition, Anthony Liguori, 2012/01/26
- [Qemu-devel] [PATCH 08/15] i440fx: introduce some saner naming conventions, Anthony Liguori, 2012/01/26
- [Qemu-devel] [PATCH 13/15] i440fx: allocate MemoryRegion for pci memory space, Anthony Liguori, 2012/01/26
- [Qemu-devel] [PATCH 12/15] i440fx-pmc: calculate PCI memory hole directly, Anthony Liguori, 2012/01/26
- [Qemu-devel] [PATCH 14/15] i440fx: move bios loading to i440fx, Anthony Liguori, 2012/01/26
- [Qemu-devel] [PATCH 15/15] i440fx: move ram initialization into i440fx-pmc, Anthony Liguori, 2012/01/26
- [Qemu-devel] [PATCH 11/15] i440fx-pmc: refactor to take properties for memory geometry, Anthony Liguori, 2012/01/26
- Re: [Qemu-devel] [RFC 00/15] Refactor PC machine to take advantage of QOM, Peter Maydell, 2012/01/26
- [Qemu-devel] [PATCH 10/15] i440fx: move some logic to realize and make inheritance from PCIHost explicit, Anthony Liguori, 2012/01/26
- [Qemu-devel] [PATCH 09/15] i440fx: create the PMC through composition, Anthony Liguori, 2012/01/26
- [Qemu-devel] [PATCH 07/15] i440fx: eliminate i440fx_common_init, Anthony Liguori, 2012/01/26