History | View | Annotate | Download (151.9 kB)
Block live migration
This patch introduces block migration called during live migration. Blockare being copied to the destination in an async way. First the code willtransfer the whole disk and then transfer all dirty blocks accumulted duringthe migration....
char: Remove special init_reset handling
The initial_reset sent to chardevs doesn't do much other than settinga bool to true. Char devices are interested in the open event andthat gets sent whenever the device is opened.
Moreover, the reset logic breaks as and when qemu's bh scheduling...
qemu_system_reset: we need to call it before loadvm/migration
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QemuOpts: command line switches for the config file.
Adds -readconfig and -writeconfig command line switches to read/writeQemuOpts from config file.
In theory you should be able to do:
qemu < machine config cmd line switches here > -writeconfig vm.cfg...
Configurable block format whitelist
We have code for a quite a few block formats. While I trust that allof these formats are useful at least for some people in somecircumstances, some of them are of a kind that friends don't letfriends use in production....
Added readonly flag to -drive command
This is a slightly revised patch for adding readonly flag to the -drive command.Even though this patch is "stand-alone", it assumes a previous related patch (in Anthony staging tree), that passesthe readonly attribute of the drive to the guest OS, applied first....
v3: don't call reset functions on cpu initialization
There is absolutely no need to call reset functions when initializingdevices. Since we are already registering them, calling qemu_system_reset()should suffice. Actually, it is what happens when we reboot the machine,...
Revert "Fall back to network boot as the last possible boot option"
This reverts commit 94ca5a985919cca312c505bbb0c824d175cc6bb8.
Fall back to network boot as the last possible boot option
This is similiar to the default with most bare metal systems.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
usb-serial and braille: use qdev for -usbdevice
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
usb-storage: use qdev for -usbdevice
Hook up usb_msd_init.
Also rework handling of encrypted block devices,move the code out vl.c.
usb core: use qdev for -usbdevice
This patchs adds infrastructure to handle -usbdevice via qdev callbacks.USBDeviceInfo gets a name field (for the -usbdevice driver name) and acallback for -usbdevice parameter parsing.
The new usbdevice_create() function walks the qdev driver list and looks...
usb-hid: use qdev for -usbdevice
Split out bottom halves
Instead of putting more and more stuff into vl.c, let's have the genericfunctions that deal with asynchronous callbacks in their own file.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: remove unused includes of if_tun.h and if_tap.h
Looks like these are just artifacts of vl.c being split up.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only IDE needs limits for CHS configuration
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
net: add QemuOptsList arg to net_client_parse()
Patchworks-ID: 35505Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: add -netdev option
Patchworks-ID: 35506Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: handle -netdevice options
Same as for -net except for:
- only tap, user, vde and socket types are supported- the vlan parameter is not allowed- the name parameter is not allowed but the id parameter isrequired
Patchworks-ID: 35517Signed-off-by: Mark McLoughlin <markmc@redhat.com>...
unlock iothread mutex before running kvm ioctl
Without this, kvm will hold the mutex while it issues its run ioctl,and never be able to step out of it, causing a deadlock.
Patchworks-ID: 35359Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Port usb net to QemuOpts
We need net_client_init_from_opts() exported for this
Final net cleanup after conversion to QemuOpts
Now that net_client_init() has no users, kill it off and renamenet_client_init_from_opts().
There is no further need for the old code in net_client_parse() either.We use qemu_opts_parse() 'firstname' facitity for that. Instead, move...
Remove double error message for -device option parsing
qemu_opts_parse() gives a suitable error message in all failure casesso we can remove the error message from the caller.
Don't assign a static string to NICInfo::model
Don't exit() in config_error()
Propagating errors up the call chain is tedious. In startup code, wecan take a shortcut: terminate the program. This is wrong elsewhere,the monitor in particular.
config_error() tries to cater for both customers: it terminates the...
offer right-ctrl as a grab option
Add support for -ctrl-grab to use the right-ctrl button to grab/releasethe mouse in SDL.
The multi-button ctrl-alt and ctrl-alt-shift grab buttons present anaccessibility problem to users who cannot press more than one button...
Reorganize option rom (+linux kernel) loading.
This patch adds infrastructure to maintain memory regions which must berestored on reset. That includes roms (vga bios and option roms on pc),but is also used when loading linux kernels directly. Features:...
Improve error reporting on file access
By making the error reporting include strerror(errno), it gives the usera bit more indication as to why qemu failed. This is particularlyimportant for people running qemu as a non root user.
Signed-off-by: Justin M. Forbes <jforbes@redhat.com>...
drive cleanup fixes.
Changes: * drive_uninit() wants a DriveInfo now. * drive_uninit() also calls bdrv_delete(), so callers don't need to do that. * drive_uninit() calls are moved over to the ->exit() callbacks, destroy_bdrvs() is zapped. * setting bdrv->private is not needed any more as the...
qdev hotplug: infrastructure and monitor commands.
Adds device_add and device_del commands. device_add accepts acceptsthe same syntax like the -device command line switch. device_delexpects a device id. So you should tag your devices with ids if you...
win32: Drop dead dyntick timer code
nearest_delta_us is calculated but not used. Drop it.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Introduce QEMU_CLOCK_HOST
Despite its name QEMU_CLOCK_REALTIME is (normally) not usingCLOCK_REALTIME / the host system time as base. In order to allow alsonon-trivial RTC emulations (MC146818) to follow the host time instead ofthe virtual guest time, introduce the new clock type QEMU_CLOCK_HOST. It...
Refactor RTC command line switches
Deprecate -localtime, -setdate and -rtc-td-hack in favor of a newunified command line switch:
-rtc [base=utc|localtime|date][,driftfix=none|slew]
Enable host-clock-based RTC
Switch RTC emulations to the new host_clock instead of vm_clock bydefault. This has the advantage that the emulated RTC will followautomatically the host time while it might be tuned via NTP. vm_clockcan still be selected by passing '-rtc clock=vm' on the command line....
do proper cpu_self check
Currently, our check for qemu_cpu_self only checks if there is a cpucurrently in execution (represented by cpu_single_env being set). Whilethis might be okay for tcg, it is certainly not okay for kvm, since multiplecpus might be executing....
Rename QEMU_TIMER_* to QEMU_CLOCK_*
These constants select clocks, not timers. And init_timers initializesclocks.
Fix warning about undefined madvise() on OpenSolaris
OpenSolaris headers can't export madvise() with a sane set of #defines.For background, see MySQL bug #7156 (http://bugs.mysql.com/bug.php?id=7156)for discussion about Solaris header problems.
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
Win32: avoid a warning
GetLastError() returns a DWORD.
vl: Add failure check for SetEvent
vl: Do not use perror after failed Win32 API calls
fix -daemonize with kvm
Otherwise fork might not inherit state initialized by kvm_init().
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix coding style issue
Replace:
if (-1 foo())
with:
if (foo() -1)
While this coding style is not in direct contravention of our currentlyratified CODING_STYLE treaty, it could be argued that the Article 3 ofthe European Convention on Human Rights (prohibiting torture and "inhuman...
support media=cdrom for if=none
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Revert "Open chr device for all serial ports"
This reverts commit 55338f1dd4648d78ee130d83a92f1059ff1f3887.
Open chr device for all serial ports
Now that labels must be unique, the chr devices can't be opened anymorewithin the serial port code (in case they are not already opened invl.c), as they end up with the same label. Instead opened sonon-assigned one directly in vl.c, with a different label....
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
Make get_ticks_per_sec() a static inline
ticks_per_sec is a constant. There's no need to store it as a variable as itnever changes since our time is based on units.
Convert get_ticks_per_sec() to a static inline and move the constant intoqemu-timer.h. Remove all references to QEMU_TIMER_BASE so that we consistently...
Unexport ticks_per_sec variable. Create get_ticks_per_sec() function
timers: Createt TimersState and put all timers state there
timers: move them to VMState
timers: remove useless check
loadvm_state is called from: vl.c during startup, vmstart() is called after finishing loading. The other caller do_loadvm() does the call after a vm_stop(). At both places where we can be saving state we are stoped a few lines before...
ram: remove support for loading v1
ram: Remove SaveVM Version 2 support
It don't work. It fails in this check
if (qemu_get_be32(f) != last_ram_offset)
With 512MB of ram, values were for me:
v = 20c00000 last_ram_offset = 20840000
Last time that some code changed that was this one....
switch chardev to QemuOpts: infrastructure, null device
start switching chardevs to QemuOpts. This patch adds theinfrastructure and converts the null device.
The patch brings two new functions:
qemu_chr_open_opts() same as qemu_chr_open(), but uses QemuOpts instead of a...
Revert "don't call cpu_sychronize_state from reset handlers"
This reverts commit 733318ea9c6d846a6a047b87619e7d9d6e9707d1.
qemu-kvm: fix segfault when running kvm without /dev/kvm, falling back to non-accelerated mode
qemu-kvm: fix segfault when running kvm without /dev/kvm, falling backto non-accelerated mode
We're seeing segfaults on systems without access to /dev/kvm. It...
don't call cpu_sychronize_state from reset handlers
Doing this will make the vcpu ioctl be issued from the I/O thread, insteadof cpu thread. The correct behaviour is to call it from within the cpu thread,as soon as we are ready to go.
Signed-off-by: Glauber Costa <glommer@redhat.com>...
fix PATH_MAX conditional compilation
PATH_MAX is used elsewhere in the qemu source tree without protection.
In addtion the actual code would not compile if PATH_MAX is not defined
Last the free() call is wrong as p is not malloc()ed.
Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>...
fix vl.c compilation if CONFIG_KVM is not defined
vl.c will not link if CONFIG_KVM is not defined.
This patch fixes the problem.
Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
mv strdup to qemu_strdup in vl.c
There are few places in vl.c not using the qemu version ofmalloc/free/strdup.
Fix it.
allow passing null machine pointer to drive_init().
qdev/usb: add usb bus support to qdev, convert drivers.
TODO: * make the rest of qemu aware of usb busses and kill the FIXMEs added by this patch....
qdev/usb: make qemu aware of usb busses.
Move usb code from vl.c to usb-bus.c and make it use the new datastructures added by qdev conversion. qemu usb core should be ableto handle multiple USB busses just fine now (untested though).
Kill some usb_*_init() legacy functions, use usb_create_simple()...
Checks in select_soundhw were never intended to accept abbreviations
monitor: Port handler_1 to use QDict
This commit ports command handlers that receive one argument to usethe new monitor's dictionary.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
do not issue ioctl from within the io thread
According to Documentation/kvm/api.txt, (and well, to common sense),we should not be calling vcpu ioctls from within the iothread.Since vcpu initialization issues a vcpu ioctl, move it a little bitfurther in time to prevent it....
Support for multiple -monitor devices
Rebased version of Anthony's patch: Allow to specify more than onemonitor terminal via the -monitor command line switch. This isparticularly useful when libvirt or some other management tool alreadyoccupies the primary monitor but you need another one for debugging....
Delay sighandler_setup()
If we are using --serial telnet:0:5555,server or similar, ^C will notkill qemu. We need to first connect using telnet, and the the ^C takeseffect.
switch balloon initialization to -device.
With that patch applied "-balloon virtio,args" becomes a shortcut for"-device virtio-balloon-pci,args".
Side effects: - ballon device gains support for id=<tag>. - ballon device is off by default now. - initialization order changes, which may in different pci slot...
add qemu_error() + friends
This patch adds some functions for error reporting to address theproblem that error messages should be routed to different destinationsdepending on the context of the caller, i.e. monitor command errorsshould go to the monitor, command line errors to stderr....
qdev: convert watchdogs
-watchdog NAME is now equivalent to -device NAME, except it treatsoption argument '?' specially, and supports only one watchdog.
A side effect is that a device created with -watchdog may now receivea different PCI address.
i6300esb is now available on any machine with a PCI bus, not just PCs....
Move watchdog, watchdog_action, give them internal linkage
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
raw-posix: add Linux native AIO support
Now that do have a nicer interface to work against we can add Linux nativeAIO support. It's an extremly thing layer just setting up an iocb forthe io_submit system call in the submission path, and registering an...
split do_loadvm() into do_loadvm() and load_vmstate()
do_loadvm() is now called from the monitor.load_vmstate() is called by do_loadvm() and when -loadvm command line is used.Command line don't have to play games with vmstop()/vmstart()
Signed-off-by: Juan Quintela <quintela@redhat.com>...
make load_vmstate() return errors
extend -smp parsing to include cores= and threads= options
For injecting multi-core and multi-threading CPU topology into guestsextend the -smp syntax to accommodate cores and threads specification.Syntax: -smp smp_value[,cores=nr_cores][,threads=nr_threads]\...
Unbreak large mem support by removing kqemu
kqemu introduces a number of restrictions on the i386 target. The worst is thatit prevents large memory from working in the default build.
Furthermore, kqemu is fundamentally flawed in a number of ways. It relies on...
QEMU set irq0override in fw_cfg
Hi,
After discussing the issue with Avi, Gleb and a couple others on irq,we came to the conclusion that it is preferred to have QEMU requestfeatures from the BIOS, rather than notifying the BIOS that it isrunning on QEMU or KVM. This way memory ranges can change etc. and...
Clean up VGA type selection; far too many variables being used to track one state leads to confusion if new variables are added.
Signed-off-by: Zachary Amsden <zamsden@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Do not disable autostart for live migration
If the user does not want autostart, they can specify -S.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
check for PR_SET_NAME being defined
Depending on what glibc/kernel headers you are compiling against,PR_SET_NAME may or may not be defined. Do the right thing ifPR_SET_NAME isn't defined and skip setting the process name.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>...
variable timer intervals
This patch introduces dynamic timer intervals: we slow down the refreshrate when there in no much activity but we get back to a fast refreshrate when the activity resume.
Please note that qemu_timer_expired is not an inline function any more...
qdev-ify virtio-blk.
First user of the new drive property. With this patch applied hostand guest config can be specified separately, like this:
-drive if=none,id=disk1,file=/path/to/disk.img -device virtio-blk-pci,drive=disk1
You can set any property for virtio-blk-pci now. You can set the pci...
QemuOpts: switch over -device.
Make -device switch use the QemuOpts framework.Everything should continue to work like it did before.
New: "-set device.$id.$property=$value" works.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
constify drive_get_by_id arg
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-Id:
add -drive if=none
This adds a host drive, but doesn't implicitly add a guest drive for it.First step in splitting host and guest configuration, check thefollowing patches to see how this can be used ...
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
QemuOpts: make the drive id actually show up in "info block".
QemuOpts: create qemu-config.h
Move drive option description there.Rename it, give it a qemu_ prefix.
QemuOpts: add -set option
One use case will be file for drives (no filename quoting issues), i.e.
-drive id=test,if=virtio -set drive.test.file=/vmdisk/test-virtio.img
It will work for any other option (assuming handled by QemuOpts) though.Except for id= for obvious reasons ;)....
Use qemu_irq for system_powerdown
fix migration to obey -S
Since migration returns right away, starting the VM rightafter calling qemu_start_incoming_migration is wrong evenif -S is not passed. We have to do this after migrationhas completed.
Cc: Glauber Costa <glommer@redhat.com>Cc: Anthony Liguori <aliguori@us.ibm.com>...
rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN
rename HOST_BSD to CONFIG_BSD
fix broken migration
While fixing migration with -S, commit89befdd1a6b18215153b8976682d57b7d03d5782 broke the rest of us. Poorglommer, with a poor family, spare him his life from this monstruosity.
Since the unconditional vm_start, not autostart was the villain, I'm putting...
Remove setvbuf(<handle>, NULL, _IOLBF, 0) calls for Win32
On Win32 the setvbuf function requires the last parameter to be size between 2 and INT_MAX bytes, so the calls always failed. Since the whole point of the calls is to set line-buffered mode for the file handle and that's not supported on Win32 anyway, conditionally remove them....
Remove special Win32 code in vl.c that's no longer needed.
Signed-off-by: Filip Navara <filip.navara@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Introduce -smp , maxcpus= flag to specify maximum number of CPUS.
Follow on patch will use it to determine the size of the MADT andother BIOS tables.
Signed-off-by: Jes Sorensen <jes@sgi.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
switch -drive to QemuOpts.
Demo QemuOpts in action ;)
Implementing a alternative way to specify the filename should bejust a few lines of code now once we decided how the cmd line syntaxshould look like.