qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v2 3/3] hw/ide/via: implement legacy/native mode switching


From: BALATON Zoltan
Subject: Re: [PATCH v2 3/3] hw/ide/via: implement legacy/native mode switching
Date: Mon, 6 Nov 2023 17:13:24 +0100 (CET)

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.

Regards,
BALATON Zoltan

Other than this, the patch looks good to me.

Kevin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]