qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: jasper.lowell@bt.com
Cc: jsnow@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH] hw/ide: Remove status register read side effect
Date: Sat, 22 Feb 2020 12:47:44 +0100 (CET)	[thread overview]
Message-ID: <alpine.BSF.2.22.395.2002221219340.4684@zero.eik.bme.hu> (raw)
In-Reply-To: <d805ea83320fdb2de626b0657e94a87bc0ea5015.camel@bt.com>

On Sat, 22 Feb 2020, jasper.lowell@bt.com wrote:
> I think the reason why the Solaris 10 driver crashes fatally whereas
> Linux and OpenBSD ignore the side effect is because when clearing
> interrupts, Solaris 10 expects the interrupt bit to be set and checks
> this. Linux and OpenBSD appear to clear it regardless of its state.

I've also found this thread:

https://lucky.openbsd.misc.narkive.com/hA6XG7Fu/bus-master-dma-error-missing-interrupt

which seems to talk about missing IRQ in UDMA mode similar to our problem 
and it suggests OpenBSD detects this and downgrades to PIO mode so it 
would still work. Did you check if this is why it works with OpenBSD or it 
really uses UDMA mode?

> This patch doesn't solve all the problems for Solaris 10. It gets
> further in the boot process but it is still unable to mount the file
> system. I suspect that there are more bugs in the IDE/CMD646 emulation.
> I'm going to continue looking into it. It's still possible we are being
> affected by the same bugs. Right now, I'm considering that the
> unresponsive serial console under Sun4u on Solaris 10 is due to not
> being able to mount the file system and pull the required assets for
> the installation menu.

This is possible. The hang I get during boot with PPC OSes I've tried is 
also becuase not being able to read CD drive after switching to UDMA mode. 
This would suggest bug may be in either common ide code or ide-cd 
emulation but could as well be in irq routing (in which case it's separate 
but similar bug in different machine emulations). Is there a way to 
disable UDMA mode in Solaris to check if it would work better when only 
using PIO? That might help locate the bug further.

In my case I've tested with both on board IDE and adding an sii3112 PCI 
card emulation, these both use common bmdma code but route IRQs 
differently. I see some irqs arriving up to the interrupt controller but 
CPU irq is not raised for some reason so I'm not sure it's a bug in common 
code or somewhere else.

>> this change seems to break
>> something else according to a CI test report from patchew.
>
> The test appears to break here in /tests/qtest/ide-test.c for obvious
> reasons:
> /* Reading the status register clears the IRQ */
> g_assert(!qtest_get_irq(qts, IDE_PRIMARY_IRQ));
>
> Should the patch I've suggested be correct, this test would need to be
> updated. This is my first patch attempt for QEMU so I'm not sure what

OK, I haven't checked the test just noticed the failure.

> the process is. Should I be submitting a new V2 patch with these
> changes? I won't have the opportunity to update the patch for a few
> days but will continue watching the thread for reviews.

I'd suggest to wait a few days to give people a chance to review the patch 
then submit a v2 with all the requested changes if any. You can submit v2 
right away but then if someone finds something you'll need more versions 
which is OK as well, your decision how many versions you want to submit. 
Since this patch is only 1 line there's not much people could ask to 
change about it and v2 could allow CI to run and maybe reveal problems so 
maybe in this case a v2 with also fixing the test might help to get it 
reviewed faster. I assume you're aware of the page about patch submission:

https://wiki.qemu.org/Contribute/SubmitAPatch

Regards,
BALATON Zoltan


  reply	other threads:[~2020-02-22 11:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21  6:50 [PATCH] hw/ide: Remove status register read side effect jasper.lowell
2020-02-21  8:08 ` no-reply
2020-02-21 15:43 ` BALATON Zoltan
2020-02-22  2:07   ` jasper.lowell
2020-02-22 11:47     ` BALATON Zoltan [this message]
2020-02-22 17:50     ` BALATON Zoltan
2020-02-22 19:26     ` BALATON Zoltan
2020-02-22 19:32 ` Mark Cave-Ayland
2020-02-22 19:45   ` BALATON Zoltan
2020-02-22 20:05     ` BALATON Zoltan
2020-02-23  7:23       ` jasper.lowell
2020-02-23 15:16         ` BALATON Zoltan
2020-02-25  3:55           ` jasper.lowell
2020-02-25 15:08             ` BALATON Zoltan
2020-02-26  5:22               ` jasper.lowell
2020-02-26 11:07                 ` BALATON Zoltan
2020-02-27  5:10                   ` jasper.lowell
2020-02-27  5:56                     ` jasper.lowell
2020-02-27 11:35                       ` BALATON Zoltan
2020-03-04  0:55                         ` jasper.lowell
2020-02-27 11:38                     ` BALATON Zoltan
2020-03-04  0:58                       ` jasper.lowell
2020-03-01 18:02                 ` BALATON Zoltan
2020-03-04  3:11                   ` jasper.lowell
2020-03-04  8:48                     ` BALATON Zoltan
2020-03-04 21:07                     ` Mark Cave-Ayland
2020-03-05  0:47                       ` jasper.lowell

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=alpine.BSF.2.22.395.2002221219340.4684@zero.eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=jasper.lowell@bt.com \
    --cc=jsnow@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).