All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: anthony.perard@citrix.com
Cc: Xen Devel <xen-devel@lists.xensource.com>,
	QEMU-devel <qemu-devel@nongnu.org>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [Qemu-devel] [PATCH V9 09/16] xen: add a 8259 Interrupt Controller
Date: Wed, 26 Jan 2011 17:04:04 -0600	[thread overview]
Message-ID: <4D40A864.6040603@codemonkey.ws> (raw)
In-Reply-To: <1295965760-31508-10-git-send-email-anthony.perard@citrix.com>

On 01/25/2011 08:29 AM, anthony.perard@citrix.com wrote:
> From: Anthony PERARD<anthony.perard@citrix.com>
>
> Introduce a 8259 Interrupt Controller for target-xen; every set_irq
> call makes a Xen hypercall.
>
> Signed-off-by: Anthony PERARD<anthony.perard@citrix.com>
> Signed-off-by: Stefano Stabellini<stefano.stabellini@eu.citrix.com>
> ---
>   hw/xen_common.h     |    2 ++
>   hw/xen_machine_fv.c |    5 ++---
>   xen-all.c           |   12 ++++++++++++
>   3 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/hw/xen_common.h b/hw/xen_common.h
> index b98d107..0cc935a 100644
> --- a/hw/xen_common.h
> +++ b/hw/xen_common.h
> @@ -42,4 +42,6 @@ static inline int xc_fd(xc_interface *xen_xc)
>   }
>   #endif
>
> +qemu_irq *i8259_xen_init(void);
> +
>   #endif /* QEMU_HW_XEN_COMMON_H */
> diff --git a/hw/xen_machine_fv.c b/hw/xen_machine_fv.c
> index 2f51625..0a90312 100644
> --- a/hw/xen_machine_fv.c
> +++ b/hw/xen_machine_fv.c
> @@ -37,6 +37,7 @@
>   #include "xen_common.h"
>   #include "xen/hvm/hvm_info_table.h"
>   #include "xen_platform.h"
> +#include "xen_common.h"
>
>   #define MAX_IDE_BUS 2
>
> @@ -52,7 +53,6 @@ static void xen_init_fv(ram_addr_t ram_size,
>       PCIBus *pci_bus;
>       PCII440FXState *i440fx_state;
>       int piix3_devfn = -1;
> -    qemu_irq *cpu_irq;
>       qemu_irq *isa_irq;
>       qemu_irq *i8259;
>       qemu_irq *cmos_s3;
> @@ -76,8 +76,7 @@ static void xen_init_fv(ram_addr_t ram_size,
>       env = cpu_init(cpu_model);
>       env->halted = 1;
>
> -    cpu_irq = pc_allocate_cpu_irq();
> -    i8259 = i8259_init(cpu_irq[0]);
> +    i8259 = i8259_xen_init();
>       isa_irq_state = qemu_mallocz(sizeof (*isa_irq_state));
>       isa_irq_state->i8259 = i8259;
>
> diff --git a/xen-all.c b/xen-all.c
> index 8a51873..205cbc4 100644
> --- a/xen-all.c
> +++ b/xen-all.c
> @@ -43,6 +43,18 @@ void xen_piix_pci_write_config_client(uint32_t address, uint32_t val, int len)
>       }
>   }
>
> +/* i8259 */
> +
> +static void i8259_set_irq(void *opaque, int irq, int level)
> +{
> +    xc_hvm_set_isa_irq_level(xen_xc, xen_domid, irq, level);
> +}
> +
> +qemu_irq *i8259_xen_init(void)
> +{
> +    return qemu_allocate_irqs(i8259_set_irq, NULL, 16);
> +}
> +
>    


I think it would make more sense to just call it a Xen interrupt 
controller as it's clearly not an i8259.  Xen may emulate an i8259 in 
the kernel but this has nothing to do with that AFAIK.

Regards,

Anthony Liguori

>   /* Initialise Xen */
>
>   int xen_init(int smp_cpus)
>    

WARNING: multiple messages have this Message-ID (diff)
From: Anthony Liguori <anthony@codemonkey.ws>
To: anthony.perard@citrix.com
Cc: Xen Devel <xen-devel@lists.xensource.com>,
	QEMU-devel <qemu-devel@nongnu.org>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH V9 09/16] xen: add a 8259 Interrupt Controller
Date: Wed, 26 Jan 2011 17:04:04 -0600	[thread overview]
Message-ID: <4D40A864.6040603@codemonkey.ws> (raw)
In-Reply-To: <1295965760-31508-10-git-send-email-anthony.perard@citrix.com>

On 01/25/2011 08:29 AM, anthony.perard@citrix.com wrote:
> From: Anthony PERARD<anthony.perard@citrix.com>
>
> Introduce a 8259 Interrupt Controller for target-xen; every set_irq
> call makes a Xen hypercall.
>
> Signed-off-by: Anthony PERARD<anthony.perard@citrix.com>
> Signed-off-by: Stefano Stabellini<stefano.stabellini@eu.citrix.com>
> ---
>   hw/xen_common.h     |    2 ++
>   hw/xen_machine_fv.c |    5 ++---
>   xen-all.c           |   12 ++++++++++++
>   3 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/hw/xen_common.h b/hw/xen_common.h
> index b98d107..0cc935a 100644
> --- a/hw/xen_common.h
> +++ b/hw/xen_common.h
> @@ -42,4 +42,6 @@ static inline int xc_fd(xc_interface *xen_xc)
>   }
>   #endif
>
> +qemu_irq *i8259_xen_init(void);
> +
>   #endif /* QEMU_HW_XEN_COMMON_H */
> diff --git a/hw/xen_machine_fv.c b/hw/xen_machine_fv.c
> index 2f51625..0a90312 100644
> --- a/hw/xen_machine_fv.c
> +++ b/hw/xen_machine_fv.c
> @@ -37,6 +37,7 @@
>   #include "xen_common.h"
>   #include "xen/hvm/hvm_info_table.h"
>   #include "xen_platform.h"
> +#include "xen_common.h"
>
>   #define MAX_IDE_BUS 2
>
> @@ -52,7 +53,6 @@ static void xen_init_fv(ram_addr_t ram_size,
>       PCIBus *pci_bus;
>       PCII440FXState *i440fx_state;
>       int piix3_devfn = -1;
> -    qemu_irq *cpu_irq;
>       qemu_irq *isa_irq;
>       qemu_irq *i8259;
>       qemu_irq *cmos_s3;
> @@ -76,8 +76,7 @@ static void xen_init_fv(ram_addr_t ram_size,
>       env = cpu_init(cpu_model);
>       env->halted = 1;
>
> -    cpu_irq = pc_allocate_cpu_irq();
> -    i8259 = i8259_init(cpu_irq[0]);
> +    i8259 = i8259_xen_init();
>       isa_irq_state = qemu_mallocz(sizeof (*isa_irq_state));
>       isa_irq_state->i8259 = i8259;
>
> diff --git a/xen-all.c b/xen-all.c
> index 8a51873..205cbc4 100644
> --- a/xen-all.c
> +++ b/xen-all.c
> @@ -43,6 +43,18 @@ void xen_piix_pci_write_config_client(uint32_t address, uint32_t val, int len)
>       }
>   }
>
> +/* i8259 */
> +
> +static void i8259_set_irq(void *opaque, int irq, int level)
> +{
> +    xc_hvm_set_isa_irq_level(xen_xc, xen_domid, irq, level);
> +}
> +
> +qemu_irq *i8259_xen_init(void)
> +{
> +    return qemu_allocate_irqs(i8259_set_irq, NULL, 16);
> +}
> +
>    


I think it would make more sense to just call it a Xen interrupt 
controller as it's clearly not an i8259.  Xen may emulate an i8259 in 
the kernel but this has nothing to do with that AFAIK.

Regards,

Anthony Liguori

