[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] GlobalProperty in QEMUMachine overwrites explicit command l
[Qemu-devel] GlobalProperty in QEMUMachine overwrites explicit command line value
Tue, 08 May 2012 18:06:25 -0300
Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1
I'm trying to change the default value of the parameter "-rtc driftfix="
and something's going wrong. This is a GlobalProperty and, currently, it
is equivalent to setting "-rtc driftfix=none" in the command line. I'm
appending a new GlobalProperty value to all previous QEMUMachine
.driver = "mc146818rtc",
.property = "lost_tick_policy",
.value = "discard",
Now when I select older machines, like "-M pc-1.0", it seems that this
value is _always_ set even if I set another value on the command line.
So, if I set "-rtc driftfix=slew", it will still use the "none" value
The file 0001-Force-driftfix-none-on-previous-machines.patch contains
the small change I made to set "none" as the default value for that option.
I added this debug statement:
printf("Registering driver %s: %s -> %s\n", prop->driver,
to the function "void qdev_prop_register_global(GlobalProperty *prop)"
and I got this result:
$ i386-softmmu/qemu-system-i386 -drive
file=/home/vianac/ISOs/ubuntu-12.04-desktop-i386.iso,media=cdrom -boot d
-m 1024 -M pc-1.0 -rtc driftfix=slew
Registering driver mc146818rtc: lost_tick_policy -> slew
Registering driver pc-sysfw: rom_only -> 1
Registering driver isa-fdc: check_media_rate -> off
Registering driver virtio-balloon-pci: class -> 0x0500
Registering driver apic: vapic -> off
Registering driver USB: full-path -> no
Registering driver mc146818rtc: lost_tick_policy -> discard
We can see that the lost_tick_policy property is overwritten at the end.
I know QEmu has "discard" as the default value somewhere in the code,
but what should we do now? Because there's not only one default value
anymore; "discard" is the default for older machines and "slew" is for
newer ones. I thought only by modifying the GlobalProperty list in the
QEMUMachine struct would be enough. Does that list have the exact values
to be set for each machine, or those should be the default ones
(overwritable by the command line, for example)?
Description: Text Data
|[Prev in Thread]
||[Next in Thread]|
- [Qemu-devel] GlobalProperty in QEMUMachine overwrites explicit command line value,
Crístian Viana <=