History | View | Annotate | Download (121.8 kB)
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.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
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....
disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio etc)
Curses display requires stdin/out to stay on the terminal,so -daemonize makes no sense in this case. Instead ofleaving display uninitialized like is done since 995ee2bf469de6bb,...
softmmu: move remaining include files to include/ subdirectories
softmmu: move include files to include/sysemu/
misc: move include files to include/qemu/
monitor: move include files to include/monitor/
migration: move include files to include/migration/
qapi: move include files to include/qobject/
exec: move include files to include/exec/
ui: move files to ui/ and include/ui/
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
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 '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,...