summaryrefslogtreecommitdiff
path: root/sysemu.h
AgeCommit message (Collapse)AuthorFilesLines
2009-08-27make load_vmstate() return errorsJuan Quintela1-1/+1
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27move do_loadvm() to monitor.cJuan Quintela1-1/+0
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27split do_loadvm() into do_loadvm() and load_vmstate()Juan Quintela1-0/+1
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> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24Unbreak large mem support by removing kqemuAnthony Liguori1-4/+0
kqemu introduces a number of restrictions on the i386 target. The worst is that it prevents large memory from working in the default build. Furthermore, kqemu is fundamentally flawed in a number of ways. It relies on the TSC as a time source which will not be reliable on a multiple processor system in userspace. Since most modern processors are multicore, this severely limits the utility of kqemu. kvm is a viable alternative for people looking to accelerate qemu and has the benefit of being supported by the upstream Linux kernel. If someone can implement work arounds to remove the restrictions introduced by kqemu, I'm happy to avoid and/or revert this patch. N.B. kqemu will still function in the 0.11 series but this patch removes it from the 0.12 series. Paul, please Ack or Nack this patch. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24QEMU set irq0override in fw_cfgJes Sorensen1-0/+1
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 request features from the BIOS, rather than notifying the BIOS that it is running on QEMU or KVM. This way memory ranges can change etc. and an older BIOS will continue to work on newer QEMU if it receives the info as a fw_cfg value. This one also matches what qemu-kvm does for irq0override, except I haven't made it configurable. I leave that as an exercise for whoever would be interested in switching off irq0override. Thanks, Jes Set irq0 override in fw_cfg, informing the BIOS that QEMU expects override on irq0. This matches qemu-kvm, and will help sharing a single BIOS binary. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24Clean up VGA type selection; far too many variables being used to track one ↵Zachary Amsden1-4/+11
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>
2009-08-10add -drive if=noneGerd Hoffmann1-0/+1
This adds a host drive, but doesn't implicitly add a guest drive for it. First step in splitting host and guest configuration, check the following patches to see how this can be used ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-10constify drive_get_by_id argGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-09Use qemu_irq for system_powerdownBlue Swirl1-8/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-30fix migration to obey -SPaolo Bonzini1-0/+1
Since migration returns right away, starting the VM right after calling qemu_start_incoming_migration is wrong even if -S is not passed. We have to do this after migration has completed. Cc: Glauber Costa <glommer@redhat.com> Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-27Introduce -smp , maxcpus= flag to specify maximum number of CPUS.Jes Sorensen1-0/+1
Follow on patch will use it to determine the size of the MADT and other BIOS tables. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-27switch -drive to QemuOpts.Gerd Hoffmann1-11/+3
Demo QemuOpts in action ;) Implementing a alternative way to specify the filename should be just a few lines of code now once we decided how the cmd line syntax should look like. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-27move parser functions from vl.c to qemu-option.cGerd Hoffmann1-7/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-27kill drives_optGerd Hoffmann1-13/+11
cleanup pretty simliar to the drives_table removal patch: - drop the table and make a linked list out of it. - pass around struct pointers instead of table indices. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-27add support for drive ids.Gerd Hoffmann1-0/+2
-drive accepts the new id= now, allowing to explicitely name your drives. They will show up with that name in "info block" if specified, otherwise the existing namimg scheme is used to autogenerate one. There is also a new function to lookup drives by name. Not used yet. The plan is to link disk drivers and drives using the drive id instead of passing around pointers to BlockDriveState. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-27kill drives_tableGerd Hoffmann1-6/+7
First step cleaning up the drives handling. This one does nothing but removing drives_table[], still it became seriously big. drive_get_index() is gone and is replaced by drives_get() which hands out DriveInfo pointers instead of a table index. This needs adaption in *tons* of places all over. The drives are now maintained as linked list. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Add boot menu control via command line switchJan Kiszka1-0/+1
Disable the lengthy BIOS prompt for selecting a boot device by default, but let the user reenable it via '-boot menu=on'. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29Replace -no-virtio-balloon by -balloonMarkus Armbruster1-1/+2
We want to do (at least) two things to the virtio-balloon device: suppress it, and control its PCI address. Option -no-virtio-balloon lets us do only the former. To get the latter, replace -no-virtio-balloon with -balloon none disable balloon device -balloon virtio[,addr=str] enable virtio balloon device (default) Syntax suggested by Anthony Liguori. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29Introduce get_next_param_valueJan Kiszka1-0/+2
In order to parse multiple instances of the same param=value pair, introduce get_next_param_value which can pass back to string parsing position after reading a parameter value. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-24Add serial number support for virtio_blkjohn cooper1-1/+3
[brought forward to current qemu-kvm.git] This patch implements the missing qemu logic to interpret a '-drive .. serial=XYZ ..' flag for a virtio_blk device. The serial number string is contained in a skeletal IDENTIFY DEVICE data structure and this structure is made available to the guest virtio_blk driver via pci i/o region 0. Signed-off-by: john cooper <john.cooper@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22Support addr=... in option argument of -drive if=virtioMarkus Armbruster1-0/+1
Make drive_init() accept addr=, put the value into struct DriveInfo. Use it in all the places that create virtio-blk-pci devices: pc_init1(), bamboo_init(), mpc8544ds_init(). Don't support addr= in third argument of monitor command pci_add and second argument of drive_add, because that clashes with their first arguments. Admittedly unelegant. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22acpi.c: make qemu_system_device_hot_add piix independent.Isaku Yamahata1-1/+2
introruce piix4_device_hot_add() for piix4 specific code and make qemu_system_device_hot_add() generic. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-13Add -no-virtio-balloon command-line optionEduardo Habkost1-0/+1
This new option may be used to disable the virtio-balloon device. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-09net: Real fix for check_params usersJan Kiszka1-1/+2
OK, last try: 8e4416af45 broke -net socket, ffad4116b9 tried to fix it but broke error reporting of invalid parameters. So this patch widely reverts ffad4116b9 again and intead fixes those callers of check_params that originally suffered from overwritten buffers by using separate ones. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-05-30Use relative path for biosPaul Brook1-1/+4
Look for bios and other support files relative to qemu binary, rather than a hardcoded prefix. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-22Create qemu-option.hKevin Wolf1-2/+0
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>
2009-05-22augment info migrate with page statusGlauber Costa1-0/+4
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>
2009-05-21Refactor how display drivers are selectedAnthony Liguori1-1/+10
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>
2009-05-19Hardware convenience libraryPaul Brook1-0/+4
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>
2009-05-19Remove obsolete BIOS_SIZE from sysemu.hPaul Brook1-8/+0
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>
2009-05-14Basic qdev infrastructure.Paul Brook1-1/+6
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-12Push AUD_init down to devicesPaul Brook1-2/+2
Now we can safely call AUD_init multiple times we can push it down to individual audio devices, rather than having to pass it from the board init. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-01net: Fix -net socket parameter checksJan Kiszka1-2/+1
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>
2009-04-22xen: add -vga xenfb option, configure xenfb (Gerd Hoffmann)aliguori1-0/+1
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
2009-04-22xen: add block device backend driver. (Gerd Hoffmann)aliguori1-1/+1
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
2009-04-21added -numa cmdline parameter parser (Andre Przywara)aliguori1-1/+5
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
2009-04-19kqemu: merge CONFIG_KQEMU and USE_KQEMUblueswir11-1/+1
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
2009-04-18Move bootp_filename to avoid a sparse warningblueswir11-1/+0
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7174 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17qemu: Add prototype and make qemu_uuid_parse() non-static (Alex Williamson)aliguori1-0/+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
2009-03-08Fix windows build and clean up use of <windows.h>aliguori1-0/+4
We want to globally define WIN_LEAN_AND_MEAN and WINVER to particular values so let's do it in OS_CFLAGS. Then, we can pepper in windows.h includes where using #includes that require it. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6783 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-05monitor: Rework API (Jan Kiszka)aliguori1-11/+14
Refactor the monitor API and prepare it for decoupled terminals: term_print functions are renamed to monitor_* and all monitor services gain a new parameter (mon) that will once refer to the monitor instance the output is supposed to appear on. However, the argument remains unused for now. All monitor command callbacks are also extended by a mon parameter so that command handlers are able to pass an appropriate reference to monitor output services. For the case that monitor outputs so far happen without clearly identifiable context, the global variable cur_mon is introduced that shall once provide a pointer either to the current active monitor (while processing commands) or to the default one. On the mid or long term, those use case will be obsoleted so that this variable can be removed again. Due to the broad usage of the monitor interface, this patch mostly deals with converting users of the monitor API. A few of them are already extended to pass 'mon' from the command handler further down to internal functions that invoke monitor_printf. At this chance, monitor-related prototypes are moved from console.h to a new monitor.h. The same is done for the readline API. 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@6711 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: PCI device, disk and host network hot-add / hot-remove (Marcelo Tosatti)aliguori1-0/+14
Add monitor command to hot-add PCI devices (nic and storage). Syntax is: pci_add pci_addr=[[<domain>:]<bus>:]<slot> nic|storage params It returns the domain, bus and slot for the newly added device on success. It is possible to attach a disk to a device after PCI initialization via the drive_add command. If so, a manual scan of the SCSI bus on the guest is necessary. Save QEMUMachine necessary for drive_init. Add monitor command to hot-remove devices, remove device data on _EJ0 notification. 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@6610 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: pci hotplug GPE support (Marcelo Tosatti)aliguori1-0/+1
Enable the corresponding bit on the PCIST region and trigger the SCI and handle the _EJ0 notifications. 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@6608 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: initialize hot add system / acpi gpe (Marcelo Tosatti)aliguori1-0/+3
ACPI GPE support, used by PCI (and CPU) hotplug. From: Glauber Costa <gcosta@redhat.com> 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@6607 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: net/drive add/remove tweaks (Marcelo Tosatti)aliguori1-0/+3
Export net/drive add/remove functions for device hotplug usage. Return the table index on add. Return failure instead of exiting if limit has been reached on drive_add. 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@6599 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: move drives_opt for external use (Marcelo Tosatti)aliguori1-0/+9
Device hotplug will use that structure from a separate file. 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@6598 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: drive removal support (Marcelo Tosatti)aliguori1-0/+3
To be used by hot-remove. 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@6596 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: dynamic drive/drive_opt index allocation (Marcelo Tosatti)aliguori1-0/+1
Dynamically allocate drive options and drive table index, to reuse indexes when devices are removed. 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@6594 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-22Rework vm_state_change notifiers (Jan Kiszka)aliguori1-5/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6402 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-21Stop VM on ENOSPC error. (Gleb Natapov)aliguori1-0/+7
This version of the patch adds new option "werror" to -drive flag. Possible values are: report - report errors to a guest as IO errors ignore - continue as if nothing happened stop - stop VM on any error and retry last command on resume enospc - stop vm on ENOSPC error and retry last command on resume all other errors are reported to a guest. Default is "report" to maintain current behaviour. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6388 c046a42c-6fe2-441c-8c8c-71466251a162