qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 5/8] irq: Add a new irq device that allows th


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v5 5/8] irq: Add a new irq device that allows the ORing of lines
Date: Tue, 26 Jul 2016 16:00:38 +0100

On 26 July 2016 at 15:37, Alistair Francis <address@hidden> wrote:
> Signed-off-by: Alistair Francis <address@hidden>
> ---
>
>  hw/core/irq.c    | 44 ++++++++++++++++++++++++++++++++++++++++++++
>  include/hw/irq.h | 13 +++++++++++++
>  2 files changed, 57 insertions(+)
>
> diff --git a/hw/core/irq.c b/hw/core/irq.c
> index 49ff2e6..73b18b4 100644
> --- a/hw/core/irq.c
> +++ b/hw/core/irq.c
> @@ -27,6 +27,7 @@
>  #include "qom/object.h"
>
>  #define IRQ(obj) OBJECT_CHECK(struct IRQState, (obj), TYPE_IRQ)
> +#define OR_IRQ(obj) OBJECT_CHECK(struct OrIRQState, (obj), TYPE_OR_IRQ)
>
>  struct IRQState {
>      Object parent_obj;
> @@ -36,6 +37,15 @@ struct IRQState {
>      int n;
>  };
>
> +struct OrIRQState {
> +    Object parent_obj;
> +
> +    qemu_irq in_irq;
> +    qemu_irq *out_irqs;
> +    int *levels;

The data in the memory pointed to by 'levels' is state, and you
need to migrate it somehow. (Otherwise you'll give the wrong
results the next time an input changes following a migration.)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]