summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2013-10-09scsi: Allocate SCSITargetReq r->buf dynamically [CVE-2013-4344]Asias He1-0/+2
r->buf is hardcoded to 2056 which is (256 + 1) * 8, allowing 256 luns at most. If more than 256 luns are specified by user, we have buffer overflow in scsi_target_emulate_report_luns. To fix, we allocate the buffer dynamically. Signed-off-by: Asias He <asias@redhat.com> Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-09-30Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori6-4/+26
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-30Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2-0/+8
# By Max Reitz (10) and others # Via Kevin Wolf * kwolf/for-anthony: (30 commits) qcow2: Remove useless count_contiguous_clusters() parameter qcow2: COMPRESSED on count_contiguous_clusters qcow2: count_contiguous_clusters and compression qcow2: Free only newly allocated clusters on error qcow2: Always use error path in l2_allocate qcow2: Don't put invalid L2 table into cache qemu-iotests: Preallocated zero clusters in 061 qcow2: Correct bitmap size in zero expansion qemu-iotests: Quote $TEST_IMG* and $TEST_DIR usage qemu-iotests: Add basic ability to use binary sample images qemu-iotests: fix qmp.py search path block: use DIV_ROUND_UP in bdrv_co_do_readv qcow2: Assert against currently impossible overflow block: qed - use QEMU_PACKED for on-disk structures block: qcow2 - used QEMU_PACKED for on-disk structures block: vpc - use QEMU_PACKED for on-disk structures block: vdi - use QEMU_PACKED for on-disk structures rbd: avoid qemu_rbd_snap_list() memory leaks qdict: Extract qdict_extract_subqdict block: Fix compiler warning (-Werror=uninitialized) ... Message-id: 1380296370-14523-1-git-send-email-kwolf@redhat.com
2013-09-30Merge remote-tracking branch 'sstabellini/xen-2013-09-25' into stagingAnthony Liguori1-1/+3
# By Anthony PERARD (2) and Liu, Jinsong (2) # Via Stefano Stabellini * sstabellini/xen-2013-09-25: xen: Enable cpu-hotplug on xenfv machine. xen: Fix vcpu initialization. qemu: Add qemu xen logic for Xen HVM S3 resume qemu: Adjust qemu wakeup Message-id: alpine.DEB.2.02.1309251749180.5498@kaball.uk.xensource.com
2013-09-30Merge remote-tracking branch 'rth/tcg-ppc-pull' into stagingAnthony Liguori1-3/+1
# By Richard Henderson (19) and Paolo Bonzini (2) # Via Richard Henderson * rth/tcg-ppc-pull: (21 commits) tcg-ppc64: Implement CONFIG_QEMU_LDST_OPTIMIZATION tcg-ppc64: Add _noaddr functions for emitting forward branches tcg-ppc64: Streamline tcg_out_tlb_read tcg-ppc64: Implement tcg_register_jit tcg-ppc64: Handle long offsets better tcg-ppc64: Tidy register allocation order tcg-ppc64: Look through a constant function descriptor tcg-ppc64: Fold constant call address into descriptor load tcg-ppc64: Don't load the static chain from TCG tcg-ppc64: Avoid code for nop move tcg-ppc64: Use tcg_out64 tcg-ppc64: Use TCG_REG_Rn constants tcg-ppc64: More use of TAI and SAI helper macros tcg-ppc64: Reformat tcg-target.c tcg-ppc: Fix and cleanup tcg_out_tlb_check tcg-ppc: Use conditional branch and link to slow path tcg-ppc: Cleanup tcg_out_qemu_ld/st_slow_path tcg-ppc: Avoid code for nop move tcg-ppc: use new return-argument ld/st helpers tcg-ppc: fix qemu_ld/qemu_st for AIX ABI ... Message-id: 1380126458-3247-1-git-send-email-rth@twiddle.net
2013-09-30Merge remote-tracking branch 'quintela/migration.next' into stagingAnthony Liguori1-2/+15
# By Isaku Yamahata (4) and others # Via Juan Quintela * quintela/migration.next: migration: ram_handle_compressed arch_init: make is_zero_page accept size migration: Fix debug print type migration: add version supporting macros for struct pointer rdma: constify ram_chunk_{index, start, end} rdma: clean up of qemu_rdma_cleanup() arch_init: right return for ram_save_iterate savevm: fix wrong initialization by ram_control_load_hook savevm: add comments for qemu_file_get_error() Message-id: 1380024203-25897-1-git-send-email-quintela@redhat.com
2013-09-30Merge remote-tracking branch 'borntraeger/tags/s390-next-20130924' into stagingAnthony Liguori2-5/+187
This is a bunch of fixes/changes for the s390 architecture. It also contains the fixes from the previous pull request, which did not make it yet. Overall it contains - a fix for kexec without kdump (which uses diag308 subcode 0 instead of 1) - several sclp related fixes - some initial sclp migration code - the sclp line mode console - A fix for a boot problem with the virtio ccw ipl bios - zeroed out padding bytes for the notes section of dump-guest-memory - some cleanups # gpg: Signature made Tue 24 Sep 2013 02:18:44 AM CDT using RSA key ID B5A61C7C # gpg: Can't check signature: public key not found # By Christian Borntraeger (6) and others # Via Christian Borntraeger * borntraeger/tags/s390-next-20130924: s390/sclplmconsole: Add support for SCLP line-mode console s390/ebcdic: Move conversion tables to header file s390/eventfacility: allow childs to handle more than 1 event type s390/eventfacility: remove unused event_type variable s390/eventfacility: Fix receive/send masks s390/eventfacility: fix multiple Read Event Data sources s390/sclp: add reset() functions s390/sclpquiesce: Add code to support live migration s390/sclpconsole: Add code to support live migration for sclpconsole s390/sclpconsole: modify definition of input buffer s390/kexec: Implement diag308 subcode 0 s390/ioinst: Moved the CC setting to the IO instruction handlers s390/cpu: Make setcc() function available to other files s390/ipl: Update the s390-ccw.img rom s390/ipl: Fix waiting for virtio processing s390/dump: zero out padding bytes in notes sections s390/kvm: Add check for priviledged SCLP handler Message-id: 1380007671-18976-1-git-send-email-borntraeger@de.ibm.com
2013-09-28smbios: Make multiple -smbios type= accumulate sanelyMarkus Armbruster2-1/+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 Armbruster2-2/+4
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-28smbios: Normalize smbios_entry_add()'s error handling to exit(1)Markus Armbruster1-1/+1
It exits on all error conditions but one, where it returns -1. Normalize, and return void. 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-25tcg-ppc: use new return-argument ld/st helpersPaolo Bonzini1-3/+1
These use a 32-bit load-of-immediate to save a mflr+addi+mtlr sequence. Tested with a Windows 98 guest (pretty much the most recent thing I could run on my PPC machine) and kvm-unit-tests's sieve.flat. The speed up for sieve.flat is as high as 10% for qemu-system-i386, 25% (no kidding) for qemu-system-x86_64 on my PowerBook G4. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-09-25qdict: Extract qdict_extract_subqdictBenoît Canet1-0/+2
Signed-off-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-09-25block: introduce BlockDriver.bdrv_needs_filename to enable some drivers.Benoît Canet1-0/+6
Some drivers will have driver specifics options but no filename. This new bool allow the block layer to treat them correctly. The .bdrv_needs_filename is set in drivers not having .bdrv_parse_filename and not having .bdrv_open. The first exception to this rule will be the quorum driver. Signed-off-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-09-24migration: add version supporting macros for struct pointerAlexey Kardashevskiy1-2/+15
This adds version supporting macros VMSTATE_STRUCT_POINTER_TEST_V and VMSTATE_STRUCT_POINTER_V in addition to the already existing VMSTATE_STRUCT_POINTER and VMSTATE_STRUCT_POINTER_TEST macros. Cc: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Juan Quintela <quintela@redhat.com>
2013-09-23Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori2-0/+18
# By Stefan Hajnoczi (4) and others # Via Stefan Hajnoczi * stefanha/block: virtio-blk: do not relay a previous driver's WCE configuration to the current blockdev: do not default cache.no-flush to true block: don't lose data from last incomplete sector qcow2: Correct snapshots size for overlap check coroutine: fix /perf/nesting coroutine benchmark coroutine: add qemu_coroutine_yield benchmark qemu-timer: do not take the lock in timer_pending qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe qemu-timer: drop outdated signal safety comments osdep: warn if open(O_DIRECT) on fails with EINVAL libcacard: link against qemu-error.o for error_report() Message-id: 1379698931-946-1-git-send-email-stefanha@redhat.com
2013-09-23Merge remote-tracking branch 'mjt/trivial-patches' into stagingAnthony Liguori1-1/+1
# By Stefan Weil (8) and others # Via Michael Tokarev * mjt/trivial-patches: tests/.gitignore: ignore test-throttle exec: Fix broken build for MinGW (regression) kvm: Fix compiler warning (clang) tcg-sparc: Fix parenthesis warning Makefile: Remove some more files when cleaning target-i386: Fix segment cache dump iov: avoid "orig_len may be used unitialized" warning vscclient: remove unnecessary use of uninitialized variable trace-events: Clean up with scripts/cleanup-trace-events.pl again tci: Fix qemu-alpha on 32 bit hosts (wrong assertions) *-user: Improve documentation for lock_user function MAINTAINERS: Add missing entry to filelist for TCI target translate-all: Fix formatting of dump output *-user: Fix typo in comment (ulocking -> unlocking) docs: Fix IO port number for CPU present bitmap. q35: Fix typo in constant DEFUALT -> DEFAULT. configure: Undefine _FORTIFY_SOURCE prior using it Message-id: 1379696296-32105-1-git-send-email-mjt@msgid.tls.msk.ru
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-23Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori1-0/+1
# By Hervé Poussineau (5) and Stefan Weil (1) # Via Paolo Bonzini * bonzini/scsi-next: block/iscsi: Drop iscsi_co_get_block_status for older versions of libiscsi lsi: add 53C810 variant lsi: remove todo lsi: ignore write accesses to CTEST0 registers lsi: check ssid versus sdid only if ssid is valid lsi: use constant name instead of its value
2013-09-20virtio-blk: do not relay a previous driver's WCE configuration to the currentPaolo Bonzini1-0/+1
The following sequence happens: - the SeaBIOS virtio-blk driver does not support the WCE feature, which causes QEMU to disable writeback caching - the Linux virtio-blk driver resets the device, finds WCE is available but writeback caching is disabled; tells block layer to not send cache flush commands - the Linux virtio-blk driver sets the DRIVER_OK bit, which causes writeback caching to be re-enabled, but the Linux virtio-blk driver does not know of this side effect and cache flushes remain disabled The bug is at the third step. If the guest does know about CONFIG_WCE, QEMU should ignore the WCE feature's state. The guest will control the cache mode solely using configuration space. This change makes Linux do flushes correctly, but Linux will keep SeaBIOS's writethrough mode. Hence, whenever the guest is reset, the cache mode of the disk should be reset to whatever was specified in the "-drive" option. With this change, the Linux virtio-blk driver finds that writeback caching is enabled, and tells the block layer to send cache flush commands appropriately. Reported-by: Rusty Russell <rusty@au1.ibm.com Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-09-20q35: Fix typo in constant DEFUALT -> DEFAULT.Richard W.M. Jones1-1/+1
Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-20s390/sclplmconsole: Add support for SCLP line-mode consoleHeinz Graalfs1-0/+80
Add simple support for SCLP line-mode also known as operating system messages. This can be added in addition to or instead of the SCLP full screen console with -device sclplmconsole. Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2013-09-20s390/ebcdic: Move conversion tables to header fileHeinz Graalfs1-0/+104
Move conversion tables to header file. - In SCLP line mode processing EBCDIC/ASCII conversion is needed. - An additional EBCDIC to ASCII conversion function is added. Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2013-09-20s390/eventfacility: allow childs to handle more than 1 event typeChristian Borntraeger1-3/+2
Currently all handlers (quiesce, console) only handle one event type. Some drivers will handle multiple (compatible) event types. Rework the code accordingly. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de>
2013-09-20s390/eventfacility: remove unused event_type variableChristian Borntraeger1-1/+0
The event_type variable is never used. Get rid of it. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de>
2013-09-20s390/eventfacility: Fix receive/send masksChristian Borntraeger1-1/+1
Currently we announce interchanged receive/send masks. This did not trigger a bug, since the sclp console has the same masks for send/receive and the Linux guest does not check the sclp mask for simple events like quiesce. With other event users like the sclp line mode console, we will have different send/receive bits. Fix it. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de>
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-18qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safeStefan Hajnoczi1-0/+17
Introduce QEMUTimerList->active_timers_lock to protect the linked list of active timers. This allows qemu_timer_mod_ns() to be called from any thread. Note that vm_clock is not thread-safe and its use of qemu_clock_has_timers() works fine today but is also not thread-safe. The purpose of this patch is to eventually let device models set or cancel timers from a vcpu thread without holding the global mutex. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-09-17Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori4-10/+37
# By Max Reitz (16) and others # Via Kevin Wolf * kwolf/for-anthony: (33 commits) qemu-iotests: Fix test 038 block: Assert validity of BdrvActionOps qemu-iotests: Cleanup test image in test number 007 qemu-img: fix invalid JSON coroutine: add ./configure --disable-coroutine-pool qemu-iotests: Adjustments due to error propagation qcow2: Use Error parameter qemu-img create: Emit filename on error block: Error parameter for create functions block: Error parameter for open functions bdrv: Use "Error" for creating images bdrv: Use "Error" for opening images qemu-iotests: add 057 internal snapshot for block device test case hmp: add interface hmp_snapshot_delete_blkdev_internal hmp: add interface hmp_snapshot_blkdev_internal qmp: add interface blockdev-snapshot-delete-internal-sync qmp: add interface blockdev-snapshot-internal-sync qmp: add internal snapshot support in qmp_transaction snapshot: distinguish id and name in snapshot delete snapshot: new function bdrv_snapshot_find_by_id_and_name() ... Message-id: 1379073063-14963-1-git-send-email-kwolf@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-16lsi: add 53C810 variantHervé Poussineau1-0/+1
Currently, treat it exactly as a 53C895A. 53C895A is a 53C810 with more capabilities, so this should work. However, this lets us test different code paths on Linux, which don't use lastest features if it detect a 810, or on some OSes which only support 810 and not 895A (like very old Windows NT versions). Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-09-15pci: add helper to retrieve the 64-bit rangeMichael S. Tsirkin1-0/+1
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-09-15range: add min/max operations on rangesMichael S. Tsirkin1-0/+18
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-09-15range: add Range to typedefsMichael S. Tsirkin2-1/+2
will help simplify header dependencies. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-09-12exec: Simplify the guest physical memory allocation hookMarkus Armbruster2-5/+2
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-12exec: Reduce ifdeffery around -mem-pathMarkus Armbruster1-2/+0
Instead of spreading its ifdeffery everywhere, confine it to qemu_ram_alloc_from_ptr(). Everywhere else, simply test block->fd, which is non-negative exactly when block uses -mem-path. 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-4-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
2013-09-12block: Error parameter for create functionsMax Reitz1-2/+3
Add an Error ** parameter to bdrv_create and its associated functions to allow more specific error messages. Signed-off-by: Max Reitz <mreitz@redhat.com>
2013-09-12block: Error parameter for open functionsMax Reitz1-3/+3
Add an Error ** parameter to bdrv_open, bdrv_file_open and associated functions to allow more specific error messages. Signed-off-by: Max Reitz <mreitz@redhat.com>
2013-09-12bdrv: Use "Error" for creating imagesMax Reitz1-1/+2
Add an Error ** parameter to BlockDriver.bdrv_create to allow more specific error messages. Signed-off-by: Max Reitz <mreitz@redhat.com>
2013-09-12bdrv: Use "Error" for opening imagesMax Reitz1-2/+4
Add an Error ** parameter to BlockDriver.bdrv_open and BlockDriver.bdrv_file_open to allow more specific error messages. Signed-off-by: Max Reitz <mreitz@redhat.com>
2013-09-12qmp: add interface blockdev-snapshot-delete-internal-syncWenchao Xia1-0/+3
This interface use id and name as optional parameters, to handle the case that one image contain multiple snapshots with same name which may be '', but with different id. Adding parameter id is for historical compatiability reason, and that case is not possible in qemu's new interface for internal snapshot at block device level, but still possible in qemu-img. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-09-12snapshot: distinguish id and name in snapshot deleteWenchao Xia2-2/+11
Snapshot creation actually already distinguish id and name since it take a structured parameter *sn, but delete can't. Later an accurate delete is needed in qmp_transaction abort and blockdev-snapshot-delete-sync, so change its prototype. Also *errp is added to tip error, but return value is kepted to let caller check what kind of error happens. Existing caller for it are savevm, delvm and qemu-img, they are not impacted by introducing a new function bdrv_snapshot_delete_by_id_or_name(), which check the return value and do the operation again. Before this patch: For qcow2, it search id first then name to find the one to delete. For rbd, it search name. For sheepdog, it does nothing. After this patch: For qcow2, logic is the same by call it twice in caller. For rbd, it always fails in delete with id, but still search for name in second try, no change to user. Some code for *errp is based on Pavel's patch. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-09-12snapshot: new function bdrv_snapshot_find_by_id_and_name()Wenchao Xia1-0/+6
To make it clear about id and name in searching, add this API to distinguish them. Caller can choose to search by id or name, *errp will be set only for exception. Some code are modified based on Pavel's patch. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-09-12block: Image file option amendmentMax Reitz2-0/+5
This patch adds the "amend" option to qemu-img which allows changing image options on existing image files. It also adds the generic bdrv implementation which is basically just a wrapper for the image format specific function. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
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-11Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20130910' into ↵Anthony Liguori1-4/+0
staging ARM queue: * aarch64 preparation patchset (excluding the defconfigs, so this doesn't actually enable the new targets yet) * minor bugfixes and cleanups * disable "-cpu any" in system emulation mode * fix ARMv7M stack alignment on reset # gpg: Signature made Tue 10 Sep 2013 01:46:11 PM CDT using RSA key ID 14360CDE # gpg: Can't check signature: public key not found # By Alexander Graf (13) and others # Via Peter Maydell * pmaydell/tags/pull-target-arm-20130910: (28 commits) configure: Add handling code for AArch64 targets linux-user: Add AArch64 support linux-user: Allow targets to specify a minimum uname release linux-user: Add AArch64 termbits.h definitions linux-user: Implement cpu_set_tls() and cpu_clone_regs() for AArch64 linux-user: Make sure NWFPE code is 32 bit ARM only linux-user: Add signal handling for AArch64 linux-user: Fix up AArch64 syscall handlers linux-user: Add syscall number definitions for AArch64 linux-user: Add cpu loop for AArch64 linux-user: Don't treat AArch64 cpu names specially target-arm: Add AArch64 gdbstub support target-arm: Add AArch64 translation stub target-arm: Prepare translation for AArch64 code target-arm: Disable 32 bit CPUs in 64 bit linux-user builds target-arm: Add new AArch64CPUInfo base class and subclasses target-arm: Pass DisasContext* to gen_set_pc_im() target-arm: Fix target_ulong/uint32_t confusions target-arm: Export cpu_env target-arm: Extract the disas struct to a header file ... Message-id: 1378839142-7726-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
2013-09-11Merge remote-tracking branch 'kraxel/usb.89' into stagingAnthony Liguori2-3/+3
# By Gerd Hoffmann (2) and Miroslav Rezanina (2) # Via Gerd Hoffmann * kraxel/usb.89: ehci: save device pointer in EHCIState Remove dev-bluetooth.c dependency from vl.c Preparation for usb-bt-dongle conditional build usb: sanity check setup_index+setup_len in post_load Message-id: 1378806073-25197-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
2013-09-11Merge remote-tracking branch 'mdroth/qga-pull-2013-9-9' into stagingAnthony Liguori1-0/+13
# By Tomoki Sekiyama (10) and Paul Burton (1) # Via Michael Roth * mdroth/qga-pull-2013-9-9: QMP/qemu-ga-client: Make timeout longer for guest-fsfreeze-freeze command qemu-ga: Install Windows VSS provider on `qemu-ga -s install' qemu-ga: Call Windows VSS requester in fsfreeze command handler qemu-ga: Add Windows VSS provider and requester as DLL error: Add error_set_win32 and error_setg_win32 qemu-ga: Add configure options to specify path to Windows/VSS SDK Add a script to extract VSS SDK headers on POSIX system checkpatch.pl: Check .cpp files Add c++ keywords to QAPI helper script configure: Support configuring C++ compiler mips_malta: support up to 2GiB RAM Message-id: 1378755701-2051-1-git-send-email-mdroth@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
2013-09-11Merge remote-tracking branch 'sstabellini/xen-2013-09-09' into stagingAnthony Liguori1-3/+1
# By Anthony PERARD # Via Stefano Stabellini * sstabellini/xen-2013-09-09: pc_q35: Initialize Xen. pc: Initializing ram_memory under Xen. Message-id: alpine.DEB.2.02.1309091718030.6397@kaball.uk.xensource.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>