summaryrefslogtreecommitdiff
path: root/include/sysemu
AgeCommit message (Collapse)AuthorFilesLines
2014-03-13Fix vga_interface_type for command line argument '-device VGA'Mark Wu1-1/+1
Some machine (like pseries) initialization code determines if it has graphics according to vga_interface_type. In the original code, vga_interface_type is evaluated to VGA_NONE even if a VGA is added via '-device VGA'. It causes the machine not aware of the graphics device configured. Add a new VGA device type to indicate that it has a VGA device, which will be initialized in QOM device initialization. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell1-0/+30
staging Block pull request # gpg: Signature made Thu 13 Mar 2014 13:50:49 GMT using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: (24 commits) block/raw-win32: bdrv_parse_filename() for hdev block/raw-posix: Strip protocol prefix on creation block/raw-posix: bdrv_parse_filename() for cdrom block/raw-posix: bdrv_parse_filename() for floppy block/raw-posix: bdrv_parse_filename() for hdev qemu-io: Fix warnings from static code analysis block: Unlink temporary file qcow2: Don't write with BDRV_O_INCOMING qcow2: Keep option in qcow2_invalidate_cache() qmp: add query-iothreads command iothread: stash thread ID away dataplane: replace internal thread with IOThread iothread: add "iothread" qdev property type qdev: make get_pointer() handle temporary strings iothread: add I/O thread object aio: add aio_context_acquire() and aio_context_release() rfifolock: add recursive FIFO lock object: add object_get_canonical_path_component() block: Rewrite the snapshot authorization mechanism for block filters. iotests: Test corruption during COW request ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-13iothread: add I/O thread objectStefan Hajnoczi1-0/+30
This is a stand-in for Michael Roth's QContext. I expect this to be replaced once QContext is completed. The IOThread object is an AioContext event loop thread. This patch adds the concept of multiple event loop threads, allowing users to define them. When SMP guests run on SMP hosts it makes sense to instantiate multiple IOThreads. This spreads event loop processing across multiple cores. Note that additional patches are required to actually bind a device to an IOThread. [Andreas Färber <afaerber@suse.de> pointed out that the embedded parent object instance should be called "parent_obj" and have a newline afterwards. This patch has been changed to reflect this. -- Stefan] Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13Revert "KVM: Split QEMUMachine typedef into separate header"Andreas Färber3-18/+0
This reverts commit 9c06a1f79f959fffd09bfb7efc3d76051a6cd2da. The new header sysemu/qemumachine.h is undesired. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-05kvm: Add a new machine option kvm-typeAneesh Kumar K.V2-2/+2
Targets like ppc64 support different types of KVM, one which use hypervisor mode and the other which doesn't. Add a new machine option kvm-type that helps in selecting the respective ones We also add a new QEMUMachine callback get_vm_type that helps in mapping the string representation of kvm type specified. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> [agraf: spelling fixes, use error_report(), use qemumachine.h] Signed-off-by: Alexander Graf <agraf@suse.de>
2014-03-05KVM: Split QEMUMachine typedef into separate headerAlexander Graf3-0/+18
Older gcc versions (such as the one in SLES11) get confused when you declare a typedef on the same struct twice. To work around that limitation, let's extract the QEMUMachine typedef into a separate header file that is guarded by preprocessor duplicate include checks. This fixes the following type of compile errors for me: In file included from vl.c:125: include/hw/xen/xen.h:39: error: redefinition of typedef "QEMUMachine" include/sysemu/kvm.h:155: error: previous declaration of "QEMUMachine" was here Signed-off-by: Alexander Graf <agraf@suse.de>
2014-03-04Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into stagingPeter Maydell1-0/+138
* remotes/qmp-unstable/queue/qmp: (32 commits) qapi: Add missing null check to opts_start_struct() qapi: Clean up superfluous null check in qapi_dealloc_type_str() qapi: Clean up null checking in generated visitors qapi: Drop unused code in qapi-commands.py qapi: Drop nonsensical header guard in generated qapi-visit.c qapi: Fix licensing of scripts tests/qapi-schema: Cover flat union types tests/qapi-schema: Cover union types with base tests/qapi-schema: Cover complex types with base tests/qapi-schema: Cover anonymous union types tests/qapi-schema: Cover simple argument types tests/qapi-schema: Cover optional command arguments tests/qapi-schema: Actually check successful QMP command response monitor: Remove left-over code in do_info_profile. qerror: Improve QERR_DEVICE_NOT_ACTIVE message qmp: Check for returned data from __json_read in get_events dump: add 'query-dump-guest-memory-capability' command Define the architecture for compressed dump format dump: make kdump-compressed format available for 'dump-guest-memory' dump: add API to write dump pages ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-04Merge remote-tracking branch 'remotes/mcayland/qemu-sparc' into stagingPeter Maydell1-0/+1
* remotes/mcayland/qemu-sparc: sun4m: Add Sun CG3 framebuffer initialisation function sun4m: Add Sun CG3 framebuffer and corresponding OpenBIOS FCode ROM sun4m: fix slavio timer RUN/STOP bit sun4m: Set HostID in NVRAM Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-28dump: add API to write dump pagesqiaonuohan1-0/+7
functions are used to write page to vmcore. vmcore is written page by page. page desc is used to store the information of a page, including a page's size, offset, compression format, etc. Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-02-28dump: add APIs to operate DataCacheqiaonuohan1-0/+9
DataCache is used to store data temporarily, then the data will be written to vmcore. These functions will be called later when writing data of page to vmcore. Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-02-28dump: add API to write dump_bitmapqiaonuohan1-0/+2
functions are used to write 1st and 2nd dump_bitmap of kdump-compressed format, which is used to indicate whether the corresponded page is existed in vmcore. 1st and 2nd dump_bitmap are same, because dump level is specified to 1 here. Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-02-28dump: add API to write dump headerqiaonuohan1-0/+96
the functions are used to write header of kdump-compressed format to vmcore. Header of kdump-compressed format includes: 1. common header: DiskDumpHeader32 / DiskDumpHeader64 2. sub header: KdumpSubHeader32 / KdumpSubHeader64 3. extra information: only elf notes here Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-02-28dump: add members to DumpState and init some of themqiaonuohan1-0/+7
add some members to DumpState that will be used in writing vmcore in kdump-compressed format. some of them, like page_size, will be initialized in the patch. Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-02-28dump: add API to write header of flatten formatqiaonuohan1-0/+17
flatten format will be used when writing kdump-compressed format. The format is also used by makedumpfile, you can refer to the following URL to get more detailed information about flatten format of kdump-compressed format: http://sourceforge.net/projects/makedumpfile/ The two functions here are used to write start flat header and end flat header to vmcore, and they will be called later when flatten format is used. struct MakedumpfileHeader stored at the head of vmcore is used to indicate the vmcore is in flatten format. struct MakedumpfileHeader { char signature[16]; /* = "makedumpfile" */ int64_t type; /* = 1 */ int64_t version; /* = 1 */ }; And struct MakedumpfileDataHeader, with offset and buf_size set to -1, is used to indicate the end of vmcore in flatten format. struct MakedumpfileDataHeader { int64_t offset; /* = -1 */ int64_t buf_size; /* = -1 */ }; Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-02-27sun4m: Add Sun CG3 framebuffer initialisation functionMark Cave-Ayland1-0/+1
In order to allow the user to choose the framebuffer for sparc-softmmu, add -vga tcx and -vga cg3 options to the QEMU command line. If no option is specified, the default TCX framebuffer is used. Since proprietary FCode ROMs use a resolution of 1152x900, slightly relax the validation rules to allow both displays to be initiated at the higher resolution used by these ROMs upon request (OpenBIOS FCode ROMs default to the normal QEMU sun4m default resolution of 1024x768). Finally move any fprintf(stderr ...) statements in the areas affected by this patch over to the new error_report() function. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Blue Swirl <blauwirbel@gmail.com> CC: Anthony Liguori <aliguori@amazon.com> CC: Peter Maydell <peter.maydell@linaro.org> CC: Bob Breuer <breuerr@mc.net> CC: Artyom Tarasenko <atar4qemu@gmail.com>
2014-02-26kvm: Common device control API functionsChristoffer Dall1-0/+22
Introduces two simple functions: int kvm_device_ioctl(int fd, int type, ...); int kvm_create_device(KVMState *s, uint64_t type, bool test); These functions wrap the basic ioctl-based interactions with KVM in a way similar to other KVM ioctl wrappers. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Message-id: 1392687720-26806-4-git-send-email-christoffer.dall@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-26kvm: Introduce kvm_arch_irqchip_createChristoffer Dall1-0/+12
Introduce kvm_arch_irqchip_create an arch-specific hook in preparation for architecture-specific use of the device control API to create IRQ chips. Following patches will implement the ARM irqchip create method to prefer the device control API over the older KVM_CREATE_IRQCHIP API. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Message-id: 1392687720-26806-3-git-send-email-christoffer.dall@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-14qtest: Don't segfault with invalid -qtest optionFam Zheng1-1/+2
This prints an error message, instead of core dump, when "-qtest" option value is invalid, e.g.: $ ./x86_64-softmmu/qemu-system-x86_64 -qtest unknown qemu-system-x86_64: Failed to initialize device for qtest: "unknown" Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-13qtest: don't report signals if qtest driver enabledMichael S. Tsirkin1-0/+2
qtest driver always uses signals to kill qemu no need to report it, whatever the accelerator state. Add API to detect qtest driver, and suppress reporting signals in this case. Reported-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-01-28virtio_rng: replace custom backend API with UserCreatable.complete() callbackIgor Mammedov1-11/+0
in addition fix default backend leak by releasing it if its initialization failed. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-12-20device_tree: qemu_fdt_setprop: Rename val_array argPeter Crosthwaite1-1/+1
Looking at the implementation, this doesn't really have a lot to do with arrays. Its just a pointer to a buffer and is passed through to the wrapped fn (qemu_fdt_setprop) unchanged. So rename to make it consistent with libfdt, which in the wrapped function just calls it "val". Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-12-20device_tree: s/qemu_devtree/qemu_fdt globallyPeter Crosthwaite1-40/+40
The qemu_devtree API is a wrapper around the fdt_ set of APIs. Rename accordingly. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [agraf: also convert hw/arm/virt.c] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-12-16char: add qemu_chr_fe_event()Marc-André Lureau1-0/+10
Teach the chardev frontend to send event. This is used by the Spice port chardev currently. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-16qmp_change_blockdev() remove unused has_formatMarc-André Lureau1-1/+1
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-10qtest: split configuration of qtest accelerator and chardevPaolo Bonzini1-20/+5
qtest uses the icount infrastructure to implement a test-driven vm_clock. This however is not necessary when using -qtest as a "probe" together with a normal TCG-, KVM- or Xen-based virtual machine. Hence, split out the call to configure_icount into a new function that is called only for "-machine accel=qtest"; and disable those commands when running with an accelerator other than qtest. This also fixes an assertion failure with "qemu-system-x86_64 -machine accel=qtest" but no -qtest option. This is a valid case, albeit somewhat weird; nothing will happen in the VM but you'll still be able to interact with the monitor or the GUI. Now that qtest_init is not limited to an int(void) function, change global variables that are not used outside qtest_init to arguments. And finally, cleanup useless parts of include/sysemu/qtest.h. The file is not used at all for user-only emulation, and qtest is not available on Win32 due to its usage of sigwait. Reported-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-11-14qmp: access the local QemuOptsLists for drive optionAmos Kong1-0/+2
Currently we have three QemuOptsList (qemu_common_drive_opts, qemu_legacy_drive_opts, and qemu_drive_opts), only qemu_drive_opts is added to vm_config_groups[]. This patch changes query-command-line-options to access three local QemuOptsLists for drive option, and merge the description items together. Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-10-11blockdev: Introduce DriveInfo.enable_auto_delKevin Wolf1-0/+1
BlockDriverStates shouldn't be affected by an unplugged guest device, except if created with the legacy -drive command line option or the drive_add HMP command. Make the automatic deletion as well as cancelling of jobs conditional on an enable_auto_del boolean that is only set in drive_init(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
2013-10-10Merge remote-tracking branch 'amit/char-remove-watch-on-unplug' into stagingAnthony Liguori1-0/+1
# By Amit Shah # Via Amit Shah * amit/char-remove-watch-on-unplug: char: remove watch callback on chardev detach from frontend char: use common function to disable callbacks on chardev close char: move backends' io watch tag to CharDriverState Message-id: 20131004154802.GA25646@grmbl.mre Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-09-30Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori2-1/+2
pc,pci,virtio fixes and cleanups This includes pc and pci cleanups and enhancements, and a virtio-net bugfix related to softmac programming. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Sun 29 Sep 2013 01:51:16 AM CDT using RSA key ID D28D5469 # gpg: Can't check signature: public key not found # By Michael S. Tsirkin (8) and others # Via Michael S. Tsirkin * mst/tags/for_anthony: smbios: Factor out smbios_maybe_add_str() smbios: Make multiple -smbios type= accumulate sanely smbios: Improve diagnostics for conflicting entries smbios: Convert to QemuOpts smbios: Normalize smbios_entry_add()'s error handling to exit(1) virtio-net: fix up HMP NIC info string on reset pci: remove explicit check to 64K ioport size piix4: disable io on reset piix: use 64 bit window programmed by guest q35: use 64 bit window programmed by guest pci: add helper to retrieve the 64-bit range range: add min/max operations on ranges range: add Range to typedefs q35: make pci window address/size match guest cfg Message-id: 1380437951-21788-1-git-send-email-mst@redhat.com
2013-09-28smbios: Make multiple -smbios type= accumulate sanelyMarkus Armbruster1-0/+1
Currently, -smbios type=T,NAME=VAL,... adds one field (T,NAME) with value VAL to fw_cfg for each unique NAME. If NAME occurs multiple times, the last one's VAL is used (before the QemuOpts conversion, the first one was used). Multiple -smbios can add multiple fields with the same (T, NAME). SeaBIOS reads all of them from fw_cfg, but uses only the first field (T, NAME). The others are ignored. "First one wins, subsequent ones get ignored silently" isn't nice. We commonly let the last option win. Useful, because it lets you -readconfig first, then selectively override with command line options. Clean up -smbios to work the common way. Accumulate the settings, with later ones overwriting earlier ones. Put the result into fw_cfg (no more useless duplicates). Bonus cleanup: qemu_uuid_parse() no longer sets SMBIOS system uuid by side effect. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-09-28smbios: Convert to QemuOptsMarkus Armbruster1-1/+1
So that it can be set in config file for -readconfig. This tightens parsing of -smbios, and makes it more consistent with other options: unknown parameters are rejected, numbers with trailing junk are rejected, when a parameter is given multiple times, last rather than first wins, ... MST: drop one chunk to fix build errors Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-09-25qemu: Adjust qemu wakeupLiu, Jinsong1-1/+3
Currently Xen hvm s3 has a bug coming from the difference between qemu-traditioanl and qemu-xen. For qemu-traditional, the way to resume from hvm s3 is via 'xl trigger' command. However, for qemu-xen, the way to resume from hvm s3 inherited from standard qemu, i.e. via QMP, and it doesn't work under Xen. The root cause is, for qemu-xen, 'xl trigger' command didn't reset devices, while QMP didn't unpause hvm domain though they did qemu system reset. We have two qemu patches and one xl patch to fix Xen hvm s3 bug. This patch is the qemu patch 1. It adjusts qemu wakeup so that Xen s3 resume logic (which will be implemented at qemu patch 2) will be notified after qemu system reset. Signed-off-by: Liu Jinsong <jinsong.liu@intel.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
2013-09-23Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori1-10/+19
# By Alexey Kardashevskiy (3) and others # Via Paolo Bonzini * qemu-kvm/uq/master: target-i386: add feature kvm_pv_unhalt linux-headers: update to 3.12-rc1 target-i386: forward CPUID cache leaves when -cpu host is used linux-headers: update to 3.11 kvm: fix traces to use %x instead of %d kvmvapic: Clear also physical ROM address when entering INACTIVE state kvmvapic: Enter inactive state on hardware reset kvmvapic: Catch invalid ROM size kvm irqfd: support direct msimessage to irq translation fix steal time MSR vmsd callback to proper opaque type kvm: warn if num cpus is greater than num recommended cpu: Move cpu state syncs up into cpu_dump_state() exec: always use MADV_DONTFORK Message-id: 1379694292-1601-1-git-send-email-pbonzini@redhat.com
2013-09-20kvm irqfd: support direct msimessage to irq translationAlexey Kardashevskiy1-0/+9
On PPC64 systems MSI Messages are translated to system IRQ in a PCI host bridge. This is already supported for emulated MSI/MSIX but not for irqfd where the current QEMU allocates IRQ numbers from irqchip and maps MSIMessages to IRQ in the host kernel. This adds a new direct mapping flag which tells the kvm_irqchip_add_msi_route() function that a new VIRQ should not be allocated, instead the value from MSIMessage::data should be used. It is up to the platform code to make sure that this contains a valid IRQ number as sPAPR does in spapr_pci.c. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-09-20cpu: Move cpu state syncs up into cpu_dump_state()James Hogan1-10/+10
The x86 and ppc targets call cpu_synchronize_state() from their *_cpu_dump_state() callbacks to ensure that up to date state is dumped when KVM is enabled (for example when a KVM internal error occurs). Move this call up into the generic cpu_dump_state() function so that other KVM targets (namely MIPS) can take advantage of it. This requires kvm_cpu_synchronize_state() and cpu_synchronize_state() to be moved out of the #ifdef NEED_CPU_H in <sysemu/kvm.h> so that they're accessible to qom/cpu.c. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Andreas Färber <afaerber@suse.de> Cc: Alexander Graf <agraf@suse.de> Cc: Gleb Natapov <gleb@redhat.com> Cc: qemu-ppc@nongnu.org Cc: kvm@vger.kernel.org Signed-off-by: Gleb Natapov <gleb@redhat.com>
2013-09-17Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori1-0/+2
# By Peter Lieven (3) and others # Via Paolo Bonzini * bonzini/scsi-next: spapr-vscsi: Report error on unsupported MAD requests spapr-vscsi: Adding VSCSI capabilities iscsi: split discard requests in multiple parts iscsi: add .bdrv_get_block_status iscsi: add logical block provisioning information to iscsilun hw/scsi/lsi53c895a: Use deposit32 rather than handcoded shift/mask hw/scsi/lsi53c895a: Use sextract32 for sign-extension scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial virtio-scsi: Make type virtio-scsi-common abstract spapr-vscsi: add task management scsi: prefer UUID to VM name for the initiator name Message-id: 1378984634-765-1-git-send-email-pbonzini@redhat.com
2013-09-12exec: Simplify the guest physical memory allocation hookMarkus Armbruster1-5/+0
Make it a generic hook rather than a KVM hook. Less code and ifdeffery. Since the only user of the hook is old S390 KVM, there's hope we can get rid of it some day. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Message-id: 1375276272-15988-5-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
2013-09-12scsi: prefer UUID to VM name for the initiator namePaolo Bonzini1-0/+2
The UUID is unique even across multiple hosts, thus it is better than a VM name even if it is less user-friendly. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-09-05char: move backends' io watch tag to CharDriverStateAmit Shah1-0/+1
All the backends implement an io watcher tag for callbacks. Move it to CharDriverState from each backend's struct to make accessing the tag from backend-neutral functions easier. This will be used later to cancel a callback on chardev detach from a frontend. CC: <qemu-stable@nongnu.org> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
2013-08-29Merge remote-tracking branch 'qemu-kvm/uq/master' into stable-1.5Anthony Liguori1-1/+2
* qemu-kvm/uq/master: kvm-stub: fix compilation kvm: shorten the parameter list for get_real_device() kvm: i386: fix LAPIC TSC deadline timer save/restore kvm-all.c: max_cpus should not exceed KVM vcpu limit kvm: Simplify kvm_handle_io kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled kvm: add KVM_IRQFD_FLAG_RESAMPLE support kvm: migrate vPMU state target-i386: remove tabs from target-i386/cpu.h Initialize IA32_FEATURE_CONTROL MSR in reset and migration Conflicts: target-i386/cpu.h target-i386/kvm.c aliguori: fixup trivial conflicts due to whitespace and added cpu argument Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
2013-08-22aio / timers: Convert rtc_clock to be a QEMUClockTypeAlex Bligh1-1/+1
Convert rtc_clock to be a QEMUClockType Move rtc_clock users to use the new API Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-08-09kvm: add KVM_IRQFD_FLAG_RESAMPLE supportVincenzo Maffione1-1/+2
Added an EventNotifier* parameter to kvm-all.c:kvm_irqchip_add_irqfd_notifier(), in order to give KVM another eventfd to be used as "resamplefd". See the documentation in the linux kernel sources in Documentation/virtual/kvm/api.txt (section 4.75) for more details. When the added parameter is passed NULL, the behaviour of the function is unchanged with respect to the previous versions. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-08-08dump: rebase from host-private RAMBlock offsets to guest-physical addressesLaszlo Ersek2-3/+8
RAMBlock.offset --> GuestPhysBlock.target_start RAMBlock.offset + RAMBlock.length --> GuestPhysBlock.target_end RAMBlock.length --> GuestPhysBlock.target_end - GuestPhysBlock.target_start "GuestPhysBlock.host_addr" is only used when writing the dump contents. This patch enables "crash" to work with the vmcore by rebasing the vmcore from the left side of the following diagram to the right side: host-private offset relative to ram_addr RAMBlock guest-visible paddrs 0 +-------------------+.....+-------------------+ 0 | ^ | | ^ | | 640 KB | | 640 KB | | v | | v | 0x0000a0000 +-------------------+.....+-------------------+ 0x0000a0000 | ^ | |XXXXXXXXXXXXXXXXXXX| | 384 KB | |XXXXXXXXXXXXXXXXXXX| | v | |XXXXXXXXXXXXXXXXXXX| 0x000100000 +-------------------+.....+-------------------+ 0x000100000 | ^ | | ^ | | 3583 MB | | 3583 MB | | v | | v | 0x0e0000000 +-------------------+.....+-------------------+ 0x0e0000000 | ^ |. |XXXXXXXXXXXXXXXXXXX| | above_4g_mem_size | . |XXXX PCI hole XXXXX| | v | . |XXXX XXXXX| ram_size +-------------------+ . |XXXX 512 MB XXXXX| . .|XXXXXXXXXXXXXXXXXXX| . +-------------------+ 0x100000000 . | ^ | . | above_4g_mem_size | .| v | +-------------------+ ram_size + 512 MB Related RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=981582 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-08-08dump: populate guest_phys_blocksLaszlo Ersek1-0/+1
While the machine is paused, in guest_phys_blocks_append() we register a one-shot MemoryListener, solely for the initial collection of the valid guest-physical memory ranges that happens at listener registration time. For each range that is reported to guest_phys_blocks_region_add(), we attempt to merge the range with the preceding one. Ranges can only be joined if they are contiguous in both guest-physical address space, and contiguous in host virtual address space. The "maximal" ranges that remain in the end constitute the guest-physical memory map that the dump will be based on. Related RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=981582 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-08-08dump: introduce GuestPhysBlockListLaszlo Ersek1-0/+22
The vmcore must use physical addresses that are visible to the guest, not addresses that point into linear RAMBlocks. As first step, introduce the list type into which we'll collect the physical mappings in effect at the time of the dump. Related RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=981582 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-07-30Merge remote-tracking branch 'spice/spice.v72' into stagingAnthony Liguori1-1/+0
# By Gerd Hoffmann # Via Gerd Hoffmann * spice/spice.v72: spice: fix display initialization Message-id: 1375173625-3784-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-30chardev: fix CHR_EVENT_OPENED events for mux chardevsMichael Roth1-0/+1
As of bd5c51ee6c4f1c79cae5ad2516d711a27b4ea8ec, chardevs no longer use bottom-halves to issue CHR_EVENT_OPENED events. To maintain past semantics, we instead defer the CHR_EVENT_OPENED events toward the end of chardev initialization. For muxes, this isn't good enough, since a range of FEs must be able to attach to the mux prior to any CHR_EVENT_OPENED being issued, else each FE will immediately print it's initial output (prompts, banners, etc.) just prior to us switching to the next FE as part of initialization. The is new and confusing behavior for users, as they'll see output for things like the HMP monitor, even though their the current mux focus may be a guest serial port with potentially no output. We fix this by further deferring CHR_EVENT_OPENED events for FEs associated with muxes until after machine init by flagging mux chardevs with 'explicit_be_open', which suppresses emission of CHR_EVENT_OPENED events until we explicitly set the mux as opened later. Currently, we must defer till after machine init since we potentially associate FEs with muxes as part of realize (for instance, serial_isa_realizefn). Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Message-id: 1375207462-8141-1-git-send-email-mdroth@linux.vnet.ibm.com Cc: qemu-stable@nongnu.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-30spice: fix display initializationGerd Hoffmann1-1/+0
Spice has two display interface implementations: One integrated into the qxl graphics card, and one generic which can operate with every qemu-emulated graphics card. The generic one is activated in case spice is used without qxl. The logic for that only caught the "-vga qxl" case, "-device qxl-vga" goes unnoticed. Fix that by adding a check in the spice interface registration so we'll notice the qxl card no matter how it is created. https://bugzilla.redhat.com/show_bug.cgi?id=981094 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-07-26kvm: Change prototype of kvm_update_guest_debug()Stefan Weil1-1/+1
Passing a CPUState pointer instead of a CPUArchState pointer eliminates the last target dependent data type in sysemu/kvm.h. It also simplifies the code. Signed-off-by: Stefan Weil <sw@weilnetz.de> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23kvm: Change kvm_{insert,remove}_breakpoint() argument to CPUStateAndreas Färber1-2/+2
CPUArchState is no longer directly used since converting CPU loops to CPUState. Prepares for changing GDBState::c_cpu to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de>