Statistics
| Branch: | Revision:

root / vl.c @ d49f626e

History | View | Annotate | Download (129.8 kB)

# Date Author Comment
d49f626e 03/19/2010 10:27 pm Anthony Liguori

qmp: don't make -qmp disable the default monitor

Instead, we introduce a default_qmp flag. We don't use it yet, but will in the
next patch.

This has a user-visible impact as specifying just -qmp will now also show a
monitor on the 'vc'.

Signed-off-by: Anthony Liguori <>

3b6304f7 03/19/2010 10:27 pm Anthony Liguori

Add exit notifiers

Like atexit() but with state

Signed-off-by: Anthony Liguori <>

d7234f4d 03/19/2010 10:27 pm Anthony Liguori

Convert atexit users to exit_notifier

All of these users have global state so we really don't see a benefit from
exit_notifier. However, using exit_notifier means that there's one less
justification for having global state in the first place.

Signed-off-by: Anthony Liguori <>

31d4ee6c 03/19/2010 10:27 pm Juan Quintela

Convert io handlers to QLIST

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

7b27a769 03/19/2010 10:27 pm Juan Quintela

rename IOCanRWHandler to IOCanReadHandler

It was always only used for reads

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

4bed9837 03/19/2010 10:27 pm Juan Quintela

Handle deleted IOHandlers in a single buffer

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

db1a4972 03/17/2010 06:16 pm Paolo Bonzini

split out qemu-timer.c

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

16b151c3 03/17/2010 06:14 pm Paolo Bonzini

place together more #ifdef CONFIG_IOTHREAD blocks

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

d6f4ade2 03/17/2010 06:14 pm Paolo Bonzini

disentangle tcg and deadline calculation

Just tell main_loop_wait whether to be blocking or nonblocking, so that
there is no need to call qemu_cpus_have_work from the timer subsystem.
Instead, tcg_cpu_exec can say "we want the main loop not to block because...

cd48d7e8 03/17/2010 06:14 pm Paolo Bonzini

only one flag is needed for alarm_timer

The ALARM_FLAG_DYNTICKS can be testing simply by checking if there is
a rearm function.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

1828be31 03/17/2010 06:14 pm Paolo Bonzini

more alarm timer cleanup

The timer_alarm_pending variable is related to the alarm timer but not
placed in the struct. Also, in qemu_mod_timer the wrong flag was being
tested: the timer is rearmed in the alarm timer "bottom half", so the
right flag to test there is the "pending" flag....

7a5e5838 03/17/2010 06:14 pm Paolo Bonzini

do not use qemu_event_increment outside qemu_notify_event

