ich9: kill cmos_s3
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1366799842-18550-1-git-send-email-hutao@cn.fujitsu.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
input: make QEMUPutLEDEntry + QEMUPutMouseEntry private
There is no need for anybody outside ui/input.c to access thestruct elements. Move the definitions, leaving only the typedefsin the header files.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
input: introduce keyboard handler list
Add a linked list of keyboard handlers. Added handlers will goto the head of the list. Removed handlers will be zapped fromthe list. The head of the list will be used for events.
This fixes the keyboard-dead-after-usb-kbd-unplug issue, key events...
Move TPM passthrough specific command line options to backend structure
Move the TPM passthrough specific command line options to the passthroughbackend implementation and attach them to the backend's interface structure.
Add code to tpm.c for validating the TPM command line options....
Add option to mlock qemu and guest memory
In certain scenario, latency induced by paging is significant andmemory locking is needed. Also, in the scenario with untrustedguests, latency improvement due to mlock is desired.
This patch introduces a following new option to mlock guest and...
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'bonzini/scsi-next' into staging
block: Remove filename parameter from .bdrv_file_open()
It is unused now in all block drivers.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>
block: Add driver-specific options for backing files
Options starting in "backing." are passed to the backing file now. Ifyou don't need to specify the filename for the backing file, you can addit on the command line instead of in the image file:
$ qemu-nbd -t /tmp/test.img...
qdev: Drop taddr properties
Drop all the infrastructure for taddr properties (ie ones whichare 'hwaddr' sized). These are now unused, and any further desireduse would be rather questionable since device properties shouldn'tgenerally depend on a type that is conceptually variable based on...
vhost-scsi: new device supporting the tcm_vhost Linux kernel module
The WWPN specified in configfs is passed to "-device vhost-scsi-pci".The tgpt field of the SET_ENDPOINT ioctl is obsolete now, so it is notavailable from the QEMU command-line. Instead, I hardcode it to zero....
virtio-scsi: create VirtIOSCSICommon
This patch refactors existing virtio-scsi code into VirtIOSCSICommonin order to allow virtio_scsi_init_common() to be used by both internalvirtio_scsi_init() and external vhost-scsi-pci code.
Cc: Michael S. Tsirkin <mst@redhat.com>...
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pci: add pci test device
This adds a new device that we can use for testing PCI PIO and MMIO, with andwithout ioeventfd in different configurations. FAST_MMIO will be added if/whenkvm supports it. Also included are minor cleanups in kvm APIs that it needs....
virtio.h: drop unused function prototypes
They are unused since commit 5c7d0962f60498c3f11d402e1c857cb9d5d8568d.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
bswap: fix compiler warning
The bswap functions use memcpy but the bswap.h header itself does not seem toinclude it in some configuration such as cross compiling for powerpc64on x86_64 machine.
The patch explicitly includes string.h.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>...
scsi: VMWare PVSCSI paravirtual device implementation
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>Signed-off-by: Yan Vugenfirer <yan@daynix.com>[ Rename files to vmw_pvscsi, fix setting of hostStatus in pvscsi_request_cancelled - Paolo ]Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
vhost: Add vhost_commit callback for SeaBIOS ROM region re-mapping
This patch follows MST's recommendation to move checks forvhost_verify_ring_mappings() > cpu_physical_memory_map() operationsfrom MemoryListener>region_[add,del]() -> vhost_set_memory() into...
elfload: use abi_short/ushort instead of target_short/ushort
The alignment is a characteristic of the ABI, not the CPU.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
elfload: use abi_int/uint instead of target_int/uint
elfload: only give abi_long/ulong the alignment specified by the target
Previously, this was done for target_long/ulong, and propagated toabi_long/ulong via a typedef. But target_long/ulong should nothave any specific alignment, it is never used to access guest...
elfload: use abi_llong/ullong instead of target_llong/ullong
configure: CONFIG_NO_XEN is duplicated
We already define it in Makefile.target. But we need to avoid acurious double negation in order to eliminate it.
Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
virtio-net: cleanup: use QOM cast.
As the virtio-net-pci and virtio-net-s390 are switched to the new API,we can use QOM casts.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Message-id: 1365690602-22729-7-git-send-email-fred.konrad@greensocs.com...
virtio: add two functions to VirtioDeviceClass.
Recent changes need two functions to VirtioDevice. This just add theminto VirtioDeviceClass.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Message-id: 1365690602-22729-2-git-send-email-fred.konrad@greensocs.com...
virtio-net: add the virtio-net device.
Create virtio-net-device which extends virtio-device, so it can be connected onvirtio-bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Message-id: 1365690602-22729-3-git-send-email-fred.konrad@greensocs.com...
Fix warnings suppressors to honor --disable-werror
Replace
#pragma GCC diagnostic ignored FOO [Troublesome code...] #pragma GCC diagnostic error FOO
by
#pragma GCC diagnostic push #pragma GCC diagnostic ignored FOO [Troublesome code...]...
chardev: remove the headers of Memory chardev driver
Memory chardev driver is no longer used, and Commit:4bf0bb8014ac2ac61b1004f5d92b2a4594d48017 has dropedit but the headers, so clean it up.
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>Message-id: 1366188414-24214-1-git-send-email-lilei@linux.vnet.ibm.com...
Merge remote-tracking branch 'spice/spice.v69' into staging
Merge remote-tracking branch 'kraxel/pixman.v11' into staging
Merge remote-tracking branch 'afaerber/qom-cpu' into staging
virtio-console: Also throttle when less was written then requested
This is necessary so that we get properly woken up to write the rest.
This patch also changes the len argument to the have_data callback, toavoid doing an unsigned signed comparison.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>...
stream: Add flow control API
Add basic flow control to stream. A stream slave may return short, indicatingthat it is not capable of accepting any more data at the present time. Pollingor a callback can be used via the can_push() function to determine when the...
stream: Remove app argument hack
The uint32_t *app argument doesn't exist in real hardware. It was a hack inxilinx_axidma/enet to fake the (secondary) control stream connection. Removedthe argument and added the second stream to axienet/dma.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
xen: re-enable refresh interval reporting for xenfb
xenfb informs the guest about the gui refresh interval so it can avoidpointless work. That logic was temporarely disabled for theDisplayState reorganization. Restore it now, with a proper interfacefor it....
console: add qemu_console_is_*
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
console: allow pinning displaychangelisteners to consoles
DisplayChangeListener gets a new QemuConsole field, which can be set tonon-NULL before registering. This will pin the QemuConsole, so thatparticular DisplayChangeListener will not follow console switches....
console: add GraphicHwOps
Pass a single GraphicHwOps struct pointer to graphic_console_init,instead of a bunch of function pointers.
console: gui timer fixes
Make gui update rate adaption code in gui_update() actually work.Sprinkle in a tracepoint so you can see the code at work. Removethe update rate adaption code in vnc and make vnc simply use thegeneric bits instead.
console: rename vga_hw_*, add QemuConsole param
Add QemuConsole parameter to vga_hw_*, so the interface allows to updatenon-active consoles (the actual code can't handle this yet, see nextpatch). Passing NULL is allowed and updates the active console, like...
console: give each QemuConsole its own DisplaySurface
Go away from the global DisplaySurface, give one to each QemuConsoleinstead. With this patch applied it is possible to callgraphics_hw_* functions with qemu consoles which are not the currentforeground console....
console: simplify screendump
Screendumps are alot simpler as we can update non-activeQemuConsoles now. So we only need to update the QemuConsolewe want write out, then dump the DisplaySurface content intoa ppm file. Done.
No console switching needed. No special support code in the...
console: move gui_update+gui_setup_refresh from vl.c into console.c
Pure code motion, no functional changes.
console: make DisplayState private to console.c
With gui_* being moved to console.c nobody outside console.c needsaccess to DisplayState fields any more. Make the struct private.
pixman: add qemu_pixman_color()
Helper function to map qemu colors (32bit integer + matching PixelFormat)into pixman_color_t.
pixman: render vgafont glyphs into pixman images
Add helper functions to create pixman mask images for glyphsand to render these glyphs into a pixman image.
console: displaystate init revamp
We have only one DisplayState, so there is no need for the "next" linking, rip it. Also consolidate all displaystate initializationinto init_displaystate(). This function is called by vl.c aftercreating the devices (and thus all QemuConsoles) and before...
qdev: Add qdev property for bool type
Signed-off-by: Igor Mammedov <imammedo@redhat.com>[AF: Use new qdev_prop_set_after_realize()]Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Pass CPUState to cpu_synchronize_post()
... so it could be called without requiring CPUArchState.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
This device is used for kvm unit tests,currently it supports testing performance of ioeventfd.Using updated kvm unittest, here's an example output: mmio-no-eventfd:pci-mem 8796 mmio-wildcard-eventfd:pci-mem 3609...
Merge remote-tracking branch 'bonzini/hw-dirs' into staging
qdev: Fix QOM unrealize behavior
Since commit 249d41720b7dfbb5951b430b9eefdbee7464f515 (qdev: Prepare"realized" property) setting realized = true would register the device'sVMStateDescription, but realized = false would not unregister it. Fix that.
Moving the code from unparenting also revealed that we were calling...
memory: move core typedefs to qemu/typedefs.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
exec: remove useless declarations from memory-internal.h
tpm: reorganize headers and split hardware part
The TPM subsystem does not have a full front-end/back-end separation.The sole available backend, tpm_passthrough, depends on the datastructures of the sole available frontend, tpm_tis.
However, we can at least try to split the user interface (tpm.c) from the...
sysemu: avoid proliferation of include/ subdirectories
virtio-serial: cleanup: use QOM casts.
As the virtio-serial-pci and virtio-serial-s390 are switched to the newAPI, we can use QOM casts.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
virtio-serial: cleanup: remove qdev field.
The qdev field is no longer needed, just drop it.
acpi.h: make it self contained
Headers shouldn't assume another header is included,pull in everything necessary.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Message-id: 20130415081250.GA7374@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio: fix broken aliases.
This fix the broken aliases, by renaming the devices.
So: * virtio-blk => virtio-blk-device. * virtio-balloon => virtio-balloon-device. * virtio-scsi => virtio-scsi-device.
All virtio-*-pci, virtio-*-s390, virtio-*-ccw didn't change....
virtio-serial: add the virtio-serial device.
Create virtio-serial which extends virtio-device, so it can be connectedon virtio-bus.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
acpi: move declarations from pc.h to acpi.h
Functions defined in acpi/ should be declared inacpi.h
arm: fix location of some include files
The recent rearrangement of include files had some minor errors: devices.h is not ARM specific and should not be in arm/ arm.h should be in arm/
Move these two headers to correct this.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
block: Introduce bdrv_writev_vmstate
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
savevm: Implement block_writev_buffer()
Instead of breaking up RAM state into many small chunks, pass the iovecto the block layer for better performance.
block: Introduce bdrv_pwritev() for qcow2_save_vmstate
Directly pass the QEMUIOVector on instead of linearising it.
kvm: remove unused APIs
There are only used internally now, move themout of header and out of stub.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
unicode: New mod_utf8_codepoint()
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
aes: move aes.h from include/block to include/qemu
Move aes.h from include/block to include/qemu to show it can be reusedby other subsystems.
Cc: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>...
aes: make Td[0-5] and Te[0-5] tables non static
Remove static attribute to Td[0-5] and Te[0-5] tables so that theycan be used outside of aes.c. Change their type from u32 to uint32_t,to keep the u32 udef local to aes.c. Prefix them with AES_ so that they...
sh7750: Change cpu field type to SuperHCPU
This brings us a step closer to QOM'ified SH7750 SoC andfixes b350ab75 (target-sh4: Move PVR/PRR/CVR into SuperHCPUClass)assuming SuperHCPU type for SUPERH_CPU_GET_CLASS().
Fix Coding Style issues while at it (indentation, braces)....
hw: move timer devices to hw/timer/, configure with default-configs/
hw: move PCI bridges to hw/pci-* or hw/ARCH
hw: move headers to include/
Many of these should be cleaned up with proper qdev-/QOM-ification.Right now there are many catch-all headers in include/hw/ARCH dependingon cpu.h, and this makes it necessary to compile these files per-target.However, fixing this does not belong in these patches....
Merge branch 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm
block: fix I/O throttling accounting blind spot
I/O throttling relies on bdrv_acct_done() which is called when a requestcompletes. This leaves a blind spot since we only charge for completedrequests, not submitted requests.
For example, if there is 1 operation remaining in this time slice the...
block: keep I/O throttling slice time constant
It is not necessary to adjust the slice time at runtime. We alreadyextend the current slice in order to carry over accounting into the nextslice. Changing the actual slice time value introduces oscillations....
vmstate: Add support for two dimensional arrays
Add support for migrating two dimensional arrays, by defininga set of new macros VMSTATE_*_2DARRAY paralleling the existingVMSTATE_*_ARRAY macros. 2D arrays are handled the same for actualstate serialization; the only difference is that the type check...
vmstate.h: introduce VMSTATE_BUFFER_POINTER_UNSAFE macro
Macro could be used to migrate a dynamically allocated buffer of known size.
Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1362923278-4080-2-git-send-email-i.mitsyanko@gmail.com...
qstring: add qstring_get_length()
Long overdue.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Allow clock_gettime() monotonic clock to be utilized on more OS's
Allow the clock_gettime() code using monotonic clock to be utilized onmore POSIX compliannt OS's. This started as a fix for OpenBSD which waslisted in one function as part of the previous hard coded list of OS's...
acpi_table_add(): accept QemuOpts and parse it with OptsVisitor
As one consequence, strtok() -- which modifies its argument -- is replacedwith g_strsplit().
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
qemu-char: Add qemu_chr_fe_claim / _release helper functions
Add qemu_chr_fe_claim / _release helper functions for properly dealing withavail_connections.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Message-id: 1364412581-3672-2-git-send-email-hdegoede@redhat.com...
Merge remote-tracking branch 'luiz/queue/qmp' into staging
oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()
The fcntl(fd, F_SETFL, O_NONBLOCK) flag is not specific to sockets.Rename to qemu_set_nonblock() just like qemu_set_cloexec().
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
QOM-ify the TPM support
QOM-ified the TPM support with much code borrowed from the rng implementation.
All other TPM related code moves will be provided in a subsequent patch.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>Message-id: 1364469981.24703.1.camel@d941e-10...
qemu-char: Rename qemu_chr_generic_open to qemu_chr_be_generic_open
To better reflect that it is for handling a backend being opened.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Message-id: 1364292483-16564-3-git-send-email-hdegoede@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char: Add fe_open tracking
Add tracking of the fe_open state to struct CharDriverState.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Message-id: 1364292483-16564-4-git-send-email-hdegoede@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char: Automatically do fe_open / fe_close on qemu_chr_add_handlers
Most frontends can't really determine if the guest actually has the frontendside open. So lets automatically generate fe_open / fe_close as soon as afrontend becomes ready (as signalled by calling qemu_chr_add_handlers) /...
qemu-char: Cleanup: consolidate fe_open/fe_close into fe_set_open
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Message-id: 1364292483-16564-6-git-send-email-hdegoede@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char: Consolidate guest_close/guest_open into a set_fe_open callback
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Message-id: 1364292483-16564-7-git-send-email-hdegoede@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char: Rename opened to be_open
Rename the opened variable to be_open to reflect that it contains theopened state of the backend.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Message-id: 1364292483-16564-2-git-send-email-hdegoede@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
compiler: fix warning with GCC 4.8.0
GCC 4.8.0 introduces a new warning:
block/qcow2-snapshot.c: In function 'qcow2_write_snapshots’: block/qcow2-snapshot.c:252:18: error: typedef 'qemu_build_bug_on__253' locally defined but not used [-Werror=unused-local-typedefs]...
virtio,pci,qom
Work by Alex to support VGA assignment,pci and virtio fixes by Stefan, Jason and myself, and anew qmp event for hotplug support by myself.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
Merge remote-tracking branch 'quintela/migration.next' into staging
char: introduce a blocking version of qemu_chr_fe_write
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add qemu_put_buffer_async
This allows us to add a buffer to the iovec to send without copying itinto the static buffer, the buffer will be sent later when qemu_fflush is called.
Signed-off-by: Orit Wasserman <owasserm@redhat.com>Signed-off-by: Juan Quintela <quintela@redhat.com>