qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	jsnow@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org,
	philmd@linaro.org, shentey@gmail.com
Subject: Re: [PATCH v2 3/3] hw/ide/via: implement legacy/native mode switching
Date: Tue, 7 Nov 2023 11:43:44 +0100	[thread overview]
Message-ID: <ZUoU4FltYjFXdWZm@redhat.com> (raw)
In-Reply-To: <509075f4-38d2-578b-b4f4-770c3b000ae8@eik.bme.hu>

Am 06.11.2023 um 17:13 hat BALATON Zoltan geschrieben:
> On Mon, 6 Nov 2023, Kevin Wolf wrote:
> > Am 25.10.2023 um 00:40 hat Mark Cave-Ayland geschrieben:
> > > Allow the VIA IDE controller to switch between both legacy and native modes by
> > > calling pci_ide_update_mode() to reconfigure the device whenever PCI_CLASS_PROG
> > > is updated.
> > > 
> > > This patch moves the initial setting of PCI_CLASS_PROG from via_ide_realize() to
> > > via_ide_reset(), and removes the direct setting of PCI_INTERRUPT_PIN during PCI
> > > bus reset since this is now managed by pci_ide_update_mode(). This ensures that
> > > the device configuration is always consistent with respect to the currently
> > > selected mode.
> > > 
> > > Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> > > Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
> > > Tested-by: Bernhard Beschow <shentey@gmail.com>
> > 
> > As I already noted in patch 1, the interrupt handling seems to be wrong
> > here, it continues to use the ISA IRQ in via_ide_set_irq() even after
> > switching to native mode.
> 
> That's a peculiarity of this via-ide device. It always uses 14/15 legacy
> interrupts even in native mode and guests expect that so using native
> interrupts would break pegasos2 guests. This was discussed and tested
> extensively before.

This definitely needs a comment to explain the situation then because
this is in violation of the spec. If real hardware behaves like this,
it's what we should do, of course, but it's certainly unexpected and we
should explicitly document it to avoid breaking it later when someone
touches the code who doesn't know about this peculiarity.

Kevin



  reply	other threads:[~2023-11-07 10:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24 22:40 [PATCH v2 0/3] ide: implement simple legacy/native mode switching for PCI IDE controllers Mark Cave-Ayland
2023-10-24 22:40 ` [PATCH v2 1/3] ide/pci.c: introduce pci_ide_update_mode() function Mark Cave-Ayland
2023-11-06 14:12   ` Kevin Wolf
2023-11-06 22:41     ` Mark Cave-Ayland
2023-11-07 11:11       ` Kevin Wolf
2023-11-13 21:24         ` Mark Cave-Ayland
2023-11-13 23:47           ` BALATON Zoltan
2023-11-14 17:59           ` Kevin Wolf
2023-10-24 22:40 ` [PATCH v2 2/3] ide/via: don't attempt to set default BAR addresses Mark Cave-Ayland
2023-10-24 23:06   ` BALATON Zoltan
2023-10-24 22:40 ` [PATCH v2 3/3] hw/ide/via: implement legacy/native mode switching Mark Cave-Ayland
2023-11-06 14:35   ` Kevin Wolf
2023-11-06 16:13     ` BALATON Zoltan
2023-11-07 10:43       ` Kevin Wolf [this message]
2023-11-13 20:45         ` Mark Cave-Ayland
2023-11-14  0:04           ` BALATON Zoltan
2023-11-01 10:49 ` [PATCH v2 0/3] ide: implement simple legacy/native mode switching for PCI IDE controllers BALATON Zoltan
2023-11-02  9:03 ` Bernhard Beschow

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=ZUoU4FltYjFXdWZm@redhat.com \
    --to=kwolf@redhat.com \
    --cc=balaton@eik.bme.hu \
    --cc=jsnow@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@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).