History | View | Annotate | Download (83.8 kB)
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
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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()
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Fix error message in drive_init
The real error is the return value of bdrv_open. errno might be overwritten ornot even set to that value in the first place.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
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.
blockdev: Belatedly remove MAX_DRIVES
Unused since commit 751c6a17.
blockdev: Belatedly remove driveopts
Unused since commit 9dfd7c7a.
usb: Remove unused usb_device_add() parameter is_hotplug
Unused since commit b3e461d3.
drive: allow rerror, werror and readonly for if=none
When creating guest disks the qdev way using ...
-drive if=none,id=$name,args -device $driver,drive=$name
it is not possible to specify rerror, werror and readonly argumentsfor drive as drive_init allows/blocks them based on the interface (if=)...
Make cache=unsafe the default for -snapshot
When using -snapshot we don't care about data integrity of the cow fileat all, so let's disable flushing there and squeeze out the last dropof performance we could possibly get.
Signed-off-by: Alexander Graf <agraf@suse.de>...
Add cache=unsafe parameter to -drive
Usually the guest can tell the host to flush data to disk. In some cases wedon't want to flush though, but try to keep everything in cache.
So let's add a new cache value to -drive that allows us to set the cachepolicy to most aggressive, disabling flushes. We call this mode "unsafe",...
Fix error handling in qemu_read_config_file
We need to close the file even in error case. While at it, make the callerscatch all kind of errors. ENOENT is allowed for default config files, theyare optional.
Reported-by: Luiz Capitulino <lcapitulino@redhat.com>...
Revert "Monitor: Return before exiting with 'quit'"
This reverts commit 0e8d2b5575938b8876a3c4bb66ee13c5d306fb6d.
Next commits will do the same thing in a better way.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
fix chardev_init for win32
chardev_init functions use socket,so socket_init() shoud be placed atthe front of chardev_init on win32.
Signed-off-by: TeLeMan <geleman@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix cpu list("-cpu ?") breakage, spotted by TeLeMan
Fix breakage by 04c9a0cbc2bf496889cef6da2d61bf00ef190a4f.
QMP: Introduce RESUME event
It's emitted when the Virtual Machine resumes execution.
We currently have the STOP event but don't have the matchingRESUME one, this means that clients are notified when the VMis stopped but don't get anything when it resumes....
virtio-9p: Create a syntactic shortcut for the file-system pass-thru
Currently the commandline to create a virtual-filesystem pass-through betweenthe guest and the host is as follows:#qemu -fsdev fstype,id=ID,path=path/to/share \ -device virtio-9p-pci,fsdev=ID,mount_tag=tag \...
virtio-9p: Create a commandline option -fsdev
This patch creates a new command line option named -fsdev to hold any filesystem specific information.
The option will currently hold the following attributes:-fsdev fstype id=id,path=path_to_sharewherefstype: Type of the file system....
Fix boot once option
The boot once options seems to have gotten broken since it originallywent in. We need to wait until the second time restore_boot_devices()gets called before restoring the standard boot order and removing itselffrom the reset list....
fix old typos in help header
1) Qemu is not only a PC emulator.2) "image image" has already been changed to "disk image" in qemu-doc.texi
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
monitor: Cleanup ID assignment for compat switch
Canonicalize the ID assignment when creating monitor devices via thelegacy switch and use less easily colliding names.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor: Reorder intialization to drop initial mux focus
So far a multiplexed monitor started disabled. Restore this property forthe new way of configuring by moving the monitor initialization beforeall devices (the last one to attach to a char-mux will gain the focus)....
Monitor: Return before exiting with 'quit'
The 'quit' Monitor command (implemented by do_quit()) callsexit() directly, this is problematic under QMP because QEMUexits before having a chance to send the ok response.
Clients don't know if QEMU exited because of a problem or...
Replace calls of old bdrv_open
What is known today as bdrv_open2 becomes the new bdrv_open. All remainingcallers of the old function are converted to the new one. In some places theyeven know the right format, so they should have used bdrv_open2 from the...
cleanup block driver option handling in vl.c
Assign directly to the bdrv_flags variable instead of usingmagic numbers before translating to the BDRV_O_* options.
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-config: qemu_read_config_file() reads the normal config file
Introduce a new function qemu_read_config_file which reads the VM configurationfrom a config file. Unlike qemu_config_parse it doesn't take a open file but afilename and reduces code duplication as a side effect....
provide a stub version of kvm-all.c if !CONFIG_KVM
This allows limited use of kvm functions (which will return ENOSYS)even in once-compiled modules. The patch also improves a bit the errormessages for KVM initialization.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
error: Drop extra messages after qemu_opts_set() and qemu_opts_parse()
Both functions report errors nicely enough now, no need for additionalmessages.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Fix build when configured with --enable-io-thread
boot: remove unused boot_devices_bitmap variable
In addition to removing the variable, this also renames the parse_bootdevices()function to validate_bootdevices(), as we don't need its return value anymore.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>...
net: remove broken net_set_boot_mask() boot device validation
There are many problems with net_set_boot_mask():
1) It is broken when using the device model instead of "-net nic". Example: $ qemu-system-x86_64 -device rtl8139,vlan=0,id=net0,mac=52:54:00:82:41:fd,bus=pci.0,addr=0x4 -net user,vlan=0,name=hostnet0 -vnc 0.0.0.0:0 -boot n...
move balloon handling to balloon.c
move socket_init to qemu-sockets.c
move two variable declarations out of vl.c
read-only: allow read-only CDROM with any interface
Signed-off-by: Naphtali Sprei <nsprei@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Use sysctl instead of /proc to find executable path on FreeBSD
..since /proc usually isn't mounted on FreeBSD.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Refactor target specific handling, compile vl.c only once
Move target specific functions and RAM handling to arch_init.c.
Add a flag to QEMUOptions structure to indicate for whicharchitectures the option is allowed, check the flagin run time and remove conditional code in option handling....
Refactor a few architecture dependent pieces in vl.c
These will be moved later.
Refactor CPUState handling out of vl.c
Move KVM and Xen global flags to vl.c
Adjust debug handling
Fix driftfix option
Based on patch by Zachary Amsden.
Refactor numa mode setting
Compile ide/core only once
Make win2k install hack unconditional as it is still restricted tox86 only in vl.c.
Replace TARGET_PAGE_SIZE and 4096 with PAGE_SIZE.
Revert "Introduce a default qmp session"
This reverts commit 3290c4aac5b97bb1e3b2b28d94669f2c611ce84a.
Conflicts:
vl.c
Revert "qmp: don't make -qmp disable the default monitor"
This reverts commit d49f626ed00cecc90fb1ff88da9bdf11e57094d1.
Revert "Convert atexit users to exit_notifier"
This reverts commit d7234f4d7e373a708e1df9ab565a71b71b189025.
hw/xen_machine_pv.c
This should have never been committed.
Revert "Add exit notifiers"
This reverts commit 3b6304f706ef7eebc0b3b3f3a5093ec75448ee19.
This was mistakenly committed.
Fix mingw32 build
mkdir() only takes path argument on mingw32:
CC i386-softmmu/vl.o/src/qemu/vl.c: In function 'qmp_add_default':/src/qemu/vl.c:3763: error: too many arguments to function 'mkdir'/src/qemu/vl.c:3769: error: too many arguments to function 'mkdir'...
qmp: don't make -qmp disable the default monitor
Instead, we introduce a default_qmp flag. We don't use it yet, but will in thenext patch.
This has a user-visible impact as specifying just -qmp will now also show amonitor on the 'vc'.
Introduce a default qmp session
Basically, -qmp unix:%{home}/.qemu/qmp/%{uuid}.sock,server,nowait
%{uuid} will be -uuid if it's specified, otherwise, if libuuid is available,we generate a uuid. If it's not available, we don't create one.
Add exit notifiers
Like atexit() but with state
Convert atexit users to exit_notifier
All of these users have global state so we really don't see a benefit fromexit_notifier. However, using exit_notifier means that there's one lessjustification for having global state in the first place.
Handle deleted IOHandlers in a single buffer