[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Memory API: handling unassigned physical memory
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] Memory API: handling unassigned physical memory |
Date: |
Tue, 1 May 2012 15:20:57 +0100 |
On 1 May 2012 15:06, Anthony Liguori <address@hidden> wrote:
> Do you mean:
>
> - qdev_connect_gpio_out(&dev->qdev, 0, irq_set[2]);
> + pin_connect_qemu_irq(&s->int_out[0], irq_set[2]);
>
> There are three ways to do this:
>
> 1) pin_connect_qemu_irq(i8259_get_int_out(s), irq_set[2]);
No good unless you're autogenerating all those accessor functions.
> 2) pin_connect_qemu_irq(&s->int_out[0], irq_set[2]);
Exposes the whole of the struct (including all the private
memmbers) to anything that wants to use it. As you say
later on in the email, this requires splitting everything up
into two structs, one for "publicly accessible" and one for
"private implementation"...which your series doesn't seem
to do at the moment.
> 3) pin_connect_qemu_irq(PIN(object_get_child(s, "int_out[0]")), irq_set[2]);
This is a bit verbose. Something more like
pin_connect(s, "int_out[0]", self, "int_set[2]");
would be a bit less longwinded. Or even
connect(TYPE_PIN, s, "int_out[0]", self, "int_set[2]");
(No, this doesn't do compile time type checking. I don't
think that's a problem particularly, or at least not enough
of one to justify not doing it this way. The object model we
have is dynamic and does things at runtime...)
-- PMM
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, (continued)
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Avi Kivity, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Peter Maydell, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Avi Kivity, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Peter Maydell, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Avi Kivity, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Peter Maydell, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Avi Kivity, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Anthony Liguori, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Peter Maydell, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Anthony Liguori, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory,
Peter Maydell <=
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Anthony Liguori, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Peter Maydell, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Anthony Liguori, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Peter Maydell, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Anthony Liguori, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Mark Cave-Ayland, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Peter Maydell, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Avi Kivity, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Anthony Liguori, 2012/05/01
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Avi Kivity, 2012/05/01