tcg-arm: Rearrange slow-path qemu_ld/st
Use the new helper_ret_*_mmu routines. Use a conditional callto arrange for a tail-call from the store path, and to load thereturn address for the helper for the load path.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
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>...
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'sstabellini/xen-2013-09-25' into staging
Merge remote-tracking branch 'rth/tcg-ppc-pull' into staging
Merge remote-tracking branch 'quintela/migration.next' into staging
Merge remote-tracking branch 'borntraeger/tags/s390-next-20130924' into staging
This is a bunch of fixes/changes for the s390 architecture. It alsocontains the fixes from the previous pull request, which did not makeit yet.Overall it contains- a fix for kexec without kdump (which uses diag308 subcode 0 instead of 1)...
smbios: Make multiple -smbios type= accumulate sanely
Currently, -smbios type=T,NAME=VAL,... adds one field (T,NAME) withvalue VAL to fw_cfg for each unique NAME. If NAME occurs multipletimes, the last one's VAL is used (before the QemuOpts conversion, the...
smbios: Convert to QemuOpts
So that it can be set in config file for -readconfig.
This tightens parsing of -smbios, and makes it more consistent withother options: unknown parameters are rejected, numbers with trailingjunk are rejected, when a parameter is given multiple times, last...
smbios: Normalize smbios_entry_add()'s error handling to exit(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>
qemu: Adjust qemu wakeup
Currently Xen hvm s3 has a bug coming from the difference betweenqemu-traditioanl and qemu-xen. For qemu-traditional, the way toresume from hvm s3 is via 'xl trigger' command. However, forqemu-xen, the way to resume from hvm s3 inherited from standard...
tcg-ppc: use new return-argument ld/st helpers
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 Icould run on my PPC machine) and kvm-unit-tests's sieve.flat. Thespeed up for sieve.flat is as high as 10% for qemu-system-i386, 25%...
block: introduce BlockDriver.bdrv_needs_filename to enable some drivers.
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...
qdict: Extract qdict_extract_subqdict
Signed-off-by: Benoit Canet <benoit@irqsave.net>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
migration: add version supporting macros for struct pointer
This adds version supporting macros VMSTATE_STRUCT_POINTER_TEST_Vand VMSTATE_STRUCT_POINTER_V in addition to the already existingVMSTATE_STRUCT_POINTER and VMSTATE_STRUCT_POINTER_TEST macros....
Merge remote-tracking branch 'stefanha/block' into staging
Merge remote-tracking branch 'mjt/trivial-patches' into staging
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Merge remote-tracking branch 'bonzini/scsi-next' into staging
virtio-blk: do not relay a previous driver's WCE configuration to the current
The following sequence happens:- the SeaBIOS virtio-blk driver does not support the WCE feature, whichcauses QEMU to disable writeback caching
- the Linux virtio-blk driver resets the device, finds WCE is available...
q35: Fix typo in constant DEFUALT -> DEFAULT.
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
s390/eventfacility: Fix receive/send masks
Currently we announce interchanged receive/send masks. This did nottrigger a bug, since the sclp console has the same masks forsend/receive and the Linux guest does not check the sclp mask for simpleevents like quiesce. With other event users like the sclp line mode...
s390/eventfacility: remove unused event_type variable
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>
s390/eventfacility: allow childs to handle more than 1 event type
Currently all handlers (quiesce, console) only handle one event type.Some drivers will handle multiple (compatible) event types. Rework thecode accordingly.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>...
s390/ebcdic: Move conversion tables to header file
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>...
s390/sclplmconsole: Add support for SCLP line-mode console
Add simple support for SCLP line-mode also known as operatingsystem messages. This can be added in addition to or instead ofthe SCLP full screen console with -device sclplmconsole.
cpu: Move cpu state syncs up into cpu_dump_state()
The x86 and ppc targets call cpu_synchronize_state() from their*_cpu_dump_state() callbacks to ensure that up to date state is dumpedwhen KVM is enabled (for example when a KVM internal error occurs)....
kvm irqfd: support direct msimessage to irq translation
On PPC64 systems MSI Messages are translated to system IRQ in a PCIhost bridge. This is already supported for emulated MSI/MSIX butnot for irqfd where the current QEMU allocates IRQ numbers fromirqchip and maps MSIMessages to IRQ in the host kernel....
qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe
Introduce QEMUTimerList->active_timers_lock to protect the linked listof active timers. This allows qemu_timer_mod_ns() to be called from anythread.
Note that vm_clock is not thread-safe and its use of...
lsi: add 53C810 variant
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, whichdon't use lastest features if it detect a 810, or on some OSes...
range: add min/max operations on ranges
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci: add helper to retrieve the 64-bit range
range: add Range to typedefs
will help simplify header dependencies.
exec: Reduce ifdeffery around -mem-path
Instead of spreading its ifdeffery everywhere, confine it toqemu_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>...
exec: Simplify the guest physical memory allocation hook
Make it a generic hook rather than a KVM hook. Less code andifdeffery.
Since the only user of the hook is old S390 KVM, there's hope we canget rid of it some day.
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>...
bdrv: Use "Error" for creating images
Add an Error ** parameter to BlockDriver.bdrv_create to allow morespecific error messages.
Signed-off-by: Max Reitz <mreitz@redhat.com>
block: Error parameter for open functions
Add an Error ** parameter to bdrv_open, bdrv_file_open and associatedfunctions to allow more specific error messages.
block: Error parameter for create functions
Add an Error ** parameter to bdrv_create and its associated functions toallow more specific error messages.
snapshot: new function bdrv_snapshot_find_by_id_and_name()
To make it clear about id and name in searching, add this APIto 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....
snapshot: distinguish id and name in snapshot delete
Snapshot creation actually already distinguish id and name since it takea structured parameter *sn, but delete can't. Later an accurate deleteis needed in qmp_transaction abort and blockdev-snapshot-delete-sync,...
qmp: add interface blockdev-snapshot-delete-internal-sync
This interface use id and name as optional parameters, to handle thecase that one image contain multiple snapshots with same name whichmay be '', but with different id.
Adding parameter id is for historical compatiability reason, and...
bdrv: Use "Error" for opening images
Add an Error ** parameter to BlockDriver.bdrv_open andBlockDriver.bdrv_file_open to allow more specific error messages.
block: Image file option amendment
This patch adds the "amend" option to qemu-img which allows changingimage options on existing image files. It also adds the generic bdrvimplementation which is basically just a wrapper for the image formatspecific function....
scsi: prefer UUID to VM name for the initiator name
The UUID is unique even across multiple hosts, thus it isbetter than a VM name even if it is less user-friendly.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20130910' into 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...
Merge remote-tracking branch 'kraxel/usb.89' into staging
Merge remote-tracking branch 'mdroth/qga-pull-2013-9-9' into staging
Merge remote-tracking branch 'sstabellini/xen-2013-09-09' into staging
Message-id: alpine.DEB.2.02.1309091718030.6397@kaball.uk.xensource.com...
abitypes.h: Remove incorrect ARM ABI_LLONG_ALIGNMENT
The ARM EABI specifies that 64 bit integers should be8 aligned; remove our incorrect setting of 4 alignment.This has no actual effect since it only set the alignmentfor the 'abi_ullong' and 'abi_llong' types, which are used...
Remove dev-bluetooth.c dependency from vl.c
Use usb_legacy_register handling to create bt-dongle device and remove codedependency from vl.c so CONFIG_USB_BLUETOOTH can be disabled.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Preparation for usb-bt-dongle conditional build
To allow disable usb-bt-dongle device using CONFIG_BLUETOOTH option, some offunctions in vl.c file has to be made accessible in dev-bluetooth.c. This ispure code moving.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>...
error: Add error_set_win32 and error_setg_win32
These functions help maintaining homogeneous formatting of error messageswith Windows error code and description (generated byg_win32_error_message()).
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>...
pc: Initializing ram_memory under Xen.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>CC: qemu-stable@nongnu.org
e1000: add interrupt mitigation support
This patch partially implements the e1000 interrupt mitigation mechanisms.Using a single QEMUTimer, it emulates the ITR register (which is the newermitigation register, recommended by Intel) and approximately emulates...
net: Rename send_queue to incoming_queue
Each networking client has a queue for packets that could not yet bedelivered to that client. Calling this queue "send_queue" is highlyconfusing as it has nothing to to with packets send from this client butto it. Avoid this confusing by renaming it to "incoming_queue"....
block: remove bdrv_is_allocated_above/bdrv_co_is_allocated_above distinction
Now that bdrv_is_allocated detects coroutine context, the two canuse the same code.
Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
block: introduce bdrv_get_block_status API
For now, bdrv_get_block_status is just another name for bdrv_is_allocated.The next patches will add more flags.
This also touches all block drivers with a mostly mechanical rename. Thesole exception is cow; because it calls cow_co_is_allocated from the read...
block: define get_block_status return value
Define the return value of get_block_status. Bits 0, 1, 2 and 9-62are valid; bit 63 (the sign bit) is reserved for errors. Bits 3-8are left for future extensions.
The return code is compatible with the old is_allocated API: if a driver...
block: implement reference count for BlockDriverState
Introduce bdrv_ref/bdrv_unref to manage the lifecycle ofBlockDriverState. They are unused for now but will used to replacebdrv_delete() later.
Signed-off-by: Fam Zheng <famz@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block: make bdrv_delete() static
Manage BlockDriverState lifecycle with refcnt, so bdrv_delete() is nolonger public and should be called by bdrv_unref() if refcnt isdecreased to 0.
This is an identical change because effectively, there's no multiplereference of BDS now: no caller of bdrv_ref() yet, only bdrv_new() sets...
block: make bdrv_co_is_allocated static
bdrv_is_allocated can detect coroutine context and go through a fastpath, similar to other block layer functions.
Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
throttle: Add a new throttling API implementing continuous leaky bucket.
Implement the continuous leaky bucket algorithm devised on IRC as a separatemodule.
Signed-off-by: Benoit Canet <benoit@irqsave.net>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block: Enable the new throttling code in the block layer.
memory: Provide separate handling of unassigned io ports accesses
Accesses to unassigned io ports shall return -1 on read and be ignoredon write. Ensure these properties via dedicated ops, decoupling us fromthe memory core's handling of unassigned accesses....
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings / X86CPU
This includes pc and pci cleanups and enhancements,and a virtio bugfix for level interrupts.
Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into staging
QOM device refactorings
cpu: Use QTAILQ for CPU list
Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthandmacros.
Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Replace qemu_for_each_cpu()
It was introduced to loop over CPUs from target-independent code, butsince commit 182735efaf956ccab50b6d74a4fed163e0f35660 target-independentCPUState is used.
A loop can be considered more efficient than function calls in a loop,...
Merge branch 'tcg-next' of git://github.com/rth7680/qemu
tcg: Introduce zero and sign-extended versions of load helpers
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Change tcg_gen_exit_tb argument to uintptr_t
And update all users.
exec: Reorganize the GETRA/GETPC macros
Always define GETRA; use __builtin_extract_return_addr, rather thanhaving a special case for s390. Split GETPC_ADJ out of GETPC; use 2universally, rather than having a special case for arm.
Rename GETPC_LDST to GETRA_LDST to indicate that it does not...
exec: Rename USUFFIX to LSUFFIX
In a following patch, there will be confusion between multiple "unsigned" suffixes; rename this one so as to imply "load".
exec: Split softmmu_defs.h
The _cmmu helpers can be moved to exec-all.h. The helpers that areused from TCG will shortly need access to tcg_target_long so movetheir declarations into tcg.h.
This requires minor include adjustments to all TCG backends....
qcow2-refcount: Repair shared refcount blocks
If the refcount of a refcount block is greater than one, we can at leasttry to repair that problem by duplicating the affected block.
Signed-off-by: Max Reitz <mreitz@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
spapr-pci: rework MSI/MSIX
On the sPAPR platform a guest allocates MSI/MSIX vectors via RTAShypercalls which return global IRQ numbers to a guest so it onlyoperates with those and never touches MSIMessage.
Therefore MSIMessage handling is completely hidden in QEMU....
pseries: Add H_SET_MODE hcall to change guest exception endianness
H_SET_MODE is used for controlling various partition settings. Oneof these settings is the endianness a guest takes its exceptions in.
Signed-off-by: Anton Blanchard <anton@samba.org>[agraf: fix whitespace]...
misc: Fix some typos in names and comments
Most typos were found using a modified version of codespell:
accross -> acrossissueing -> issuingTICNT_THRESHHOLD -> TICNT_THRESHOLDbandwith -> bandwidthVCARD_7816_PROPIETARY -> VCARD_7816_PROPRIETARYoccured -> occurred...
pc: reduce duplication, fix PIIX descriptions
We have a lot of code duplication between machine types,this increases with each new machine typeand each new field.
This has already introduced a minor bug: descriptionfor pc-1.3 says "Standard PC" while description for...
qom: Pass available size to object_initialize()
To be passed on to object_initialize_with_type().
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> (virtio-ccw)Signed-off-by: Andreas Färber <afaerber@suse.de>
qom: Assert instance size in object_initialize_with_type()
This catches objects initializing beyond allocated memory, e.g.,when subtypes get extended with instance state of their own.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Andreas Färber <afaerber@suse.de>
isa: Fix documentation of isa_register_portio_list()
Commit b40acf9 (ioport: Switch dispatching to memory core layer,2013-06-24) removed all instances of old_portio.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Acked-by: Paolo Bonzini <pbonzini@redhat.com>...
qdev: Pass size to qbus_create_inplace()
To be passed to object_initialize().
Since commit 39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6 the argument isvoid*, so drop some superfluous (BusState *) casts or direct parentfield usages.
pci: Pass size to pci_bus_new_inplace()
To be passed to qbus_create_inplace().
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
scsi: Pass size to scsi_bus_new()
Use DEVICE casts instead of direct parent field access.
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
usb: Pass size to usb_bus_new()
Use DEVICE cast to avoid a direct parent field access.
qom: Fix object_initialize_with_type() argument name in documentation
@obj -> @data.
object: Fix typo in qom/object.h
There's been a cut-and-paste error, it looks like, in the documentationin qom/object.h.
Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>Signed-off-by: Andreas Färber <afaerber@suse.de>
qcow2: Metadata overlap checks
Two new functions are added; the first one checks a given range in theimage file for overlaps with metadata (main header, L1 tables, L2tables, refcount table and blocks).
The second one should be used immediately before writing to the image...
option: Add assigned flag to QEMUOptionParameter
Adds an "assigned" flag to QEMUOptionParameter which is cleared at thebeginning of parse_option_parameters and set on (successful)set_option_parameter and set_option_parameter_int.
Signed-off-by: Max Reitz <mreitz@redhat.com>...
monitor: avoid use of global *cur_mon in monitor_find_completion()
Parameter *mon is added, and local variable *mon added in previous patchis removed. The caller readline_completion(), pass rs->mon as value, whichshould be initialized in readline_init() called by monitor_init()....
Merge remote-tracking branch 'qemu-kvm/uq/master' into stable-1.5
Merge remote-tracking branch 'mst/tags/for_anthony' into stable-1.5
This includes pc and pci cleanups, future-proofing of ROM files,and a virtio bugfix correcting splice on virtio console.
tcg-i386: Remove abort from GETPC_LDST
Indeed, remove it entirely and remove the is_tcg_gen_code checkfrom GETPC_EXT.
Fixes https://bugs.launchpad.net/qemu/+bug/1218098 wherein a callto a "normal" helper function performed a sequence of tail callsall the way into the memory helper functions, leading to a stack...