History | View | Annotate | Download (92.2 kB)
defaults: ide-cd, ide-hd and scsi-cd devices suppress default CD-ROM
ide-hd has to suppress the default CD-ROM, or else you can't put oneon secondary master without -nodefaults.
Unlike legacy scsi-disk, scsi-cd suppresses default CD-ROM.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
vl.c: Introduce getter for shutdown_requested and reset_requested.
Introduce two functions qemu_shutdown_requested_get andqemu_reset_requested_get to get the value of shutdown/reset_requestedwithout reset it.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>...
xen: Add initialisation of Xen
The xenpv machine use the common init function.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
Introduce -machine command option.
This option gives the ability to switch one "accelerator" like kvm, xenor the default one tcg. We can specify more than one accelerator byseparate them by a colon. QEMU will try each one and use the first whoseworks....
machine, Add default_machine_opts to QEMUMachine.
With this new field, we can specified which accelerator use to run themachine, if the accelerator is not already specified by either aconfiguration file or the command line options.
Currently, the only use will be made in the xenfv machine....
vl.c: Replace -virtfs string manipulation with QemuOpts
The -virtfs option creates an fsdev representing the pass-through filesystem and a guest-visible virtio-9p-pci device that can access thisfile system. This patch replaces the string manipulation used to build...
vl: trivial spelling fix
Signed-off-by: Brad Hards <bradh@frogmouth.net>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
exit if -drive specified is invalid instead of ignoring the "wrong" -drive
This fixes the problem when qemu continues even if -drive specificationis somehow invalid, resulting in a mess. Applicable for both currentmaster and for stable-0.14 (and the same issue exist 0.13 and 0.12 too)....
virtio: use generic name when possible
We have two different virtio buses: pci and s390. The abstraction pathtaken in qemu is to have generic aliases for each device type in thearchitecture specific qdev devices.
So let's make use of these aliases whenever we can and define them...
register signal handler after initializing SDL.
SDL library initialization mangles signal handlers, so QEMU shouldregister them after initializing SDL. This was the case before and codeeven have a comment about that. Fix it to be so again.
Signed-off-by: Gleb Natapov <gleb@redhat.com>...
vl.c: Tidy up message printed when we exit on a signal
Tidy up the message printed when qemu exits due to a signal, so thatit's clearer where the message is coming from and that it's not juststray debug output.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
extract I/O handler lists to iohandler.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
report that QEMU process was killed by a signal
Currently when rogue script kills QEMU process (using TERM/INT/HUPsignal) it looks indistinguishable from system shutdown. Lets reportthat QEMU was killed and leave some clues about the killer identity.
vl.c: Fix compilation failure if CONFIG_SDL isn't defined
Fix a compilation failure if CONFIG_SDL isn't defined (gcc complainedthat the label 'invalid_display' wasn't used).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
error message if user specifies SDL cmd line option when SDL is disabled
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
error message if user specifies curses on cmd line when curses is disabled
Make VNC support optional
Per default VNC is enabled.
Introduce -display argument
This patch introduces a -display argument which consolidates thesetting of the display mode. Valid options are:sdl/curses/default
Introduce -display none
New option -display none. This option differs from -nographic by nottrying to take control of stdio etc. but instead behaves as if agraphics display is enabled, except that it doesn't show one.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>...
Add support for -display vnc
Merge remote branch 'qemu-kvm/uq/master' into staging
change all rt_clock references to use millisecond resolution accessors
This was done with:
sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \ $(git grep -l 'get_clock\>.*rt_clock' ) sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \...
simpletrace: Move st_init() error reporting
User emulator builds do not have error_report() so it should not be usedby simpletrace.c. In fact, error reporting inside simpletrace.c isinappropriate and should be done by the caller instead.
This patch moves st_init() error reporting out to its caller,...
Synchronize VCPU states before reset
This is required to support keeping VCPU states across a system reset.If we do not read the current state before the reset,cpu_synchronize_all_post_reset may write back incorrect stateinformation.
The first user of this will be MCE MSR synchronization which currently...
simpletrace: Thread-safe tracing
Trace events outside the global mutex cannot be used with the simpletrace backend since it is not thread-safe. There is no check to preventthem being enabled so people sometimes learn this the hard way.
This patch restructures the simple trace backend with a ring buffer...
Improve vm_stop reason declarations
Define and use dedicated constants for vm_stop reasons, they actuallyhave nothing to do with the EXCP_* defines used so far. At this chance,specify more detailed reasons so that VM state change handlers canevaluate them....
Refactor debug and vmstop request interface
Instead of fiddling with debug_requested and vmstop_requested directly,introduce qemu_system_debug_request and turn qemu_system_vmstop_requestinto a public interface. This aligns those services with exiting ones in...
Move debug exception handling out of cpu_exec
To prepare splitting up KVM and TCG CPU entry/exit, move the debugexception into cpus.c and invoke cpu_handle_debug_exception on returnfrom qemu_cpu_exec.
This also allows to clean up the debug request signaling: We can assign...
Stop current VCPU on synchronous reset requests
If some I/O operation ends up calling qemu_system_reset_request in VCPUcontext, we record this and inform the io-thread, but we do notterminate the VCPU loop. This can lead to fairly unexpected behavior if...
Process vmstop requests in IO thread
A pending vmstop request is also a reason to leave the inner main loop.So far we ignored it, and pending stop requests issued over VCPU threadswere simply ignored.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Leave inner main_loop faster on pending requests
If there is any pending request that requires us to leave the inner loopif main_loop, makes sure we do this as soon as possible by enforcingnon-blocking IO processing.
At this change, move variable definitions out of the inner loop to...
Flatten the main loop
First of all, vm_can_run is a misnomer, it actually means "no requestpending". Moreover, there is no need to check all pending requeststwice, the first time via the inner loop check and then again whenactually processing the requests. We can simply remove the inner loop...
do not pass NULL to strdup.
Also use qemu_strdup() instead of strdup() in bootindex code.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
aliguori: fix build with !defined(KVM_CAP_ASYNC_PF)
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
blockdev: Fix drive_add for drives without media
Watch this:
(qemu) drive_add 0 if=none (qemu) info block none0: type=hd removable=0 [not inserted] (qemu) drive_del none0 Segmentation fault (core dumped)
add_init_drive() is confused about drive_init()'s failure modes, and...
blockdev: Replace drive_add()'s fmt, ... by optstr parameter
Let the callers build the optstr. Only one wants to. All the othersbecome simpler, because they don't have to worry about escaping '%'.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockdev: Reject multiple definitions for the same drive
We silently ignore multiple definitions for the same drive:
$ qemu-system-x86_64 -nodefaults -vnc :1 -S -monitor stdio -drive if=ide,index=1,file=tmp.qcow2 -drive if=ide,index=1,file=nonexistant...
blockdev: Make drive_add() take explicit type, index parameters
Before, type & index were hidden in printf-like fmt, ... parameters,which get expanded into an option string. Rather inconvenient foruses later in this series.
New IF_DEFAULT to ask for the machine's default interface. Before,...
Make strtosz() return int64_t instead of ssize_t
strtosz() needs to return a 64 bit type even on 32 bitarchitectures. Otherwise qemu-img will fail to create diskimages >= 2GB
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
kvm: Drop smp_cpus argument from init functions
No longer used.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Merge remote branch 'mst/for_anthony' into staging
Merge branch 'spice.v23.pull' of git://anongit.freedesktop.org/spice/qemu
Fix a missing trailing newline
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qbus: register reset handler for qbus whose parent is NULL
Stefan Weil reported the regression caused byec990eb622ad46df5ddcb1e94c418c271894d416 as follows
The second regression also occurs with MIPS malta.Networking no longer works with the default pcnet nic....
Avoid a warning from OpenBSD linker
Avoid the warning below by using snprintf:../libhw64/vl.o(.text+0x78d4): In function `get_boot_devices_list':/src/qemu/vl.c:763: warning: sprintf() is often misused, please use snprintf()
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Add notifier that will be called when machine is fully created.
Action that depends on fully initialized device model should registerwith this notifier chain.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Pass boot device list to firmware.
Add bootindex for option roms.
Extend -option-rom command to have additional parameter ,bootindex=.
Add bootindex parameter to net/block/fd device
If bootindex is specified on command line a string that describes devicein firmware readable way is added into sorted list. Later this list willbe passed into firmware to control boot order.
spice: add qxl device
qxl is a paravirtual graphics card. The qxl device is the bridgebetween the guest and the spice server (aka libspice-server). Thespice server will send the rendering commands to the spice client, whichwill actually render them....
Merge remote branch 'origin/master' into pci
Conflicts: Makefile.objs hw/virtio.c
qdev: reset qdev along with qdev tree
This patch changes the reset handling so that qdev has no knowledge of theglobal system reset. Instead, a new bus/device level function is introducedthat allows all devices/buses on the bus/device to be reset using a depth...
trace: Trace vm_start()/vm_stop()
VM state change notifications are invoked from vm_start()/vm_stop().Trace these state changes so we can reason about the state of the VMfrom trace output.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Delete IOHandlers after potentially running them
Since commit 4bed9837309e58d208183f81d8344996744292cf an .fd_read()handler that deletes its IOHandler is exposed to .fd_write() beingcalled on the deleted IOHandler.
This patch fixes deletion so that .fd_read() and .fd_write() are never...
Introduce strtosz() library function to convert a string to a byte count.
strtosz() returns -1 on error. It now supports human unit formats ineg. 1.0G, with better error handling.
The following suffixes are supported:B/b = bytesK/k = KBM/m = MBG/g = GB...
qemu-timer: move commonly used timer code to qemu-timer-common
Move timer init functions to a new file, qemu-timer-common.c. Make othercritical timer functions inlined to preserve performance inqemu-timer.c, also move muldiv64() (used by the inline functions)...
Merge remote branch 'spice/submit.6' into staging
Conflicts: configure
Add option to turn on JSON pretty printing in monitor
Expaned '-mon' arg to allow a 'pretty=on' flag. This makes themonitor pretty print its replies to easy human debugging / reading
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Introduce qemu_madvise()
vl.c has a Sun-specific hack to supply a prototype for madvise(),but the call site has apparently moved to arch_init.c.
Haiku doesn't implement madvise() in favor of posix_madvise().OpenBSD and Solaris 10 don't implement posix_madvise() but madvise()....
spice: simple display
With that patch applied you'll actually see the guests screen in thespice client. This does not bring qxl and full spice support though.This is basically the qxl vga mode made more generic, so it playstogether with any qemu-emulated gfx card. You can display stdvga or...
spice: core bits
Add -spice command line switch. Has support setting passwd and port fornow. With this patch applied the spice client can successfully connectto qemu. You can't do anything useful yet though.
Use display types for local display only.
This patch drops DT_VNC. The display types are only used to selectselect the local display (i.e. curses, sdl, coca, ...). Remotedisplays (for now only vnc, spice will follow) can be enabledindependently.
Use machine_init() to register virtfs config options.
trace: Add trace file name command-line option
This patch adds an optional command line switch '-trace' to specify thefilename to write traces to, when qemu starts.Eg, If compiled with the 'simple' trace backend,[temp@system]$ qemu -trace FILENAME IMAGE...
virtio-9p: Add SM_NONE security model
This is equivalent to SM_PASSTHROUGH security model.The only exception is, failure of privilige operation like chownare ignored. This makes a passthrough like security model usablefor people who runs kvm as non root...
virtio-9p: Make sure -virtfs option works correctly
When making copy of arguments we were doing partial copy
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix OpenBSD linker warning
Fix a warning from OpenBSD linker:../libhw32/vl.o(.text+0x5c3c): In function `main':/src/qemu/vl.c:2335: warning: sprintf() is often misused, please use snprintf()
QemuOpts: make most qemu_*_opts static
Switch tree to lookup-by-name using qemu_find_opts().Also hook up virtfs options so qemu_find_opts works for them too.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
compile -fsdev and -virtfs cmd line options unconditionally.
Remove useless NULL checks for qemu_malloc return value
Found with this Coccinelle semantic patch:@expression E;identifier ptr;identifier fn ~= "qemu_mallocz*";@
@expression E;identifier ptr;identifier fn ~= "qemu_mallocz*";
ptr = fn(E);-if (ptr == NULL) { ... }+ptr = fn(E);
migration: Accept 'cont' only after successful incoming migration
When a 'cont' is issued on a VM that's just waiting for an incomingmigration, the VM reboots and boots into the guest, possibly corruptingits storage since it could be shared with another VM running elsewhere....
remove pointless if from vl.c
We already set sockets to nonzero in the code above.So this if statement always evaluates true. Remove it.
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Rename tcg_cpu_exec and tcg_has_work
These functions are also used for kvm under !CONFIG_IOTHREAD, having'tcg' in their name is just misleading.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>...
savevm: Add DeviceState param
When available, we'd like to be able to access the DeviceStatewhen registering a savevm. For buses with a get_dev_path()function, this will allow us to create more unique savevmid strings.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>...
savevm: Migrate RAM based on name/offset
Synchronize RAM blocks with the target and migrate using name/offsetpairs. This ensures both source and target have the same view ofRAM and that we get the right bits into the right slot.
Exit if incoming migration fails
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-9p: Make infrastructure for the new security model.
This patch adds required infrastructure for the new security model.
- A new configure option for attr/xattr.- if CONFIG_VIRTFS will be defined if both CONFIG_LINUX and CONFIG_ATTR defined.- Defines routines related to both security models....
virtio-9p: Introduces an option to specify the security model.
The new option is:
-fsdev fstype,id=myid,path=/share_path/,security_model=[mapped|passthrough]-virtfs fstype,path=/share_path/,security_model=[mapped|passthrough],mnt_tag=tag
In the case of mapped security model, files are created with QEMU user...
Add exit notifiers.
Hook up any cleanup work which needs to be done here. Advantages overusing atexit(3):
(1) You get passed in a pointer to the notifier. If you embed that into your state struct you can use container_of() to get get your state info....
Merge remote branch 'kwolf/for-anthony' into staging
Conflicts: hw/pc.c
Rename qemu-options.h to qemu-options.def
Rename qemu-options.h to qemu-options.def as it is not a header filefor general use and this leaves space for a proper qemu-options.h
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Acked-by: Juan Quintela <quintela@redhat.com>...
Introduce OS specific cmdline argument handling and move SMB arg to os-posix.c
Introduce OS specific cmdline argument handling by callingos_parse_cmd_args() at the end of switch() statement. Move optionenum to qemu-options.h and have it included from os-posix.c and...
Move runas handling from vl.c to OS specific files.
Move code to handle runas, ie. change of user id of QEMU processto OS specific files and provide dummy stub for Win32.
Move chroot handling to OS specific files.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Acked-by: Juan Quintela <quintela@redhat.com>Acked-by: Richard Henderson <rth@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Move daemonize handling to OS specific files
Move daemonize handling from vl.c to OS specific files. Provide dummystubs for Win32.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Acked-by: Juan Quintela <quintela@redhat.com>Acked-by: Richard Henderson <rth@redhat.com>...
Move line-buffering setup to OS specific files.
Move set_proc_name() to OS specific files.
Move handling to change process name to POSIX specific filesplus add a better error message to cover the case where thefeature isn't supported.
Introduce os-win32.c and move polling functions from vl.c
This introduces os-win32.c. It is meant to carry win32 specificfunctions thata are not relevant for all of QEMU as well as win32versions of various pieces like signal handling etc.
Move win32 polling handler helper functions from vl.c to os-win32.c...
vl.c: Move host_main_loop_wait() to OS specific files.
Move host_main_loop_wait() to OS specific files. Createqemu-os-posix.h and provide empty inline for the POSIX case.
Introduce os-posix.c and create os_setup_signal_handling()
Introcuce os-posix.c and move posix specific signal handlingthere.
Move win32 early signal handling setup to os_setup_signal_handling()
Rename os_setup_signal_handling() to os_setup_early_signal_handling()
Move main signal handler setup to os specificfiles.
Move main signal handler setup to os specific files.
Move find_datadir to OS specific files.
This moves the win32 and POSIX versions of find_datadir() to OSspecific files, and removes some #ifdef clutter from vl.c
vl.c: Remove double include of netinet/in.h for Solaris
vl.c: netinet/in.h is already included once above for the
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Acked-by: Andreas Faerber <afaerber@opensolaris.org>Acked-by: Juan Quintela <quintela@redhat.com>...
main: allocate gui_timer only once.
fix memory leak.there is no need to allocate more than one gui_timer.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
configure: expand ${prefix} in create_config
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
blockdev: Collect block device code in new blockdev.c
Anything that moves hundreds of lines out of vl.c can't be all bad.
close all the block drivers before the qemu process exits
This patch calls the close handler of the block driver before the qemuprocess exits.
This is necessary because the sheepdog block driver releases the lockof VM images in the close handler.
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>...
blockdev: Hide QEMUMachine from drive_init()
To pave the way for moving it out of vl.c.