s390/sclpconsole: modify definition of input buffer
To use VMState for migration, we need to adapt some sclp code: - allocate console buffer as part of the console - change semantic of sclpconsole offset fields
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>...
s390/sclpconsole: Add code to support live migration for sclpconsole
This patch adds the necessary life migration pieces to the sclp codeby using vmstate_register.
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>Reviewed-by: Alexander Graf <agraf@suse.de>...
s390/sclpquiesce: Add code to support live migration
This patch adds the necessary life migration pieces to sclpquiesceby using the vmstate_register.
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>
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'bonzini/scsi-next' into staging
pc_sysfw: Fix ISA BIOS init for ridiculously big flash
pc_isa_bios_init() suffers integer overflow for flash larger thanINT_MAX.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Acked-by: Laszlo Ersek <lersek@redhat.com>Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...
spapr-vscsi: Adding VSCSI capabilities
This implements capabilities exchange between vscsi host and client. Asat the moment no capability is supported, put zero flags everywhere andreturn.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
spapr-vscsi: Report error on unsupported MAD requests
The existing driver just dropped unsupported requests. This adds errorresponses to those unhandled requests.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>Signed-off-by: Paolo Bonzini <pbonzini@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.
Signed-off-by: Max Reitz <mreitz@redhat.com>
spapr-vscsi: add task management
At the moment the guest kernel issues two types of task managementrequests to the hypervisor - task about and lun reset. This addshandling for these tasks. As spapr-vscsi starts calling scsi_req_cancel(),free_request callback was implemented....
virtio-scsi: Make type virtio-scsi-common abstract
It's the abstract base of virtio-scsi-device and vhost-scsi.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial
scsi_bus_legacy_add_drive() creates either a scsi-disk or ascsi-generic device. It sets property "serial" to argument serialunless null. Crashes with scsi-generic, because it doesn't have such...
hw/scsi/lsi53c895a: Use sextract32 for sign-extension
Use sextract32() for doing sign-extension rather than rollingour own implementation.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/lsi53c895a: Use deposit32 rather than handcoded shift/mask
Use deposit32() rather than handcoded shifts/masks to update thescratch registers. This is cleaner and incidentally avoids a clangsanitizer complaint ("runtime error: left shift of 255 by 24 places...
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 'spice/spice.v73' into staging
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...
Merge remote-tracking branch 'stefanha/block' into staging
pl110: Clarify comment about PL110 ID on VersatilePB
Clarify a comment about the ID register value presented bythe PL110 variant present on the VersatilePB board (basedon testing what the actual hardware does), to indicate thatthis is not an error in our emulation, and to remove an #if-0....
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>
ehci: save device pointer in EHCIState
We'll need a pointer to the actual pci/sysbus device,stick a pointer to it into the EHCIState struct.
https://bugzilla.redhat.com/show_bug.cgi?id=1005495
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: sanity check setup_index+setup_len in post_load
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>...
qxl: trace io port name
qxl: fix local renderer
The local spice renderer assumes the primary surface is located at thestart of the "ram" bar. This used to be a requirement in qxl hardwarerevision 1. In revision 2+ this is relaxed. Nevertheless guest driverscontinued to use the traditional location, for historical and backward...
Add c++ keywords to QAPI helper script
Add c++ keywords to avoid errors in compiling with c++ compiler.This also renames class member of PciDeviceInfo to q_class.
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>...
mips_malta: support up to 2GiB RAM
A Malta board can support up to 2GiB of RAM. Since the unmapped kseg0/1regions are only 512MiB large & the latter 256MiB of those are taken upby the IO region, access to RAM beyond 256MiB must be done through amapped region. In the case of a Linux guest this means we need to use...
pc_q35: Initialize 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>
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
ne2000: mark I/O as LITTLE_ENDIAN
Now that the memory subsystem is propagating the endianness correctly,the ne2000 device should have its I/O ports marked as LITTLE_ENDIAN, asPCI devices are little endian.
This makes the ne2000 NIC to work again on PowerPC....
vmxnet3: Eliminate __packed redefined warning
This eliminates a warning about __packed being redefined as exposed by thevmxnet3 code. __packed is not used anywhere in the vmxnet3 code.
CC hw/net/vmxnet3.oIn file included from hw/net/vmxnet3.c:29:...
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...
dataplane: Fix startup race.
Avoid trying to setup dataplane again if dataplane setup is already inprogress. This may happen if an eventfd is triggered during setup.
I saw this occasionally with an experimental s390 irqfd implementation:
virtio_blk_handle_output...
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...
xen_disk: simplify blk_disconnect with refcnt
We call bdrv_attach_dev when initializing whether or not bs is createdlocally, so call bdrv_detach_dev and let the refcnt handle thelifecycle.
Signed-off-by: Fam Zheng <famz@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings / X86CPU
Merge remote-tracking branch 'mjt/trivial-patches' into staging
Merge remote-tracking branch 'kraxel/usb.88' into staging
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 bugfix for level interrupts.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
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,...
a15mpcore: Use qemu_get_cpu() for generic timers
This simplifies the loop and aids with refactoring of CPU list.
Requested-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Andreas Färber <afaerber@suse.de>
usb: parallelize usb3 streams
usb3 bulk endpoints with streams are implicitly pipelined now,so the requests will actually be processed in parallel. Alsoallow them to complete out-of-order.
Fixes stalls in the uas driver.
Cc: qemu-stable@nongnu.orgSigned-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-hub: add tracepoint for status reports
Revert "usb-hub: report status changes only once"
This reverts commit a309ee6e0a256f690760abfba44fceaa52a7c2f3.
This isn't in line with the usb specification and adds regressions,win7 fails to drive the usb hub for example.
Was added because it "solved" the issue of hubs interacting badly...
usb/dev-hid: Modified usb-tablet category from Misc to Input
usb-tablet device was wrongly assigned to Misc category
Reported-by: Markus Armbruster <armbru@redhat.com>Cc: qemu-stable@nongnu.orgSigned-off-by: Marcel Apfelbaum <marcel.a@redhat.com>Reviewed-by: Andreas Färber <afaerber@suse.de>...
xhci: remove leftover debug printf
xhci: add tracepoint for endpoint state changes
xhci: add port to slot_address tracepoint
xhci: fix endpoint interval calculation
xhci: emulate intr endpoint intervals correctly
Respect the interval for interrupt endpoints, so we don't finishtransfers as fast as possible but at the rate configured by the guest.
Fixes guest deadlocks triggered by interrupt storms.
Cc:Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
xhci: reset port when disabling slot
uas: add property for request logging
PPC: spapr: iommu: rework traces
This converts old style fprintf to traces.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>[agraf: change patch subject]Signed-off-by: Alexander Graf <agraf@suse.de>
spapr-pci: fix config space access to support bridges
spapr-pci config space accessors use find_dev() to find a PCI device.However find_dev() only searched on a primary bus and did not dorecursive search through secondary buses so config space access was not...
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....
xics: move registration of global state to realize()
Registration of global state belongs into realize so move it there.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
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]...
spapr: add "stop-self" RTAS call required to support hot CPU unplug
PAPR+ requires two RTAS calls to be supported by the hypervisor inorder to allow hotplugging VCPUs from the guest. The "start-cpu" RTAScall was already there but "stop-self" was not.
This adds the "stop-self" RTAS call....
pseries: Fix stalls on hypervisor virtual console
A number of users are reporting stalls when using the pserieshypervisor virtual console.
A simple test case is to paste 15 or 17 characters at a timeinto the console. Pasting 15 characters at a time works fine...
ppc: virtex_ml507: QEMU_OPTION_dtb support for this machine.
QEMU has 'dtb' option for specifing the device tree file for the kernel.The patch adds support for this option to the 'virtex_ml507' machineimplementation.
Signed-off-by: Efimov Vasily <real@ispras.ru>...
ppc405_boards: Disable debug output
Also move one stray debug output into an #ifdef.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
ppc405_uc: Disable debug output
ppc405_boards: Don't enforce presence of firmware for qtest
Adopt error_report() while at it.
PPC: E500: Generate device tree on reset
Today we generate the device tree once on machine initialization and thenstore the finalized blob in memory to reload it on reset.
This is bad for 2 reasons. First we potentially waste a bunch of RAM for nogood reason, as we have all information required to regenerate the device...
adlib: sort offsets in portio registration
This fixes the following assert when -device adlib is used:ioport.c:240: portio_list_add: Assertion `pio->offset >= off_last' failed.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
pflash_cfi02.c: fix debug macro
If PFLASH_DEBUG is enabled then we have some build errors:
hw/block/pflash_cfi02.c: In function ‘pflash_timer’:hw/block/pflash_cfi02.c:128:5: error: expected ‘)’ before string constanthw/block/pflash_cfi02.c:128:5: error: too few arguments to function ‘fprintf’...
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...
virtio_pci: fix level interrupts with irqfd
commit 62c96360ae7f2c7a8b029277fbb7cb082fdef7fd virtio-pci: fix level interruptsonly helps systems without irqfd: on systems with irqfd support wepassed in flag requesting irqfd even when msix is disabled....
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>
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.
virtio-mmio: Pass size to virtio_mmio_bus_new()
To be passed to qbus_create_initialize().
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
ide: Pass size to ide_bus_new()
To be passed to qbus_create_inplace().
pci: Pass size to pci_bus_new_inplace()
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.
virtio-pci: Pass size to virtio_pci_bus_new()
s390-virtio-bus: Pass size to virtio_s390_bus_new()
virtio-ccw: Pass size to virtio_ccw_bus_new()
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
virtio: Remove unnecessary OBJECT casts
There's no need to cast the first argument of object_initialize()to Object. Remove these unnecessary casts.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Andreas Färber <afaerber@suse.de>
intel-hda: Pass size to hda_codec_bus_init()
ipack: Pass size to ipack_bus_new_inplace()
Simplify DEVICE cast to avoid parent field access.
s390: provide I/O subsystem reset
Provide a function that resets the I/O subsystem.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>Acked-by: Alexander Graf <agraf@suse.de>
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.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
hw: Clean up bogus default boot order
We set default boot order "cad" in every single machine definitionexcept "pseries" and "moxiesim", even though very few boards actuallycare for boot order, and "cad" makes sense for even fewer.
Machines that care:...
pci: add config space access traces
This adds pci_cfg_read and pci_cfg_write traces for config spacesaccesses.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pc: fix regression for 64 bit PCI memory
commit 398489018183d613306ab022653552247d93919f pc: limit 64 bit hole to 2G by defaultintroduced a way for management to controlthe window allocated to the 64 bit PCI hole.
This is useful, but existing management tools do not know how to set...
pci: Introduce helper to retrieve a PCI device's DMA address space
A PCI device's DMA address space (possibly an IOMMU) is returned by amethod on the PCIBus. At the moment that only has one caller, so themethod is simply open coded. We'll need another caller for VFIO, so...
virtio: virtqueue_get_avail_bytes: fix desc_pa when loop over the indirect descriptor table
virtqueue_get_avail_bytes: when found a indirect desc, we need loop over it. /* loop over the indirect descriptor table */ indirect = 1; max = vring_desc_len(desc_pa, i) / sizeof(VRingDesc);...
kvm: shorten the parameter list for get_real_device()
get_real_device() has 5 parameters with the last 4 is contained in the firststructure.
This patch removes the last 4 parameters and directly use them from the firstparameter.
Acked-by: Alex Williamson <alex.williamson@redhat.com>...
aio / timers: Rearrange timer.h & make legacy functions call non-legacy
Rearrange timer.h so it is in order by function type.
Make legacy functions call non-legacy functions rather than vice-versa.
Convert cpus.c to use new API.
Signed-off-by: Alex Bligh <alex@alex.org.uk>...
aio / timers: Convert rtc_clock to be a QEMUClockType
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>
aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api.
Switch the entire code base to using the new timer API.
Note this patch may introduce some line length issues.
aio / timers: Untangle include files
include/qemu/timer.h has no need to include main-loop.h anddoing so causes an issue for the next patch. Unfortunatelyvarious files assume including timers.h will pull in main-loop.h.Untangle this mess.