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

Re: [PATCH 14/22] i8259.c: properly cascade secondary i8259 from primary i8259


  • To: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
  • From: Peter Maydell <peter.maydell@xxxxxxxxxx>
  • Date: Wed, 14 Oct 2026 13:06:05 +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=d/3zqLfYuRm+7YCJo4+EtPoysMl01w41Nwru3cxg2z0=; fh=t5G37c3p/fbcuVy1NaMr51YxgmP3jVoaitBm7NEdzUI=; b=hC24GbuH92sQlfFV89BS1zopI/9iFRuCOCZHO2huiz890SNyROKjem2qv2OsuKv0Uz rj94GZ8Ze9rGmK9Kl/VuhLSb36xnims+vAqbwmpaepqUkzKF4r7hXd/SRxN59hvUBoPM be+31AxrAwSnfdUQaTYt726xARJyh+F7lFH/z+kpNlPAbVANr9uymtLSG/XzKuzg1q6e bygxNrdhznnL8UPIrqH9h4bxXy7HU0WEQbgqYA4o3dgChhKRC3ladRFssqR+nUfC/FLl a9vNMUPH4lPIqsB35DWE/h6UO3lSzH5pRHdBFCluW2Sred3LsIDNHNsRq2iPaJFDdEFg MaKA==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1791979577; cv=none; d=google.com; s=arc-20260327; b=A51KR3dAGNxtFWjtEplQqECcscBqwIS/F1L60g3SO7e/cG0dtr9HEVJ2tTqBvwLIco PVbuto4diQfk7/B04Ypc3nkrzyA2Wuet2+iwxqnvIR8IDK4Peq0+THQBNcmUobDDDu+U V8fqLeshBAUp7DG029icRIZ6Z6Qzy6l37zCBp7t2QoOJL4YV370eRXU7xROrukTOB45G 83IFHD5uL+cTJvN/FCz+pyB3xnMgR4xvKXFZLsWXkQK6gVm+VLwmWEV4Edf/GgaZj89I 2gRfvmmfF/HQ4F8bB+qVic9Oh9a/2aOLX+PfRWYcU+shtB2SYbeOlbOMyRYvAqC8eI+e vvjg==
  • 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: Wed, 14 Oct 2026 12:06:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, 14 Oct 2026 at 12:20, Mark Cave-Ayland
<mark.caveayland@xxxxxxxxxxx> wrote:
>
> On 13/10/2026 17:18, Peter Maydell wrote:
>
> > On Wed, 16 Sept 2026 at 11:49, Mark Cave-Ayland
> > <mark.caveayland@xxxxxxxxxxx> wrote:
> >>
> >> Currently the cascaded output from the secondary i8259 is returned 
> >> directly in
> >> the pass_irqs[] array, instead of being connected to the relevant input of 
> >> the
> >> primary i8259.
> >>
> >> Signed-off-by: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
> >> ---
> >>   hw/intc/i8259.c | 3 ++-
> >>   1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c
> >> index fcc94e12f8..964ceb04b2 100644
> >> --- a/hw/intc/i8259.c
> >> +++ b/hw/intc/i8259.c
> >> @@ -501,7 +501,8 @@ static void i8259_pic_realize(DeviceState *dev, Error 
> >> **errp)
> >>       }
> >>
> >>       /* Wire up secondary cascade */
> >> -    qdev_connect_gpio_out(sec_dev, 0, s->pass_irqs[2]);
> >> +    qdev_connect_gpio_out(sec_dev, 0,
> >> +                          qdev_get_gpio_in(pri_dev, 2));
> >
> > We just added this line in the previous patch, so we might as well
> > squash this change into the previous one I think.
> The reason for having this in a separate commit is because it is
> technically a behaviour change. Before this commit, an interrupt from
> the secondary PIC would *always* raise the passed interrupt, whereas on
> real hardware it is possible to disable interrupts from the secondary
> PIC by masking the relevant input on the primary PIC [1].

OK, if it's a behaviour change that's fine. The commit message
is written as if it's just a refactoring, though -- it would
be helpful to spell out what the behaviour change there and
that it's fixing a corner case bug.

-- PMM



 


Rackspace

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