History | View | Annotate | Download (112 kB)
ui: move files to ui/ and include/ui/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
net: reorganize headers
Move public headers to include/net, and leave private headers in net/.Put the virtio headers in include/net/tap.h, removing the multiple copiesthat existed. Leave include/net/tap.h as the interface for NICs, andnet/tap_int.h as the interface for OS-specific parts of the tap backend....
build: kill libdis, move disassemblers to disas/
use qemu_opts_create_nofail
We will use qemu_opts_create_nofail function, it can make codemore readable.
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Support default block interfaces per QEMUMachine
There are QEMUMachines that have neither IF_IDE nor IF_SCSI as adefault/standard interface to their block devices / drives. Therefore,this patch introduces a new field default_block_type per QEMUMachinestruct. The prior use_scsi field becomes thereby obsolete and is...
block: simplify default_drive
Markus Armbruster pointed out that there is only one callerto default_drive with IF_DEFAULT as a type. Lets get ridof the block_default_type parameter and adopt the callerto do the right thing (asking the machine struct)....
vl.c: Fix broken -usb option
Commit 094b287f0b accidentally broke the "-usb" command lineoption, so it would have no effect if the user had not specifiedany machine options at that point. (the return value from'qemu_opts_find(qemu_find_opts("machine"), 0);' is NULL if there...
vl: add -object option to create QOM objects from the command line
This will create a new QOM object in the '/objects' path. Note that propertiesare set in order which allows for simple objects to be initialized entirelywith this option and then realized....
Merge branch 'trivial-patches' of git://github.com/stefanha/qemu
vl: delay thread initialization after daemonization
Commit ac4119c (chardev: Use timer instead of bottom-half to postponeopen event, 2012-10-12) moved the alarm timer initialization to an earlierpoint but failed to consider that it depends on qemu_init_main_loop....
vl: unify calls to init_timer_alarm
init_timer_alarm was being called twice. This is not needed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl.c: add missing static
Add missing 'static' qualifiers.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Merge remote-tracking branch 'kraxel/pixman.v3' into staging
Merge remote-tracking branch 'bonzini/threadpool' into staging
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
console: untangle gfx & txt updates
Stop abusing displaysurface fields for text mode displays.(bpp = 0, width = cols, height = lines).
Add flags to displaystate indicating whenever text mode display(curses) or gfx mode displays (sdl, vnc, ...) are present....
console: init displaychangelisteners on register
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
console: QLIST-ify display change listeners.
console: add unregister_displaychangelistener
Also change the way the gui_timer is initialized: each time adisplaychangelistener is registered or unregistered we'll checkwhether we need a timer (due to dpy_refresh callback being present)and if so setup a timer, otherwise zap it. This way the gui timer...
chardev: Use timer instead of bottom-half to postpone open event
As the block layer may decide to flush bottom-halfs while the machine isstill initializing (e.g. to read geometry data from the disk), ourpostponed open event may be processed before the last frontend...
Merge remote-tracking branch 'origin/master' into threadpool
Emulate qemu-kvms -no-kvm option
Releases of qemu-kvm will be interrupted at qemu 1.3.0.Users should switch to plain qemu releases.To avoid breaking scenarios which are setup with command lineoptions specific to qemu-kvm, port these switches from qemu-kvm...
Issue warning when deprecated -tdf option is used
Use global properties to emulate -no-kvm-pit-reinjection
Use machine options to emulate -no-kvm-irqchip
Issue warning when deprecated -no-kvm-pit is used
vl: init main loop earlier
Otherwise, chardevs will not be able to create a bottom half as soonas that will require an AioContext.
main-loop: unify qemu_init_main_loop between QEMU and tools
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf
Merge branch 'queue/qmp' of git://repo.or.cz/qemu/qmp-unstable
Add USB option in machine options
When -usb option is used, global varible usb_enabled is set.And all the plaform will create one USB controller accordingto this variable. In fact, global varibles make code hardto read.
So this patch is to remove global variable usb_enabled and...
migration: go to paused state after finishing incoming migration with -S
At the end of migration the machine has started already, and cannot bedestroyed without losing the guest's data. Hence, prelaunch is thewrong state. Go to the paused state instead. QEMU would reach that...
qemu-config: Add new -add-fd command line option
This option can be used for passing file descriptors on thecommand line. It mirrors the existing add-fd QMP command whichallows an fd to be passed to QEMU via SCM_RIGHTS and added to anfd set.
This can be combined with commands such as -drive to link file...
vnc: add error propagation to vnc_display_open
Before:
$ qemu-system-x86_64 -vnc foo.bar:12345 getaddrinfo(foo.bar,18245): Name or service not known Failed to start VNC server on `foo.bar:12345'
$ qemu-system-x86_64 -vnc localhost:12345,reverse=on...
migration (incoming): add error propagation to fd and exec protocols
And remove the superfluous integer return value.
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
create struct for machine initialization arguments
This should help us to:- More easily add or remove machine initialization arguments without having to change every single machine init function;- More easily make mechanical changes involving the machine init...
vl.c: check for qxl availability
Check for qxl availability in vl.c. This will allow to remove #ifdefCONFIG_SPICE .. #endif later in this series
Cc: Anthony Liguori <aliguori@us.ibm.com>Cc: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
vl.c: default to std if cirrus is not available
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
vl.c: convert *vga_enabled functions to QOM
And get rid of qdev_exists().
cleanup useless return sentence
This patch cleans up return sentences in the end of void functions.
Reported-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Amos Kong <akong@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
add a boot parameter to set reboot timeout
Added an option to let qemu transfer a configuration file to bios,"etc/boot-fail-wait", which could be specified by command -boot reboot-timeout=TT have a max value of 0xffff, unit is ms.
With this option, guest will wait for a given time if not find...
Introduce powerdown_notifiers
Notifier will be used for signaling powerdown request to guest ina more general way and intended to replace very specificqemu_irq_rise(qemu_system_powerdown) and will allow to remove globalvariable qemu_system_powerdown....
Cleanup unused global var qemu_system_powerdown
All deps that used global qemu_system_powerdown var are now convertedto notifiers, so remove it.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
curses: don't initialize curses when qemu is daemonized
Current qemu initializes curses even if -daemonize option ispassed. This cause problem because shell prompt appears withoutcalling endwin().
This patch adds new function, is_daemonized(), to OS dependent...
Revert "vl: fix -hdachs/-hda argument order parsing issues"
This reverts commit 7764ae9671f1cd74227cf4404431dd5213799ef0.
Signed-off-by: malc <av1474@comtv.ru>
Revert "vga: add some optional CGA compatibility hacks"
This reverts commit 482f7bf86b43af9f6903c52726fedf82b28bf953.
Revert "i8259: add -no-spurious-interrupt-hack option"
This reverts commit f278d4947fff814dcde2ef2acad36d172ff8be35.
vga: add some optional CGA compatibility hacks
This patch adds some optional compatibility hacks (defaultdisabled) to allow Microport UNIX to function under qemu.
I've tried to structure it to be easy to add more hacks for otherold CGA programs, if anyone ever needs them....
i8259: add -no-spurious-interrupt-hack option
This patch provides a way to optionally suppress spurious interrupts,as a workaround for systems described below:
Some old operating systems do not handle spurious interrupts well,and qemu tends to generate them significantly more often than...
vl: fix -hdachs/-hda argument order parsing issues
Without this patch, the -hdachs argument had to occur eitherBEFORE the corresponding "-hda" option, or AFTER the plaindisk image name (if neither -hda nor -drive is used). Otherwiseit would effectively be ignored....
vl: Round argument of -m up to multiple of 8KiB
Partial pages make little sense and don't work. Ensure the RAM sizeis a multiple of any possible target's page size.
Fixes
$ qemu-system-x86_64 nodefaults -S -vnc :0 -m 0.8 qemu-system-x86_64: /work/armbru/qemu/exec.c:2255: register_subpage: Assertion `existing>mr->subpage || existing->mr == &io_mem_unassigned' failed....
Allow QEMUMachine to override reset sequencing
qemu_system_reset() function always performs the same basic actions onall machines. This includes running all the reset handler hooks,however the order in which these will run is not always easily predictable....
Adding seccomp calls to vl.c (v8)
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>---v1: - Full seccomp calls and data included in vl.c
v1 -> v2: - Full seccomp calls and data removed from vl.c and put into separate...
Command line support for seccomp with -sandbox (v8)
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>---v7 -> v8 - Parse options correctly (aliguori)
qmp: don't emit the RESET event on wakeup from S3
QEMU is basically using reset logic when waking up from S3. Thiscauses the QMP RESET event to be emitted, which is wrong. Also,the runstate checks done in reset are not necessary for S3 wakeup.
Fix this by untangling wakeup from reset logic and passing...
qmp: emit the WAKEUP event when the guest is put to run
Today, the WAKEUP event is emitted when a wakeup request is made.This could be the system_wakeup command, for example.
A better semantic would be to emit the event when the guest isalready running, as that's what matters in the end. This commit does...
qapi: add query-machines command
This provides the same output as -M ? but in a structured way.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'bonzini/scsi-next' into staging
vl.c: Exit QEMU early if no machine is found
We check whether the variable machine is NULL or not before accessingit. If machine is NULL, exit QEMU with an error, this can avoids asegfault error.
Markus Armbruster <armbru@redhat.com> adds that the segfault can be...
handle device help before accelerator set up
A command line device probe using just -device "?" gets processedafter qemu-kvm initializes the accelerator. If /dev/kvm is notpresent, the accelerator check will fail (kvm is defaulted to on),which causes libvirt to not be set up to handle qemu guests....
iscsi: Pick default initiator-name based on the name of the VM
This patch updates the iscsi layer to automatically pick a 'unique'initiator-name based on the name of the vm in case the user has not setan explicit iqn-name to use.
Create a new function qemu_get_vm_name() that returns the name of the VM,...
Fixes related to processing of qemu's -numa option
The -numa option to qemu is used to create [fake] numa nodesand expose them to the guest OS instance.
There are a couple of issues with the -numa option:
a) Max VCPU's that can be specified for a guest while using...
fips: fix build on !Linux
Commit 0f66998 makes -enable-fips conditional on Linux hosts but then uses itunconditionally in vl.c.
Fix this by moving the fips handling to os-posix.c and adding a condition.
Cc: Paul Moore <pmoore@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: disable VNC password authentication (security type 2) when in FIPS mode
FIPS 140-2 requires disabling certain ciphers, including DES, which is usedby VNC to obscure passwords when they are sent over the network. Thesolution for FIPS users is to disable the use of VNC password auth when the...
Support 'help' as a synonym for '?' in command line options
For command line options which permit '?' meaning 'please list thepermitted values', add support for 'help' as a synonym, by abstractingthe check out into a helper function.
This change means that in some cases where we were being lazy in...
Merge commit 'quintela/migration-next-v5' into staging
vl.c: Don't print errno after failed qemu_chr_new()
The qemu_chr_new() function doesn't set errno on failure, sodon't print strerror(errno) on the error handling path whendealing with the -serial, -parallel and -virtioconsole arguments.This avoids nonsensical error messages like:...
savevm: Live migration handlers register the struct directly
Notice that the live migration users never unregister, so no problemabout freeing the ops structure.
Signed-off-by: Juan Quintela <quintela@redhat.com>
block: Geometry and translation hints are now useless, purge them
There are two producers of these hints: drive_init() on behalf of-drive, and hd_geometry_guess().
The only consumer of the hint is hd_geometry_guess().
The callers of hd_geometry_guess() call it only when drive_init()...
vnc: add a more descriptive error message
Currently qemu outputs some low-level error in qemu-sockets.cwhen failed to start vnc server.eg. 'getaddrinfo(127.0.0.1,5902): Name or service not known'
Some libvirt users could not know what's happened with this...
qemu_find_file: check name as a straight path even if it has no '/'
Make qemu_find_file() check for the passed in name as a straightpathname even if it doesn't have any path separator character in it.This means that "-bios foo", "-dtb foo" etc will find a file 'foo'...
Allow machines to configure the QEMU_VERSION that's exposed via hardware
QEMU exposes its version to the guest's hardware and in some cases that is wrong(e.g. Windows prints messages about driver updates when you switchthe QEMU version).There is a new field now on the struct QEmuMachine, hw_version, which may...
do not include <libutil.h> needlessly or if it doesn't exist
<libutil.h> and <util.h> on *BSD (some have one, some another)were #included just for openpty() declaration. The only filewhere this function is actually used is qemu-char.c.
In vl.c and net/tap-bsd.c, none of functions declared in libutil.h...
qemu-option: qemu_opts_create(): use error_set()
This commit converts qemu_opts_create() from qerror_report() toerror_set().
Currently, most calls to qemu_opts_create() can't fail, so mostcallers don't need any changes.
The two cases where code checks for qemu_opts_create() erros are:...
Merge remote-tracking branch 'origin/master' into staging
vga: disable default VGA if appropriate -device is used
This is a partial revert of commits a369da5 (vga: improve VGA logic,committed 2012-01-22) and c5bd4f3 (vga: fix -nodefaults -device VGA,2012-01-24) which broke command-line option parsing in different ways....
implement -no-user-config command-line option (v3)
Changes v2 -> v3: - Rebase against latest qemu.git
Changes v1 -> v2: - Change 'userconfig' field/variables to bool instead of int - Coding style change
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>...
use inet_listen()/inet_connect() to support ipv6 migration
Use help functions in qemu-socket.c for tcp migration,which already support ipv6 addresses.
Currently errp will be set to UNDEFINED_ERROR when migration fails,qemu would output "migration failed: ...", and current user can...
vl.c: change 'defconfig' variable to bool (v2)
Changes v1 -> v2: - Actually change the variable type declaration to 'bool'
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
move code to read default config files to a separate function (v2)
Function added to arch_init.c because it depends on arch-specificsettings.
Changes v1 -> v2: - Move qemu_read_default_config_file() prototype to qemu-config.h
vl: drop is_suspended variable
Check for the RUN_STATE_SUSPENDED state instead.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
runstate: introduce suspended state
QEMU enters in this state when the guest suspends to ram (S3).
This is important so that HMP users and QMP clients can know thatthe guest is suspended. QMP also has an event for this, but eventsare not reliable and are limited (ie. a client can connect to QEMU...
Merge branch 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
qtest: add test framework
The idea behind qtest is pretty simple. Instead of executing a CPU via TCG orKVM, rely on an external process to send events to the device model that the CPUwould normally generate.
qtest presents itself as an accelerator. In addition, a new option is added to...
rtc: add -rtc clock=rt
This will let people use backwards-compatible semantics for devices thatwill be affected by the following patches.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
vl.c: fix '-cpu ?' segfault
Fix stupid copy&paste mistake at commitecf40beae7dcbb057d4f115207f9d8276832a774: I moved code around but kept"optarg" on the cpu_list() call.
Reported-by: Jiri Denemark <jdenemar@redhat.com>Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>...
Merge remote-tracking branch 'sstabellini/saverestore-8' into staging
Set runstate to INMIGRATE earlier
Set runstate to RUN_STATE_INMIGRATE as soon as we can on resume.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
spice: fix broken initialization
Commit 1b71f7c14fab6f00c2680d4489fbee7baf796e4f moved MODULE_INIT_QOM toway before MODULE_INIT_MACHINE, thereby breaking assumptions made inspice-core.c which registered both a type initializer and a machineintializer....
qom: Register QOM infrastructure early
The constructors for QOM TYPE_INTERFACE were executed rather late invl.c's main(). Call them very early so that QOM can safely be used formachines and CPUs.
Signed-off-by: Andreas Färber <afaerber@suse.de>Cc: Anthony Liguori <anthony@codemonkey.ws>...
initialize CPU model list after handling -readconfig options
To properly load cpudefs using -readconfig, we have to callcpudef_init() after finishing the command-line option handling.
Consequently, the handling of "-cpu ?" has to be done after thecommand-line option handling loop, too....
arm: add device tree support
If compiled with CONFIG_FDT, allow user to specify a device tree file usingthe -dtb argument. If the machine supports it then the dtb will be loadedinto memory and passed to the kernel on boot.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>...
usb: Resolve warnings about unassigned bus on usb device creation
When creating an USB device the old way, there is no way to specify thetarget bus. Thus the warning issued by usb_create makes no sense andrather confuses our users.
Resolve this by passing a bus reference to the usbdevice_init handler...
vl.c: Avoid segfault when started with no arguments
Fix a bug (introduced in commit a0abe47) where a command line whichspecified no machine arguments (either explicitly or implicitly via-kernel &co) would result in a segfault because of a NULL pointerreturned from qemu_opts_find(qemu_find_opts("machine"), 0)....
suspend: add qmp events
Send qmp events on suspend and wakeup so libvirthas a chance to track the vm state.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
suspend: add infrastructure
This patch adds some infrastructure to handle suspend and resume toqemu. First there are two functions to switch state and second thereis a suspend notifier: