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

Re: [PATCH 21/22] i8259_common.c: remove static irq_count and irq_level variables


  • To: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
  • From: Peter Maydell <peter.maydell@xxxxxxxxxx>
  • Date: Tue, 13 Oct 2026 17:29:10 +0100
  • Arc-authentication-results: i=1; mx.google.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=jXo9q1ZmZcN51gvyAI6giPbieASxcFI/Rz78Tc/rF4k=; fh=soxJElAlokBxb0qXlToTWx+nLUSaWOMvgPaeVh3fGx8=; b=mW9pfk8bDz7ey1bAQ5MjmKfvm1F85E+Loa1nc6XBb0JTTxQ6DUxx4CMfx7g2RNU06Y rpGxZt6gNb1/u4pCVRQ/Qgm93qgocuSdwJ/w2VrJfoJqJKTQonfU0ZxrqBNhLHfjiuFs vtN8DNMqli3S3VXwEb8PVAkRiIGPSsjuWLw6CCotIlMI8BoTQsi2LOfbMDTiXMGC5903 X7mQydqnfKuB/xBHxZ1k+cV/j1nQyC73Ps7cstYw6yYCZYns0NnUjVYigERCv+L0vu+/ wHLhPj50Td/uHXPpZwmmNYg6r4CWOZUqHp8jcTPDk7veNkkdGBUC9+30Jh8t0qZh915o LPHQ==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1791908962; cv=none; d=google.com; s=arc-20260327; b=O2dfiuxpdKwluCw/PBHCErVYzmxJpNTylN6I4W+1dtfzgXUQuqk9lwNFmY7azc/jDR tf9AkgL4A1pqpFR6fm8i+CAr0sJFirnBU5U8lFeB/7v2cPgvxbSvOk815PUr//Pu48Ob xVyapa7X44UI4HiMa+eWzoJr8y85AEAmOfRRHp2U7InAfHphtpfjf+wlOrJua0i9Vzch LpXU0P50/BVLezXJdx/fJdNSshrVyTpEtKL3tUClgp8T+FcG0jX2CbU7PWtirh6iROpo HueVET0Lhc/oBXr0CcancZdywGVhQU5OhdboE1PU39nUX7zf/88Dv792Xw7Hqmmo95s3 005Q==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=linaro.org header.i="@linaro.org" header.h="Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version"
  • Cc: pbonzini@xxxxxxxxxx, richard.henderson@xxxxxxxxxx, mst@xxxxxxxxxx, sstabellini@xxxxxxxxxx, anthony@xxxxxxxxxxxxxx, edgar.iglesias@xxxxxxxxx, qemu-devel@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 13 Oct 2026 16:29:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, 16 Sept 2026 at 11:50, Mark Cave-Ayland
<mark.caveayland@xxxxxxxxxxx> wrote:
>
> Adjust the parameters to i8259_stat_update_irq() to allow passing in pointers
> to the irq_count and irq_level arrays, and then move the arrays into the
> corresponding i8259 PIC and KVM PIC devices.
>
> Doing this allows the statistics capture logic in i8259_set_irq() that handles
> incoming cascading interrupts to be removed.
>
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>

> diff --git a/hw/i386/kvm/i8259.c b/hw/i386/kvm/i8259.c
> index 421c9279cd..ca661afc02 100644
> --- a/hw/i386/kvm/i8259.c
> +++ b/hw/i386/kvm/i8259.c
> @@ -30,6 +30,9 @@ struct KVMI8259PICState {
>
>      ISABus *isabus;
>      I8259CommonState i8259[2];
> +
> +    int irq_level[ISA_NUM_IRQS];
> +    uint64_t irq_count[ISA_NUM_IRQS];
>  };


> diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c
> index 3f10777036..ac43995ce4 100644
> --- a/hw/intc/i8259.c
> +++ b/hw/intc/i8259.c
> @@ -49,14 +49,16 @@ struct I8259PICState {
>      ISABus *isabus;
>      IRQState i8259_primary_out_irq;
>      I8259CommonState i8259[2];
> +
> +    int irq_level[ISA_NUM_IRQS];
> +    uint64_t irq_count[ISA_NUM_IRQS];
> +#ifdef DEBUG_IRQ_LATENCY
> +    int64_t irq_time[ISA_NUM_IRQS];
> +#endif
>  };

Would it make sense for these two types to have a common base
class (where the stats stuff could then live)? AIUI they're
both intending to provide the same interface ("pair of i8259
devices cascaded together in the way that x86 does it").

-- PMM



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.