qemu_notify_event in the non-iothread case is only stopping the current
CPU. However, if the CPU is idle and the main loop is in the select
call then a call to qemu_event_increment is needed too (as done in...

1db89e91 03/17/2010 06:14 pm Paolo Bonzini

tweak qemu_notify_event

Instead of testing specially next_cpu in host_alarm_handler, just do
that in qemu_notify_event. The idea is, if we are not running (or
not yet running) target CPU code, prepare things so that the execution
loop is exited asap; just make that clear....

3a720b14 03/17/2010 06:14 pm Paolo Bonzini

remove qemu_rearm_alarm_timer from main loop

Make the timer subsystem register its own callback instead.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

b6964827 03/17/2010 06:14 pm Paolo Bonzini

extract timer handling out of main_loop_wait

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

8c04ba55 03/17/2010 06:14 pm Paolo Bonzini

change qemu_run_timers interface

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

972abbe0 03/17/2010 06:14 pm Paolo Bonzini

introduce and use qemu_clock_enable

By adding the possibility to turn on/off a clock, yet another
incestuous relationship between timers and CPUs can be disentangled.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

4e3de9e9 03/17/2010 06:14 pm Paolo Bonzini

centralize handling of -icount

A simple patch to place together all handling of -icount.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

e2a7bb4b 03/17/2010 06:14 pm Paolo Bonzini

add qemu_icount_round

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

63255043 03/17/2010 06:14 pm Paolo Bonzini

add qemu_alarm_pending

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

a2aaa079 03/17/2010 06:14 pm Paolo Bonzini

new function qemu_icount_delta

Tweaking the rounding in qemu_next_deadline ensures that there's
no change whatsoever.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

1b48824f 03/17/2010 06:14 pm Paolo Bonzini

move vmstate registration of vmstate_timers earlier

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

9aea1029 03/17/2010 06:14 pm Paolo Bonzini

avoid dubiously clever code in win32_start_timer

The code is initializing an unsigned int to UINT_MAX using "-1", so that
the following always-true comparison seems to be always-false at a
first look. Since alarm timer initializations are never nested, it is...

291defbc 03/17/2010 06:14 pm Paolo Bonzini

fix error in win32_rearm_timer

The TIME_ONESHOT and TIME_PERIODIC flags are mutually exclusive.
The code after the patch matches the flags used in win32_start_timer.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

4a39943b 03/17/2010 04:44 pm Anthony Liguori

Merge remote branch 'markus/qerror' into staging

8212c64f 03/16/2010 06:45 pm Markus Armbruster

qemu-option: Move the implied first name into QemuOptsList

We sometimes permit omitting the first option name, for example
-device foo is short for -device driver=foo. The name to use
("driver" in the example) is passed as argument to qemu_opts_parse()....

1ecda02b 03/16/2010 05:58 pm Markus Armbruster

error: Replace qemu_error() by error_report()

error_report() terminates the message with a newline. Strip it it
from its arguments.

This fixes a few error messages lacking a newline:
net_handle_fd_param()'s "No file descriptor named %s found", and
tap_open()'s "vnet_hdr=1 requested, but no kernel support for...

65abca0a 03/16/2010 05:58 pm Markus Armbruster

error: Include the program name in error messages to stderr

cf5a65aa 03/16/2010 05:58 pm Markus Armbruster

error: Track locations in configuration files

New LOC_FILE. Use it for tracking file name and line number in
qemu_config_parse(). We now report errors like

qemu:foo.conf:42: Did not find I2C bus for smbus-eeprom

In particular, gems like this message:...

0f0bc3f1 03/16/2010 05:58 pm Markus Armbruster

error: Track locations on command line

New LOC_CMDLINE. Use it for tracking option with argument in
lookup_opt(). We now report errors like this

qemu: -device smbus-eeprom: Did not find I2C bus for smbus-eeprom
03cd4655 03/16/2010 05:55 pm Markus Armbruster

savevm: Fix -loadvm to report errors to stderr, not the monitor

A monitor may not even exist.

Change load_vmstate() to use qemu_error() instead of monitor_printf().
Parameter mon is now unused, remove it.

6e4f984c 03/16/2010 05:55 pm Markus Armbruster

error: Simplify error sink setup

qemu_error_sink can either point to a monitor or a file. In practice,
it always points to the current monitor if we have one, else to
stderr. Simply route errors to the current monitor or else to stderr,
and remove qemu_error_sink along with the functions to control it....

18141ed6 03/14/2010 11:43 pm Jan Kiszka

Don't set default monitor when there is a mux'ed one

This fixes eg. "-nographic -serial mon:stdio [-serial ...]".

Signed-off-by: Jan Kiszka <>
Signed-off-by: Aurelien Jarno <>

81d9b784 03/10/2010 05:06 pm Luiz Capitulino

QMP: Really move the RESET event to qemu_system_reset()

Something bad has happened in the merge of commit 0ee44250, as
the log message says it's supposed to be in qemu_system_reset()
but it is do_vm_stop().

Possibly, it was a problem with the conflict resolution with...

80cd3478 03/08/2010 07:30 pm Luiz Capitulino

QMP: Introduce RTC_CHANGE event

Emitted whenever the RTC time changes.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

0ee44250 03/08/2010 07:30 pm Luiz Capitulino

QMP: Move RESET event into qemu_system_reset()

Nothing will change as that function is currently only called by
the main loop code, but it's the right place for the RESET event,
as it's where the reset is actually performed.

Signed-off-by: Luiz Capitulino <>...

51a3bd71 03/08/2010 07:30 pm Luiz Capitulino

QMP: Drop DEBUG event

This event has been introduced in the first round of QMP commits,
turns out that it's based on the usage of the EXCP_DEBUG macro,
which has discussable semantics when exposed through QMP.

As libvirt doesn't use this, let's just drop it....

6b8f8fff 03/08/2010 07:30 pm Luiz Capitulino

QMP: Move STOP event into do_vm_stop()

I've introduced the STOP event in the main loop, this is wrong
as it will be only emitted if the io thread is enabled.

This fixes that by moving the STOP event to do_vm_stop().

Signed-off-by: Luiz Capitulino <>...

ea375f9a 03/04/2010 05:29 am Jan Kiszka

KVM: Rework VCPU state writeback API

This grand cleanup drops all reset and vmsave/load related
synchronization points in favor of four(!) generic hooks:

- cpu_synchronize_all_states in qemu_savevm_state_complete
(initial sync from kernel before vmsave)...

c902760f 03/04/2010 05:28 am Marcelo Tosatti

Add option to use file backed guest memory

Port qemu-kvm's -mem-path and -mem-prealloc options. These are useful
for backing guest memory with huge pages via hugetlbfs.

Signed-off-by: Marcelo Tosatti <>
CC: john cooper <>

724c6893 02/23/2010 12:16 am Anthony Liguori

Merge remote branch 'qemu-kvm/uq/master' into staging

b5ec5ce0 02/23/2010 12:16 am john cooper

Add cpu model configuration support..

This is a reimplementation of prior versions which adds
the ability to define cpu models for contemporary processors.
The added models are likewise selected via -cpu <name>,
and are intended to displace the existing convention...

adc8c965 02/22/2010 10:58 am Marcelo Tosatti

block SIGCHLD in vcpu thread(s)

Otherwise a vcpu thread can run the sigchild handler causing
waitpid() from iothread to fail.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>

fed6c344 02/22/2010 10:58 am Marcelo Tosatti

kvm specific wait_io_event

In KVM mode the global mutex is released when vcpus are executing,
which means acquiring the fairness mutex is not required.

Also for KVM there is one thread per vcpu, so tcg_has_work is meaningless.

Add a new qemu_wait_io_event_common function to hold common code...

cc84de95 02/22/2010 10:58 am Marcelo Tosatti

kvm: consume internal signal with sigtimedwait

Change the way the internal qemu signal, used for communication between
iothread and vcpus, is handled.

Block and consume it with sigtimedwait on the outer vcpu loop, which
allows more precise timing control....

b473df6e 02/19/2010 11:18 pm Paolo Bonzini

use lazy initialization for display_state

Ensure initialization of a dumb display, if needed, by making
all accesses go through get_displaystate.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

94419874 02/19/2010 11:18 pm Paolo Bonzini

remove knowledge of defaultallocator_free_displaysurface from sdl.c

Let register_displayallocator hand over the old width/height to the new
allocator.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

98b50080 02/19/2010 11:18 pm Paolo Bonzini

move default allocator to console.c

Moving stuff in console.c to avoid the need for prototypes makes
this patch a bit bigger, but there's no change in the code.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

668680f7 02/19/2010 08:12 pm Markus Armbruster

net: net_check_clients() runs too early to see -device, fix

Call it right after -device devices get created.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

f3dfda61 02/17/2010 02:59 pm Paolo Bonzini

use eventfd for iothread

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Avi Kivity <>

c37cc7b0 02/10/2010 08:46 pm Marcelo Tosatti

iothread: fix vcpu stop with smp tcg

Round robin vcpus in tcg_cpu_next even if the vm stopped. This
allows all cpus to enter stopped state.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Anthony Liguori <>

1d0f0d91 02/10/2010 07:56 pm Paolo Bonzini

do not loop on an incomplete io_thread_fd read

No need to loop if less than a full buffer is read, the next
read would return EAGAIN.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

652ce2d4 02/10/2010 07:56 pm Paolo Bonzini

loop write in qemu_event_increment upon EINTR

Same as what qemu-kvm does.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

41c872b6 02/10/2010 12:56 am Paolo Bonzini

add qemu_get_clock_ns

Some places use get_clock directly because they want to access the
rt_clock with nanosecond precision. Add a function to do exactly that
instead of using internal interfaces.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

8217d945 02/08/2010 06:06 pm Anthony Liguori

Merge remote branch 'qemu-kvm/uq/master' into staging-tmp

3f020d70 02/08/2010 11:12 am malc

Revert "On some systems printf is a macro"

This reverts commit bc5b6004588ad17370e0416e40b4aa9cf977023b.

bec7c2d4 02/08/2010 11:12 am Paolo Bonzini

do not interpolate % from vl.c to qemu-options.h

Since qemu-options.h is only used in vl.c, we can avoid using
brittle interpolation from a generated file.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: malc <>

e8105ebb 02/08/2010 11:12 am Paolo Bonzini

vl.c: avoid preprocessor directives in a printf call

Similar to the qemu-img.c patch, but I also have to unescape remaining
% signs in qemu-options.hx.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: malc <>

bc5b6004 02/07/2010 01:04 am malc

On some systems printf is a macro

Signed-off-by: malc <>

0dfbd514 02/05/2010 08:13 pm Paolo Bonzini

fix undefined shifts by >32

This one is for 0.12 too.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Blue Swirl <>

c5f32c99 02/04/2010 01:44 am Marcelo Tosatti

Fix incoming migration with iothread

Do not allow the vcpus to execute if the vm is stopped.

Fixes -incoming with CONFIG_IOTHREAD enabled.

Signed-off-by: Marcelo Tosatti <>

62a2744c 02/03/2010 11:47 pm Sheng Yang

kvm: Flush coalesced MMIO buffer periodly

The default action of coalesced MMIO is, cache the writing in buffer, until:
1. The buffer is full.
2. Or the exit to QEmu due to other reasons.

But this would result in a very late writing in some condition.
1. The each time write to MMIO content is small....

ff952ba2 02/03/2010 08:39 pm Markus Armbruster

qdev: Fix exit code for -device ?

Help was shoehorned into device creation, qdev_device_add(). Since
help doesn't create a device, it returns NULL, which looks to callers
just like failed device creation. Monitor handler do_device_add()
doesn't care, but main() exits unsuccessfully....

28e68d68 01/27/2010 06:50 pm Anthony Liguori

Fix regression in option parsing

Commit ec229bbe7 broke invocation without a specific -hda. IOW, qemu foo.img.
The lack of an optind update caused an infinite loop.

Reported-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>

625a5bef 01/27/2010 01:08 am Adam Litke

virtio: Add memory statistics reporting to the balloon driver

When using ballooning to manage overcommitted memory on a host, a system for
guests to communicate their memory usage to the host can provide information
that will minimize the impact of ballooning on the guests. The current method...

392ecf54 01/26/2010 11:42 pm Amit Shah

virtio-console: Automatically use virtio-serial-bus for the older -virtioconsole invocation

These hunks got dropped off mysteriously during the rebasing of my
virtio-serial series. Thanks go to Markus for noticing it.

Without these fixes, -virtioconsole doesn't actually have any effect....

dc330e28 01/26/2010 10:59 pm Kirill A. Shutemov

vl.c: fix warning with _FORTIFY_SOURCE

CC i386-softmmu/vl.o
cc1: warnings being treated as errors
/usr/src/RPM/BUILD/qemu-0.11.92/vl.c: In function 'qemu_event_increment':
/usr/src/RPM/BUILD/qemu-0.11.92/vl.c:3404: error: ignoring return value of 'write', declared with attribute warn_unused_result...

6530a97b 01/24/2010 05:37 pm Anthony Liguori

Move out option lookup into a separate function

Signed-off-by: Anthony Liguori <>

292444cb 01/24/2010 05:37 pm Anthony Liguori

Load global config files by default

A new option, nodefconfig is introduced to prevent loading from the default
config location. Otherwise, two configuration files will be searched for,
qemu.conf and target
<TARGET_NAME>.conf.

To ensure that the default configuration is overridden by a user specified...

98b19252 01/20/2010 04:25 pm Amit Shah

virtio-console: qdev conversion, new virtio-serial-bus

This commit converts the virtio-console device to create a new
virtio-serial bus that can host console and generic serial ports. The
file hosting this code is now called virtio-serial-bus.c.

The virtio console is now a very simple qdev device that sits on the...

b196b153 01/20/2010 04:25 pm Naphtali Sprei

Make CDROM a read-only drive

Signed-off-by: Naphtali Sprei <>
Signed-off-by: Anthony Liguori <>

f5edb014 01/20/2010 04:25 pm Naphtali Sprei

Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE.

Instead of using the field 'readonly' of the BlockDriverState struct for passing the request,...

5cdc9b76 01/14/2010 01:14 am Amit Shah

vl.c: Remove dead assignment

clang-analyzer pointed out the value of 'sockets' is never reused.

Signed-off-by: Amit Shah <>
CC: Andre Przywara <>
Signed-off-by: Anthony Liguori <>

8f0056b7 01/14/2010 01:14 am Paolo Bonzini

move kbd/mouse handling to input.c

Move 200 lines out of vl.c already into common code that only needs to
be compiled once.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

3f7638ec 01/11/2010 05:56 pm Jiri Denemark

Fix CPU topology initialization

Late initialization of CPU topology in CPUState prevents KVM guests to
actually see the topology.

Signed-off-by: Jiri Denemark <>
Signed-off-by: Anthony Liguori <>

c9f398e5 01/08/2010 05:58 pm H. Peter Anvin

debugcon: support for debugging consoles (e.g. Bochs port 0xe9)

Add generic support for debugging consoles (simple I/O ports which
when written to cause debugging output to be written to a target.)
The current implementation matches Bochs' port 0xe9, allowing the same...

59d1c1c2 12/23/2009 08:25 am Scott Tsai

USB: Improve usbdevice error messages

When an non-existent USB device is specified on the command line,
print "qemu: could not add USB device 'X'".
Likewise for the usb_{add,del} monitor commands.

Signed-off-by: Scott Tsai <>
Signed-off-by: Aurelien Jarno <>

099fe236 12/19/2009 12:23 am Juha Riihimäki

fix pidfile option to work in WIN32

Explicit read/write locking pidfile under WIN32 is bit extreme
nobody get the chance to read the pidfile. Convert to a write-only lock.

Also, creating pidfile was disabled along with daemonize under
WIN32. Enable it, but do not enable daemon support which doesn't...

42be86ce 12/18/2009 07:26 pm Gerd Hoffmann

usb-net: use qdev for -usbdevice

Rebased to master, adapted to device renaming by armbru,
no other changes.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

69fd02ee 12/18/2009 07:26 pm Gerd Hoffmann

fix vga names in default_list

Fix mismerge between 64465297 and 556cd098.

Cc: Markus Armbruster <>
Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

ac33f8fa 12/18/2009 07:26 pm Gerd Hoffmann

defaults: split default_drive

Split default_drive into default_{floppy,cdrom,sdcard}.
Also add QEMUMachine flags to disable them per machine.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

d8bcbabf 12/18/2009 07:26 pm Gerd Hoffmann

defaults: update device_list[]

Add isa-fdc (disables default_floppy).
Add ide-drive (disables default_cdrom).

Also walk the -global QemuOpts, so we'll catch
-global isa-fdc.drive{A,B}=<name> too.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

15ff7705 12/18/2009 07:26 pm Gerd Hoffmann

Check rom_load_all() return value.

Check rom_load_all() return value.
Also don't make option rom loading failure fatal.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

75f12475 12/18/2009 07:26 pm Kevin Wolf

Revert "Rename DriveInfo.onerror to on_write_error" (fix mismerge)

Part of the first patch of the -drive rerror series has been merged once more
on top of the rest of the series. This effectively disables the rerror option
and always goes with the default value. Reverting the commit re-enables the...

38536da1 12/18/2009 05:34 pm Alexander Graf

add default virtcon initialization

When going through the default devices, we don't initialize the virtio
console, unless we're doing -nographic.

I suppose that's just a leftover from the recent code restructuring, so
let's put it in.

Signed-off-by: Alexander Graf <>...

e78c48ec 12/12/2009 03:59 pm Luiz Capitulino

monitor: Convert do_info_mice() to QObject

Each mouse is represented by a QDict, the returned QObject is a QList of
all mice.

This commit should not change user output.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

aee1b935 12/12/2009 03:59 pm Gerd Hoffmann

default devices: virtio consoles.

This patch adds a variable default_virtcon which says whenever a default
virtio console should be added. It is disabled by default, followup
patch will enable it for s390. It is cleared when qemu finds
'-virtiocon', '-device virtio-console-s390' or '-device...

986c5f78 12/12/2009 03:59 pm Gerd Hoffmann

Set default console to virtio on S390x

All "normal" system emulation targets in qemu I'm aware of display
output on either VGA or serial output.

Our S390x virtio machine doesn't have such kind of legacy hardware. So
instead we need to default to a virtio console....

d8c208dd 12/12/2009 03:59 pm Gerd Hoffmann

default devices: add global cmd line option.

Add global command line option to disable default devices.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

cb4522cc 12/12/2009 03:59 pm Gerd Hoffmann

default devices: network

Add a default_net variable which specified whenever a default network
should be created. It is cleared in case any -net option is specified
and it is also added to the new -nodefaults switch.

Signed-off-by: Gerd Hoffmann <>...

aa40fc9c 12/12/2009 03:59 pm Gerd Hoffmann

default devices: drives

Add a default_drive variable which specified whenever the default drives
(cdrom, floppy, sd) should be created. It is cleared when the new
-nodefaults switch is specified on the command line.

Signed-off-by: Gerd Hoffmann <>...

88589343 12/12/2009 03:59 pm Gerd Hoffmann

rework -monitor handling, switch to QemuOpts

This patch reworks the -monitor handling:

- It adds a new "mon" QemuOpts list for the monitor(s).
- It adds a monitor_parse() function to parse the -monitor switch.
- It adds a mon_init function to initialize the monitor(s) from the...
22a0e04b 12/12/2009 03:59 pm Gerd Hoffmann

add new -mon switch

Add -mon switch which maps pretty straight forward into the QemuOpts
internal representation:

-mon chardev=&lt;name&gt;[,mode=[control|readline]][,[no]default]

Via config file:

[mon]
chardev = "<name>"
mode = "readline"
default = "on"...

6ca5582d 12/12/2009 03:59 pm Gerd Hoffmann

add -qmp convinience switch

Acts like -monitor but switched into qmp mode.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

998bbd74 12/12/2009 03:59 pm Gerd Hoffmann

default devices: core code & serial lines.

Qemu creates a default serial line for you in case you didn't specify
one on the command line. Right now this is tied to the '-serial
<chardev>' command line switch, which in turn causes trouble if you are
creating your serial line via '-device isa-serial,<props>'....

6a5e8b0e 12/12/2009 03:59 pm Gerd Hoffmann

default devices: parallel port.

Qemu creates a default parallel port for you in case you didn't specify
one on the command line. Right now this is tied to the '-parallel
<chardev>' command line switch, which in turn causes trouble if you are
creating your parallel port via '-device isa-parallel,<props>'....

abdeed06 12/12/2009 03:59 pm Gerd Hoffmann

default devices: qemu monitor.

This patch makes the monitor default device configuration work like the
default serial and parallel port devices. It adds a variable
default_monitor which says whenever a default monitor should be added.
It is enabled by default. It is cleared when qemu finds '-monitor' on...

e1c09175 12/12/2009 03:59 pm Gerd Hoffmann

zap serial_monitor_mux

The logic in this code obviously predates the multiple monitor
capability of qemu and looks increasingly silly these days.

I think the intention of this piece of code is to get a reasonable
default for the -nographic case: have monitor and serial line muxed...

64465297 12/12/2009 03:59 pm Gerd Hoffmann

default devices: vga adapter.

Qemu creates a vga display for you in case you didn't specify one on the
command line. Right now this is tied to the '-vga <type>' command line
switch, which in turn causes trouble if you are creating your gfx card
using '-device VGA,<props>'....

51bfa4d3 12/12/2009 03:59 pm Gerd Hoffmann

chardev: move greeting into vc backend.

Make the 'vc' chardev backend print a title line with the chardev name
after initialization, using CharDriverState->label.

This replaces the banner printing code in vl.c.

Signed-off-by: Gerd Hoffmann <>...