Statistics
| Branch: | Revision:

root @ d6f4ade2

# Date Author Comment
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 <>

6d0ee850 03/17/2010 05:42 pm Adam Litke

balloon: Do not save VM state wrt asynchronous virtio operations

When working with the VM state (for loadvm/savevm and migration), it is not
valid to load and store pointers since the validity of those pointers cannot be
assured in the new qemu address space. Therefore, virtio_balloon_save() and...

8cfacf07 03/17/2010 05:42 pm Christoph Hellwig

block: add logical_block_size property

Add a logical block size attribute as various guest side tools only
increase the filesystem sector size based on it, not the advisory
physical block size.

For scsi we already have support for a different logical block size...

702f3e0f 03/17/2010 05:42 pm Jan Kiszka

Avoid crash on '-usbdevice <device>' without parameters

Many usbdevice_init implementors assume params is non-NULL.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

cc39a92c 03/17/2010 05:42 pm Chris Webb

Fix SIGFPE for vnc display of width/height = 1

During boot, the screen gets resized to height 1 and a mouse click at this
point will cause a division by zero when calculating the absolute pointer
position from the pixel (x, y). Return a click in the middle of the screen...

3c9c706c 03/17/2010 05:41 pm Paul Bolle

usb-linux: remove unreachable default in switch statement

Signed-off-by: Paul Bolle <>
Signed-off-by: Anthony Liguori <>

fd04a2ae 03/17/2010 05:41 pm Shahar Havivi

Wrong error message in block_passwd command

Signed-off-by: Shahar Havivi <>
Signed-off-by: Anthony Liguori <>

b6034a39 03/17/2010 05:41 pm Bjørn Mork

sdl: improve error message on fatal error

The SDL_SetVideoMode() error condition is easily triggered by a user by
simply configure a guest with a host unsupported display resolution
and attempting to enable fullscreen. Since the error is fatal, adding
a bit of debugging help can't harm....

25b28f01 03/17/2010 05:41 pm Shahar Havivi

QError: New QERR_DEVICE_NOT_ENCRYPTED

Signed-off-by: Shahar Havivi <>
Signed-off-by: Anthony Liguori <>

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

Merge remote branch 'markus/qerror' into staging

7d834c74 03/17/2010 04:42 pm Anthony Liguori

Merge remote branch 'mst/pci' into staging

d4c430a8 03/17/2010 04:44 am Paul Brook

Large page TLB flush

QEMU uses a fixed page size for the CPU TLB. If the guest uses large
pages then we effectively split these into multiple smaller pages, and
populate the corresponding TLB entries on demand.

When the guest invalidates the TLB by virtual address we must invalidate...

304329ee 03/16/2010 06:45 pm Markus Armbruster

qemu-option: Rename find_list() to qemu_find_opts() & external linkage

Next commit wants to use it.

361127df 03/16/2010 06:45 pm Markus Armbruster

monitor: New argument type 'O'

In the human monitor, it declares a single optional argument to be
parsed according to the QemuOptsList given by its name.

In QMP, it declares an optional argument for each member of the
QemuOptsList.

Restriction: only lists with empty desc are supported for now. Good...

c7e4e8ce 03/16/2010 06:45 pm Markus Armbruster

monitor: Use argument type 'O' for device_add

While there, improve the params help text.

8bc27249 03/16/2010 06:45 pm Markus Armbruster

monitor: convert do_device_add() to QObject

fc98eb43 03/16/2010 06:45 pm Markus Armbruster

qdev: Relax parsing of bus option

Treat multiple successive slashes as a one slash. Ignore trailing
slashes. This is how POSIX pathnames work.

7bbd8237 03/16/2010 06:45 pm Markus Armbruster

error: New QERR_BUS_NOT_FOUND

1ae78718 03/16/2010 06:45 pm Markus Armbruster

error: New QERR_DEVICE_MULTIPLE_BUSSES

07574baf 03/16/2010 06:45 pm Markus Armbruster

error: New QERR_DEVICE_NO_BUS

ac8dae67 03/16/2010 06:45 pm Markus Armbruster

