summaryrefslogtreecommitdiffstats
path: root/vl.c
Commit message (Collapse)AuthorAgeFilesLines
* Create qemu-option.hKevin Wolf2009-05-221-37/+1
| | | | | | | | | | | | | 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>
* augment info migrate with page statusGlauber Costa2009-05-221-1/+20
| | | | | | | | | | | | | | | | 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>
* Introduce is_default field for QEMUMachineAnthony Liguori2009-05-211-2/+14
| | | | | | | | 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-211-41/+41
| | | | | | | | | | | 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>
* Convert machine registration to use module init functionsAnthony Liguori2009-05-211-1/+1
| | | | | | 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-211-15/+26
| | | | | | | | | | | | | | | | | | | --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>
* 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>
* Basic qdev infrastructure.Paul Brook2009-05-141-0/+4
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* Fix kqemu build failure.Paul Brook2009-05-131-1/+1
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* Remove vga_ram_sizePaul Brook2009-05-131-3/+1
| | | | | | | | | | The vga_ram_size argument to machine init functions always has the same value, and is ignored by many machines (including SPARC32 which has an obsolete ifdef for VGA_RAM_SIZE). Remove it and push VGA_RAM_SIZE into vga_int.h. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Follow coding conventionsPaul Brook2009-05-101-3/+3
| | | | | | Remove explicit struct qualifiers and rename structure types. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Drop CONFIG_GDBSTUBJan Kiszka2009-05-081-8/+0
| | | | | | | | This is no user-flippable switch, and no arch makes use of disabling gdbstub support. So it's pointless to keep the related #ifdefs and configure hunks around - and risking breakages like 711c410fdd again. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
* Fix serial option with -driveAnthony Liguori2009-05-011-1/+1
| | | | | | This is from the KVM tree. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Build fix for !CONFIG_GDBSTUB caseXiantao Zhang2009-05-011-0/+2
| | | | | | | | Once CONFIG_GDBSTUB not configured, compile will generate error. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Hardware watchdogRichard W.M. Jones2009-05-011-0/+16
| | | | | | | | Here is an updated hardware watchdog patch, which should fix everything that was raised about the previous version ... Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: Fix -net socket parameter checksJan Kiszka2009-05-011-11/+27
| | | | | | | | | | My commit ea053add700d8abe203cd79a9ffb082aee4eabc0 broke -net socket by overwriting an intermediate buffer in the added check_param. Fix this by switching check_param to automatic buffer allocation and release, ie. callers no longer have to worry about providing a scratch buffer. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix qemu_event_initJan Kiszka2009-04-291-0/+2
| | | | | | | Falling through to "fail" made qemu_event_init() close the pipe fds immediately again, breaking timer event notification. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
* Fix Win32 warningBlue Swirl2009-04-251-1/+1
|
* qemu: introduce iothread (Marcelo Tosatti)aliguori2009-04-241-22/+390
| | | | | | | | | | Fill in the hooks and introduce iothread. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7248 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: handle stop request in main loop (Marcelo Tosatti)aliguori2009-04-241-10/+26
| | | | | | | | Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7247 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: refactor tcg cpu execution loop (Marcelo Tosatti)aliguori2009-04-241-24/+29
| | | | | | | | Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7246 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: use debug_requested global instead of cpu_exec return (Marcelo Tosatti)aliguori2009-04-241-3/+14
| | | | | | | | | | Necessary for the next refactoring patch. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7245 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: introduce lock/unlock_iothread (Marcelo Tosatti)aliguori2009-04-241-0/+5
| | | | | | | | | | Hook to allow iothread to drop the global mutex. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7244 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: introduce qemu_cpu_kick (Marcelo Tosatti)aliguori2009-04-241-0/+10
| | | | | | | | | | To notify cpu of pending interrupt. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7243 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: introduce qemu_init_vcpu (Marcelo Tosatti)aliguori2009-04-241-0/+9
| | | | | | | | Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7242 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: refactor main_loop (Marcelo Tosatti)aliguori2009-04-241-129/+151
| | | | | | | | | | Break main loop into 3 main functions. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7241 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: factor out event notification / rearm alarm timer on main_loop_wait ↵aliguori2009-04-241-71/+85
| | | | | | | | | | | | | | | | | | (Marcelo Tosatti) Special events that have no particular event descriptor (either fd for UNIX or HANDLE for Windows) associated with make use of an artificial one. Factor the alarm timer notification so that it can be used for other events, and move dyntick timer rearm to main_loop_wait. aliguori: made sure to return a value in qemu_event_init() on win32 Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7240 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: introduce qemu_init_main_loop (Marcelo Tosatti)aliguori2009-04-241-0/+9
| | | | | | | | | | Hook to allow iothread initialization. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7239 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: create helper for event notification (Marcelo Tosatti)aliguori2009-04-241-22/+21
| | | | | | | | Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7236 c046a42c-6fe2-441c-8c8c-71466251a162
* xen: add -vga xenfb option, configure xenfb (Gerd Hoffmann)aliguori2009-04-221-0/+4
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7228 c046a42c-6fe2-441c-8c8c-71466251a162
* simplify vga selection (Gerd Hoffmann)aliguori2009-04-221-11/+4
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7227 c046a42c-6fe2-441c-8c8c-71466251a162
* xen: add block device backend driver. (Gerd Hoffmann)aliguori2009-04-221-1/+5
| | | | | | | | | | | | | This patch adds a block device backend driver to qemu. It is a pure userspace implemention using the gntdev interface. It uses "qdisk" as backend name in xenstore so it doesn't interfere with the other existing backends (blkback aka "vbd" and tapdisk aka "tap"). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7223 c046a42c-6fe2-441c-8c8c-71466251a162
* xen: groundwork for xen support (Gerd Hoffmann)aliguori2009-04-221-0/+12
| | | | | | | | | | | | - configure script and build system changes. - wind up new machine type. - add -xen-* command line options. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7219 c046a42c-6fe2-441c-8c8c-71466251a162
* added -numa cmdline parameter parser (Andre Przywara)aliguori2009-04-211-4/+129
| | | | | | | | | | | | | | adds a -numa command line parameter and sets a QEMU global array with the memory sizes. The CPU-to-node assignemnt is written into the CPUState. If no specific values for memory and CPUs are given, all resources will be split equally across all nodes. This code currently support only up to 64 virtual CPUs. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7210 c046a42c-6fe2-441c-8c8c-71466251a162
* slirp: Enhance host-guest redirection setup (Jan Kiszka)aliguori2009-04-211-1/+1
| | | | | | | | | | | | Allow to establish a TCP/UDP connection redirection also via a monitor command 'host_net_redir'. Moreover, assume TCP as connection type if that parameter is omitted. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7204 c046a42c-6fe2-441c-8c8c-71466251a162
* Allow empty params for check_params (Jan Kiszka)aliguori2009-04-211-1/+1
| | | | | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7199 c046a42c-6fe2-441c-8c8c-71466251a162
* kqemu: merge CONFIG_KQEMU and USE_KQEMUblueswir12009-04-191-14/+14
| | | | | | | | | | Basically a recursive ":%s/USE_KQEMU/CONFIG_KQEMU/g". Signed-off-by: Paul Bolle <pebolle@tiscali.nl> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7189 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: Add support for SMBIOS command line otions (Alex Williamson)aliguori2009-04-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a new -smbios option (x86-only) to allow binary SMBIOS entries to be passed through to the BIOS or modify the default values of individual fields of type 0 and 1 entries on the command line. Binary SMBIOS entries can be generated as follows: dmidecode -t 1 -u | grep $'^\t\t[^"]' | xargs -n1 | \ perl -lne 'printf "%c", hex($_)' > smbios_type_1.bin These can then be passed to the BIOS using this switch: -smbios file=smbios_type_1.bin Command line generation supports the following syntax: -smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d] -smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str] [,uuid=$(uuidgen)][,sku=str][,family=str] For instance, to add a serial number to the type 1 table: -smbios type=1,serial=0123456789 Interface is extensible to support more fields/tables as needed. aliguori: remove texi formatting from help output Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7163 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: Add prototype and make qemu_uuid_parse() non-static (Alex Williamson)aliguori2009-04-171-1/+1
| | | | | | | | | | SMBIOS parameters can also provide a UUID outside of vl.c. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7162 c046a42c-6fe2-441c-8c8c-71466251a162
* kvm: Sync CPU state on reset (Jan Kiszka)aliguori2009-04-171-0/+2
| | | | | | | | | | Make sure KVM gets informed about the reset CPU state. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7135 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement dynamic guest ram allocation.pbrook2009-04-111-33/+23
| | | | | | | Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7088 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove code phys_ram_base uses.pbrook2009-04-111-9/+10
| | | | | | | Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7085 c046a42c-6fe2-441c-8c8c-71466251a162
* Add --with-pkgversion.pbrook2009-04-071-1/+1
| | | | | | | | | | Allows distributors to identify their builds without needing to hack the sources. Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7036 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement --version.pbrook2009-04-071-2/+11
| | | | | | | Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7035 c046a42c-6fe2-441c-8c8c-71466251a162
* Add new command line option -singlestep for tcg single stepping.aurel322009-04-051-0/+4
| | | | | | | | | | | | | | This replaces a compile time option for some targets and adds this feature to targets which did not have a compile time option. Add monitor command to enable or disable single step mode. Modify monitor command "info status" to display single step mode. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7004 c046a42c-6fe2-441c-8c8c-71466251a162
* stop dirty tracking just at the end of migration (Glauber Costa)aliguori2009-04-051-1/+1
| | | | | | | | | | | | | | | If there is still work to do, it is not safe to assume we can end the dirty tracking. Specifically, kvm can update the dirty tracking log inside ram_save_block(), leaving pages still out of sync if we go with the current code. Based on a patch by Yaniv Kamay Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6999 c046a42c-6fe2-441c-8c8c-71466251a162
* gdbstub: Rework configuration via command line and monitor (Jan Kiszka)aliguori2009-04-051-17/+8
| | | | | | | | | | | | | | | | | | | | | | | Introduce a more canonical gdbstub configuration (system emulation only) via the new switch '-gdb dev'. Keep '-s' as shorthand for '-gdb tcp::1234'. Use the same syntax also for the corresponding monitor command 'gdbserver'. Its default remains to listen on TCP port 1234. Changes in v4: - Rebased over new command line switches meta file Changes in v3: - Fix documentation Changes in v2: - Support for pipe-based like to gdb (target remote | qemu -gdb stdio) - Properly update the qemu-doc Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6992 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix some win32 compile warningsblueswir12009-04-051-5/+12
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6984 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove nodisk_ok machine feature (Jan Kiszka)aliguori2009-03-281-4/+0
| | | | | | | | | | | | | All archs have some kind of firmware to load and can be fine with it already. So there is not much use in enforcing the presence of a disk. If the system setup requires one, the user will notice it anyway once the firmware/bios fails to boot from it. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6899 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud