From: Gerd Hoffmann <kraxel@redhat.com>
To: "Gabriel L. Somlo" <gsomlo@gmail.com>
Cc: mst@redhat.com, lersek@redhat.com, qemu-devel@nongnu.org,
armbru@redhat.com, pbonzini@redhat.com,
John Snow <jsnow@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] i386: drop FDC in pc-q35-2.4+ if neither
Date: Thu, 28 May 2015 15:52:41 +0200 [thread overview]
Message-ID: <1432821161.6250.11.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <20150528125925.GG6488@HEDWIG.INI.CMU.EDU>
On Do, 2015-05-28 at 08:59 -0400, Gabriel L. Somlo wrote:
> > It is Very annoying to carry forward an outdatEd coNtroller with a mOdern
> > Machine type.
> >
> > Hence, let us not instantiate the FDC when all of the following apply:
> > - the machine type is pc-q35-2.4 or later,
> > - "-device isa-fdc" is not passed on the command line (nor in the config
> > file),
> > - no "-drive if=floppy,..." is requested.
>
> Don't forget the FDC0 entry in the ACPI DSDT !
No worries, everything is fine here.
> Right now, FDC0's _STA method returns 0x0F or 0x00, depending on the
> value of \_SB_.PCI0.ISA_.FDEN,
Yes.
> which is hard-coded to 1 (so 0x0F
> always, basically :) )
Yes on piix4.
On q35 FDEN maps to the floppy drive enable bit of the ich9 lpc. And
ich9_lpc_machine_ready() sets this (and other) enable bits.
/me double checks things.
Ok, in theory. In practice there seems to be something wrong. linux
kernel log on q35 (with floppy) yields this:
[root@fedora ~]# dmesg | grep pnp
pnp: PnP ACPI init
pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active)
pnp 00:01: Plug and Play ACPI device, IDs PNP0303 (active)
pnp 00:02: Plug and Play ACPI device, IDs PNP0f13 (active)
pnp 00:03: Plug and Play ACPI device, IDs PNP0501 (active)
pnp: PnP ACPI: found 4 devices
Floppy (PNP0700) is not present. Hmm ...
Seems be be this:
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -494,7 +494,7 @@ static void ich9_lpc_machine_ready(Notifier *n, void *opaque)
/* lpt */
pci_conf[0x82] |= 0x04;
}
- if (memory_region_present(io_as, 0x3f0)) {
+ if (memory_region_present(io_as, 0x3f2)) {
/* floppy */
pci_conf[0x82] |= 0x08;
}
Oh, and this ...
$ virsh qemu-monitor-command fedora-org-q35.base --hmp "info mtree" | grep fdc
00000000000003f1-00000000000003f5 (prio 0, RW): fdc
00000000000003f7-00000000000003f7 (prio 0, RW): fdc
... looks fishy too. Shouldn't that be 0x3f2-0x3f6 for the first range?
cheers,
Gerd
next prev parent reply other threads:[~2015-05-28 13:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 21:06 [Qemu-devel] [PATCH] i386: drop FDC in pc-q35-2.4+ if neither it nor floppy drives are wanted Laszlo Ersek
2015-05-28 8:19 ` Paolo Bonzini
2015-05-28 8:39 ` Markus Armbruster
2015-05-28 8:42 ` Paolo Bonzini
2015-05-28 9:38 ` Michael S. Tsirkin
2015-05-28 9:30 ` Kevin Wolf
2015-05-28 12:59 ` [Qemu-devel] [PATCH] i386: drop FDC in pc-q35-2.4+ if neither Gabriel L. Somlo
2015-05-28 13:52 ` Gerd Hoffmann [this message]
2015-05-28 14:42 ` Paolo Bonzini
2015-05-28 14:56 ` Gerd Hoffmann
2015-05-28 15:20 ` Paolo Bonzini
2015-05-28 15:49 ` Gerd Hoffmann
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=1432821161.6250.11.camel@nilsson.home.kraxel.org \
--to=kraxel@redhat.com \
--cc=armbru@redhat.com \
--cc=gsomlo@gmail.com \
--cc=jsnow@redhat.com \
--cc=lersek@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@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).