summaryrefslogtreecommitdiffstats
path: root/qemu-config.c
Commit message (Collapse)AuthorAgeFilesLines
* PPC: e500: allow users to set the /compatible property via -machineAlexander Graf2012-06-241-0/+4
| | | | | | | | | | | Device trees usually have a node /compatible, which indicate which machine type we're looking at. For quick prototyping, it can be very useful to change the contents of that node via the command line. Thus, introduce a new option to -machine called dt_compatible, which when set changes the /compatible contents to its value. Signed-off-by: Alexander Graf <agraf@suse.de>
* dt: Add global option to set phandle start offsetAlexander Graf2012-06-241-0/+4
| | | | | | | | | If anyone outside of QEMU wants to mess with a QEMU generated device tree, he needs to know which range phandles are valid in. So let's expose a machine option that an external program can use to set the start allocate id for phandles in QEMU. Signed-off-by: Alexander Graf <agraf@suse.de>
* dt: Add -machine dumpdtb option to dump the current dtbAlexander Graf2012-06-241-0/+4
| | | | | | | | | | | | Now that we are dynamically creating the dtb, it's really useful to be able to dump the created blob for debugging. This patch implements a -machine dumpdtb=<file> option for e500 that dumps the dtb exactly in the form the guest would get it to disk. It can then be analyzed by dtc to get information about the guest configuration. Signed-off-by: Alexander Graf <agraf@suse.de>
* qemu-config: introduce qemu_find_opts_err()Luiz Capitulino2012-06-041-0/+5
| | | | | | | | | | This is like qemu_find_opts(), except that it takes an Error argument. This new function allows for a incremental conversion of code using qemu_find_opts(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
* qemu-config: find_list(): use error_set()Luiz Capitulino2012-06-041-7/+25
| | | | | | | | Note that qemu_find_opts() and qemu_config_parse() need to call error_report() to maintain their semantics on error. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
* qemu-option: qemu_opts_create(): use error_set()Luiz Capitulino2012-06-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | This commit converts qemu_opts_create() from qerror_report() to error_set(). Currently, most calls to qemu_opts_create() can't fail, so most callers don't need any changes. The two cases where code checks for qemu_opts_create() erros are: 1. Initialization code in vl.c. All of them print their own error messages directly to stderr, no need to pass the Error object 2. The functions opts_parse(), qemu_opts_from_qdict() and qemu_chr_parse_compat() make use of the error information and they can be called from HMP or QMP. In this case, to allow for incremental conversion, we propagate the error up using qerror_report_err(), which keeps the QError semantics Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
* arm: add device tree supportGrant Likely2012-03-021-0/+4
| | | | | | | | | | | 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>
* Make kernel, initrd and append be machine_optsPeter Maydell2012-02-221-0/+12
| | | | | | | | | 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>
* Make -machine/-enable-kvm options merge into a single listPeter Maydell2012-02-171-0/+1
| | | | | | | | | | | | | | 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 'qemu-kvm/uq/master' into stagingAnthony Liguori2012-02-151-0/+4
|\ | | | | | | | | | | | | * qemu-kvm/uq/master: apic: Fix legacy vmstate loading for KVM kvm: Implement kvm_irqchip_in_kernel like kvm_enabled kvm: Allow to set shadow MMU size
| * kvm: Allow to set shadow MMU sizeJan Kiszka2012-02-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Introduce the KVM-specific machine option kvm_shadow_mem. It allows to set a custom shadow MMU size for the virtual machine. This is useful for stress testing e.g. Only x86 supports this for now, but it is in principle a generic concept for all targets with shadow MMUs. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | iSCSI: add configuration variables for iSCSIRonnie Sahlberg2012-02-091-0/+27
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* kvm: Activate in-kernel irqchip supportJan Kiszka2012-01-191-0/+4
| | | | | | | | Make the basic in-kernel irqchip support selectable via -machine ...,kernel_irqchip=on. Leave it off by default until it can fully replace user space models. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
* hw/9pfs: Add support to use named socket for proxy FSM. Mohan Kumar2012-01-041-0/+7
| | | | | | | | | 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-0/+6
| | | | | | | | | | | 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>
* block: add -drive copy-on-read=on|offStefan Hajnoczi2011-12-051-0/+4
| | | | | | | | | | | | | This patch adds the -drive copy-on-read=on|off command-line option: copy-on-read=on|off copy-on-read is "on" or "off" and enables whether to copy read backing file sectors into the image file. Copy-on-read avoids accessing the same backing file sectors repeatedly and is useful when the backing file is over a slow network. By default copy-on-read is off. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: add the blockio limits command line supportZhi Yong Wu2011-12-051-0/+24
| | | | | | Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* hw/9pfs: Read-only support for 9p exportM. Mohan Kumar2011-10-311-0/+7
| | | | | | | | | A new fsdev parameter "readonly" is introduced to control accessing 9p export. "readonly" can be used to specify the access type. By default "rw" access is given to 9p export. 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: Rename fstype to fsdriver to make it consistent across VirtFS codeAneesh Kumar K.V2011-10-151-4/+4
| | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Add new virtfs option writeout=immediate skip host page cacheAneesh Kumar K.V2011-10-121-0/+6
| | | | | | | writeout=immediate implies the after pwritev we do a sync_file_range. Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* trace: add "-trace events" argument to control initial stateLluís2011-09-011-0/+3
| | | | | | | | | | | The "-trace events" argument can be used to provide a file with a list of trace event names that will be enabled prior to starting execution, thus providing early tracing. This saves the user from manually toggling event states through the monitor interface or whichever backend-specific interface. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
* trace: avoid conditional code compilation during option parsingLluís2011-09-011-4/+0
| | | | | | | | A default implementation for backend-specific routines is provided in "trace/default.c", which backends can override by setting "trace_default=no" in "configure". Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
* trace: [configure] rename CONFIG_*_TRACE into CONFIG_TRACE_*Lluís2011-09-011-2/+2
| | | | | | | | | | | Provides a more hierarchical view of the variable domain. Also adds the CONFIG_TRACE_* variables for all backends. [Stefan added missing 'test' in stap if statement] Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* block: add cache=directsync parameter to -driveStefan Hajnoczi2011-08-231-1/+2
| | | | | | | | | | | | | | | | This patch adds -drive cache=directsync for O_DIRECT | O_SYNC host file I/O with no disk write cache presented to the guest. This mode is useful when guests may not be sending flushes when appropriate and therefore leave data at risk in case of power failure. When cache=directsync is used, write operations are only completed to the guest when data is safely on disk. This new mode is like cache=writethrough but it bypasses the host page cache. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* showing a splash picture when startwayne2011-07-291-0/+27
| | | | | | | | | | | | | | | Added options to let qemu transfer two configuration files to bios: "bootsplash.bmp" and "etc/boot-menu-wait", which could be specified by command -boot splash=P,splash-time=T P is jpg/bmp file name or an absolute path, T have a max value of 0xffff, unit is ms. With these two options, if user invoke qemu with menu=on option, then a splash picture would be showed in a given time. For example: qemu -boot menu=on,splash=/root/boot.bmp,splash-time=5000 would make boot.bmp shown as a brand with 5 seconds in the booting up process. This feature need the new seabios's support, which could be got from git. Signed-off-by: Wayne Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Generalize -machine command line optionJan Kiszka2011-07-231-0/+5
| | | | | | | | | | | | | | | -machine somehow suggests that it selects the machine, but it doesn't. Fix that before this command is set in stone. Actually, -machine should supersede -M and allow to introduce arbitrary per-machine options to the command line. That will change the internal realization again, but we will be able to keep the user interface stable. Tested-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-config: Document -drive optionsLuiz Capitulino2011-07-191-0/+6
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-config: comment spell fixGerd Hoffmann2011-06-061-3/+3
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: add SASL supportMarc-André Lureau2011-06-061-0/+3
| | | | | | | | | | | | | | | | | | | | | Turn on SASL support by appending "sasl" to the spice arguments, which requires that the client use SASL to authenticate with the spice. The exact choice of authentication method used is controlled from the system / user's SASL configuration file for the 'qemu' service. This is typically found in /etc/sasl2/qemu.conf. If running QEMU as an unprivileged user, an environment variable SASL_CONF_PATH can be used to make it search alternate locations for the service config. While some SASL auth methods can also provide data encryption (eg GSSAPI), it is recommended that SASL always be combined with the 'tls' and 'x509' settings to enable use of SSL and server certificates. This ensures a data encryption preventing compromise of authentication credentials. It requires support from spice 0.8.1. [ kraxel: moved spell fix to separate commit ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: add option for disabling copy paste supportHans de Goede2011-06-061-0/+3
| | | | | | | Some people want to be able disable spice's guest <-> client copy paste support because of security considerations. [ kraxel: drop old-version error message ]
* Introduce -machine command option.Anthony PERARD2011-05-081-0/+14
| | | | | | | | | | | | | | | | | | | This option gives the ability to switch one "accelerator" like kvm, xen or the default one tcg. We can specify more than one accelerator by separate them by a colon. QEMU will try each one and use the first whose works. So, ./qemu -machine accel=xen:kvm:tcg which would try Xen support first, then KVM and finally TCG if none of the other works. By default, QEMU will use TCG. But we can specify another default in the global configuration file. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* Remove unused sysemu.h include directivesBlue Swirl2011-04-151-1/+0
| | | | | | | Remove unused sysemu.h include directives to speed up build with the following patches. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* spice: add chardev (v5)Alon Levy2011-01-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adding a chardev backend for spice, where spice determines what to do with it based on the name attribute given during chardev creation. For usage by spice vdagent in conjunction with a properly named virtio-serial device, and future smartcard channel usage. Example usage: qemu -device virtio-serial -chardev spicevmc,name=vdagent,id=vdagent \ -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 v4->v5: * add tracing events * fix missing comma * fix help string to show debug is optional v3->v4: * updated commit message v1->v3 changes: (v2 had a wrong commit message) * removed spice-qemu-char.h, folded into ui/qemu-spice.h * removed dead IOCTL code * removed comment * removed ifdef CONFIG_SPICE from qemu-config.c and qemu-options.hx help. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Add bootindex for option roms.Gleb Natapov2010-12-111-0/+17
| | | | | | | Extend -option-rom command to have additional parameter ,bootindex=. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* spice: add misc config optionsGerd Hoffmann2010-10-081-0/+9
| | | | | This patch adds a few more options to tweak spice server behavior. The documentation update chunk has the details ;)
* spice: add config options for the listening addressGerd Hoffmann2010-10-081-0/+9
| | | | | Make listening address configurable. Also add options to force using IPv4 or IPv6.
* spice: add config options for channel security.Gerd Hoffmann2010-10-081-0/+6
| | | | | | | This allows to enforce tls or plaintext usage for certain spice channels. [ v2: code style fixup ]
* spice: make compression configurable.Yonit Halperin2010-10-081-0/+9
| | | | | | | This patch adds options to the -spice command line switch to configure image compression. [ v2: speling fix in the documentation ]
* spice: tls supportGerd Hoffmann2010-10-081-0/+24
| | | | Add options to the -spice command line switch to setup tls.
* Merge remote branch 'spice/submit.6' into stagingAnthony Liguori2010-10-051-0/+18
|\ | | | | | | | | | | | | Conflicts: configure Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * spice: core bitsGerd Hoffmann2010-09-211-0/+18
| | | | | | | | | | | | Add -spice command line switch. Has support setting passwd and port for now. With this patch applied the spice client can successfully connect to qemu. You can't do anything useful yet though.
* | Add option to turn on JSON pretty printing in monitorDaniel P. Berrange2010-10-011-0/+3
|/ | | | | | | | Expaned '-mon' arg to allow a 'pretty=on' flag. This makes the monitor pretty print its replies to easy human debugging / reading Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* trace: Add trace file name command-line optionPrerna Saxena2010-09-091-0/+18
| | | | | | | | | | | | This patch adds an optional command line switch '-trace' to specify the filename to write traces to, when qemu starts. Eg, If compiled with the 'simple' trace backend, [temp@system]$ qemu -trace FILENAME IMAGE Allows the binary traces to be written to FILENAME instead of the option set at config-time. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Fix repeated typo: was "end if list" instead of "end of list"Jes Sorensen2010-09-041-6/+6
| | | | | Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* QemuOpts: make most qemu_*_opts staticGerd Hoffmann2010-08-221-13/+9
| | | | | | | | Switch tree to lookup-by-name using qemu_find_opts(). Also hook up virtfs options so qemu_find_opts works for them too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QemuOpts: allow new option groups be registered at runtime.Gerd Hoffmann2010-08-221-1/+17
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* rtc: Remove TARGET_I386 from qemu-config.c, enables driftfixAmit Shah2010-08-191-2/+0
| | | | | | | | | qemu-config.c doesn't contain any target-specific code, and the TARGET_I386 conditional code didn't get compiled as a result. Removing this enables the driftfix parameter for rtc. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-9p: Introduces an option to specify the security model.Venkateswararao Jujjuri (JV)2010-06-221-0/+6
| | | | | | | | | | | | | | | The new option is: -fsdev fstype,id=myid,path=/share_path/,security_model=[mapped|passthrough] -virtfs fstype,path=/share_path/,security_model=[mapped|passthrough],mnt_tag=tag In the case of mapped security model, files are created with QEMU user credentials and the client-user's credentials are saved in extended attributes. Whereas in the case of passthrough security model, files on the filesystem are directly created with client-user's credentials. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add cache=unsafe parameter to -driveAlexander Graf2010-05-261-1/+1
| | | | | | | | | | | | | | | Usually the guest can tell the host to flush data to disk. In some cases we don't want to flush though, but try to keep everything in cache. So let's add a new cache value to -drive that allows us to set the cache policy to most aggressive, disabling flushes. We call this mode "unsafe", as guest data is not guaranteed to survive host crashes anymore. This patch also adds a noop function for aio, so we can do nothing in AIO fashion. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Fix error handling in qemu_read_config_fileKevin Wolf2010-05-241-4/+8
| | | | | | | | | | We need to close the file even in error case. While at it, make the callers catch all kind of errors. ENOENT is allowed for default config files, they are optional. Reported-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud