summaryrefslogtreecommitdiffstats
path: root/vl.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell2014-09-231-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging # gpg: Signature made Mon 22 Sep 2014 12:41:59 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: (59 commits) block: Always compile virtio-blk dataplane vring: Better error handling if num is too large virtio: Import virtio_vring.h async: aio_context_new(): Handle event_notifier_init failure block: vhdx - fix reading beyond pointer during image creation block: delete cow block driver block/archipelago: Fix typo in qemu_archipelago_truncate() ahci: Add test_identify case to ahci-test. ahci: Add test_hba_enable to ahci-test. ahci: Add test_hba_spec to ahci-test. ahci: properly shadow the TFD register ahci: add test_pci_enable to ahci-test. ahci: Add test_pci_spec to ahci-test. ahci: MSI capability should be at 0x80, not 0x50. ahci: Adding basic functionality qtest. layout: Add generators for refcount table and blocks fuzz: Add fuzzing functions for entries of refcount table and blocks docs: List all image elements currently supported by the fuzzer qapi/block-core: Add "new" qcow2 options qcow2: Add overlap-check.template option ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * async: aio_context_new(): Handle event_notifier_init failureChrysostomos Nanakos2014-09-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a system with a low limit of open files the initialization of the event notifier could fail and QEMU exits without printing any error information to the user. The problem can be easily reproduced by enforcing a low limit of open files and start QEMU with enough I/O threads to hit this limit. The same problem raises, without the creation of I/O threads, while QEMU initializes the main event loop by enforcing an even lower limit of open files. This commit adds an error message on failure: # qemu [...] -object iothread,id=iothread0 -object iothread,id=iothread1 qemu: Failed to initialize event notifier: Too many open files in system Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | vl: Print maxmem in hex format for error messagezhanghailiang2014-09-201-11/+11
|/ | | | | | | | | | In error message, maxmem is printed in Dec but ram_size in Hex. It is better to print them in same format. Also use error_report instead of fprintf. Reviewed-By: Igor Mammedov <imammedo@redhat.com> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell2014-09-181-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pci, pc, virtio, misc bugfixes A bunch of bugfixes - some of these will make sense for 2.1.2 I put Cc: qemu-stable included where appropriate. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Thu 18 Sep 2014 19:52:18 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: pc: leave more space for BIOS allocations virtio-pci: fix migration for pci bus master vhost-user: fix VIRTIO_NET_F_MRG_RXBUF negotiation virtio-pci: enable bus master for old guests Revert "virtio: don't call device on !vm_running" virtio-net: drop assert on vm stop Revert "rng-egd: remove redundant free" qdev: Move global validation to a single function qdev: Rename qdev_prop_check_global() to qdev_prop_check_globals() test-qdev-global-props: Test handling of hotpluggable and non-device types test-qdev-global-props: Initialize not_used=true for all props test-qdev-global-props: Run tests on subprocess tests: disable global props test for old glib test-qdev-global-props: Trivial comment fix hw/machine: Free old values of string properties Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * qdev: Rename qdev_prop_check_global() to qdev_prop_check_globals()Eduardo Habkost2014-09-181-1/+1
| | | | | | | | | | | | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | cpu: init vmstate for ticks and clock offsetPavel Dovgalyuk2014-09-111-0/+1
| | | | | | | | | | | | | | | | | | | | Ticks and clock offset used by CPU timers have to be saved in vmstate. But vmstate for these fields registered only in icount mode. Missing registration leads to breaking the continuity when vmstate is loaded. This patch introduces new initialization function which fixes this. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | vl: use QLIST_FOREACH_SAFE to visit change state handlersPaolo Bonzini2014-09-101-2/+2
|/ | | | | | | This lets a handler delete itself. Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* machine: Clean up -machine handlingAndreas Färber2014-09-041-4/+4
| | | | | | | | | | Since commit c4090f8, -object options are no longer handled through object_set_property(), so clean up -object leftovers by renaming the function and dropping special-casing of qom-type and id properties. Cc: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell2014-09-021-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pci, pc fixes, features A bunch of bugfixes - these will make sense for 2.1.1 Initial Intel IOMMU support. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Tue 02 Sep 2014 16:05:04 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: vhost_net: start/stop guest notifiers properly pci: avoid losing config updates to MSI/MSIX cap regs virtio-net: don't run bh on vm stopped ioh3420: remove unused ioh3420_init() declaration vhost_net: cleanup start/stop condition intel-iommu: add IOTLB using hash table intel-iommu: add context-cache to cache context-entry intel-iommu: add supports for queued invalidation interface intel-iommu: fix coding style issues around in q35.c and machine.c intel-iommu: add Intel IOMMU emulation to q35 and add a machine option "iommu" as a switch intel-iommu: add DMAR table to ACPI tables intel-iommu: introduce Intel IOMMU (VT-d) emulation iommu: add is_write as a parameter to the translate function of MemoryRegionIOMMUOps Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * intel-iommu: add Intel IOMMU emulation to q35 and add a machine option ↵Le Tan2014-08-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "iommu" as a switch Add Intel IOMMU emulation to q35 chipset and expose it to the guest. 1. Add a machine option. Users can use "-machine iommu=on|off" in the command line to enable/disable Intel IOMMU. The default is off. 2. Accroding to the machine option, q35 will initialize the Intel IOMMU and use pci_setup_iommu() to setup q35_host_dma_iommu() as the IOMMU function for the pci bus. 3. q35_host_dma_iommu() will return different address space according to the bus_num and devfn of the device. Signed-off-by: Le Tan <tamlokveer@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | vl: process -object after other backend optionsPaolo Bonzini2014-08-261-5/+5
|/ | | | | | | | | | | QOM backends can refer to chardevs, but not vice versa. So process -chardev and -fsdev options before -object This fixes the rng-egd backend to virtio-rng. Reported-by: Amos Kong <akong@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* vl: free errHu Tao2014-08-151-0/+1
| | | | | | | | | err is not freed after use, thus causing memory leak. This patch fixes it. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Cc: qemu-trivial@nongnu.org Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* vl: don't use 'Yoda conditions'Gonglei2014-08-151-2/+3
| | | | | | | | imitate nearby code about using '!value' or 'value == NULL' Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* icount: Add align option to icountSebastian Tanase2014-08-061-0/+4
| | | | | | | | | The align option is used for activating the align algorithm in order to synchronise the host clock and the guest clock. Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr> Tested-by: Camille Bégué <camille.begue@openwide.fr> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* icount: Add QemuOpts for icountSebastian Tanase2014-08-061-7/+28
| | | | | | | | | Make icount parameter use QemuOpts style options in order to easily add other suboptions. Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr> Tested-by: Camille Bégué <camille.begue@openwide.fr> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* machine: Replace underscores in machine's property namesMarcel Apfelbaum2014-07-211-1/+11
| | | | | | | | | Replaced '_' with '-' to comply with QOM guidelines. Made the conversion from command line to QMP in vl.c. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* pc: fix qemu exiting with error when -m X < 128 with old machine typesIgor Mammedov2014-07-171-0/+1
| | | | | | | | | | | | | | | | | | If machine doesn't support memory hotplug then starting QEMU with initial memory less than default will make QEMU exit with following error message: $QEMU -m 16 -M isapc qemu-system-i386: "-memory 'slots|maxmem'" is not supported by: isapc Set maxram_size to initial memory value before parsing 'maxmem' option allows to keep maxmem in sync with initial memory size if no maxmem option was specified. Signed-off-by: Igor Mammedov <imammedo@redhat.com> CC: Bruce Rogers <brogers@suse.com> Reviewed-By: Bruce Rogers <brogers@suse.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' ↵Peter Maydell2014-07-011-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging Tracing pull request # gpg: Signature made Tue 01 Jul 2014 09:56:27 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/tracing-pull-request: trace: add qemu_system_powerdown_request and qemu_system_shutdown_request trace events Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * trace: add qemu_system_powerdown_request and qemu_system_shutdown_request ↵Yang Zhiyong2014-07-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trace events We have the experience that the guest doesn't stop successfully though it was instructed to shut down. The root cause may be not in QEMU mostly. However, QEMU is often suspected at the beginning just because the issue occurred in virtualization environment. Therefore, we need to affirm that QEMU received the shutdown request and raised ACPI irq from "virsh shutdown" command, virt-manger or stopping QEMU process to the VM . So that we can affirm the problems was belonged to the Guset OS rather than the QEMU itself. When we stop guests by "virsh shutdown" command or virt-manger, or stopping QEMU process, qemu_system_powerdown_request() or qemu_system_shutdown_request() is called. Then the below functions in main_loop_should_exit() of Vl.c are called roughly in the following order. if (qemu_powerdown_requested()) qemu_system_powerdown() monitor_protocol_event(QEVENT_POWERDOWN, NULL) OR if(qemu_shutdown_requested()} monitor_protocol_event(QEVENT_SHUTDOWN, NULL); The tracepoint of monitor_protocol_event() already exists, but no tracepoints are defined for qemu_system_powerdown_request() and qemu_system_shutdown_request(). So this patch adds two tracepoints for the two functions. We believe that it will become much easier to isolate the problem mentioned above by these tracepoints. Signed-off-by: Yang Zhiyong <yangzy.fnst@cn.fujitsu.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | memory: MemoryRegion: use /machine as default ownerPaolo Bonzini2014-07-011-2/+1
|/ | | | | | | This will be added (after QOMification) as the QOM parent. Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* numa: Keep track of NUMA nodes present on the command-lineEduardo Habkost2014-06-291-0/+3
| | | | | | | | | | | | | | | | | Based on "enable sparse node numbering" patch from Nishanth Aravamudan, but without the code to actually support sparse node IDs. This just adds the code to keep track of present/non-present nodes on the command-line, without changing any behavior. Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com> [Rename max_numa_node to max_numa_nodeid -Eduardo] [Initialize max_numa_nodeid to 0 -Eduardo] [Use MAX() macro when setting max_numa_nodeid -Eduardo] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20140623' ↵Peter Maydell2014-06-241-0/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging migration/next for 20140623 # gpg: Signature made Mon 23 Jun 2014 18:18:57 BST using RSA key ID 5872D723 # gpg: Can't check signature: public key not found * remotes/juanquintela/tags/migration/20140623: (22 commits) vmstate: Refactor & increase tests for primitive types vmstate: Return error in case of error migration: Remove unneeded minimum_version_id_old tests: vmstate static checker: add size mismatch inside substructure tests: vmstate static checker: add substructure for usb-kbd for hid section tests: vmstate static checker: remove Subsections tests: vmstate static checker: remove a subsection tests: vmstate static checker: remove Description inside Fields tests: vmstate static checker: remove Description tests: vmstate static checker: remove Fields tests: vmstate static checker: change description name tests: vmstate static checker: remove last field in a struct tests: vmstate static checker: remove a field tests: vmstate static checker: remove a section tests: vmstate static checker: minimum_version_id check tests: vmstate static checker: version mismatch inside a Description tests: vmstate static checker: add version error in main section tests: vmstate static checker: incompat machine types tests: vmstate static checker: add dump1 and dump2 files vmstate-static-checker: script to validate vmstate changes ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * migration: dump vmstate info as a json file for static analysisAmit Shah2014-06-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a new command, '-dump-vmstate', that takes a filename as an argument. When executed, QEMU will dump the vmstate information for the machine type it's invoked with to the file, and quit. The JSON-format output can then be used to compare the vmstate info for different QEMU versions, specifically to test whether live migration would break due to changes in the vmstate data. A Python script that compares the output of such JSON dumps is included in the following commit. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* | Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into stagingPeter Maydell2014-06-241-16/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/qmp-unstable/queue/qmp: (43 commits) monitor: protect event emission monitor: protect outbuf and mux_out with mutex qemu-char: make writes thread-safe qemu-char: move pty_chr_update_read_handler around qemu-char: do not call chr_write directly qemu-char: introduce qemu_chr_alloc qapi event: clean up qapi event: convert QUORUM events qapi event: convert GUEST_PANICKED qapi event: convert BALLOON_CHANGE qmp: convert ACPI_DEVICE_OST event qapi event: convert SPICE events qapi event: convert VNC events qapi event: convert NIC_RX_FILTER_CHANGED qapi event: convert other BLOCK_JOB events qapi event: convert BLOCK_IMAGE_CORRUPTED qapi event: convert BLOCK_IO_ERROR and BLOCK_JOB_ERROR qapi event: convert DEVICE_TRAY_MOVED qapi event: convert DEVICE_DELETED qapi event: convert WATCHDOG ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | qapi event: convert RTC_CHANGEWenchao Xia2014-06-231-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch also eliminates build time warning caused by no caller of monitor_qapi_event_throttle(). Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert WAKEUPWenchao Xia2014-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert SUSPENDWenchao Xia2014-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert RESUMEWenchao Xia2014-06-231-2/+2
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert RESETWenchao Xia2014-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert POWERDOWNWenchao Xia2014-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no existing comments for POWERDOWN in doc/qmp/qmp-events.txt, so no change on it like other conversion patch. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert SHUTDOWNWenchao Xia2014-06-231-1/+3
| |/ | | | | | | | | | | | | | | | | | | This patch also eliminates build time warning caused by QAPI_EVENT_MAX = 0. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell2014-06-241-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pc,pci,vhost,net fixes, enhancements Don's patches to limit below-4g ram for pc Marcel's pcie hotplug rewrite Gabriel's changes to e1000 auto-negotiation qemu char bugfixes by Stefan misc bugfixes Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 23 Jun 2014 16:25:19 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: (23 commits) xen-hvm: Handle machine opt max-ram-below-4g pc & q35: Add new machine opt max-ram-below-4g xen-hvm: Fix xen_hvm_init() to adjust pc memory layout pcie: coding style tweak hw/pcie: better hotplug/hotunplug support hw/pcie: implement power controller functionality hw/pcie: correct debug message q35: Use PC_Q35_COMPAT_1_4 on pc-q35-1.4 compat_props virtio-pci: Report an error when msix vectors init fails qemu-char: avoid leaking unused fds in tcp_get_msgfds() qemu-char: fix qemu_chr_fe_get_msgfd() qapi/string-output-visitor: fix human output e1000: factor out checking for auto-negotiation availability e1000: move e1000_autoneg_timer() to after set_ics() e1000: signal guest on successful link auto-negotiation e1000: improve auto-negotiation reporting via mii-tool e1000: emulate auto-negotiation during external link status change qtest: fix vhost-user-test unbalanced mutex locks qtest: fix qtest for vhost-user libqemustub: add more stubs for qemu-char ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | pc & q35: Add new machine opt max-ram-below-4gDon Slutz2014-06-231-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a pc & q35 only machine opt. If you add enough PCI devices then all mmio for them will not fit below 4G which may not be the layout the user wanted. This allows you to increase the below 4G address space that PCI devices can use (aka decrease ram below 4G) and therefore in more cases not have any mmio that is above 4G. For example using "-machine pc,max-ram-below-4g=2G" on the command line will limit the amount of ram that is below 4G to 2G. Note: this machine option cannot be used to increase the amount of ram below 4G. Signed-off-by: Don Slutz <dslutz@verizon.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> MST: fix 32 bit
* | tcg-ppc: Merge cache-utils into the backendRichard Henderson2014-06-231-3/+0
| | | | | | | | | | | | | | | | | | As a "utility", it only supported ppc, and in a way that other tcg backends provided directly in tcg-target.h. Removing this disparity is easier now that the two ppc backends are merged. Tested-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
* | qemu/osdep: Remove the need for qemu_init_auxvalRichard Henderson2014-06-231-1/+0
|/ | | | | | | | | Instead of getting backup auxv data from the env pointer given to main, read it from /proc/self/auxv. We can do this at any time, so we're not tied to any ordering wrt a call to qemu_init_auxval from main. Tested-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
* vl: allow other threads to do qemu_system_vmstop_requestPaolo Bonzini2014-06-231-31/+54
| | | | | | | | | | | | | | | | | | | There patch protects vmstop_requested with a lock and introduces qemu_system_vmstop_request_prepare. Together with the new call to qemu_vmstop_requested in vm_start, qemu_system_vmstop_request_prepare avoids a race where the VM could remain stopped even though the iostatus of a block device has already been set (for example). qemu_system_vmstop_request_prepare however also lets the caller thread delay observation of the state change until it has itself communicated that change to the user. This delay avoids any possibility of a wrong reordering of the BLOCK_IO_ERROR event and the subsequent STOP event. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* numa: use RAM_ADDR_FMT with ram_addr_tMichael S. Tsirkin2014-06-191-6/+6
| | | | | | | | | | | commit 4407ab055be995e64633322a78e64dfa376dc534 vl.c: extend -m option to support options for memory hotplug prints ram_addr_t with u64 format, this is wrong for some systems, in particular w32. print ram_addr_t with RAM_ADDR_FMT to fix build on w32. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* vl: redo -object parsingPaolo Bonzini2014-06-191-29/+36
| | | | | | | | | | | Follow the lines of the HMP implementation, using OptsVisitor to parse the options. This gives access to OptsVisitor's rich parsing of integer lists. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* numa: add -numa node,memdev= optionPaolo Bonzini2014-06-191-2/+2
| | | | | | | | | | | | | | | | | | | This option provides the infrastructure for binding guest NUMA nodes to host NUMA nodes. For example: -object memory-ram,size=1024M,policy=bind,host-nodes=0,id=ram-node0 \ -numa node,nodeid=0,cpus=0,memdev=ram-node0 \ -object memory-ram,size=1024M,policy=interleave,host-nodes=1-3,id=ram-node1 \ -numa node,nodeid=1,cpus=1,memdev=ram-node1 The option replaces "-numa node,mem=". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> MST: conflict resolution
* NUMA: convert -numa option to use OptsVisitorWanlong Gao2014-06-191-1/+10
| | | | | | | | | | | Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* NUMA: Add numa_info structure to contain numa nodes infoWanlong Gao2014-06-191-4/+3
| | | | | | | | | | | | | | | | Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> [Fix hw/ppc/spapr.c - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* NUMA: move numa related code to new file numa.cWanlong Gao2014-06-191-138/+1
| | | | | | | | | | | | | Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> MST: comment tweaks
* vl.c: extend -m option to support options for memory hotplugIgor Mammedov2014-06-191-0/+51
| | | | | | | | | | | | | | | Add following parameters: "slots" - total number of hotplug memory slots "maxmem" - maximum possible memory "slots" and "maxmem" should go in pair and "maxmem" should be greater than "mem" for memory hotplug to be enabled. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> MST: fix build on 32 bit
* vl.c: daemonize before guest memory allocationIgor Mammedov2014-06-181-2/+2
| | | | | | | | | | | | | | memory allocated for guest before QEMU is daemonized and then mapped later in guest's address space after it is daemonized, leads to EPT violation and QEMU aborts. To avoid this and similar issues switch to daemonized mode early before applying/processing other options. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* object_add: allow completion handler to get canonical pathIgor Mammedov2014-06-181-4/+5
| | | | | | | | | | | Add object to /objects before calling user_creatable_complete() handler, so that object might be able to call object_get_canonical_path() in its completion handler. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* blockdev: Rename drive_init(), drive_uninit() to drive_new(), drive_del()Markus Armbruster2014-06-161-2/+2
| | | | | | | | | "Init" and "uninit" suggest the functions don't allocate / free storage. But they do. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* trace: Multi-backend tracingLluís Vilanova2014-06-091-2/+2
| | | | | | | | | | | | | | | Adds support to compile QEMU with multiple tracing backends at the same time. For example, you can compile QEMU with: $ ./configure --enable-trace-backends=ftrace,dtrace Where 'ftrace' can be handy for having an in-flight record of events, and 'dtrace' can be later used to extract more information from the system. This patch allows having both available without recompiling QEMU. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell2014-06-051-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pc,pci,virtio,qdev fixes, tests new tests for SMBIOS SMBIOS fixes pc, pci fixes qdev patches stayed on list for a month with no review, as I told people on KVM forum I'm merging stuch patches if they look fine. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> * remotes/mst/tags/for_upstream: qdev: Add test of qdev_prop_check_global qdev: Display warning about unused -global tests: add smbios testing tests: rename acpi-test to bios-tables-test virtio-balloon: return empty data when no stats are available pcie_host: Turn pcie_host_init() into an instance_init SMBIOS: Fix type 17 field sizes SMBIOS: Update Type 0 struct generator for machines >= 2.1 SMBIOS: Fix endian-ness when populating multi-byte fields serial-pci: Set prog interface field of pci config to 16550 compatible Conflicts: include/hw/i386/pc.h [PMM: fixed trivial conflict in pc.h] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * qdev: Display warning about unused -globalDon Slutz2014-06-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can help a user understand why -global was ignored. For example: with "-vga cirrus"; "-global vga.vgamem_mb=16" is just ignored when "-global cirrus-vga.vgamem_mb=16" is not. This is currently clear when the wrong property is provided: out/x86_64-softmmu/qemu-system-x86_64 -global cirrus-vga.vram_size_mb=16 -monitor pty -vga cirrus char device redirected to /dev/pts/20 (label compat_monitor0) qemu-system-x86_64: Property '.vram_size_mb' not found Aborted (core dumped) vs out/x86_64-softmmu/qemu-system-x86_64 -global vga.vram_size_mb=16 -monitor pty -vga cirrus char device redirected to /dev/pts/20 (label compat_monitor0) VNC server running on `::1:5900' ^Cqemu: terminating on signal 2 Signed-off-by: Don Slutz <dslutz@verizon.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
* | machine: Make -machine opts properties of MachineStateMarcel Apfelbaum2014-05-281-3/+8
| | | | | | | | | | | | | | | | | | | | | | Make machine's QemuOpts QOM properties of /machine. The properties are automatically filled in. This opens the possibility to create opts per machine rather than global. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
OpenPOWER on IntegriCloud