qemu-e2k/hw
Markus Armbruster 9953f8822c pc: Kill the "use flash device for BIOS unless KVM" misfeature
Use of a flash memory device for the BIOS was added in series "[PATCH
v10 0/8] PC system flash support", commit 4732dca..1b89faf, v1.1.

Flash vs. ROM is a guest-visible difference.  Thus, flash use had to
be suppressed for machine types pc-1.0 and older.  This was
accomplished by adding a dummy device "pc-sysfw" with property
"rom_only":

* Non-zero rom_only means "use ROM".  Default for pc-1.0 and older.
* Zero rom_only means "maybe use flash".  Default for newer machines.

Not only is the dummy device ugly, it was also retroactively added to
the older machine types!  Fortunately, it's not guest-visible (thus no
immediate guest ABI breakage), and has no vmstate (thus no immediate
migration breakage).  Breakage occurs only if the user unwisely
enables flash by setting rom_only to zero.  Patch review FAIL #1.

Why "maybe use flash"?  Flash didn't (and still doesn't) work with
KVM.  Therefore, rom_only=0 really means "use flash, except when KVM
is enabled, use ROM".  This is a Bad Idea, because it makes enabling/
disabling KVM guest-visible.  Patch review FAIL #2.

Aside: it also precludes migrating between KVM on and off, but that's
not possible for other reasons anyway.

Fix as follows:

1. Change the meaning of rom_only=0 to mean "use flash, no ifs, buts,
or maybes" for pc-i440fx-1.5 and pc-q35-1.5.  Don't change anything
for older machines (to remain bug-compatible).

2. Change the default value from 0 to 1 for these machines.
Necessary, because 0 doesn't work with KVM.  Once it does, we can flip
the default back to 0.

3. Don't revert the retroactive addition of device "pc-sysfw" to older
machine types.  Seems not worth the trouble.

4. Add a TODO comment asking for device "pc-sysfw" to be dropped once
flash works with KVM.

Net effect is that you get a BIOS ROM again even when KVM is disabled,
just like for machines predating the introduction of flash.

To get flash instead, use "--global pc-sysfw.rom_only=0".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1365780303-26398-4-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24 13:23:51 -05:00
..
9pfs virtio: remove the function pointer. 2013-04-24 11:50:20 -05:00
acpi ich9: kill cmos_s3 2013-04-24 11:50:18 -05:00
alpha include: avoid useless includes of exec/ headers 2013-04-15 18:19:26 +02:00
arm Merge branch 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm 2013-04-20 11:39:08 +00:00
audio Remove unneeded type casts 2013-04-19 11:36:33 +02:00
block pc: Kill the "use flash device for BIOS unless KVM" misfeature 2013-04-24 13:23:51 -05:00
bt sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
char virtio: cleanup: init and exit function. 2013-04-24 11:50:21 -05:00
core qdev: Drop taddr properties 2013-04-20 17:54:52 +00:00
cpu
cris hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
display qdev: Drop taddr properties 2013-04-20 17:54:52 +00:00
dma qdev: Drop taddr properties 2013-04-20 17:54:52 +00:00
gpio Remove unneeded type casts 2013-04-19 11:36:33 +02:00
i2c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
i386 pc: Kill the "use flash device for BIOS unless KVM" misfeature 2013-04-24 13:23:51 -05:00
ide Merge remote-tracking branch 'bonzini/hw-dirs' into staging 2013-04-15 17:06:04 -05:00
input input: introduce keyboard handler list 2013-04-24 11:50:18 -05:00
intc ioapic: Replace FROM_SYSBUS() with QOM type cast 2013-04-16 01:19:46 +02:00
isa ich9: kill cmos_s3 2013-04-24 11:50:18 -05:00
lm32 qdev: Drop taddr properties 2013-04-20 17:54:52 +00:00
m68k
microblaze Remove unneeded type casts 2013-04-19 11:36:33 +02:00
mips sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
misc Merge remote-tracking branch 'stefanha/trivial-patches' into staging 2013-04-19 08:38:16 -05:00
moxie
net virtio: cleanup: init and exit function. 2013-04-24 11:50:21 -05:00
nvram
openrisc
pci
pci-bridge hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
pci-host hw/versatile_pci: Drop unnecessary vpb_pci_config_addr() 2013-04-19 11:15:21 +01:00
ppc Remove unneeded type casts 2013-04-19 11:36:33 +02:00
s390x virtio: remove virtiobindings. 2013-04-24 11:50:20 -05:00
scsi virtio: cleanup: init and exit function. 2013-04-24 11:50:21 -05:00
sd Typo, spelling and grammatical fixes 2013-04-12 14:33:20 +02:00
sh4 arm: fix location of some include files 2013-04-15 15:16:01 +02:00
sparc qdev: Drop taddr properties 2013-04-20 17:54:52 +00:00
sparc64
ssi
timer arm: fix location of some include files 2013-04-15 15:16:01 +02:00
tpm Move TPM passthrough specific command line options to backend structure 2013-04-23 10:40:40 -05:00
unicore32 console: add GraphicHwOps 2013-04-16 09:03:49 +02:00
usb dev-smartcard-reader: empty implementation for Mechanical (fail correctly) 2013-04-24 11:48:04 +03:00
virtio virtio: cleanup: init and exit function. 2013-04-24 11:50:21 -05:00
watchdog
xen sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
xtensa sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
Makefile.objs virtio: simplify Makefile conditionals 2013-04-19 16:18:11 +02:00