qdev: Convert qbus_find() to QError

aa924ae7 03/16/2010 06:45 pm Markus Armbruster

error: New error_printf_unless_qmp()

56e9f563 03/16/2010 06:45 pm Markus Armbruster

error: New QERR_BAD_BUS_FOR_DEVICE

8eae73b5 03/16/2010 06:45 pm Markus Armbruster

error: New QERR_BUS_NO_HOTPLUG

4d9a1a15 03/16/2010 06:45 pm Markus Armbruster

error: New QERR_DEVICE_INIT_FAILED

fab5767f 03/16/2010 06:45 pm Markus Armbruster

error: New QERR_NO_BUS_FOR_DEVICE

3801cf8a 03/16/2010 06:45 pm Markus Armbruster

Revert "qdev: Use QError for 'device not found' error"

This reverts commit 3ced9f7a36189aed94d8bf86f3f5087a53012455.

The next commit will convert all of qdev_device_add() to QError, and
it'll be clearer with this partial conversion reverted.

0204276b 03/16/2010 06:45 pm Markus Armbruster

error: Convert do_device_add() to QError

Conversion to QObject is still missing.

01e7f188 03/16/2010 06:45 pm Markus Armbruster

qemu-option: Functions to convert to/from QDict

The functions are somewhat restricted. Good enough for the job at
hand. We'll extend them when we need more.

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()....

9c5eff95 03/16/2010 06:45 pm Markus Armbruster

error: New QERR_PROPERTY_VALUE_IN_USE

84745d68 03/16/2010 06:45 pm Markus Armbruster

error: New QERR_PROPERTY_VALUE_NOT_FOUND

fdcfa190 03/16/2010 06:45 pm Markus Armbruster

qdev: convert setting device properties to QError

036f7166 03/16/2010 06:01 pm Markus Armbruster

qdev: Hide "ptr" properties from users

Users can't set them, so qdev_device_help() shouldn't list them. Fix
that. Also make qdev_prop_parse() hide them instead of printing a
meaningless "has no parser" error message.

Their value means nothing to users, so qdev_print_props() shouldn't...

6620d3ce 03/16/2010 06:01 pm Markus Armbruster

monitor: New monitor_cur_is_qmp()

cde0fc75 03/16/2010 06:01 pm Markus Armbruster

error: Let converted handlers print in human monitor

While fully converted handlers are not supposed to print anything when
running in a QMP monitor, they are free to print in a human monitor.
For instance, device_add (not yet converted) prints help, and will...

fc5469d8 03/16/2010 06:01 pm Markus Armbruster

error: Polish human-readable error descriptions

Also put error definitions in alphabetical order

c58a35f8 03/16/2010 06:01 pm Markus Armbruster

error: New QERR_PROPERTY_NOT_FOUND

06b4a703 03/16/2010 06:01 pm Markus Armbruster

error: New QERR_PROPERTY_VALUE_BAD

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...

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

error: Rename qemu_error_new() to qerror_report()

827b0813 03/16/2010 05:58 pm Markus Armbruster

error: Infrastructure to track locations for error reporting

New struct Location holds a location. So far, the only location is
LOC_NONE, so this doesn't do anything useful yet.

Passing the current location all over the place would be too
cumbersome. Hide it away in static cur_loc instead, and provide...

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:...

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

QemuOpts: Fix qemu_config_parse() to catch file read errors

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
327867b6 03/16/2010 05:58 pm Markus Armbruster

qdev: Fix -device and device_add to handle unsuitable bus gracefully

"device_add isa-serial,bus=pci.0" kills QEMU. Not good.

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

qdev: Factor qdev_create_from_info() out of qdev_create()

To make it obvious that -device and device_add can't die in
hw_error().

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

qdev: Hide "no_user" devices from users

Users can't create them, so qdev_device_help() shouldn't list them.
Fix that.

Also make qdev_device_add() pretend they don't exist. Before, it
rejected them with a "can't be added via command line" message, which...

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

error: Don't abuse qemu_error() for non-error in scsi_hot_add()

Commit 30d335d6 converted an informational message from
monitor_printf() to qemu_error(), probably because the latter doesn't
need a mon argument. A later commit will make qemu_error() print...

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.

8ad00f84 03/16/2010 05:55 pm Markus Armbruster

pc: Fix error reporting for -boot once

Commit 0ecdffbb created pc_boot_set() for use from monitor command
"boot_set", via qemu_boot_set(). pc_boot_set() reports errors to
cur_mon, which works fine for monitor code.

Commit e0f084bf reused the function int reset handler...

d9346e81 03/16/2010 05:55 pm Markus Armbruster

pc: Factor common code out of pc_boot_set() and cmos_init()

Code duplicated in commit 0ecdffbb. The two versions are similar, but
not identical:

  • cmos_init() reports errors to stderr, pc_boot_set() via
    qemu_error(). The latter is fine for both, so pick that for the...
070a2f81 03/16/2010 05:55 pm Markus Armbruster

tools: Remove unused cur_mon from qemu-tool.c

8631b608 03/16/2010 05:55 pm Markus Armbruster

monitor: Separate "default monitor" and "current monitor" cleanly

Commits 376253ec..731b0364 introduced global variable cur_mon, which
points to the "default monitor" (if any), except during execution of
monitor_read() or monitor_control_read() it points to the monitor from...

a4426488 03/16/2010 05:55 pm Markus Armbruster

block: Simplify usb_msd_initfn() test for "can read bdrv key"

The old test assumes that "hotplugged" implies "we have a current
monitor for reading the key". This is in fact true, but it's not
obviously true.

Aside: if it were false, we could pass a null pointer to...

d6f46833 03/16/2010 05:55 pm Markus Armbruster

monitor: Factor monitor_set_error() out of qemu_error_internal()

This separates the monitor part from the QError part.

b4a51f7f 03/16/2010 05:55 pm Markus Armbruster

error: Move qemu_error() & friends from monitor.c to own file

They're about reporting errors, not about the monitor.

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....

2f792016 03/16/2010 05:55 pm Markus Armbruster

error: Move qemu_error & friends into their own header

ba0fe87a 03/16/2010 05:55 pm Markus Armbruster

error: New error_printf() and error_vprintf()

8a9662ca 03/16/2010 05:55 pm Markus Armbruster

error: Don't abuse qemu_error() for non-error in qdev_device_help()

qdev_device_help() prints device information with qemu_error(). A
later commit will make qemu_error() print additional stuff that is
only appropriate for proper errors, and then this will break. Use...

53db16b5 03/16/2010 05:55 pm Markus Armbruster

error: Don't abuse qemu_error() for non-error in qbus_find()

qbus_find() adds an informational line to error messages, and prints
both lines with one qemu_error(). Use error_printf() for the
informational line instead.

While there, simplify: instead of printing buffers filled by...

4491e0f3 03/16/2010 05:55 pm Markus Armbruster

usb: Remove disabled monitor_printf() in usb_read_file()

The monitor_printf() reports failure. Printing is wrong, because the
caller tries various arguments, and expects the function to fail for
some or all.

Disabled since commit 26a9e82a. Remove it.

409dbce5 03/16/2010 09:38 am Aurelien Jarno

load_elf: replace the address addend by a translation function

A few machines need to translate the ELF header addresses into physical
addresses. Currently the only possibility is to add a value to the
addresses.

This patch replaces the addend argument by and a translation function...

7a7e5db9 03/15/2010 01:52 pm Michael S. Tsirkin

pcnet: make subsystem vendor id match hardware

Real pcnet device (AT2450) apparently has subsystem
device and vendor id set to 0, this is out of spec
(which requires that vendor id is obtained from PCI SIG)
but windows xp driver seems to need this in order...

15e89f59 03/15/2010 01:52 pm Michael S. Tsirkin

eepro100: address pci todo's, use pci_set_xx

eepro100 uses macros which rely on a specific
local variable name (pci_conf) which is scary.
Some of the uses are wrong or unnecessary,
remove them. The rest are small in number, open-code
them using pci_set_xx functions....

