All of lore.kernel.org
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: John Snow <jsnow@redhat.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	Aleksandar Markovic <amarkovic@wavecomp.com>,
	philmd@redhat.com, Artyom Tarasenko <atar4qemu@gmail.com>,
	Richard Henderson <rth@twiddle.net>
Subject: [PATCH v4 0/4] Implement "non 100% native mode" in via-ide
Date: Tue, 10 Mar 2020 20:06:50 +0100	[thread overview]
Message-ID: <cover.1583867210.git.balaton@eik.bme.hu> (raw)

This (started to be small but getting bigger) series implements
"non-100% native mode" of via-ide found at least on pegasos2 where io
addresses come from PCI BARs but interrupts are hard coded to legacy
IRQ14 and 15. This is needed for guests that expect it and activate
work arounds on that platform and don't work unless this is emulated.
(Symptom is missing IDE IRQs after enabling BMDMA and boot freezes
waiting for interrupt.)

We need a flag to turn this mode on or off so we repurpose the last
remaining CMD646 specific field in PCIIDEState to allow more flags and
make room for the new legacy-irq flag there. (The CMD646 may need
similar mode or something else may need more flags in the future.)
Boards using CMD646 and VIA IDE are updated for the above changes.
Also included a patch fixing up PCI reset to not clear value set by
device emulation on bus reset when wmask does not allow that and
another getting rid of via_ide_init helper that's now out of fashion.

Tested with Linux and MorphOS on pegasos2 and a Gentoo live CD kernel
for mips_fulong2e that's the only one I could find but being beta not
sure if that fully works on real hardware. (The mips_fulong2e also
seems to have problems with pci devices so to boot Linux you need
-net none -vga none and use serial console otherwise the kernel panics.)

v4 is rebased on top of Mark's cmd646 patches that are now on the ide
tree.

Regards,
BALATON Zoltan

BALATON Zoltan (4):
  ide/via: Get rid of via_init_ide()
  ide: Make room for flags in PCIIDEState and add one for legacy IRQ
    routing
  pci: Honour wmask when resetting PCI_INTERRUPT_LINE
  via-ide: Also emulate non 100% native mode

 hw/ide/cmd646.c         |  4 ++--
 hw/ide/via.c            | 36 +++++++++++++++++++++++-------------
 hw/mips/mips_fulong2e.c |  5 ++++-
 hw/pci/pci.c            |  5 ++++-
 hw/sparc64/sun4u.c      |  2 +-
 include/hw/ide.h        |  1 -
 include/hw/ide/pci.h    |  7 ++++++-
 7 files changed, 40 insertions(+), 20 deletions(-)

-- 
2.21.1



             reply	other threads:[~2020-03-10 19:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 19:06 BALATON Zoltan [this message]
2020-03-10 19:06 ` [PATCH v4 2/4] ide: Make room for flags in PCIIDEState and add one for legacy IRQ routing BALATON Zoltan
2020-03-10 19:06 ` [PATCH v4 1/4] ide/via: Get rid of via_init_ide() BALATON Zoltan
2020-03-10 23:14   ` BALATON Zoltan
2020-03-11 20:59   ` Mark Cave-Ayland
2020-03-10 19:06 ` [PATCH v4 4/4] via-ide: Also emulate non 100% native mode BALATON Zoltan
2020-03-11 21:10   ` Mark Cave-Ayland
2020-03-11 21:50     ` BALATON Zoltan
2020-03-10 19:06 ` [PATCH v4 3/4] pci: Honour wmask when resetting PCI_INTERRUPT_LINE BALATON Zoltan
2020-03-10 21:18   ` Michael S. Tsirkin
2020-03-11 20:58   ` Mark Cave-Ayland
2020-03-10 22:39 ` [PATCH v4 0/4] Implement "non 100% native mode" in via-ide no-reply

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=cover.1583867210.git.balaton@eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=amarkovic@wavecomp.com \
    --cc=atar4qemu@gmail.com \
    --cc=jsnow@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.