>   /* Initialise Xen */
>
>   int xen_init(int smp_cpus)
>    

  reply	other threads:[~2011-01-26 23:04 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25 14:29 [Qemu-devel] [PATCH V9 00/16] Xen device model support anthony.perard
2011-01-25 14:29 ` anthony.perard
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 01/16] xen: Replace some tab-indents with spaces (clean-up) anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 02/16] xen: Make xen build only on x86 target anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 03/16] xen: Add a generic layer for xc calls anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-26 22:49   ` [Qemu-devel] " Anthony Liguori
2011-01-28 15:09     ` [Xen-devel] " Anthony PERARD
2011-01-28 15:09       ` Anthony PERARD
2011-01-28 15:12       ` [Xen-devel] " Alexander Graf
2011-01-28 15:12         ` Alexander Graf
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 04/16] xen: Support new libxc calls from xen unstable anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-26 22:53   ` [Qemu-devel] " Anthony Liguori
2011-01-27 12:03     ` Stefano Stabellini
2011-01-27 12:03       ` Stefano Stabellini
2011-01-27 12:16       ` [Xen-devel] " Keir Fraser
2011-01-27 12:16         ` Keir Fraser
2011-01-27 12:21         ` [Xen-devel] " Stefano Stabellini
2011-01-27 12:21           ` Stefano Stabellini
2011-01-27 17:24     ` Anthony PERARD
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 05/16] xen: Add xen_machine_fv anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-26 22:56   ` [Qemu-devel] " Anthony Liguori
2011-01-27 12:04     ` Stefano Stabellini
2011-01-27 12:04       ` Stefano Stabellini
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 06/16] xen: Add initialisation of Xen anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-26 22:57   ` [Qemu-devel] " Anthony Liguori
2011-01-26 22:57     ` Anthony Liguori
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 07/16] xen: Add the Xen platform pci device anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-26 23:01   ` [Qemu-devel] " Anthony Liguori
2011-01-26 23:01     ` Anthony Liguori
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 08/16] piix_pci: Introduces Xen specific call for irq anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 09/16] xen: add a 8259 Interrupt Controller anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-26 23:04   ` Anthony Liguori [this message]
2011-01-26 23:04     ` Anthony Liguori
2011-01-27 17:19     ` [Qemu-devel] " Anthony PERARD
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 10/16] xen: Introduce the Xen mapcache anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-26 23:07   ` [Qemu-devel] " Anthony Liguori
2011-01-27 12:04     ` Stefano Stabellini
2011-01-27 12:04       ` Stefano Stabellini
2011-01-31 16:30     ` Stefano Stabellini
2011-01-31 16:30       ` Stefano Stabellini
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 11/16] configure: Always use 64bits target physical addresses with xen enabled anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 12/16] Introduce qemu_ram_ptr_unlock anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-26 23:10   ` [Qemu-devel] " Anthony Liguori
2011-01-26 23:10     ` Anthony Liguori
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 13/16] vl.c: Introduce getter for shutdown_requested and reset_requested anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 14/16] xen: Initialize event channels and io rings anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 15/16] xen: Set running state in xenstore anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-26 23:12   ` [Qemu-devel] " Anthony Liguori
2011-01-25 14:29 ` [Qemu-devel] [PATCH V9 16/16] acpi-piix4: Add Xen hypercall for sleep state anthony.perard
2011-01-25 14:29   ` anthony.perard
2011-01-26  2:49   ` [Qemu-devel] " Isaku Yamahata
2011-01-26 13:47     ` Anthony PERARD
2011-01-26 14:36     ` [Qemu-devel] Re: [PATCH V9 16/16] xen: Add Xen hypercall for sleep state in the cmos_s3 callback anthony.perard
2011-01-26 14:36       ` anthony.perard
2011-01-26 23:14       ` [Qemu-devel] " Anthony Liguori
2011-01-26 23:11   ` [Qemu-devel] [PATCH V9 16/16] acpi-piix4: Add Xen hypercall for sleep state Anthony Liguori
2011-01-26 23:11     ` Anthony Liguori
2011-01-25 14:41 ` [Qemu-devel] Re: [PATCH V9 00/16] Xen device model support Anthony PERARD
2011-01-25 14:41   ` Anthony PERARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D40A864.6040603@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.