cb66ffcf 03/15/2010 12:56 am Kevin Wolf

qemu-img rebase: Document -f option

The option was implemented in e53dbee0, but I forgot documenting it.

Signed-off-by: Kevin Wolf <>
Reviewed-by: Christoph Hellwig <>
Signed-off-by: Aurelien Jarno <>

7b9cbadb 03/15/2010 12:30 am Aurelien Jarno

mips: add header to mips_int.c and mips_timer.c

Signed-off-by: Aurelien Jarno <>

dbfff4de 03/15/2010 12:01 am Aurelien Jarno

tcg: declare internal helpers as const and pure

TCG internal helpers only access to the values passed in arguments, and
do not modify the CPU internal state. Thus they can be declared as
const and pure.

Signed-off-by: Aurelien Jarno <>

39324ca4 03/14/2010 11:43 pm Jan Kiszka

Fix corner case in chardev udp: parameter

The missing '' broke 'udp::<port>:<port>' parsing.

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

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 <>

2b71cd72 03/14/2010 11:04 pm Aurelien Jarno

tcg/arm: use helpers for divu/remu

Signed-off-by: Aurelien Jarno <>

31d66551 03/14/2010 11:04 pm Aurelien Jarno

tcg: add div/rem 32-bit helpers

Some targets like ARM would benefit to use 32-bit helpers for
div/rem/divu/remu.

Create a #define for div2 so that targets can select between
div, div2 and helper implementation. Use the helper version if none
of the #define are present....

7296abac 03/14/2010 04:58 pm Paul Brook

Fix pagetable code

The multi-level pagetable code fails to iterate ove all entries because
of the L2_BITS v.s. L2_SIZE thinko.

Signed-off-by: Paul Brook <>

66c80e75 03/14/2010 10:52 am Vagrant Cascadian

spelling typo (compatibilty) in hw/fw_cfg.c

here's a trivial patch to fix the spelling of "compatibility":

Signed-off-by: Vagrant Cascadian <>
Signed-off-by: Blue Swirl <>

e117f772 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: add missing CPUID feature flag names

Some CPUID feature flags had no string value, so they could not be
switched on or off from the command line.
Add names for the missing ones mentioned in the current public CPUID
specification from both Intel and AMD. Those only mentioned in the...

ed2c54d4 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: add "host" to the list of supported CPU models

Signed-off-by: Andre Przywara <>
Signed-off-by: Aurelien Jarno <>

457dfed6 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: remove unnecessary kvm_trim function

Correct me if I am wrong, but kvm_trim looks like a really bloated
implementation of a bitwise AND. So remove this function and replace
it with the real stuff(TM).

Signed-off-by: Andre Przywara <>...

551a2dec 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: add TCG feature bit trimming

In KVM we trim the user provided CPUID bits to match the host CPU's
one. Introduce a similar feature to QEMU/TCG. Create a mask of TCG's
capabilities and apply it to the user bits.
This allows to let the CPU models reflect their native archetypes....

d3bf5915 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: Always expose 32 and 64-bit CPUs

Since 64-bit capability is just another CPUID bit we now properly
mask, there is no reason anymore to hide the 64-bit capable CPU
models from a 32-bit only QEMU. All 64-bit CPUs can be used
perfectly in 32-bit legacy mode anyway, so these models also make...

58012d66 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: fix CPUID levels

Bump up the xlevel number for qemu32 to allow parsing of the processor
name string for this model.
Similiarly the 486 processor should have at least the feature bit
leaf enabled.

Signed-off-by: Andre Przywara <>...

8560efed 03/13/2010 05:50 pm Aurelien Jarno

x86/cpuid: Enable all features of real CPU

Enable all features of real CPU, unsupported features will be
trimmed depending on TCG or KVM capabilities.

Move the list of unsupported TCG features near the TCG capabilities
masks.

Signed-off-by: Aurelien Jarno <>

2f7a21c4 03/13/2010 05:50 pm Aurelien Jarno

x86/cpuid: fix indentation

Signed-off-by: Aurelien Jarno <>