History | View | Annotate | Download (120.7 kB)
vl: allow "cont" from panicked state
After reporting the GUEST_PANICKED monitor event, QEMU stops the VM.The reason for this is that events are edge-triggered, and can be lost ifmanagement dies at the wrong time. Stopping a panicked VM lets management...
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pci, pc, acpi fixes, enhancements
This includes some pretty big changes:- pci master abort support by Marcel- pci IRQ API rework by Marcel- acpi generation support by myself
Everything has gone through several revisions, latest versions have been on...
spice: fix multihead support
This patch fixes spice display initialization to handlemultihead properly.
spice-core now keeps track of which QemuConsole has a spicedisplay channel attached to it and which has not. It alsomanages display channel ids....
loader: allow adding ROMs in done callbacks
Don't abort if machine done callbacks add ROMs.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>Tested-by: Gerd Hoffmann <kraxel@redhat.com>Reviewed-by: Igor Mammedov <imammedo@redhat.com>Tested-by: Igor Mammedov <imammedo@redhat.com>...
vl: Clean up unnecessary boot_order complications
Messed up in commit 8281abd.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
pc,pci,virtio fixes and cleanups
This includes pc and pci cleanups and enhancements,and a virtio-net bugfix related to softmac programming.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
smbios: Make multiple -smbios type= accumulate sanely
Currently, -smbios type=T,NAME=VAL,... adds one field (T,NAME) withvalue VAL to fw_cfg for each unique NAME. If NAME occurs multipletimes, the last one's VAL is used (before the QemuOpts conversion, the...
smbios: Convert to QemuOpts
So that it can be set in config file for -readconfig.
This tightens parsing of -smbios, and makes it more consistent withother options: unknown parameters are rejected, numbers with trailingjunk are rejected, when a parameter is given multiple times, last...
qemu: Adjust qemu wakeup
Currently Xen hvm s3 has a bug coming from the difference betweenqemu-traditioanl and qemu-xen. For qemu-traditional, the way toresume from hvm s3 is via 'xl trigger' command. However, forqemu-xen, the way to resume from hvm s3 inherited from standard...
Remove dev-bluetooth.c dependency from vl.c
Use usb_legacy_register handling to create bt-dongle device and remove codedependency from vl.c so CONFIG_USB_BLUETOOTH can be disabled.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Preparation for usb-bt-dongle conditional build
To allow disable usb-bt-dongle device using CONFIG_BLUETOOTH option, some offunctions in vl.c file has to be made accessible in dev-bluetooth.c. This ispure code moving.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>...
This includes pc and pci cleanups and enhancements,and a virtio bugfix for level interrupts.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw: Clean up bogus default boot order
We set default boot order "cad" in every single machine definitionexcept "pseries" and "moxiesim", even though very few boards actuallycare for boot order, and "cad" makes sense for even fewer.
Machines that care:...
Merge remote-tracking branch 'stefanha/block' into staging
aio / timers: Convert rtc_clock to be a QEMUClockType
Convert rtc_clock to be a QEMUClockType
Move rtc_clock users to use the new API
Signed-off-by: Alex Bligh <alex@alex.org.uk>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
aio / timers: Remove alarm timers
Remove alarm timers from qemu-timers.c now we use g_poll / ppollinstead.
Convert stderr message calling error_get_pretty() to error_report()
Convert stderr messages calling error_get_pretty()to error_report().
Timestamp is prepended by -msg timstamp option with it.
Per Markus's comment below, A conversion from fprintf() to...
spice: fix display initialization
Spice has two display interface implementations: One integrated intothe qxl graphics card, and one generic which can operate with everyqemu-emulated graphics card.
The generic one is activated in case spice is used without qxl. The...
add timestamp to error_report()
[Issue]When we offer a customer support service and a problem happensin a customer's system, we try to understand the problem bycomparing what the customer reports with message logs of thecustomer's system.
In this case, we often need to know when the problem happens....
Fix -machine options accel, kernel_irqchip, kvm_shadow_mem
Multiple -machine options with the same ID are merged. All but theone without an ID are to be silently ignored.
In most places, we query these options with a null ID. This iscorrect.
In some places, we instead query whatever options come first in the...
Simplify -machine option queries with qemu_get_machine_opts()
The previous two commits fixed bugs in -machine option queries. Ican't find fault with the remaining queries, but let's useqemu_get_machine_opts() everywhere, for consistency, simplicity and...
vl: Tighten parsing of -machine option phandle_start
Make it QEMU_OPT_NUMBER, so it gets parsed by generic code, whichactually bothers to check for errors, rather than its user, whichdoesn't.
Cc: Alexander Graf <agraf@suse.de>Signed-off-by: Markus Armbruster <armbru@redhat.com>...
vl: New qemu_get_machine_opts()
To be used in the next few commits to fix or clean up queries of"machine" options (-machine and its sugared forms).
Signed-off-by: Markus Armbruster <armbru@redhat.com>Message-id: 1372943363-24081-4-git-send-email-armbru@redhat.com...
vl: convert -smp to qemu_opts_parse()
This also introduces a new suboption, "cpus=",which is the default. So after this patch,
-smp n,sockets=y
is the same as
-smp cpus=n,sockets=y
(with "cpu" being some generic thing, referring toeither cores, or threads, or sockets, as before)....
vl: reformat SDL ifdeffery a bit
This reformats #ifdef..#endif and case statement a bit,to make it a bit shorter and matching other cases like that(no code changes).
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
vl: Fix -boot order and once regressions, and related bugs
Option "once" sets up a different boot order just for the initialboot. Boot order reverts back to normal on reset. Option "order" changes the normal boot order.
The reversal is implemented by reset handler restore_boot_devices(),...
vl: Rename *boot_devices to *boot_order, for consistency
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1371208516-7857-5-git-send-email-armbru@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl: Clean up parsing of -boot option argument
Commit 3d3b8303 threw in some QemuOpts parsing without replacing theexisting ad hoc parser, resulting in a confusing mess. Clean it up.
Two user-visible changes:
1. Invalid options are reported more nicely. Before:...
vl: always define no_frame
Commit 047d4e151dd46 "Unbreak -no-quit for GTK, validate SDL options" brokebuild of qemu without sdl, by referencing `no_frame' variable which is definedinside #if SDL block. Fix that by defining that variable unconditionally....
gtk: implement -full-screen
Aiming for GTK as replacement for SDL, a feature like -full-screen should alsobe implemented.
Bringing the window into full-screen mode is done by activating the "Fullscreen" menu item. This is done after showing the windows to make the cursor and menu...
Unbreak -no-quit for GTK, validate SDL options
Certain options (-no-frame, -alt-grab, -ctrl-grab) only make sense with SDL.When compiling without SDL, these options (and -no-quit) print an error messageand exit qemu.
In case QEMU is compiled with SDL support, the three aforementioned options...
gdbstub: let the debugger resume from guest panicked state
While in general we forbid a "continue" from the guest panickedstate, it makes sense to have an exception for that when continuingin the debugger. Perhaps the guest entered that state due to a bug,...
main_loop: do not set nonblocking if xen_enabled()
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>CC: qemu-stable@nongnu.org
monitor: allow to disable the default monitor
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
vl: new runstate transition: RUN_STATE_GUEST_PANICKED -> RUN_STATE_FINISH_MIGRATE
This fixes a problem that after guest panic happens, virsh dump without--memory-only fails:
ERROR: invalid runstate transition: 'guest-panicked' -> 'finish-migrate'
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>...
clean unnecessary code: don't check g_strdup arg for NULL
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Drop redundant resume_all_vcpus() from main()
VCPUs are either resumed directly via vm_start(), after the incomingmigration is done, or when a continue command is issued. We don't needthe explicit resume before entering main_loop().
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
cpu: Call cpu_synchronize_post_init() from DeviceClass::realize()
If hotplugged, synchronize CPU state to KVM.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
add a new runstate: RUN_STATE_GUEST_PANICKED
The guest will be in this state when it is panicked.
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Message-id: 0255f263ffdc2a3716f73e89098b96fd79a235b3.1366945969.git.hutao@cn.fujitsu.com...
audio: enable PCI audio cards for all PCI-enabled targets
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1366303444-24620-9-git-send-email-pbonzini@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
audio: remove HAS_AUDIO
Several targets can have wavcapture/-soundhw support via PCI cards.HAS_AUDIO is a useless limitation, remove it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1366303444-24620-4-git-send-email-pbonzini@redhat.com...
Common: Add quick access to first boot device
Instead of manually parsing the boot_list as character stream,we can access the nth boot device, specified by the position in theboot order.
Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
Move TPM passthrough specific command line options to backend structure
Move the TPM passthrough specific command line options to the passthroughbackend implementation and attach them to the backend's interface structure.
Add code to tpm.c for validating the TPM command line options....
Add option to mlock qemu and guest memory
In certain scenario, latency induced by paging is significant andmemory locking is needed. Also, in the scenario with untrustedguests, latency improvement due to mlock is desired.
This patch introduces a following new option to mlock guest and...
console: move gui_update+gui_setup_refresh from vl.c into console.c
Pure code motion, no functional changes.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
console: displaystate init revamp
We have only one DisplayState, so there is no need for the "next" linking, rip it. Also consolidate all displaystate initializationinto init_displaystate(). This function is called by vl.c aftercreating the devices (and thus all QemuConsoles) and before...
Merge remote-tracking branch 'bonzini/hw-dirs' into staging
Allow qtest to be used together with a virtual CPU
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>Message-id: 1366054097-14132-1-git-send-email-edgar.iglesias@gmail.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
tpm: reorganize headers and split hardware part
The TPM subsystem does not have a full front-end/back-end separation.The sole available backend, tpm_passthrough, depends on the datastructures of the sole available frontend, tpm_tis.
However, we can at least try to split the user interface (tpm.c) from the...
sysemu: avoid proliferation of include/ subdirectories
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Revert "New QMP command query-cpu-max and HMP command cpu_max"
This reverts commit 4d700430a20b3d53b7b15bc5f6666f7e570e3f2c as asked byLuiz. The patch has been obsoleted by extending MachineInfo structureby cpu-max field.
Signed-off-by: Michal Novotny <minovotn@redhat.com>...
New cpu-max field in query-machines QMP command output
Alter the query-machines QMP command to output information aboutmaximum number of CPUs for each machine type with default valueset to 1 in case the number of max_cpus is not set.
hw: move headers to include/
Many of these should be cleaned up with proper qdev-/QOM-ification.Right now there are many catch-all headers in include/hw/ARCH dependingon cpu.h, and this makes it necessary to compile these files per-target.However, fixing this does not belong in these patches....
strip some whitespace
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1363821803-3380-2-git-send-email-lersek@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
acpi_table_add(): accept QemuOpts and parse it with OptsVisitor
As one consequence, strtok() -- which modifies its argument -- is replacedwith g_strsplit().
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
qemu-char: Call fe_claim / fe_release when not using qdev chr properties
chardev-frontends need to explictly check, increase and decrement theavail_connections "property" of the chardev when they are not using aqdev-chardev-property for the chardev.
This fixes things like:...
append the terminating '\0' to bootorder string
Problem was introduced in commit c8a6ae8b. The last terminating'\0' was lost, use the right length 5 ("HALT\0").
Reported-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Amos Kong <akong@redhat.com>Message-id: 1363774594-21001-1-git-send-email-akong@redhat.com...
vl: add runstate_set tracepoint
This patch enables us to know RunState transition. It will be userfulfor investigation when the trouble occured in special event such likelive migration, shutdown, suspend, and so on.
Signed-off-by: Kazuya Saito <saito.kazuya@jp.fujitsu.com>...
vl.c: call bdrv_init_with_whitelist() before cmdline parsing
commit 4d454574 "qemu-option: move standard option definitionsout of qemu-config.c" broke support for commandline optiongroups that where registered during bdrv_init(). In particularsupport for -iscsi options was broken since that commit....
New QMP command query-cpu-max and HMP command cpu_max
These commands return the maximum number of CPUs supported by thecurrently running emulator instance, as defined in its QEMUMachinestruct.
Signed-off-by: Michal Novotny <minovotn@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
add a boot option to do strict boot
Seabios already added a new device type to halt booting.Qemu can add "HALT" at the end of bootindex string, thenseabios will halt booting after trying to boot from allselected devices.
This patch added a new boot option to configure if boot...
console: fix displaychangelisteners interface
Split callbacks into separate Ops struct. Pass DisplayChangeListenerpointer as first argument to all callbacks. Uninline a bunch ofdisplay functions and move them from console.h to console.c
Add search path support for qemu data files.
This patch allows to specify multiple directories where qemu should lookfor data files. To implement that the behavior of the -L switch isslightly different now: Instead of replacing the data directory the...
Add support for cancelling of a TPM command
This patch adds support for cancelling an executing TPM command.In Linux for example a user can cancel a command through the TPM'ssysfs 'cancel' entry using
echo "1" > /sysfs/class/misc/tpm0/device/cancel
This patch propagates the cancellation of a command inside a VM...
Support for TPM command line options
This patch adds support for TPM command line options.The command line options supported here are
./qemu-... -tpmdev passthrough,path=<path to TPM device>,id=<id> -device tpm-tis,tpmdev=<id>,id=<other id>...
qemu-char: move baum registration to baum.c
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Amit Shah <amit.shah@redhat.com>Message-id: 1b24baa1ec3a174d5cad31e079d829904b53077b.1362505276.git.amit.shah@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw: move qdev-monitor.o to toplevel directory
qdev-monitor.c is the only "core qdev" file that is not used inuser-mode emulation, and it does not define anything that is usedby hardware models. Remove it from the hw/ directory andremove hw/qdev-monitor.h from hw/qdev.h too; this requires...
hw: move char backends to backends/
Braille and msmouse support is in hw/, but it is not hardware.Move it to the backends/ directory.
vl.c: allow for repeated -sd arguments
Allows for repeating of -sd arguments in the same way as -pflash and -mtdblock.
Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
gtk ui: unbreak spice
Merge of the gtk ui brought a initialitation order issue for spice:The using_spice variable isn't set yet when checked, leading to thedefault UI being activated (additionally to spice remote access).
Let's set display_remote when we find a -spice switch on the command...
gtk: make default UI (v5)
A user can still enable SDL with '-sdl' or '-display sdl' but start making thedefault display GTK by default.
I'd also like to deprecate the SDL display and remove it in a few releases.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
usb-host: remove usb_host_device_close
Nobody implements that anyway.
cpus.c: Drop unnecessary set_cpu_log()
The set_cpu_log() function in cpus.c is a fairly simple wrapperwhich is only called from one location. Just inline the codeinto vl.c, since there is no need to indirect it via cpus.cand the handling of the error case is more appropriate to vl.c....
qemu-log: Unify {cpu_set,set_cpu}_log_filename as qemu_set_log_filename
The qemu_log() functionality is no longer specific to TCG CPU debug logs.Rename cpu_set_log_filename() to qemu_set_log_filename() and drop thepointless wrapper set_cpu_log_filename()....
vl: Drop redundant "parse error" reports
qemu_opts_parse() reports the error already, and in a much more usefulway.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Message-id: 1360354939-10994-6-git-send-email-armbru@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl: Exit unsuccessfully on option argument syntax error
We exit successfully after reporting syntax error for argument of--sandbox and --add-fd.
We continue undaunted after reporting it for argument of -boot,--option-rom and --object.
Change all five to exit unsuccessfully, like the other options....
vl.c: validate -numa "cpus" parameter properly
- Accept empty strings without aborting- Use parse_uint*() to parse numbers- Abort if anything except '-' or end-of-string is found after the first number.- Check for endvalue < value
Also change the MAX_CPUMASK_BITS warning message from "A max of %d CPUs...
vl.c: Use parse_uint_full() for NUMA nodeid
This should catch many kinds of errors that the current code wasn'tchecking for:
- Values that can't be parsed as a number - Negative values - Overflow - Empty string
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>...
vl.c: Extract -numa "cpus" parsing to separate function
This will make it easier to refactor that code later.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl.c: Fix off-by-one bug when handling "-numa node" argument
The numa_add() code was unconditionally adding 1 to the get_opt_name()return value, making it point after the end of the string if no ','separator is present.
Example of weird behavior caused by the bug:...
vl.c: Abort on unknown -numa option type
Abort in case an invalid -numa option is provided, instead of silentlyignoring it.
vl.c: Check for NUMA node limit inside numa_add()
Instead of checking the limit before calling numa_add(), check the limitonly when we already know we're going to add a new node.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
vl.c: numa_add(): Validate nodeid before using it
Without this check, QEMU will corrupt memory if a too-large nodeid isprovided in the command-line. e.g.:
-numa node,mem=...,cpus=...,nodeid=65
This changes nodenr to unsigned long long, to avoid integer conversion...
qdev: drop extra references at creation time
qdev_free and qbus_free have to do unparent+unref, because nobody elsedrops the initial reference (the one included by object_initialize)before them.
For device_init_func and do_device_add, this is trivially correct,...
accel: change {xen, kvm, tcg, qtest}_allowed from int to bool
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl: skip init accelerator if it's not available
vl: correct error message when fail to init kvm
command:qemu-system-x86_64 -hda disk.img -smp 32 --enable-kvmerror:Number of SMP cpus requested (32) exceeds max cpus supported by KVM (16)failed to initialize KVM: Invalid argumentNo accelerator found!...
sclpconsole: Don't instantiate sclpconsole with -nodefaults
libvirt specifies nodefaults and creates an sclp console with specialparameters. Let qemu follow nodefaults and don't create an sclpconsole if nodefaults is specified.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>...
s390: Add default support for SCLP console
The current s390 machine uses the virtio console as default console,but this doesn't mean that we always want to keep it that way for newmachines.
This patch introduces a way for a machine type to specify that it wants...
fw_cfg: Splash image loader can overrun a stack variable, fix
read_splashfile() passes the address of an int variable as size_t *parameter to g_file_get_contents(), with a cast to gag the compiler.
No problem on machines where sizeof(size_t) == sizeof(int)....
vl: Use size_t for sizes in get_boot_devices_list()
Code mixes uint32_t, int and size_t. Very unlikely to go wrong inpractice, but clean it up anyway.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
HMP: add QDict to info callback handler
This patch change all info call back function to takeadditional QDict * parameter, which allow those commandtake parameter. Now it is set to NULL at default case.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>...
chardev: add error reporting for qemu_chr_new_from_opts
Make default boot order machine specific
This patch makes default boot order machine specific instead ofset globally. The default boot order can be set per machine inQEMUMachine boot_order. This also allows a machine to receive aNULL boot order when -boot isn't used and take an appropriate action...
qemu-option: move standard option definitions out of qemu-config.c
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Replace remaining gmtime, localtime by gmtime_r, localtime_r
This allows removing of MinGW specific code and improvesreentrancy for POSIX hosts.
[Removed unused ret variable in qemu_get_timedate() to fix warning:vl.c: In function ‘qemu_get_timedate’:vl.c:451:16: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable]...
net: clean up network at qemu process termination
We don't clean up network if fails to parse "-device" parameters withoutcalling net_cleanup(). I touch a problem, the tap device which iscreated by qemu-ifup script could not be removed by qemu-ifdown script....