All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <andreas.faerber@web.de>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: hpoussin@reactos.org, qemu-devel@nongnu.org,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [RFC v4 03/12] isa: Provide set_state callback
Date: Thu, 9 Jun 2011 16:07:28 +0200	[thread overview]
Message-ID: <F3D48D3A-7197-40BA-BE42-294A8A204273@web.de> (raw)
In-Reply-To: <4DF0BB4E.9080507@redhat.com>

Hi,

Am 09.06.2011 um 14:23 schrieb Gerd Hoffmann:

>>> I get the feeling that doing all this in the pc87312 emulation is
>>> easier as it needs to have this logic anyway for config register
>>> writes and you can probably reuse the code for loadvm pre- and
>>> postprocessing.
>>
>> Well, I wasn't looking for the easiest way but for the proper way. I
>> don't want to let pc87312-internal state get out-of-sync with that of
>> the aggregated devices. So we still need the qdev getters, and we  
>> still
>> need each device to handle enabling/disabling itself.
>
> Do we?  The pc87312 is the only instance which changes those  
> settings at runtime, so they should not get out-of-sync even if they  
> are write-only for the pc87312.

The devices need to register the I/O ports for sure. No one else knows  
what functions to use.
So we either need your generic set_state callback or my explicit  
helper functions to invoke that.

>> Are you okay with
>> those parts if we move just the VMState to pc87312? That feels wrong.
>
> I'd keep everything (iobase, irq, enabled state) in pc87312, so the  
> isa vmstate doesn't need any updates.  The pc87312 actually applies  
> the configuration, so this doesn't feel wrong to me ...
>
>> Do we have any ordering guarantee that the isa devices were loaded  
>> prior
>> to the pc87312 post hook?
>
> I don't think so.  Juan?

In that case it won't work (out-of-sync) and we shouldn't introduce  
VMState for pc87312 at all imo. In theory we'd probably need a pc87312- 
owned bus to put the devices on but then I don't see how to reuse the  
existing isa devices.

>> How do BIOS config changes work on a PC? Which qdev would be  
>> responsible
>> for saving their state?
>
> They are not re-configurable at runtime.  I think even on real  
> hardware you usually can only enable/disable devices, not change the  
> configuration.

I'm positive they are configurable by the BIOS, that's why I called it  
"ISA reconfigurability" (not "Weird workarounds for PReP") and thought  
about VMState in the first place.

SystemSoft MobilePRO BIOS, PhoenixBIOS, AMI BIOS, Award BIOS all allow  
to reconfigure I/O base (same also IRQ) of both serial ports and  
parallel port. fdc and ide however I've seen nowhere before.
Some newer ones have an "Auto" setting that hides this, and when  
choosing "Enabled" a new field shows up.
Configuration options are a set of fixed options, similar to pc87312.

DOS, Windows and Linux were able to apply such driver configuration  
changes after a reboot iirc. For example, ISA SoundBlaster or NE2000  
cards. I also remember 3Com having special DOS boot discs with a tool  
to change on-card config for some ISA network cards.

