History | View | Annotate | Download (105.2 kB)
Revert "vl: fix -hdachs/-hda argument order parsing issues"
This reverts commit 7764ae9671f1cd74227cf4404431dd5213799ef0.
Signed-off-by: malc <av1474@comtv.ru>
Revert "vga: add some optional CGA compatibility hacks"
This reverts commit 482f7bf86b43af9f6903c52726fedf82b28bf953.
Revert "i8259: add -no-spurious-interrupt-hack option"
This reverts commit f278d4947fff814dcde2ef2acad36d172ff8be35.
vga: add some optional CGA compatibility hacks
This patch adds some optional compatibility hacks (defaultdisabled) to allow Microport UNIX to function under qemu.
I've tried to structure it to be easy to add more hacks for otherold CGA programs, if anyone ever needs them....
i8259: add -no-spurious-interrupt-hack option
This patch provides a way to optionally suppress spurious interrupts,as a workaround for systems described below:
Some old operating systems do not handle spurious interrupts well,and qemu tends to generate them significantly more often than...
vl: fix -hdachs/-hda argument order parsing issues
Without this patch, the -hdachs argument had to occur eitherBEFORE the corresponding "-hda" option, or AFTER the plaindisk image name (if neither -hda nor -drive is used). Otherwiseit would effectively be ignored....
vl: Round argument of -m up to multiple of 8KiB
Partial pages make little sense and don't work. Ensure the RAM sizeis a multiple of any possible target's page size.
Fixes
$ qemu-system-x86_64 nodefaults -S -vnc :0 -m 0.8 qemu-system-x86_64: /work/armbru/qemu/exec.c:2255: register_subpage: Assertion `existing>mr->subpage || existing->mr == &io_mem_unassigned' failed....
Allow QEMUMachine to override reset sequencing
qemu_system_reset() function always performs the same basic actions onall machines. This includes running all the reset handler hooks,however the order in which these will run is not always easily predictable....
Adding seccomp calls to vl.c (v8)
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>---v1: - Full seccomp calls and data included in vl.c
v1 -> v2: - Full seccomp calls and data removed from vl.c and put into separate...
Command line support for seccomp with -sandbox (v8)
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>---v7 -> v8 - Parse options correctly (aliguori)
qmp: don't emit the RESET event on wakeup from S3
QEMU is basically using reset logic when waking up from S3. Thiscauses the QMP RESET event to be emitted, which is wrong. Also,the runstate checks done in reset are not necessary for S3 wakeup.
Fix this by untangling wakeup from reset logic and passing...
qmp: emit the WAKEUP event when the guest is put to run
Today, the WAKEUP event is emitted when a wakeup request is made.This could be the system_wakeup command, for example.
A better semantic would be to emit the event when the guest isalready running, as that's what matters in the end. This commit does...
qapi: add query-machines command
This provides the same output as -M ? but in a structured way.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'bonzini/scsi-next' into staging
vl.c: Exit QEMU early if no machine is found
We check whether the variable machine is NULL or not before accessingit. If machine is NULL, exit QEMU with an error, this can avoids asegfault error.
Markus Armbruster <armbru@redhat.com> adds that the segfault can be...
handle device help before accelerator set up
A command line device probe using just -device "?" gets processedafter qemu-kvm initializes the accelerator. If /dev/kvm is notpresent, the accelerator check will fail (kvm is defaulted to on),which causes libvirt to not be set up to handle qemu guests....
iscsi: Pick default initiator-name based on the name of the VM
This patch updates the iscsi layer to automatically pick a 'unique'initiator-name based on the name of the vm in case the user has not setan explicit iqn-name to use.
Create a new function qemu_get_vm_name() that returns the name of the VM,...
Fixes related to processing of qemu's -numa option
The -numa option to qemu is used to create [fake] numa nodesand expose them to the guest OS instance.
There are a couple of issues with the -numa option:
a) Max VCPU's that can be specified for a guest while using...
fips: fix build on !Linux
Commit 0f66998 makes -enable-fips conditional on Linux hosts but then uses itunconditionally in vl.c.
Fix this by moving the fips handling to os-posix.c and adding a condition.
Cc: Paul Moore <pmoore@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: disable VNC password authentication (security type 2) when in FIPS mode
FIPS 140-2 requires disabling certain ciphers, including DES, which is usedby VNC to obscure passwords when they are sent over the network. Thesolution for FIPS users is to disable the use of VNC password auth when the...
Support 'help' as a synonym for '?' in command line options
For command line options which permit '?' meaning 'please list thepermitted values', add support for 'help' as a synonym, by abstractingthe check out into a helper function.
This change means that in some cases where we were being lazy in...
Merge commit 'quintela/migration-next-v5' into staging
vl.c: Don't print errno after failed qemu_chr_new()
The qemu_chr_new() function doesn't set errno on failure, sodon't print strerror(errno) on the error handling path whendealing with the -serial, -parallel and -virtioconsole arguments.This avoids nonsensical error messages like:...
savevm: Live migration handlers register the struct directly
Notice that the live migration users never unregister, so no problemabout freeing the ops structure.
Signed-off-by: Juan Quintela <quintela@redhat.com>
block: Geometry and translation hints are now useless, purge them
There are two producers of these hints: drive_init() on behalf of-drive, and hd_geometry_guess().
The only consumer of the hint is hd_geometry_guess().
The callers of hd_geometry_guess() call it only when drive_init()...
vnc: add a more descriptive error message
Currently qemu outputs some low-level error in qemu-sockets.cwhen failed to start vnc server.eg. 'getaddrinfo(127.0.0.1,5902): Name or service not known'
Some libvirt users could not know what's happened with this...
qemu_find_file: check name as a straight path even if it has no '/'
Make qemu_find_file() check for the passed in name as a straightpathname even if it doesn't have any path separator character in it.This means that "-bios foo", "-dtb foo" etc will find a file 'foo'...
Allow machines to configure the QEMU_VERSION that's exposed via hardware
QEMU exposes its version to the guest's hardware and in some cases that is wrong(e.g. Windows prints messages about driver updates when you switchthe QEMU version).There is a new field now on the struct QEmuMachine, hw_version, which may...
do not include <libutil.h> needlessly or if it doesn't exist
<libutil.h> and <util.h> on *BSD (some have one, some another)were #included just for openpty() declaration. The only filewhere this function is actually used is qemu-char.c.
In vl.c and net/tap-bsd.c, none of functions declared in libutil.h...
qemu-option: qemu_opts_create(): use error_set()
This commit converts qemu_opts_create() from qerror_report() toerror_set().
Currently, most calls to qemu_opts_create() can't fail, so mostcallers don't need any changes.
The two cases where code checks for qemu_opts_create() erros are:...
Merge remote-tracking branch 'origin/master' into staging
vga: disable default VGA if appropriate -device is used
This is a partial revert of commits a369da5 (vga: improve VGA logic,committed 2012-01-22) and c5bd4f3 (vga: fix -nodefaults -device VGA,2012-01-24) which broke command-line option parsing in different ways....
implement -no-user-config command-line option (v3)
Changes v2 -> v3: - Rebase against latest qemu.git
Changes v1 -> v2: - Change 'userconfig' field/variables to bool instead of int - Coding style change
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>...
use inet_listen()/inet_connect() to support ipv6 migration
Use help functions in qemu-socket.c for tcp migration,which already support ipv6 addresses.
Currently errp will be set to UNDEFINED_ERROR when migration fails,qemu would output "migration failed: ...", and current user can...
vl.c: change 'defconfig' variable to bool (v2)
Changes v1 -> v2: - Actually change the variable type declaration to 'bool'
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
move code to read default config files to a separate function (v2)
Function added to arch_init.c because it depends on arch-specificsettings.
Changes v1 -> v2: - Move qemu_read_default_config_file() prototype to qemu-config.h
vl: drop is_suspended variable
Check for the RUN_STATE_SUSPENDED state instead.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
runstate: introduce suspended state
QEMU enters in this state when the guest suspends to ram (S3).
This is important so that HMP users and QMP clients can know thatthe guest is suspended. QMP also has an event for this, but eventsare not reliable and are limited (ie. a client can connect to QEMU...
Merge branch 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
qtest: add test framework
The idea behind qtest is pretty simple. Instead of executing a CPU via TCG orKVM, rely on an external process to send events to the device model that the CPUwould normally generate.
qtest presents itself as an accelerator. In addition, a new option is added to...
rtc: add -rtc clock=rt
This will let people use backwards-compatible semantics for devices thatwill be affected by the following patches.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
vl.c: fix '-cpu ?' segfault
Fix stupid copy&paste mistake at commitecf40beae7dcbb057d4f115207f9d8276832a774: 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>...
Merge remote-tracking branch 'sstabellini/saverestore-8' into staging
Set runstate to INMIGRATE earlier
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 initialization
Commit 1b71f7c14fab6f00c2680d4489fbee7baf796e4f moved MODULE_INIT_QOM toway before MODULE_INIT_MACHINE, thereby breaking assumptions made inspice-core.c which registered both a type initializer and a machineintializer....
qom: Register QOM infrastructure early
The constructors for QOM TYPE_INTERFACE were executed rather late invl.c's main(). Call them very early so that QOM can safely be used formachines and CPUs.
Signed-off-by: Andreas Färber <afaerber@suse.de>Cc: Anthony Liguori <anthony@codemonkey.ws>...
initialize CPU model list after handling -readconfig options
To properly load cpudefs using -readconfig, we have to callcpudef_init() after finishing the command-line option handling.
Consequently, the handling of "-cpu ?" has to be done after thecommand-line option handling loop, too....
arm: add device tree support
If compiled with CONFIG_FDT, allow user to specify a device tree file usingthe -dtb argument. If the machine supports it then the dtb will be loadedinto memory and passed to the kernel on boot.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>...
usb: Resolve warnings about unassigned bus on usb device creation
When creating an USB device the old way, there is no way to specify thetarget bus. Thus the warning issued by usb_create makes no sense andrather confuses our users.
Resolve this by passing a bus reference to the usbdevice_init handler...
vl.c: Avoid segfault when started with no arguments
Fix a bug (introduced in commit a0abe47) where a command line whichspecified no machine arguments (either explicitly or implicitly via-kernel &co) would result in a segfault because of a NULL pointerreturned from qemu_opts_find(qemu_find_opts("machine"), 0)....
suspend: add qmp events
Send qmp events on suspend and wakeup so libvirthas 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 infrastructure
This patch adds some infrastructure to handle suspend and resume toqemu. First there are two functions to switch state and second thereis a suspend notifier:
vl.c: Error locations for options using add_device_config()
These are -bt, -serial, -virtcon, -parallel, -debugcon, -usbdevice.Improves messages emitted via proper error reporting interfaces. Forinstance:
$ qemu-system-x86_64 -nodefaults -S -usb -usbdevice net:vlan=xxx...
gdbstub: Error locations for -gdb
Stash away the option argument with add_device_config(), so we stillhave its location when we get around to parsing it.
This doesn't improve any messages I can see just yet, but that'llchange shortly.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
vl.c: Increase width of machine name column in "-M ?" output
Increase the width of the column used for the machine name inthe "-M ?" output from 10 to 20 spaces. This fixes the formattingso it looks nice for architectures where a few of the machineshave overly long names. (Our current longest machine name is...
Make kernel, initrd and append be machine_opts
Make kernel, initrd, append be machine opts (ie -machine kernel=foo)with the old plain command line arguments as legacy/convenienceequivalents.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl: make find_default_machine externally visible
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
notifier: switch to QLIST
Notifiers do not need to access both ends of the list, and usinga QLIST also simplifies the API.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Make -machine/-enable-kvm options merge into a single list
Make the "machine" option list use list merging, so that multiple-machine arguments (and the -enable-kvm argument) all merge togetherinto a single list. Drop the calls to qemu_opts_reset() which meant...
Merge remote-tracking branch 'kwolf/for-anthony' into staging
qom: Unify type registration
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 wherenecessary and don't put a semicolon after the closing brace....
vl.c: Fix typo in variable name
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>
iSCSI: add configuration variables for iSCSI
This patch adds configuration variables for iSCSI to setinitiator-name to use when logging in to the target,which type of header-digest to negotiate with the targetand username and password for CHAP authentication....
s390x: fix qom-ification fall-out
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()
In some cases initializing the alarm timers can lead to non-negligableoverhead from programs that link against qemu-tool.o. At least,setting a max-resolution WinMM alarm timer via mm_start_timer() (the...
mc146818rtc: Use lost_tick_policy property
Allow to configure the MC146818 RTC via the new lost tick policyproperty 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>
Improve default machine options usability
So far we overwrite the machine options completely with defaults if noaccel=value is provided. More user friendly is to fill in onlyunspecified options. The new qemu_opts_set_defaults enables this.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
vga: fix -nodefaults -device VGA
Flag -nodefaults should also imply no VGA. This was broken ina369da5f31ddbdeb32a7f76622e480d3995fbb00.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
vga: improve VGA logic
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>...
kvm: x86: Establish IRQ0 override control
KVM is forced to disable the IRQ0 override when we run with in-kernelirqchip but without IRQ routing support of the kernel. Set the fwcfgvalue correspondingly. This aligns us with qemu-kvm.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hw/9pfs: Add support to use named socket for proxy FS
Add option to use named socket for communicating between proxy helperand qemu proxy FS. Access to socket can be given by using command lineoptions -u and -g.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>...
hw/9pfs: Add new proxy filesystem driver
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>...
hw/9pfs: Move opt validation to FsDriver callback
This remove all conditional code from common code path andmake opt validation a FSDriver callback.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Set numa topology for max_cpus
qemu-kvm passes numa/SRAT topology information for smp_cpus to SeaBIOS. HoweverSeaBIOS always expects to setup max_cpus number of SRAT cpu entries(MaxCountCPUs variable in build_srat function of Seabios). When qemu-kvm runs...
g_thread_init users: don't call it if glib >= 2.31
since commit f9b29ca03 included in release 2.31 (docs below say 2.32 butthat is not correct) and onwards g_thread_init is deprecated and callingit is not required:
http://developer.gnome.org/glib/unstable/glib-Deprecated-Thread-APIs.html#g-thread-init...
qdev: fix hotplug when no -device is specified
The peripheral[-anon] containers are initialized lazily but since they sit onsysbus, they can not be created after realize. This was causing an abort() tooccur during hotplug if no -device option was used....
vl.c: Move option generation logic into a wrapper file
In vl.c and qemu-options.h we define macros and include qemu-options.defin order to generate different content. Move the bulk of the def'ing andundef'ing into a wrapper, this will make it cleaner when we add another...
vl.c: In qemu -h output, only print options for the arch we are running as
Only print options in the help output that are accepted by our arch.This is less confusing for users and also for other programs thatconsume the help output.
The options affected are:...
vl.c: Print the actual program name in help output
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...
fix spelling in main directory
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 -numa's parameter mem
strtosz_suffix() fails unless the size is followed by 0, whitespace or','. Useless here, because we need to fail for any junk following thesize, even if it starts with whitespace or ','. Check manually.
Things like...
vl: Tighten parsing of -m argument
strtosz_suffix() fails unless the size is followed by 0, whitespace or','. Useless here, because we need to fail for any junk following thesize, even if it starts with whitespace or ','. Check manually.Things like "-m 1024," are now caught....
vl.c: prohibit simultaneous use of -icount with kvm or xen
With -icount, The vm_clock is updated with help from TCG (it countsinstructions at 2^ICOUNT ns/instructions). With KVM, the instructioncount is not available so KVM cannot provide this help.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>...
vl.c: Fail gracefully if no machine is found
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....
Clean up assertion in get_boot_devices_list()
g_strdup() can't fail, remove assertion. Assert its argument can't benull, because that's not obvious (add_boot_device_path() ensures it).
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu_timedate_diff() shouldn't modify its argument.
The caller of qemu_timedate_diff() does not expect that tm it passes tothe function will be modified, but mktime() is destructive and modifiesits argument. Pass a copy of tm to it and set tm_isdst so that mktime()...
vl.c: Guard against GThread double-initialization
GThread-ERROR **: GThread system may only be initialized once.aborting...
Making the g_thread_init() call in vl.c conditional resolves an abort onMac OS X, where coroutine-gthread.c seems to call it before vl.c....
Merge remote-tracking branch 'aneesh/for-upstream-7' into staging
hw/9pfs: Add synthetic file system support using 9p
This patch create a synthetic file system with mount tagv_synth when -virtfs_synth command line option is specifiedin qemu. The synthetic file system can be mounted in guestusing 9p using the below command line...
hw/9pfs: Read-only support for 9p export
A new fsdev parameter "readonly" is introduced to control accessing 9p export."readonly" can be used to specify the access type. By default "rw" accessis given to 9p export.
Drop qemu-objects.h from modules that don't require it
Previous commits dropped most qobjects usage from qemu modules(now they are a low level interface used by the QAPI). However,some modules still include the qemu-objects.h header file.
This commit drops qemu-objects.h from some of those modules...
simplify main loop functions
Provide a clean example of how to use the main loop in the tools.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-timer: use atexit for quit_timers
qemu-timer: move more stuff out of qemu-timer.c
main-loop: create main-loop.h
main-loop: create main-loop.c