summaryrefslogtreecommitdiffstats
path: root/vl.c
Commit message (Collapse)AuthorAgeFilesLines
...
* runstate: introduce suspended stateLuiz Capitulino2012-05-081-0/+7
| | | | | | | | | | | | | | | | | | QEMU enters in this state when the guest suspends to ram (S3). This is important so that HMP users and QMP clients can know that the guest is suspended. QMP also has an event for this, but events are not reliable and are limited (ie. a client can connect to QEMU after the event has been emitted). Having a different state for S3 brings a new issue, though. Every device that doesn't run when the VM is stopped but wants to run when the VM is suspended has to check for RUN_STATE_SUSPENDED explicitly. This is the case for the keyboard and mouse devices, for example. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
* Merge branch 'arm-devs.for-upstream' of ↵Blue Swirl2012-03-311-0/+2
|\ | | | | | | | | | | | | | | | | | | | | git://git.linaro.org/people/pmaydell/qemu-arm * 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: pl031: switch clock base to rtc_clock pl031: rearm alarm timer upon load arm: switch real-time clocks to rtc_clock omap: switch omap_lpg to vm_clock rtc: add -rtc clock=rt
| * rtc: add -rtc clock=rtPaolo Bonzini2012-03-301-0/+2
| | | | | | | | | | | | | | | | This will let people use backwards-compatible semantics for devices that will be affected by the following patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | qtest: add test frameworkAnthony Liguori2012-03-301-1/+9
|/ | | | | | | | | | | | | | | | | | | | | | | | The idea behind qtest is pretty simple. Instead of executing a CPU via TCG or KVM, rely on an external process to send events to the device model that the CPU would normally generate. qtest presents itself as an accelerator. In addition, a new option is added to establish a qtest server (-qtest) that takes a character device. This is what allows the external process to send CPU events to the device model. qtest uses a simple line based protocol to send the events. Documentation of that protocol is in qtest.c. I considered reusing the monitor for this job. Adding interrupts would be a bit difficult. In addition, logging would also be difficult. qtest has extensive logging support. All protocol commands are logged with time stamps using a new command line option (-qtest-log). Logging is important since ultimately, this is a feature for debugging. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vl.c: fix '-cpu ?' segfaultEduardo Habkost2012-03-261-1/+1
| | | | | | | | | | Fix stupid copy&paste mistake at commit ecf40beae7dcbb057d4f115207f9d8276832a774: I moved code around but kept "optarg" on the cpu_list() call. Reported-by: Jiri Denemark <jdenemar@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Merge remote-tracking branch 'sstabellini/saverestore-8' into stagingAnthony Liguori2012-03-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sstabellini/saverestore-8: xen: do not allocate RAM during INMIGRATE runstate xen mapcache: check if memory region has moved. xen: record physmap changes to xenstore Set runstate to INMIGRATE earlier Introduce "xen-save-devices-state" cirrus_vga: do not reset videoram Conflicts: qapi-schema.json Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * Set runstate to INMIGRATE earlierStefano Stabellini2012-03-191-1/+1
| | | | | | | | | | | | | | Set runstate to RUN_STATE_INMIGRATE as soon as we can on resume. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
* | spice: fix broken initializationAlon Levy2012-03-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1b71f7c14fab6f00c2680d4489fbee7baf796e4f moved MODULE_INIT_QOM to way before MODULE_INIT_MACHINE, thereby breaking assumptions made in spice-core.c which registered both a type initializer and a machine intializer. This fix removes the type registration, and replaces it with calling qemu_spice_init in vl.c after command line parsing (second pass) is done, and after timers are armed, required by spice server. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | qom: Register QOM infrastructure earlyAndreas Färber2012-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | The constructors for QOM TYPE_INTERFACE were executed rather late in vl.c's main(). Call them very early so that QOM can safely be used for machines and CPUs. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | initialize CPU model list after handling -readconfig optionsEduardo Habkost2012-03-121-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To properly load cpudefs using -readconfig, we have to call cpudef_init() after finishing the command-line option handling. Consequently, the handling of "-cpu ?" has to be done after the command-line option handling loop, too. Without this patch, "-readconfig configfile -cpu ?" fails to list the CPU definitions read from 'configfile'. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | arm: add device tree supportGrant Likely2012-03-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | If compiled with CONFIG_FDT, allow user to specify a device tree file using the -dtb argument. If the machine supports it then the dtb will be loaded into memory and passed to the kernel on boot. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> [Peter Maydell: Use machine opt rather than global to pass dtb filename] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | usb: Resolve warnings about unassigned bus on usb device creationJan Kiszka2012-02-271-3/+4
|/ | | | | | | | | | | | When creating an USB device the old way, there is no way to specify the target bus. Thus the warning issued by usb_create makes no sense and rather confuses our users. Resolve this by passing a bus reference to the usbdevice_init handler and letting those handlers forward it to usb_create. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vl.c: Avoid segfault when started with no argumentsPeter Maydell2012-02-241-7/+10
| | | | | | | | | | Fix a bug (introduced in commit a0abe47) where a command line which specified no machine arguments (either explicitly or implicitly via -kernel &co) would result in a segfault because of a NULL pointer returned from qemu_opts_find(qemu_find_opts("machine"), 0). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* suspend: add qmp eventsGerd Hoffmann2012-02-241-0/+2
| | | | | | | | Send qmp events on suspend and wakeup so libvirt has a chance to track the vm state. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* suspend: add infrastructureGerd Hoffmann2012-02-241-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds some infrastructure to handle suspend and resume to qemu. First there are two functions to switch state and second there is a suspend notifier: * qemu_system_suspend_request is supposed to be called when the guest asks for being be suspended, for example via ACPI. * qemu_system_wakeup_request is supposed to be called on events which should wake up the guest. * qemu_register_suspend_notifier can be used to register a notifier which will be called when the guest is suspended. Machine types and device models can hook in there to modify state if needed. * qemu_register_wakeup_notifier can be used to register a notifier which will be called when the guest is woken up. Machine types and device models can hook in there to modify state if needed. * qemu_system_wakeup_enable can be used to enable/disable wakeup events. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-02-241-2/+2
|\ | | | | | | | | | | | | * stefanha/trivial-patches: slirp/misc: fix gcc __warn_memset_zero_len warnings vl.c: Increase width of machine name column in "-M ?" output tcg: Remove unneeded include statements
| * vl.c: Increase width of machine name column in "-M ?" outputPeter Maydell2012-02-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | Increase the width of the column used for the machine name in the "-M ?" output from 10 to 20 spaces. This fixes the formatting so it looks nice for architectures where a few of the machines have overly long names. (Our current longest machine name is "petalogix-s3adsp1800" with "realview-eb-mpcore" not far behind.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | gdbstub: Error locations for -gdbMarkus Armbruster2012-02-241-6/+4
| | | | | | | | | | | | | | | | | | | | | | Stash away the option argument with add_device_config(), so we still have its location when we get around to parsing it. This doesn't improve any messages I can see just yet, but that'll change shortly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | vl.c: Error locations for options using add_device_config()Markus Armbruster2012-02-241-0/+4
|/ | | | | | | | | | | | | | | | | | | These are -bt, -serial, -virtcon, -parallel, -debugcon, -usbdevice. Improves messages emitted via proper error reporting interfaces. For instance: $ qemu-system-x86_64 -nodefaults -S -usb -usbdevice net:vlan=xxx qemu-system-x86_64: Parameter 'vlan' expects a number becomes: qemu-system-x86_64: -usbdevice net:vlan=xxx: Parameter 'vlan' expects a number Many more remain unimproved, because they're fprintf()ed. The next few commits will take care of that. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Make kernel, initrd and append be machine_optsPeter Maydell2012-02-221-8/+16
| | | | | | | | | Make kernel, initrd, append be machine opts (ie -machine kernel=foo) with the old plain command line arguments as legacy/convenience equivalents. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vl: make find_default_machine externally visibleJordan Justen2012-02-221-1/+1
| | | | | Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* notifier: switch to QLISTPaolo Bonzini2012-02-171-1/+1
| | | | | | | | Notifiers do not need to access both ends of the list, and using a QLIST also simplifies the API. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-02-171-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/trivial-patches: linux-user: brk() debugging virtio: Remove unneeded g_free() check in virtio_cleanup() net: remove extra spaces in help messages fmopl: Fix typo in function name vl.c: Fix typo in variable name ide: fix compilation errors when DEBUG_IDE is set cpu-exec.c: Correct comment about this file and indentation cleanup CODING_STYLE: Clarify style for enum and function type names linux-user: fail execve() if env/args too big
| * vl.c: Fix typo in variable namePeter Maydell2012-02-101-5/+5
| | | | | | | | | | | | | | | | Fix a typo in a local variable name. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | Make -machine/-enable-kvm options merge into a single listPeter Maydell2012-02-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the "machine" option list use list merging, so that multiple -machine arguments (and the -enable-kvm argument) all merge together into a single list. Drop the calls to qemu_opts_reset() which meant that only the last -machine or -enable-kvm option had any effect. This fixes the bug where "-enable-kvm -machine foo" would ignore the '-enable-kvm' option, and "-machine foo -enable-kvm" would ignore the '-machine foo' option. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* | Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2012-02-151-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kwolf/for-anthony: AHCI: Masking of IRQs actually masks them sheepdog: fix co_recv coroutine context AHCI: Fix port reset race rewrite QEMU_BUILD_BUG_ON qcow2: Keep unknown header extension when rewriting header qcow2: Update whole header at once vpc: Round up image size during fixed image creation vpc: Add support for Fixed Disk type iSCSI: add configuration variables for iSCSI qemu-io: add write -z option for bdrv_co_write_zeroes qed: add .bdrv_co_write_zeroes() support qed: replace is_write with flags field block: perform zero-detection during copy-on-read block: add .bdrv_co_write_zeroes() interface cutils: extract buffer_is_zero() from qemu-img.c
| * | iSCSI: add configuration variables for iSCSIRonnie Sahlberg2012-02-091-0/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds configuration variables for iSCSI to set initiator-name to use when logging in to the target, which type of header-digest to negotiate with the target and username and password for CHAP authentication. This allows specifying a initiator-name either from the command line -iscsi initiator-name=iqn.2004-01.com.example:test or from a configuration file included with -readconfig [iscsi] initiator-name = iqn.2004-01.com.example:test header-digest = CRC32C|CRC32C-NONE|NONE-CRC32C|NONE user = CHAP username password = CHAP password If you use several different targets, you can also configure this on a per target basis by using a group name: [iscsi "iqn.target.name"] ... The configuration file can be read using -readconfig. Example : qemu-system-i386 -drive file=iscsi://127.0.0.1/iqn.ronnie.test/1 -readconfig iscsi.conf Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | qom: Unify type registrationAndreas Färber2012-02-151-1/+1
|/ | | | | | | | | | | | | Replace device_init() with generalized type_init(). While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* s390x: fix qom-ification fall-outAnthony Liguori2012-02-061-1/+5
| | | | | Tested-by: Andreas Faerber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* main-loop: For tools, initialize timers as part of qemu_init_main_loop()Michael Roth2012-02-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | In some cases initializing the alarm timers can lead to non-negligable overhead from programs that link against qemu-tool.o. At least, setting a max-resolution WinMM alarm timer via mm_start_timer() (the current default for Windows) can increase the "tick rate" on Windows OSs and affect frequency scaling, and in the case of tools that run in guest OSs such has qemu-ga, the impact can be fairly dramatic (+20%/20% user/sys time on a core 2 processor was observed from an idle Windows XP guest). This patch doesn't address the issue directly (not sure what a good solution would be for Windows, or what other situations it might be noticeable), but it at least limits the scope of the issue to programs that "opt-in" to using the main-loop.c functions by only enabling alarm timers when qemu_init_main_loop() is called, which is already required to make use of those facilities, so existing users shouldn't be affected. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Improve default machine options usabilityJan Kiszka2012-02-011-15/+2
| | | | | | | | | So far we overwrite the machine options completely with defaults if no accel=value is provided. More user friendly is to fill in only unspecified options. The new qemu_opts_set_defaults enables this. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* mc146818rtc: Use lost_tick_policy propertyJan Kiszka2012-02-011-5/+23
| | | | | | | | Allow to configure the MC146818 RTC via the new lost tick policy property and replace rtc_td_hack with this mechanism. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: fix -nodefaults -device VGABlue Swirl2012-01-251-0/+1
| | | | | | | Flag -nodefaults should also imply no VGA. This was broken in a369da5f31ddbdeb32a7f76622e480d3995fbb00. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori2012-01-231-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qemu-kvm/uq/master: kvm: Activate in-kernel irqchip support kvm: x86: Add user space part for in-kernel IOAPIC kvm: x86: Add user space part for in-kernel i8259 kvm: x86: Add user space part for in-kernel APIC kvm: x86: Establish IRQ0 override control kvm: Introduce core services for in-kernel irqchip support memory: Introduce memory_region_init_reservation ioapic: Factor out base class for KVM reuse ioapic: Drop post-load irr initialization i8259: Factor out base class for KVM reuse i8259: Completely privatize PicState apic: Open-code timer save/restore apic: Factor out base class for KVM reuse apic: Introduce apic_report_irq_delivered apic: Inject external NMI events via LINT1 apic: Stop timer on reset kvm: Move kvmclock into hw/kvm folder msi: Generalize msix_supported to msi_supported hyper-v: initialize Hyper-V CPUID leaves. hyper-v: introduce Hyper-V support infrastructure. Conflicts: Makefile.target Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * kvm: x86: Establish IRQ0 override controlJan Kiszka2012-01-191-1/+0
| | | | | | | | | | | | | | | | KVM is forced to disable the IRQ0 override when we run with in-kernel irqchip but without IRQ routing support of the kernel. Set the fwcfg value correspondingly. This aligns us with qemu-kvm. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
* | vga: improve VGA logicBlue Swirl2012-01-221-17/+45
|/ | | | | | | | | | | | Improve VGA selection logic, push check for device availabilty to vl.c. Create the devices at board level unconditionally. Remove now unused pci_try_create*() functions. Make PCI VGA devices optional. Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* hw/9pfs: Add support to use named socket for proxy FSM. Mohan Kumar2012-01-041-1/+5
| | | | | | | | | Add option to use named socket for communicating between proxy helper and qemu proxy FS. Access to socket can be given by using command line options -u and -g. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Add new proxy filesystem driverM. Mohan Kumar2012-01-041-1/+5
| | | | | | | | | | | Add new proxy filesystem driver to add root privilege to qemu process. It needs a helper process to be started by root user. Following command line can be used to utilize proxy filesystem driver -virtfs proxy,id=<id>,mount_tag=<tag>,socket_fd=<socket-fd> Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Move opt validation to FsDriver callbackAneesh Kumar K.V2012-01-041-6/+2
| | | | | | | This remove all conditional code from common code path and make opt validation a FSDriver callback. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* Set numa topology for max_cpusVasilis Liaskovitis2011-12-221-1/+1
| | | | | | | | | | | | | qemu-kvm passes numa/SRAT topology information for smp_cpus to SeaBIOS. However SeaBIOS always expects to setup max_cpus number of SRAT cpu entries (MaxCountCPUs variable in build_srat function of Seabios). When qemu-kvm runs with smp_cpus != max_cpus (e.g. -smp 2,maxcpus=4), Seabios will mistakenly use memory SRAT info for setting up CPU SRAT entries for the offline CPUs. Wrong SRAT memory entries are also created. This breaks NUMA in a guest. Fix by setting up SRAT info for max_cpus in qemu-kvm. Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* g_thread_init users: don't call it if glib >= 2.31Alon Levy2011-12-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | since commit f9b29ca03 included in release 2.31 (docs below say 2.32 but that is not correct) and onwards g_thread_init is deprecated and calling it is not required: http://developer.gnome.org/glib/unstable/glib-Deprecated-Thread-APIs.html#g-thread-init g_thread_init has been deprecated since version 2.32 and should not be used in newly-written code. This function is no longer necessary. The GLib threading system is automatically initialized at the start of your program. Fixes bulid failure when warnings are treated as errors on fedora 17. I only tested the change to vl.c, and copy pasted to the two other locations (couldn't decide if a wrapper for calling g_thread_init is uglier). Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: fix hotplug when no -device is specifiedAnthony Liguori2011-12-191-0/+2
| | | | | | | | | | The peripheral[-anon] containers are initialized lazily but since they sit on sysbus, they can not be created after realize. This was causing an abort() to occur during hotplug if no -device option was used. This was spotted by qemu-test::device-add.sh Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vl.c: In qemu -h output, only print options for the arch we are running asMichael Ellerman2011-12-191-12/+9
| | | | | | | | | | | | | | | | | | | | Only print options in the help output that are accepted by our arch. This is less confusing for users and also for other programs that consume the help output. The options affected are: -g and -prom-env only displayed on PPC or SPARC -win2k-hack, -rtc-td-hack, -no-fd-bootchk, -no-acpi, -no-hpet, -acpitable, -smbios only displayed on i386 -semihosting only displayed on ARM, M68K or XTENSA -old-param only displayed on ARM Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vl.c: Move option generation logic into a wrapper fileMichael Ellerman2011-12-191-14/+4
| | | | | | | | | | | | In vl.c and qemu-options.h we define macros and include qemu-options.def in order to generate different content. Move the bulk of the def'ing and undef'ing into a wrapper, this will make it cleaner when we add another macro in the next patch. AFAICS undefining GEN_DOCS services no purpose, but I've left it for now. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vl.c: Print the actual program name in help outputmichael@ozlabs.org2011-12-151-1/+1
| | | | | | | | | | | | | | | In help() we do what boils down to: printf("%s", "qemu"); This seems to be an artifact of be995c27640a82c7056b6f53d02ec823570114e5 ("removed unused code"), which removed some ifdef'ery that used to print a different name depending on CONFIG_SOFTMMU. Instead print the actual program name, originally from argv[0]. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* fix spelling in main directoryDong Xu Wang2011-12-021-1/+1
| | | | | Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* vl: Tighten parsing of -m argumentMarkus Armbruster2011-11-281-2/+3
| | | | | | | | | | strtosz_suffix() fails unless the size is followed by 0, whitespace or ','. Useless here, because we need to fail for any junk following the size, even if it starts with whitespace or ','. Check manually. Things like "-m 1024," are now caught. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vl: Tighten parsing of -numa's parameter memMarkus Armbruster2011-11-281-2/+2
| | | | | | | | | | | | | | | | strtosz_suffix() fails unless the size is followed by 0, whitespace or ','. Useless here, because we need to fail for any junk following the size, even if it starts with whitespace or ','. Check manually. Things like -smp 4 -numa "node,mem=1024,cpus=0-1" -numa "node,mem=1024 cpus=2-3" are now caught. Before, the second -numa's argument was silently interpreted as just "node,mem=1024". Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vl.c: prohibit simultaneous use of -icount with kvm or xenMax Filippov2011-11-111-0/+5
| | | | | | | | | | With -icount, The vm_clock is updated with help from TCG (it counts instructions at 2^ICOUNT ns/instructions). With KVM, the instruction count is not available so KVM cannot provide this help. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vl.c: Fail gracefully if no machine is foundAndreas Färber2011-11-111-0/+5
| | | | | | | | | | | | | machine defaults to find_default_machine(), then gets overridden via -M and machine_parse(). If no -M is specified and find_default_machine() returns NULL (when no machine compiled in), exit with an error. Avoids a segfault when setting machine->max_cpus. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud