qdev: Relax parsing of bus option
Treat multiple successive slashes as a one slash. Ignore trailingslashes. This is how POSIX pathnames work.
error: New QERR_BUS_NOT_FOUND
error: New QERR_DEVICE_MULTIPLE_BUSSES
error: New QERR_DEVICE_NO_BUS
qdev: Convert qbus_find() to QError
error: New error_printf_unless_qmp()
error: New QERR_PROPERTY_VALUE_IN_USE
error: New QERR_PROPERTY_VALUE_NOT_FOUND
qdev: convert setting device properties to QError
qdev: Hide "ptr" properties from users
Users can't set them, so qdev_device_help() shouldn't list them. Fixthat. Also make qdev_prop_parse() hide them instead of printing ameaningless "has no parser" error message.
Their value means nothing to users, so qdev_print_props() shouldn't...
monitor: New monitor_cur_is_qmp()
error: Let converted handlers print in human monitor
While fully converted handlers are not supposed to print anything whenrunning in a QMP monitor, they are free to print in a human monitor.For instance, device_add (not yet converted) prints help, and will...
error: Polish human-readable error descriptions
Also put error definitions in alphabetical order
error: New QERR_PROPERTY_NOT_FOUND
error: New QERR_PROPERTY_VALUE_BAD
error: Replace qemu_error() by error_report()
error_report() terminates the message with a newline. Strip it itfrom its arguments.
This fixes a few error messages lacking a newline:net_handle_fd_param()'s "No file descriptor named %s found", andtap_open()'s "vnet_hdr=1 requested, but no kernel support for...
error: Rename qemu_error_new() to qerror_report()
error: Infrastructure to track locations for error reporting
New struct Location holds a location. So far, the only location isLOC_NONE, so this doesn't do anything useful yet.
Passing the current location all over the place would be toocumbersome. Hide it away in static cur_loc instead, and provide...
error: Include the program name in error messages to stderr
error: Track locations in configuration files
New LOC_FILE. Use it for tracking file name and line number inqemu_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:...
QemuOpts: Fix qemu_config_parse() to catch file read errors
error: Track locations on command line
New LOC_CMDLINE. Use it for tracking option with argument inlookup_opt(). We now report errors like this
qemu: -device smbus-eeprom: Did not find I2C bus for smbus-eeprom
qdev: Fix -device and device_add to handle unsuitable bus gracefully
"device_add isa-serial,bus=pci.0" kills QEMU. Not good.
qdev: Factor qdev_create_from_info() out of qdev_create()
To make it obvious that -device and device_add can't die inhw_error().
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, itrejected them with a "can't be added via command line" message, which...
error: Don't abuse qemu_error() for non-error in scsi_hot_add()
Commit 30d335d6 converted an informational message frommonitor_printf() to qemu_error(), probably because the latter doesn'tneed a mon argument. A later commit will make qemu_error() print...
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.
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 tocur_mon, which works fine for monitor code.
Commit e0f084bf reused the function int reset handler...
pc: Factor common code out of pc_boot_set() and cmos_init()
Code duplicated in commit 0ecdffbb. The two versions are similar, butnot identical:
tools: Remove unused cur_mon from qemu-tool.c
monitor: Separate "default monitor" and "current monitor" cleanly
Commits 376253ec..731b0364 introduced global variable cur_mon, whichpoints to the "default monitor" (if any), except during execution ofmonitor_read() or monitor_control_read() it points to the monitor from...
block: Simplify usb_msd_initfn() test for "can read bdrv key"
The old test assumes that "hotplugged" implies "we have a currentmonitor for reading the key". This is in fact true, but it's notobviously true.
Aside: if it were false, we could pass a null pointer to...
monitor: Factor monitor_set_error() out of qemu_error_internal()
This separates the monitor part from the QError part.
error: Move qemu_error() & friends from monitor.c to own file
They're about reporting errors, not about the monitor.
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 tostderr. Simply route errors to the current monitor or else to stderr,and remove qemu_error_sink along with the functions to control it....
error: Move qemu_error & friends into their own header
error: New error_printf() and error_vprintf()
error: Don't abuse qemu_error() for non-error in qdev_device_help()
qdev_device_help() prints device information with qemu_error(). Alater commit will make qemu_error() print additional stuff that isonly appropriate for proper errors, and then this will break. Use...
error: Don't abuse qemu_error() for non-error in qbus_find()
qbus_find() adds an informational line to error messages, and printsboth lines with one qemu_error(). Use error_printf() for theinformational line instead.
While there, simplify: instead of printing buffers filled by...
usb: Remove disabled monitor_printf() in usb_read_file()
The monitor_printf() reports failure. Printing is wrong, because thecaller tries various arguments, and expects the function to fail forsome or all.
Disabled since commit 26a9e82a. Remove it.
target-ppc: fix evsrwu and evsrws (second try)
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-ppc: fix evsrwu and evsrws
target-ppc: fix evslw instruction
audio: fix comment
Signed-off-by: malc <av1474@comtv.ru>
QMP: Really move the RESET event to qemu_system_reset()
Something bad has happened in the merge of commit 0ee44250, asthe 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...
target-i386: fix SIB decoding with index = 4
A SIB byte with an index of 4 means "no scaled index", even if the scalevalue is not 0. In 64-bit mode, if REX.X is used, an index of 4 selects%r12. This is correctly handled by the computation of the index variable,...
slirp: check system() success
we shouldn't call W*() macros until we check that fork worked.
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qcow2: return errno instead of -1
qcow: return errno instead of -1
vmdk: return errno instead of -1
vmdk: make vmdk_snapshot_create return -errno
vmdk: fix double free
fail_gd error case would also free rgd_buf that was already freed
vmdk: share cleanup code
cleanup code is identical for error/success cases. Only differenceare goto labels.
block: print errno on error
Now that we changed all create calls to return errno, just print it.
documentation: qemu_write_full don't work with non-blocking fd's
cow: return errno instead of -1
Remove not needed ret = 0 assignment.
qemu-img rebase: Add -f option
Allow the user to specify the format of the image to rebase.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
configure: Fix wrong stderr redirection
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
configure: Fix code which creates config.mak files
These files are created by configure and growunnecessarily at each new call of configure:
roms/seabios/config.makroms/vgabios/config.maklibhw32/config.maklibhw64/config.mak
libhw32/config.mak and libhw64/config.mak set...
kbd keds: vnc
Use led status notification support in vnc.
The qemu vnc server keeps track of the capslock and numlock states basedon the key presses it receives from the vnc client. But this fails incase the guests idea of the capslock and numlock state changes for other...
Restore terminal attributes for tty based monitor
Patch http://permalink.gmane.org/gmane.comp.emulators.qemu/63472 handleclose when using tty devices (like /dev/ttyS0),yet tty based monitor are not restoring terminal attributes (as donewith stdio based monitor), when closing qemu after that command:...
QMP: Introduce WATCHDOG event
It's emitted whenever the watchdog device's timer expires. The actiontaken is provided in the 'data' member.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: Catch attempt to attach more than one device to a netdev
Guest device and host netdev are peers, i.e. it's a 1:1 relation.However, we fail to enforce that:
$ qemu -nodefaults --nographic -netdev user,id=net0 -device e1000,netdev=net0 -device virtio-net-pci,netdev=net0 -monitor stdio...
scsi: Make device scsi-disk reject /dev/sg*
You're supposed to use scsi-generic for that. Which rejects anythingbut /dev/sg*.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kbd leds: infrastructure
Adds infrastructure for keyboard led status tracking to qemu.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kbd leds: ps/2 kbd
Add led status notification support to the ps/2 kbd driver.
kbd leds: usb kbd
Add led status notification support to the usb kbd driver.
qdev: Improve diagnostics for bad property values
Property "vlan" reports "failed to parse" even when the value parsesjust fine, but the result doesn't name an existing VLAN.
Similarly, properties "drive", "chr" and "netdev" misleadingly report"failed to parse" when the value doesn't name an existing host device....
QMP: Introduce RTC_CHANGE event
Emitted whenever the RTC time changes.
adding helper pci functions
Signed-off-by: Izik Eidus <ieidus@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
move x509 file name defines to qemu-x509.h
Want share them with vnc and spice.
pcnet APROMWE bit location (retry)
According to AMD document 21485D pp.141, APROMWE is bit 8 of BCR2.
Signed-off-by: Christopher Kilgour <techie@whiterocker.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: Add a DEV_NVECTORS_UNSPECIFIED enum for unspecified nr of MSI vectors
net.c used a constant to signify no MSI vectors were specified. Extendthat to all qdev devices.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Reported-by: "Michael S. Tsirkin" <mst@redhat.com>...
virtio-pci: Use DEV_NVECTORS_UNSPECIFIED instead of -1 for virtio-serial
Use the named constant instead of -1.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Reported-by: "Michael S. Tsirkin" <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QMP: Move RESET event into qemu_system_reset()
Nothing will change as that function is currently only called bythe 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 <lcapitulino@redhat.com>...
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....
QMP: Revamp the qmp-events.txt file
Now we can say it's useful, the following changes have been made:
- Put events in alphabetical order- Add examples to all events- Document all 'data' members- Small corrections and cleanups
block: Emit BLOCK_IO_ERROR before vm_stop() call
The next commit will move the STOP event into do_vm_stop(), tohave the expected event sequence we need to emit the I/O errorevent before calling vm_stop().
The expected sequence is:
{ "event": "BLOCK_IO_ERROR" [...] }...
QMP: Move STOP event into do_vm_stop()
I've introduced the STOP event in the main loop, this is wrongas it will be only emitted if the io thread is enabled.
This fixes that by moving the STOP event to do_vm_stop().
Fix hanging user monitor when using balloon command
This patch application failed. My patch adds a cb() call indo_balloon(), but the change in git has added the cb() call todo_info_balloon(). That is causing qemu segfaults. Applying thefollowing should correct the damage. Thanks....
sdl: improve grab exiting instructions
It might not be obvious what "grab" is.
Reported-by: Ingo Molnar <mingo@elte.hu>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ppc: don't define bamboo-0.13 as the default machine
It has been broken by commit 977b6b91cee1132f8c7b12d22f4b273091598e44.
Update to a hopefully more future proof FSF address
See also 8167ee883931cb20c6264fc19d040ce2dc6ceaaa,530e7615ce3c01882e582c84dc6304ab98a3d5c5 andfad6cb1a565bb73f83fc0e2654489457b489e436.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
i386-dis: remove dead assignments, spotted by clang
Value stored to 'mask' is never read.
softfloat: remove dead assignments, spotted by clang
Value stored to 'bSign' is never read.
slirp: remove dead initialization, spotted by clang
Value stored during initialization is never read.
slirp: remove dead nested assignment, spotted by clang
Although the value stored to 'r' is used in the enclosing expression,the value is never actually read from 'r'.
slirp: remove dead increments, spotted by clang
Value stored is never read.
slirp: remove dead assignments, spotted by clang
target-arm: Fix missing 'return' in SRS handling.
There's a return missing in the srs handling which leads to srs always beingtreated an an invalid op.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix curses interaction with keymaps
The combination of keymap support (-k option) and curses is currentlyvery broken. The patch below fixes it by first extending keymap supportto interpret the shift, ctrl, altgr and addupper keywords in keymaps,and to fix curses into properly using keymaps....
use absolute URLs for .gitmodules
The relative URLs do not work when cloning a fork of qemu or whencloning from the Savannah URL.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Documentation: Modify rule for html output (better looking output format)
To create html output from texi input, texi2html was used.Output from makeinfo looks cleaner, so replace the old ruleand use makeinfo now.
For those who want to use their own variant of html output,...
scsi: update comment on the standards revision
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qemu-nbd: Fix wrong description in qemu-nbd.texi
-c option needs argument <dev> but it's missing now.This patch fixes it.
Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Build usb-ohci for PCs
The OHCI emulation isn't obviously broken and there are people who want to useit. Let's build it by default so that it can be enabled via -device.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
ppc440_bamboo: Disable new virtio-serial features for 0.12 machine type
Disable the MULTIPORT feature and MSI vectors for the 0.12 machinetypes; those features are added only for 0.13 onwards.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
ppc440_bamboo: Add 0.12 and 0.13 machine types for backward compat
Add a 0.12 machine type for compatibility with older versions. Mark thedefault one as 0.13.
s390-virtio: Fix compile error for virtio-block init
Commit 428c149b0be790b440e1cbee185b152cdb22feec modified the argumentthat virtio_blk_init takes. Update the s390 bus code that calls thisfunction.
Signed-off-by: Amit Shah <amit.shah@redhat.com>CC: Christoph Hellwig <hch@lst.de>...
json-parser: Fix segfault on malformed input
If the parser fails to parse the key in parse_pair, it will access a NULLpointer. A simple way to trigger this is sending {foo} via QMP. This patchturns the segfault into a syntax error reply.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...