adb: QOM'ify Apple Desktop Bus
It was not a qbus before, turn it into a first-class bus and initializeit properly from CUDA. Leave it a global variable as long as devices arenot QOM'ified yet.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
macio: QOM'ify some more
Move bar MemoryRegion initialization to an instance_init.
macio: Delay qdev init until all fields are initialized
This turns macio_bar_setup() into an implementation detail of the qdevinitfn, to be removed step by step.
macio: Split MacIO in two
Let the machines create two different types. This prepares to moveknowledge about sub-devices from the machines into the devices.
mac_nvram: Clean up public API
The state data field is accessed in uint8_t quantities, so switch fromuint32_t argument and return value to uint8_t.
Fix debug format specifiers while at it.
mac_nvram: Mark as Big Endian
mac_nvram: QOM'ify MacIO NVRAM
It was not qdev'ified before. Turn it into a SysBusDevice andinitialize it via static properties.
Prepare Old World specific MacIO state and embed the NVRAM state there.
Drop macio_nvram_setup_bar() in favor of sysbus_mmio_map() or...
ide/macio: QOM'ify MacIO IDE
It was not qdev'ified before. Turn it into a SysBusDevice.Embed them into the MacIO devices.
cuda: QOM'ify CUDA
It was not qdev'ified before. Turn it into a SysBusDevice and embed itin MacIO.
ppc: Move Mac machines to hw/ppc/
Signed-off-by: Andreas Färber <afaerber@suse.de>[agraf: squash in MAINTAINERS fix]Signed-off-by: Alexander Graf <agraf@suse.de>
Merge remote-tracking branch 'bonzini/scsi-next' into staging
Revert "serial: fix retry logic"
This reverts commit 67c5322d7000fd105a926eec44bc1765b7d70bdd:
I'm not sure if the retry logic has ever worked when not using FIFO mode. I found this while writing a test case although code inspection confirms it is...
iscsi: do not leak acb->buf when commands are aborted
acb->buf is freed in the WRITE callback, but this may notget called at all when commands are aborted. Add anotherfree in the ABORT TASK callback, which requires setting acb->bufto NULL everywhere....
iscsi: add support for iovectors
This patch adds support for directly passing the iovecarray from QEMUIOVector if libiscsi supports it (1.8.0or newer).
Signed-off-by: Peter Lieven <pl@kamp.de>[Preserve the improvements from commit 4cc841b, iscsi: partly...
target-cris: Fix typo in D_LOG() macro
It's VA_ARGS. Fixes the build with CRIS_[OP_]HELPER_DEBUG defined.
Broken since r6338 / 93fcfe39a0383377e647b821c9f165fd927cd4e0 (Convertreferences to logfile/loglevel to use qemu_log*() macros).
Cc: Eduardo Habkost <ehabkost@redhat.com>...
trivial: etraxfs_eth: Eliminate checkpatch errors
This is a trivial patch to harmonize the coding style onhw/etraxfs_eth.c. This is in preparation to split off the bitbang mdiocode into a separate file.
Cc: Peter Maydell <peter.maydell@linaro.org>Cc: Paul Brook <paul@codesourcery.com>...
Merge remote-tracking branch 'kraxel/usb.77' into staging
Merge remote-tracking branch 'spice/spice.v68' into staging
iscsi: add iscsi_create support
This patch adds support for bdrv_create. This allows e.g.to use qemu-img to convert from any supported device toan iscsi backed storage as destination.
Signed-off-by: Peter Lieven <pl@kamp.de>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
iscsi: partly avoid iovec linearization in iscsi_aio_writev
libiscsi expects all write16 data in a linear buffer. If theiovec only contains one buffer we can skip the linearizationstep as well as the additional malloc/free and pass thebuffer directly....
iscsi: add support for iSCSI NOPs [v2]
This patch will send NOP-Out PDUs every 5 seconds to the iSCSI target.If a consecutive number of NOP-In replies fail a reconnect is initiated.iSCSI NOPs help to ensure that the connection to the target is still operational....
scsi: fix segfault with 0-byte disk
When a 0-sized disk is found, READ CAPACITY will return aLUN NOT READY error. However, because it returns -1 insteadof zero, the HBA will call scsi_req_continue. This willtypically cause a segmentation fault or an assertion failure....
lsi: use qbus_reset_all to reset SCSI bus
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi: Drop useless null test in scsi_unit_attention()
req was created by scsi_req_alloc(), which initializes req->dev to avalue it dereferences. req->dev isn't changed anywhere else.Therefore, req->dev can't be null.
Drop the useless null test; it spooks Coverity....
ohci: add missing break
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: add usb-bot device (scsi bulk-only transport).
Basically the same as usb-storage, but without automatic scsidevice setup. Also features support for up to 16 LUNs.
Revert "usb-storage: Drop useless null test in usb_msd_handle_data()"
This reverts commit a1cbfd554e11bb8af38c2f3e1f1574bf4c563cd2.
Test isn't useless. scsi_req_enqueue() may finish the request (willactually happen for requests which don't trigger any I/O such as...
qxl: change rom size to 8192
This is a simpler solution to 869981, where migration breaks since qxl'srom bar size has changed. Instead of ignoring fields in QXLRom, which is what hasactually changed, we remove some of the modes, a mechanism alreadyaccounted for by the guest. The modes left allow for portrait and...
qxl: stop using non revision 4 rom fields for revision < 4
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
sysbus: Drop sysbus_from_qdev() cast macro
Replace by SYS_BUS_DEVICE() QOM cast macro using a scripted conversion.Avoids the old macro creeping into new code.
Resolve a Coding Style warning in openpic code.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
vnc: added buffer_advance function
Following Anthony Liguori's Websocket implementation I have added thebuffer_advance function to VNC and replaced all related buffer memmoveoperations with it.
Signed-off-by: Tim Hardeck <thardeck@suse.de>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
vnc: added initial websocket protocol support
This patch adds basic Websocket Protocol version 13 - RFC 6455 - supportto QEMU VNC. Binary encoding support on the client side is mandatory.
Because of the GnuTLS requirement the Websockets implementation is...
vnc: fix possible uninitialized removals
Some VncState values are not initialized before the Websocket handshake.If it fails QEMU segfaults during the cleanup. To prevent this behaviorintialization checks are added.
Signed-off-by: Tim Hardeck <thardeck@suse.de>...
virtio-s390-device: create a virtio-s390-bus during init.
A virtio-s390-bus is created during the init. So one VirtIODevice can beconnected on the virtio-s390-device through this bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-pci: refactor virtio-pci device.
Create the virtio-pci device which is abstract. This transport device willcreate a virtio-pci-bus, so one VirtIODevice can be connected.
virtio-s390-bus: add virtio-s390-bus.
This add the virtio-s390-bus which extends virtio-bus. So one VirtIODevice canbe connected on this bus.
qdev: add a maximum device allowed field for the bus.
Add a max_dev field to BusClass to specify the maximum amount of devices allowedon the bus (has no effect if max_dev=0)
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
virtio-bus: introduce virtio-bus
Introduce virtio-bus. Refactored transport device will create a bus whichextends virtio-bus.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-device: refactor virtio-device.
Create the virtio-device which is abstract. All the virtio-device can extendthis class. It also add some functions to virtio-bus.
virtio-pci-bus: introduce virtio-pci-bus.
Introduce virtio-pci-bus, which extends virtio-bus. It is used with virtio-pcitransport device.
Merge remote-tracking branch 'quintela/thread.next' into staging
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'kraxel/seabios-1.7.2' into staging
target-cris: Drop unused cpu_cris_close() prototype
Such a function never existed.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
target-microblaze: Drop unused cpu_mb_close() prototype
hw/tpci200: Fix compiler warning (redefined symbol with MinGW)
STATUS_TIMEOUT is defined in winnt.h:
CC hw/tpci200.ohw/tpci200.c:34:0: warning: "STATUS_TIMEOUT" redefined [enabled by default]/usr/lib/gcc/x86_64-w64-mingw32/4.6/../../../../x86_64-w64-mingw32/include/winnt.h:1036:0:...
hw: Spelling fix in log message
defineition -> definition
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Andreas F=E4rber <afaerber@suse.de>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
acpitable: open the data file in binary mode
-acpitable {file|data}=file reads the content of file, but it isin binary form, so the file should be opened usin O_BINARY flag.On *nix it is a no-op, but on windows and other weird platformit is really needed....
configure: silence pkg-config's check for curses
Signed-off-by: Vadim Evard <v.e.evard@gmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
seabios: update to 1.7.2 release
Not that many changes as we have a pretty recent git snapshot in masteralready:
Hannes Reinecke (1): megasas: Invert PCI device selection
Kevin O'Connor (2): Minor: Separate UUID display from F12 boot prompt....
Merge remote-tracking branch 'stefanha/block' into staging
tci: Fix broken build (regression)
s390x-linux-user now also uses GETPC. Instead of adding it to the list oftargets which use GETPC, the macro is now defined unconditionally.
This avoids future build regressions like this one:
CC s390x-linux-user/target-s390x/int_helper.o...
block/raw-posix: Make hdev_aio_discard() available outside Linux
Fixes the build on OpenBSD among others.
Suggested-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Andreas Färber <andreas.faerber@web.de>Cc: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
usb: Fix compilation for MinGW (regression)
84f2d0ea added an argument to function usb_host_info.The stub function must match the declaration in usb.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
cpu-defs.h: Drop qemu_work_item prototype
Commit c64ca8140e9c21cd0d44c10fbe1247cb4ade8e6e (cpu: Movequeued_work_{first,last} to CPUState) moved the qemu_work_item fieldsaway. Clean up the now unused prototype.
tcg/target-arm: Add missing parens to assertions
Silence a (legitimate) complaint about missing parentheses:
tcg/arm/tcg-target.c: In function ‘tcg_out_qemu_ld’:tcg/arm/tcg-target.c:1148:5: error: suggest parentheses aroundcomparison in operand of ‘&’ [-Werror=parentheses]...
Replace non-portable asprintf by g_strdup_printf
g_strdup_printf already handles OOM errors, so some error handling inQEMU code can be removed.
vl: Use size_t for sizes in get_boot_devices_list()
Code mixes uint32_t, int and size_t. Very unlikely to go wrong inpractice, but clean it up anyway.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
fw_cfg: Use void *, size_t instead of uint8_t *, uint32_t for blobs
Many callers pass size_t, which gets silently truncated to uint32_t.Harmless, because all practical sizes are well below 4GiB. Clean itup anyway. Size overflow now fails assertions....
pc: Clean up bochs_bios_init()'s (non-)use of sizeof
sun4: Fix unchecked strdup() by switching to fw_cfg_add_string()
fw_cfg: New fw_cfg_add_string()
pc: Fix unchecked strdup() by switching to fw_cfg_add_string()
fw_cfg: Dumb down fw_cfg_add_*() not to return success / failure
No caller is checking the value, so all errors get ignored, usuallysilently. assert() instead.
fw_cfg: Replace debug prints by tracepoints
optimize: optimize using nonzero bits
This adds two optimizations using the non-zero bit mask. In some casesinvolving shifts or ANDs the value can become zero, and can thus beoptimized to a move of zero. Second, useless zero-extension or anAND with constant can be detected that would only zero bits that are...
optimize: track nonzero bits of registers
Add a "mask" field to the tcg_temp_info struct. A bit that is zeroin "mask" will always be zero in the corresponding temporary.Zero bits in the mask can be produced from moves of immediates,zero-extensions, ANDs with constants, shifts; they can then be...
optimize: only write to state when clearing optimizer data
The next patch will add to the TCG optimizer a field that should benon-zero in the default case. Thus, replace the memset of thetemps array with a loop. Only the state field has to be up-to-date,...
Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf
Merge branch 's390-for-upstream' of git://repo.or.cz/qemu/agraf
Merge branch 'axp-next' of git://github.com/rth7680/qemu
s390: new contributions GPLv2 or later
IBMs s390 contributions were meant to to be gplv2 or later (sincewe were contributing to qemu). Several of the s390 specific fileslink to gpl code anyway, so lets clarify the licence statement fornew contributions for those files that we have touched multiple...
s390: Move IPL code into a separate device
Lets move the code to setup IPL for external kernelor via the zipl rom into a separate file. This allows to
- define a reboot handler, setting up the PSW appropriately- enhance the boot code to IPL disks that contain a bootmap that...
S390: Enable -cpu help and QMP query-cpu-definitions
This enables qemu -cpu help to return a list of supported CPU modelson s390 and also to query for cpu definitions in the monitor.Initially only cpu model = host is returned. This needs to be reworked...
s390x: Remove inline function ebcdic_put and related data from cpu.h
The function is only used in misc_helper.c, so move it to that file.
This reduces the size of debug executables (compiled without optimization)because they get unused code and data for each compilation which includes...
s390: Add CPU reset handler
Add a CPU reset handler to have all CPUs in a PoP compliantstate.
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>[agraf: move hw/hw.h into existing ifdef]Signed-off-by: Alexander Graf <agraf@suse.de>
s390x: fix indentation
In one of the last commits we accidently got 3-space indentation intothe tree. Fix it up so it's 4 spaces wide.
Reported-by: Andreas Faerber <afaerber@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
target-s390x: Unregister reset callback on finalization
Since commit "s390: Add CPU reset handler" the CPU's instance_initregisters a reset callback. Unregister that on instance_finalize.
s390: Add a hypercall registration interface.
Allow virtio machines to register for different diag500 functioncodes and convert s390-virtio to use it.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>Signed-off-by: Alexander Graf <agraf@suse.de>
PPC: E500: Calculate loading blob offsets properly
We have 3 blobs we need to load when booting the system:
- kernel - initrd - dtb
We place them in physical memory in that order. At least we should.This patch fixes the location calculation up to take any module into...
PPC: Provide zero SVR for -cpu e500mc and e5500
Even though our -cpu types for e500mc and e5500 are no real CPUs thatactually have version registers, a guest might still want to accesssaid version register and that has to succeed for a guest to be happy....
PPC: e500: Change in-memory order of load blobs
Today, we load
<kernel> <initrd> <dtb>
into memory in that order. However, Linux has a bug where it can onlyhandle the dtb if it's within the first 64MB of where <kernel> starts.
So instead, let's change the order to...
Update Linux kernel headers
Based on kvm.git a843fac (next) plus dfdebc24 (master).
Signed-off-by: Alexander Graf <agraf@suse.de>
openpic: export e500 epr enable into a ppc.c function
Enabling and disabling the EPR capability (mpic_proxy) is a systemwide operation. As such, it belongs into the ppc.c file, since that'swhere PPC specific machine wide logic happens.
PPC: KVM: Add support for EPR with KVM
This patch links KVM EPR support to the existing TCG support we have now.
openpic: move gcr write into a function
The GCR register contains too much functionality to be covered insideof the register switch statement. Move it out into a separate function.
openpic: unify gcr mode mask updates
The mode mask already masks out bits we don't care about, so theactual handling code can stay intact regardless.
openpic: set mixed mode as supported
The Raven MPIC implementation supports the "Mixed" mode to work withan i8259. While we don't implement mixed mode, we should mark it asa supported mode in the mode bitmap.
dataplane: support viostor virtio-pci status bit setting
The viostor virtio-blk driver for Windows does not use theVIRTIO_CONFIG_S_DRIVER bit. It only sets the VIRTIO_CONFIG_S_DRIVER_OKbit.
The viostor driver refreshes the virtio-pci status byte sometimes while...
dataplane: avoid reentrancy during virtio_blk_data_plane_stop()
When dataplane is stopping, the s->vdev->binding->set_host_notifier(...,false) call can invoke the virtqueue handler if an ioeventfdnotification is pending. This causes hw/virtio-blk.c to invoke...
win32-aio: use iov utility functions instead of open-coding them
We have iov_from_buf() and iov_to_buf(), use them instead ofopen-coding these in block/win32-aio.c
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Merge remote-tracking branch 'luiz/queue/qmp' into staging
virtio-pci: fix irqfd cleanup argument order
Order of arguments of kvm_virtio_pci_irqfd_releasegot mixed up in all calls.As a result users see assertions during cleanup.
Reported-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>...
qom: Extend documentation on QOM method concepts
Add a documentation section "Methods" and discuss among others how tohandle overriding virtual methods.
Clarify DeviceClass::realize documentation and refer to the above.
Makefile: drop recursive libcacard clean
Commit eb8eb53e5846a957cf333f2e1ec8cb6e0c04 ("libcacard: rewriteMakefile in non-recursive style") refactored libcacard/Makefile so itcan be included by the top-level Makefile.
The top-level clean target still loops over subdirectories, including...
migration: move exit condition to migration thread
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Reviewed-by: Eric Blake <eblake@redhat.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
migration: unfold rest of migrate_fd_put_ready() into thread
This will allow us finer control in next patches.
migration: Only go to the iterate stage if there is anything to send
Signed-off-by: Orit Wasserman <owasserm@redhat.com>Signed-off-by: Juan Quintela <quintela@redhat.com>
migration: remove argument to qemu_savevm_state_cancel