summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* kvm: Fix dirty log temporary buffer sizeJan Kiszka2009-05-221-1/+1
| | | | | | | | | The buffer passed to KVM_GET_DIRTY_LOG requires one bit per page. Fix the size calculation in kvm_physical_sync_dirty_bitmap accordingly, avoiding allocation of extremly oversized buffers. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kvm: Introduce kvm_set_migration_logJan Kiszka2009-05-222-7/+40
| | | | | | | | | Introduce a global dirty logging flag that enforces logging for all slots. This can be used by the live migration code to enable/disable global logging withouth destroying the per-slot setting. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kvm: Conditionally apply workaround for KVM slot handling bugJan Kiszka2009-05-221-1/+11
| | | | | | | | Only apply the workaround for broken slot joining in KVM when the capability was not found that signals the corresponding fix existence. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qcow2: Allow different cluster sizesKevin Wolf2009-05-222-5/+49
| | | | | | | | Add an option to specify the cluster size of a newly created qcow2 image. Default is 4k which is the same value that was hard-coded before. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Convert qemu-img convert to new bdrv_createKevin Wolf2009-05-221-32/+65
| | | | | | | | | This is part two of the qemu-img conversion. This really works the same as the previous conversion of qemu-img create: It introduces a new -o option for the generic approach and adds the old-style options to this option set. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Convert qemu-img create to new bdrv_createKevin Wolf2009-05-221-46/+87
| | | | | | | | | | This patch changes qemu-img to actually use the new bdrv_create interface. It translates the old-style qemu-img options which have been bdrv_create2 parameters or flags so far to option structures. As the generic approach, it introduces an -o option which accepts any parameter the driver knows. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Convert all block drivers to new bdrv_createKevin Wolf2009-05-2212-55/+214
| | | | | | | | | | | | Now we can make use of the newly introduced option structures. Instead of having bdrv_create carry more and more parameters (which are format specific in most cases), just pass a option structure as defined by the driver itself. bdrv_create2() contains an emulation of the old interface to simplify the transition. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Create qemu-option.hKevin Wolf2009-05-225-40/+418
| | | | | | | | | | | | | This patch creates a new header file and the corresponding implementation file for parsing of parameter strings for options (like used in -drive). Part of this is code moved from vl.c (so qemu-img can use it later). The idea is to have a data structure describing all accepted parameters. When parsing a parameter string, the structure is copied and filled with the parameter values. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* allow changing the speed of a running migrationGlauber Costa2009-05-221-0/+7
| | | | | | | | | | This patch allow us to call migrate_set_speed on running migrations. This should allow mgmt tools to increase the allocated bandwidth of a running migration if there is no progress, and they really want the migration to succeed. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* introduce set_rate_limit function for QEMUFileGlauber Costa2009-05-223-10/+43
| | | | | | | This patch converts the current callers of qemu_fopen_ops(). Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* augment info migrate with page statusGlauber Costa2009-05-223-1/+27
| | | | | | | | | | | | | | | | This patch augments info migrate output with status about: * ram bytes remaining * ram bytes transferred * ram bytes total This should be enough for management tools to realize whether or not there is progress in migration. We can add more information later on, if the need arrives [v2: fixes bytes_transferred type] Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Don't send all gratuitous packets at once.Gleb Natapov2009-05-221-5/+19
| | | | | | | Use timer to separate them in time. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Minimal ethernet frame length is 64 bytes.Gleb Natapov2009-05-221-1/+2
| | | | | Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix segv when passing an unknown protocolAnthony Liguori2009-05-221-1/+1
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Partially revert e20a8dff4c0da3827764924139d3bb73962f5d5aAnthony Liguori2009-05-222-8/+5
| | | | | | | | | From Paul Brook: "the fdc is tied to the ISA DMA engine. We don't currently have a target independent method of handling inter-device data transfer." Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Revert "Fix arm-softmmu breakage"Anthony Liguori2009-05-221-2/+2
| | | | | | | | | This reverts commit ec6bd8dea77478f32981a5df49f66ca2430ad19d. This broke any target that uses virtio. Virtio devices live in libhw and without whole-archive, the constructors will never be called for virtio. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce is_default field for QEMUMachineAnthony Liguori2009-05-2111-3/+24
| | | | | | | | f80f9ec changed the order that machines are registered which had the effect of changing the default machine. This changeset introduces a new is_default field so that machine types can declare that they are the default for an architecture. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Refactor how display drivers are selectedAnthony Liguori2009-05-215-49/+58
| | | | | | | | | | | My previous commit, f92f8afebe, broke -vnc (spotted by Glauber Costa). This is because it's necessary to tell when the no special display parameters have been passed and default to SDL or VNC appropriately. This refactors the display selection logic to be less complicated which has the effect of fixing the regression mentioned above. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix arm-softmmu breakageBlue Swirl2009-05-211-2/+2
| | | | | | Don't use whole-archive for hwlib or libqemu objects Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Compile most Xen files only onceBlue Swirl2009-05-214-2/+14
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Compile fdc, escc and SCSI controllers only onceBlue Swirl2009-05-213-12/+16
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Let the venomous poison spread to more identifiersBlue Swirl2009-05-211-0/+23
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Convert machine registration to use module init functionsAnthony Liguori2009-05-2145-263/+321
| | | | | | This cleans up quite a lot of #ifdefs, extern variables, and other ugliness. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Eliminate --disable-gfx-check and make VNC default when SDL not availableAnthony Liguori2009-05-214-33/+36
| | | | | | | | | | | | | | | | | | | --disable-gfx-check predates VNC server support. It made sense back then because the only thing you could do without SDL was use -nographic mode or similar tricks. Since this is a very advanced mode of operation, gfx-check provided a good safety net for casual users. A casual user is very likely to use VNC to interact with a guest. In fact, it's often frustrating to install QEMU on a server and have to specify disable-gfx-check when you only want to use VNC. This patch eliminates disable-gfx-check and makes SDL behave like every other optional dependency. If SDL is not available, instead of failing ungracefully if no special options are specified, we default to -vnc localhost:0,to=99. When we do default to VNC, we also print a message to tell the user that we've done this include which port we're currently listening on. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Do not attempt to allocate sn_tab when there are no snapshotsmalc2009-05-211-0/+5
| | | | | | | This was caught by a7d27b536ffc0773028a90f14580552c0c3ddb2a which aborted on this attempt, thanks to Alex Ivanov for report. Signed-off-by: malc <av1474@comtv.ru>
* Cast pointer arguments of get/setsockopt, send to void * to keep GCCmalc2009-05-213-3/+4
| | | | | | from producing a warning about pointer type mismatches with Winsock Signed-off-by: malc <av1474@comtv.ru>
* kvm: add error message for when SMP is requestedMark McLoughlin2009-05-201-1/+3
| | | | | | | Right now, if you try e.g. '-smp 2' you just get 'failed to initialize KVM'. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
* Remove initrd warning messageRichard W.M. Jones2009-05-201-3/+0
| | | | Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
* initialize struct sigevent before timer_createJean-Christophe Dubois2009-05-201-0/+5
| | | | | | | | | | | | | | | | | | When qemu is run under valgrind, valgrind shows the following output on exit: ==3648== 1 errors in context 2 of 2: ==3648== Syscall param timer_create(evp) points to uninitialised byte(s) ==3648== at 0x54E936A: timer_create (in /lib/librt-2.9.so) ==3648== by 0x405DCF: dynticks_start_timer (vl.c:1549) ==3648== by 0x40A966: main (vl.c:1726) ==3648== Address 0x7fefffb34 is on thread 1's stack ==3648== Uninitialised value was created by a stack allocation ==3648== at 0x405D60: dynticks_start_timer (vl.c:1534) This patch is a simple fix to remove this potential problem. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
* Fix NULL alarm_timer pointer at exitJean-Christophe Dubois2009-05-201-2/+2
| | | | | | | | | | | | | | | | | | | | This fixes a SIGSEGV error on qemu exit. Here is the valgrind output related to this error ==3648== Process terminating with default action of signal 11 (SIGSEGV) ==3648== Access not within mapped region at address 0x8 ==3648== at 0x40636B: host_alarm_handler (vl.c:1345) ==3648== by 0x52D807F: (within /lib/libpthread-2.9.so) ==3648== by 0x5C0A12E: tcsetattr (in /lib/libc-2.9.so) ==3648== by 0x4DD601: term_exit (qemu-char.c:700) ==3648== by 0x5B636EC: exit (in /lib/libc-2.9.so) ==3648== by 0x5B4B5AC: (below main) (in /lib/libc-2.9.so) This simple fix check for a valid pointer as host_alarm_handler is also called after alarm_timer is released in the exit path. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
* keep initrd in below 4g area.Glauber Costa2009-05-201-4/+5
| | | | | | | | initrd must be kept on the memory area below 4g. By not doing this, we're seeing guests break while using -initrd and values of -mem superior to 4096. Signed-off-by: Glauber Costa <glommer@redhat.com>
* migrate.c: migrate_fd_put_buffer: Do not busyloop: stop writing if EWOULDBLOCKUri Lublin2009-05-201-1/+1
| | | | | | | | | The migration code is non-blocking, designed for live migration. Practically migrate_fd_put_buffer busy-loops trying to write, as on many machines EWOULDBLOCK==EAGAIN (look in include/asm-generic/errno.h). Signed-off-by: Uri Lublin <uril@redhat.com>
* kvm: work around supported cpuid ioctl() brokennessMark McLoughlin2009-05-201-0/+3
| | | | | | | | KVM_GET_SUPPORTED_CPUID has been known to fail to return -E2BIG when it runs out of entries. Detect this by always trying again with a bigger table if the ioctl() fills the table. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
* remove gcc 3.x requirement from documentationHollis Blanchard2009-05-201-10/+0
| | | | | | | | | | | | This text is no longer accurate. After the patch is applied, the generated version at http://www.nongnu.org/qemu/qemu-doc.html should be regenerated. This patch is also a candidate for the stable branch. (The URL above is probably generated from the stable branch anyways, so maybe it goes without saying.) Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* Remove dead codemalc2009-05-201-14/+7
| | | | Signed-off-by: malc <av1474@comtv.ru>
* Format per CODING_STYLEmalc2009-05-191-6/+10
| | | | Signed-off-by: malc <av1474@comtv.ru>
* Abort on attempts to allocate zero bytesmalc2009-05-191-2/+7
| | | | | | http://marc.info/?t=124267873300015&r=1&w=2 Signed-off-by: malc <av1474@comtv.ru>
* Unbreak out-of-tree buildsmalc2009-05-191-1/+1
| | | | Signed-off-by: malc <av1474@comtv.ru>
* Hardware convenience libraryPaul Brook2009-05-1918-133/+248
| | | | | | | | | | | | | | The only target dependency for most hardware is sizeof(target_phys_addr_t). Build these files into a convenience library, and use that instead of building for every target. Remove and poison various target specific macros to avoid bogus target dependencies creeping back in. Big/Little endian is not handled because devices should not know or care about this to start with. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Disable >4G ram support on 32-bit targetsPaul Brook2009-05-191-0/+4
| | | | | | | If the target only has a 32-bit physical address space then the code to map >4G ram breaks horribly, and causes compiler warnings. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Only define __llseek if it is going to be usedPaul Brook2009-05-191-1/+1
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* Avoid implicit truncation compiler warningsPaul Brook2009-05-191-2/+2
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* Remove obsolete BIOS_SIZE from sysemu.hPaul Brook2009-05-199-33/+14
| | | | | | | BIOS_SIZE is no longer needed by vl.c, so there's no point having it in sysemu.h. Signed-off-by: Paul Brook <paul@codesourcery.com>
* cris: First shot at qdev for CRIS interrupts.Edgar E. Iglesias2009-05-186-48/+114
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* etrax: Don't keep the passed irq pointer.Edgar E. Iglesias2009-05-181-3/+3
| | | | | | Copy passed irq object at channel connect. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* etrax: Remove unused eth irq line.Edgar E. Iglesias2009-05-184-10/+6
| | | | | | | The ethernet blocks irq line to report errors is unimplemented in QEMU. Remove it for now. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Syborg virtio bindings.Paul Brook2009-05-183-0/+293
| | | | | | Implement Syborg device bindings for virtio-net. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Separate virtio PCI codePaul Brook2009-05-1814-300/+474
| | | | | | Split the PCI host bindings from the VRing transport implementation. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Only shutdown video subsytem in sdl_cleanupmalc2009-05-171-1/+1
| | | | | | | | Depending on the order in which atexit handlers are called SDL might try to join on an audio thread without said thread ever being notified that it must stop, hence QEMU will forever block in pthread_join call. Signed-off-by: malc <av1474@comtv.ru>
* Consistently use uint64_t for int propertiesPaul Brook2009-05-172-3/+3
| | | | | | I apparently failed to do this properly on the first attempt. Signed-off-by: Paul Brook <paul@codesourcery.com>
OpenPOWER on IntegriCloud