Andreas

  reply	other threads:[~2011-06-09 14:07 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 16:20 [Qemu-devel] [RFC 00/10] ISA reconfigurability Andreas Färber
2011-06-06 16:20 ` [Qemu-devel] [RFC 01/10] isa: Allow to un-assign I/O ports Andreas Färber
2011-06-06 16:20   ` [Qemu-devel] [RFC 02/10] isa: Allow to un-associate an IRQ Andreas Färber
2011-06-06 16:20     ` [Qemu-devel] [RFC 03/10] parallel: Allow to reconfigure ISA I/O base Andreas Färber
2011-06-06 16:20       ` [Qemu-devel] [RFC 04/10] parallel: Allow to reconfigure ISA IRQ Andreas Färber
2011-06-06 16:20         ` [Qemu-devel] [RFC 05/10] serial: Allow to reconfigure ISA I/O base Andreas Färber
2011-06-06 16:20           ` [Qemu-devel] [RFC 06/10] serial: Allow to reconfigure ISA IRQ Andreas Färber
2011-06-06 16:20             ` [Qemu-devel] [PATCH v2 07/10] fdc: Parametrize ISA base, IRQ and DMA Andreas Färber
2011-06-06 16:20               ` [Qemu-devel] [RFC 08/10] fdc: Allow to reconfigure ISA I/O base Andreas Färber
2011-06-06 16:20                 ` [Qemu-devel] [RFC 09/10] ide: " Andreas Färber
2011-06-06 16:20                   ` [Qemu-devel] [RFC 10/10] prep: Add pc87312 Super I/O emulation Andreas Färber
2011-06-06 20:08           ` [Qemu-devel] [RFC 05/10] serial: Allow to reconfigure ISA I/O base Richard Henderson
2011-06-06 20:25             ` Andreas Färber
2011-06-07  7:18 ` [Qemu-devel] [RFC 00/10] ISA reconfigurability Gerd Hoffmann
2011-06-07 15:02   ` [Qemu-devel] [RFC v2 00/10] ISA reconfigurability v2 Andreas Färber
2011-06-07 15:02     ` [Qemu-devel] [RFC v2 01/10] isa: Provide set_state callback Andreas Färber
2011-06-07 15:02       ` [Qemu-devel] [RFC v2 02/10] isa: Allow to un-assign I/O ports Andreas Färber
2011-06-07 15:02         ` [Qemu-devel] [RFC v2 03/10] isa: Allow to un-associate an IRQ Andreas Färber
2011-06-07 15:02           ` [Qemu-devel] [RFC v2 04/10] parallel: Implement ISA set_state callback Andreas Färber
2011-06-07 15:02             ` [Qemu-devel] [RFC v2 05/10] serial: Implement ISA set_state() callback Andreas Färber
2011-06-07 15:02               ` [Qemu-devel] [PATCH v2 06/10] fdc: Parametrize ISA base, IRQ and DMA Andreas Färber
2011-06-07 15:02                 ` [Qemu-devel] [RFC v2 07/10] fdc: Implement ISA set_state() callback Andreas Färber
2011-06-07 15:02                   ` [Qemu-devel] [RFC v2 08/10] ide: Allow to discard I/O ports Andreas Färber
2011-06-07 15:02                     ` [Qemu-devel] [RFC v2 09/10] ide: Implement ISA set_state() callback Andreas Färber
2011-06-07 15:02                       ` [Qemu-devel] [RFC v2 10/10] prep: Add pc87312 Super I/O emulation Andreas Färber
2011-06-07 15:16     ` [Qemu-devel] [RFC v2 00/10] ISA reconfigurability v2 Gerd Hoffmann
2011-06-07 22:36       ` Andreas Färber
2011-06-08  8:13         ` Gerd Hoffmann
2011-06-08 18:55           ` [Qemu-devel] [RFC v4 00/12] ISA reconfigurability v4 Andreas Färber
2011-06-08 18:55             ` [Qemu-devel] [PATCH v4 01/12] qdev: Add support for property type bool Andreas Färber
2011-06-08 18:55               ` [Qemu-devel] [PATCH v4 02/12] qdev: Add helpers for reading properties Andreas Färber
2011-06-08 18:55                 ` [Qemu-devel] [RFC v4 03/12] isa: Provide set_state callback Andreas Färber
2011-06-08 18:55                   ` [Qemu-devel] [RFC v4 04/12] isa: Allow to un-assign I/O ports Andreas Färber
2011-06-08 18:55                     ` [Qemu-devel] [RFC v4 05/12] isa: Allow to un-associate an IRQ Andreas Färber
2011-06-08 18:55                       ` [Qemu-devel] [RFC v4 06/12] parallel: Implement ISA set_state callback Andreas Färber
2011-06-08 18:55                         ` [Qemu-devel] [RFC v4 07/12] serial: Implement ISA set_state() callback Andreas Färber
2011-06-08 18:55                           ` [Qemu-devel] [PATCH v4 08/12] fdc: Parametrize ISA base, IRQ and DMA Andreas Färber
2011-06-08 18:55                             ` [Qemu-devel] [RFC v4 09/12] fdc: Implement ISA set_state() callback Andreas Färber
2011-06-08 18:55                               ` [Qemu-devel] [RFC v4 10/12] ide: Allow to discard I/O ports Andreas Färber
2011-06-08 18:55                                 ` [Qemu-devel] [RFC v4 11/12] ide: Implement ISA set_state() callback Andreas Färber
2011-06-08 18:55                                   ` [Qemu-devel] [RFC v4 12/12] prep: Add pc87312 Super I/O emulation Andreas Färber
2011-06-09  7:56                               ` [Qemu-devel] [RFC v4 09/12] fdc: Implement ISA set_state() callback Gerd Hoffmann
2011-06-09  9:23                                 ` Andreas Färber
2011-06-09 15:35                           ` [Qemu-devel] [RFC v4 07/12] serial: " Markus Armbruster
2011-06-09 16:08                             ` Andreas Färber
2011-06-09 15:04                       ` [Qemu-devel] [RFC v4 05/12] isa: Allow to un-associate an IRQ Markus Armbruster
2011-06-09 15:12                         ` Markus Armbruster
2011-06-12 12:05                           ` Andreas Färber
2011-06-09 15:03                     ` [Qemu-devel] [RFC v4 04/12] isa: Allow to un-assign I/O ports Markus Armbruster
2011-06-12 11:59                       ` Andreas Färber
2011-06-12 13:48                         ` Gleb Natapov
2011-06-12 15:32                           ` Andreas Färber
2011-06-12 17:14                             ` Gleb Natapov
2011-06-09 10:39                   ` [Qemu-devel] [RFC v4 03/12] isa: Provide set_state callback Gerd Hoffmann
2011-06-09 11:37                     ` Andreas Färber
2011-06-09 12:23                       ` Gerd Hoffmann
2011-06-09 14:07                         ` Andreas Färber [this message]
2011-06-09 14:19                           ` Gerd Hoffmann
2011-06-09 16:04                           ` Markus Armbruster
2011-06-12 12:48                             ` Andreas Färber
2011-06-09 14:53                   ` Markus Armbruster
2011-06-12 11:46                     ` Andreas Färber
2011-06-09 14:45               ` [Qemu-devel] [PATCH v4 01/12] qdev: Add support for property type bool Markus Armbruster
2011-06-12 11:44                 ` Andreas Färber
2011-06-13 20:08             ` [Qemu-devel] [RFC v4 00/12] ISA reconfigurability v4 Blue Swirl
2011-06-13 21:09               ` Andreas Färber
2011-06-15 18:24                 ` Blue Swirl
2011-06-07 23:32       ` [Qemu-devel] [RFC v3 10/11] qdev: Add helpers for reading properties Andreas Färber
2011-06-07 23:32         ` [Qemu-devel] [RFC v3 11/11] prep: Add pc87312 Super I/O emulation Andreas Färber

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=F3D48D3A-7197-40BA-BE42-294A8A204273@web.de \
    --to=andreas.faerber@web.de \
    --cc=hpoussin@reactos.org \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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.