qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: BALATON Zoltan <balaton@eik.bme.hu>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	Daniel Henrique Barboza <danielhb413@gmail.com>,
	Bernhard Beschow <shentey@gmail.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	ReneEngel80@emailn.de
Subject: Re: [PATCH v9 4/7] hw/isa/vt82c686: Implement PCI IRQ routing
Date: Mon, 30 Oct 2023 05:05:50 +0100	[thread overview]
Message-ID: <cf4b1c2f-dde1-738e-1e5d-329b9074e58d@linaro.org> (raw)
In-Reply-To: <fbb016c7d0e19093335c237e15f5f6c62c4393b4.1678188711.git.balaton@eik.bme.hu>

Hi Zoltan,

On 7/3/23 12:42, BALATON Zoltan wrote:
> The real VIA south bridges implement a PCI IRQ router which is configured
> by the BIOS or the OS. In order to respect these configurations, QEMU
> needs to implement it as well. The real chip may allow routing IRQs from
> internal functions independently of PCI interrupts but since guests
> usually configute it to a single shared interrupt we don't model that
> here for simplicity.
> 
> Note: The implementation was taken from piix4_set_irq() in hw/isa/piix4.
> 
> Suggested-by: Bernhard Beschow <shentey@gmail.com>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> Reviewed-by: Bernhard Beschow <shentey@gmail.com>
> Tested-by: Rene Engel <ReneEngel80@emailn.de>
> ---
>   hw/isa/vt82c686.c | 42 ++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 42 insertions(+)


> +static int via_isa_get_pci_irq(const ViaISAState *s, int irq_num)
> +{
> +    switch (irq_num) {
> +    case 0:
> +        return s->dev.config[0x55] >> 4;
> +    case 1:
> +        return s->dev.config[0x56] & 0xf;
> +    case 2:
> +        return s->dev.config[0x56] >> 4;
> +    case 3:
> +        return s->dev.config[0x57] >> 4;

Shouldn't this be & 0xf?

(This is why I prefer extract8() over manual bits extraction)

> +    }
> +    return 0;
> +}



  reply	other threads:[~2023-10-30  4:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 11:42 [PATCH v9 0/7] Pegasos2 fixes and audio output support BALATON Zoltan
2023-03-07 11:42 ` [PATCH v9 1/7] hw/display/sm501: Add debug property to control pixman usage BALATON Zoltan
2023-03-07 15:11   ` Philippe Mathieu-Daudé
2023-03-07 15:15     ` BALATON Zoltan
2023-03-07 11:42 ` [PATCH v9 2/7] hw/intc/i8259: Implement legacy LTIM Edge/Level Bank Select BALATON Zoltan
2023-03-07 13:36   ` Daniel Henrique Barboza
2023-03-07 13:38     ` Peter Maydell
2023-03-07 13:39     ` David Woodhouse
2023-03-07 14:45       ` Daniel Henrique Barboza
2023-03-07 14:18     ` BALATON Zoltan
2023-03-07 11:42 ` [PATCH v9 3/7] Revert "hw/isa/vt82c686: Remove intermediate IRQ forwarder" BALATON Zoltan
2023-03-07 13:37   ` Daniel Henrique Barboza
2023-03-07 11:42 ` [PATCH v9 4/7] hw/isa/vt82c686: Implement PCI IRQ routing BALATON Zoltan
2023-10-30  4:05   ` Philippe Mathieu-Daudé [this message]
2023-10-30  9:02     ` BALATON Zoltan
2023-10-30  9:22       ` BALATON Zoltan
2023-10-30  9:26       ` Philippe Mathieu-Daudé
2023-03-07 11:42 ` [PATCH v9 5/7] hw/ppc/pegasos2: Fix PCI interrupt routing BALATON Zoltan
2023-03-07 11:42 ` [PATCH v9 6/7] hw/usb/vt82c686-uhci-pci: Use PCI IRQ routing BALATON Zoltan
2023-03-07 11:42 ` [PATCH v9 7/7] hw/audio/via-ac97: Basic implementation of audio playback BALATON Zoltan
2023-03-07 16:20 ` [PATCH v9 0/7] Pegasos2 fixes and audio output support Philippe Mathieu-Daudé

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=cf4b1c2f-dde1-738e-1e5d-329b9074e58d@linaro.org \
    --to=philmd@linaro.org \
    --cc=ReneEngel80@emailn.de \
    --cc=balaton@eik.bme.hu \
    --cc=danielhb413@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=shentey@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).