qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Guenter Roeck" <linux@roeck-us.net>,
	"Bernhard Beschow" <shentey@gmail.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"John Snow" <jsnow@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>
Cc: qemu-devel@nongnu.org,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-block@nongnu.org, qemu-ppc@nongnu.org,
	Richard Henderson <richard.henderson@linaro.org>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Magnus Damm <magnus.damm@gmail.com>
Subject: Re: [PATCH v3 07/11] hw/sh4/r2d: Realize IDE controller before accessing it
Date: Sun, 13 Oct 2024 07:18:13 +0200	[thread overview]
Message-ID: <41feaca3-5d41-4aa7-8774-5f2b3911135a@redhat.com> (raw)
In-Reply-To: <f7fe9a16-4c21-442a-b5dc-9d367450346b@roeck-us.net>

On 13/10/2024 06.53, Guenter Roeck wrote:
> On 10/12/24 07:06, Bernhard Beschow wrote:
>>
>>
>> Am 12. Oktober 2024 09:40:27 UTC schrieb Thomas Huth <thuth@redhat.com>:
>>> On 12/10/2024 00.48, Philippe Mathieu-Daudé wrote:
>>>> On 11/10/24 05:23, Thomas Huth wrote:
>>>>> On 03/05/2024 23.34, Guenter Roeck wrote:
>>>>>> Hi,
>>>>>>
>>>>>> On Thu, Feb 08, 2024 at 07:12:40PM +0100, Philippe Mathieu-Daudé wrote:
>>>>>>> We should not wire IRQs on unrealized device.
>>>>>>>
>>>>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>>>>> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>>>>>>> Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp>
>>>>>>
>>>>>> qemu 9.0 fails to boot Linux from ide/ata drives with the sh4
>>>>>> and sh4eb emulations. Error log is as follows.
>>>>>>
>>>>>> ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100
>>>>>> ata1.00: 16384 sectors, multi 16: LBA48
>>>>>> ata1.00: configured for PIO
>>>>>> scsi 0:0:0:0: Direct-Access     ATA      QEMU HARDDISK    2.5+ PQ: 0 
>>>>>> ANSI: 5
>>>>>> sd 0:0:0:0: [sda] 16384 512-byte logical blocks: (8.39 MB/8.00 MiB)
>>>>>> sd 0:0:0:0: [sda] Write Protect is off
>>>>>> sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't 
>>>>>> support DPO or FUA
>>>>>> ata1: lost interrupt (Status 0x58)
>>>>>>
>>>>>> [ and more similar errors ]
>>>>>>
>>>>>> qemu command line:
>>>>>>
>>>>>> qemu-system-sh4eb -M r2d -kernel arch/sh/boot/zImage \
>>>>>>      -snapshot -drive file=rootfs.ext2,format=raw,if=ide \
>>>>>>      -append "root=/dev/sda console=ttySC1,115200 noiotrap" \
>>>>>>      -serial null -serial stdio -monitor null -nographic -no-reboot
>>>>>>
>>>>>> Bisect points to this patch (see below). Reverting it fixes the problem.
>>>>
>>>> Sorry Guenter for missing your email :(
>>>>
>>>>>
>>>>>    Hi Philippe!
>>>>>
>>>>> Today I noticed that our sh4 test from tests/avocado/ 
>>>>> tuxrun_baselines.py is failing (which is not run by default, that's why 
>>>>> nobody noticed), and bisection took me to the same result that Guenter 
>>>>> already reported.
>>>>
>>>> "not run by default" because flaky.
>>>>
>>>> Having a quick look, the problem seems hw/ide/core.c uses non-QOM
>>>> shortcuts. In particular ide_bus_init_output_irq() expects a preset
>>>> IRQ. Not something trivial to fix.
>>>
>>> I wonder whether the other spots that use ide_bus_init_output_irq() or 
>>> similar constructs are broken now, too. Bernhard apparently already fixed 
>>> (reverted) one in commit 143f3fd3d8b51d6526c8ea80e8a2a085f6f01cdf.
>>>
>>> But what about fc432ba0f58343c8912b80e9056315bb9bd8df92 ?
>>
>> There is an indirection going on in pmac_ide_irq() which triggers 
>> real_*_irq. These get wired via sysbus API after realize() while 
>> ide_bus_init_output_irq() wires to pmac_ide_irq(). So 
>> fc432ba0f58343c8912b80e9056315bb9bd8df92 seems safe to me (haven't tested 
>> it though).
>>
> 
> Not sure if that answers the question, but booting from ide works
> for both mac99 and g3beige emulations.

Ok, thank you both, that sounds like we should be safe with macio IDE, indeed!

  Thomas



  reply	other threads:[~2024-10-13  5:19 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08 18:12 [PATCH v3 00/11] hw: Strengthen SysBus & QBus API Philippe Mathieu-Daudé
2024-02-08 18:12 ` [PATCH v3 01/11] hw/ide/ich9: Use AHCIPCIState typedef Philippe Mathieu-Daudé
2024-02-09 11:28   ` Peter Maydell
2024-02-08 18:12 ` [PATCH v3 02/11] hw/rx/rx62n: Reduce inclusion of 'qemu/units.h' Philippe Mathieu-Daudé
2024-02-09 11:28   ` Peter Maydell
2024-02-12 11:24   ` Yoshinori Sato
2024-02-08 18:12 ` [PATCH v3 03/11] hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary Philippe Mathieu-Daudé
2024-02-09 11:29   ` Peter Maydell
2024-02-12 11:25   ` Yoshinori Sato
2024-02-08 18:12 ` [PATCH v3 04/11] hw/i386/pc_q35: Realize LPC PCI function before accessing it Philippe Mathieu-Daudé
2024-02-08 18:29   ` BALATON Zoltan
2024-02-08 18:12 ` [PATCH v3 05/11] hw/ppc/prep: Realize ISA bridge " Philippe Mathieu-Daudé
2024-02-09 11:29   ` Peter Maydell
2024-02-09 21:29   ` Mark Cave-Ayland
2024-02-08 18:12 ` [PATCH v3 06/11] hw/misc/macio: Realize IDE controller " Philippe Mathieu-Daudé
2024-02-08 18:33   ` BALATON Zoltan
2024-02-09  6:40     ` Philippe Mathieu-Daudé
2024-02-09 21:32   ` Mark Cave-Ayland
2024-02-08 18:12 ` [PATCH v3 07/11] hw/sh4/r2d: " Philippe Mathieu-Daudé
2024-02-09 11:30   ` Peter Maydell
2024-02-12 12:48   ` Yoshinori Sato
2024-05-03 21:34   ` Guenter Roeck
2024-10-11  8:23     ` Thomas Huth
2024-10-11 22:48       ` Philippe Mathieu-Daudé
2024-10-12  9:40         ` Thomas Huth
2024-10-12 14:06           ` Bernhard Beschow
2024-10-13  4:53             ` Guenter Roeck
2024-10-13  5:18               ` Thomas Huth [this message]
2024-02-08 18:12 ` [PATCH v3 08/11] hw/sparc/sun4m: Realize DMA " Philippe Mathieu-Daudé
2024-02-09 11:37   ` Peter Maydell
2024-02-09 22:37     ` Mark Cave-Ayland
2024-02-09 21:38   ` Mark Cave-Ayland
2024-02-08 18:12 ` [PATCH v3 09/11] hw/sparc/leon3: Realize GRLIB IRQ " Philippe Mathieu-Daudé
2024-02-09 11:38   ` Peter Maydell
2024-02-09 21:39   ` Mark Cave-Ayland
2024-02-08 18:12 ` [PATCH v3 10/11] hw/sparc/leon3: Initialize GPIO before realizing CPU devices Philippe Mathieu-Daudé
2024-02-09 11:35   ` Peter Maydell
2024-02-09 21:48   ` Mark Cave-Ayland
2024-02-08 18:12 ` [PATCH v3 11/11] hw/sparc64/cpu: " Philippe Mathieu-Daudé
2024-02-09 11:34   ` Peter Maydell
2024-02-09 22:01     ` Mark Cave-Ayland
2024-02-13 13:00       ` Philippe Mathieu-Daudé
2024-02-09 21:49   ` Mark Cave-Ayland
2024-10-11  8:56 ` [PATCH v3 00/11] hw: Strengthen SysBus & QBus API Paolo Bonzini
2024-10-11 22:11   ` 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=41feaca3-5d41-4aa7-8774-5f2b3911135a@redhat.com \
    --to=thuth@redhat.com \
    --cc=armbru@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=linux@roeck-us.net \
    --cc=magnus.damm@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=shentey@gmail.com \
    --cc=ysato@users.sourceforge.jp \
    /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).