summaryrefslogtreecommitdiffstats
path: root/hw/char
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into ↵Anthony Liguori2013-09-034-6/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging QOM device refactorings * Fix QOM and ISA documentation errors * Extend object_initialize() et al. to check the instance size # gpg: Signature made Fri 30 Aug 2013 02:19:48 PM CDT using RSA key ID 3E7E013F # gpg: Can't check signature: public key not found # By Andreas Färber (14) and others # Via Andreas Färber * afaerber/tags/qom-devices-for-anthony: isa: Fix documentation of isa_register_portio_list() qom: Assert instance size in object_initialize_with_type() qom: Pass available size to object_initialize() qdev: Pass size to qbus_create_inplace() virtio-mmio: Pass size to virtio_mmio_bus_new() virtio-ccw: Pass size to virtio_ccw_bus_new() s390-virtio-bus: Pass size to virtio_s390_bus_new() virtio-pci: Pass size to virtio_pci_bus_new() usb: Pass size to usb_bus_new() scsi: Pass size to scsi_bus_new() pci: Pass size to pci_bus_new_inplace() ide: Pass size to ide_bus_new() ipack: Pass size to ipack_bus_new_inplace() intel-hda: Pass size to hda_codec_bus_init() qom: Fix object_initialize_with_type() argument name in documentation virtio: Remove unnecessary OBJECT() casts object: Fix typo in qom/object.h
| * qdev: Pass size to qbus_create_inplace()Andreas Färber2013-08-302-3/+3
| | | | | | | | | | | | | | | | | | | | To be passed to object_initialize(). Since commit 39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6 the argument is void*, so drop some superfluous (BusState *) casts or direct parent field usages. Signed-off-by: Andreas Färber <afaerber@suse.de>
| * ipack: Pass size to ipack_bus_new_inplace()Andreas Färber2013-08-303-3/+5
| | | | | | | | | | | | | | | | | | To be passed to qbus_create_inplace(). Simplify DEVICE() cast to avoid parent field access. Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* | pseries: Fix stalls on hypervisor virtual consoleAnton Blanchard2013-09-021-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | A number of users are reporting stalls when using the pseries hypervisor virtual console. A simple test case is to paste 15 or 17 characters at a time into the console. Pasting 15 characters at a time works fine but pasting 17 characters hangs for a random amount of time. Other activity (network, qemu monitor etc) unblocks it. If qemu-char tries to send more than 16 characters at once, vty_can_receive returns false. At this point we have to wait for the guest to consume that output. Everything is good so far. The problem occurs when the the guest does consume the output. We need to signal back to the qemu-char layer that we are ready for more input. Without this we block until something else kicks us (eg network activity). Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
* Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori2013-08-263-22/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Alex Bligh (32) and others # Via Stefan Hajnoczi * stefanha/block: (42 commits) win32-aio: drop win32_aio_flush_cb() aio-win32: replace incorrect AioHandler->opaque usage with ->e aio / timers: remove dummy_io_handler_flush from tests/test-aio.c aio / timers: Remove legacy interface aio / timers: Switch entire codebase to the new timer API aio / timers: Add scripts/switch-timer-api aio / timers: Add test harness for AioContext timers aio / timers: convert block_job_sleep_ns and co_sleep_ns to new API aio / timers: Convert rtc_clock to be a QEMUClockType aio / timers: Remove main_loop_timerlist aio / timers: Rearrange timer.h & make legacy functions call non-legacy aio / timers: Add qemu_clock_get_ms and qemu_clock_get_ms aio / timers: Remove legacy qemu_clock_deadline & qemu_timerlist_deadline aio / timers: Remove alarm timers aio / timers: Add documentation and new format calls aio / timers: Use all timerlists in icount warp calculations aio / timers: Introduce new API timer_new and friends aio / timers: On timer modification, qemu_notify or aio_notify aio / timers: Convert mainloop to use timeout aio / timers: Convert aio_poll to use AioContext timers' deadline ... Message-id: 1377202298-22896-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
| * aio / timers: Switch entire codebase to the new timer APIAlex Bligh2013-08-223-22/+22
| | | | | | | | | | | | | | | | | | | | | | 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. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | Convert stderr message calling error_get_pretty() to error_report()Seiji Aguchi2013-08-201-2/+3
|/ | | | | | | | | | | | | | | | | | | | | | Convert stderr messages calling error_get_pretty() to error_report(). Timestamp is prepended by -msg timstamp option with it. Per Markus's comment below, A conversion from fprintf() to error_report() is always an improvement, regardless of error_get_pretty(). http://marc.info/?l=qemu-devel&m=137513283408601&w=2 But, it is not reasonable to convert them at one time because fprintf() is used everwhere in qemu. So, it should be done step by step with avoiding regression. Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* virtio-console: Use exitfn for virtserialport, tooAndreas Färber2013-08-011-0/+1
| | | | | | | | | | | virtconsole and virtserialport are identical in every other aspect except for the distinguishing VirtIOSerialPortClass::is_console field. Cc: qemu-stable@nongnu.org Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1375313326-14966-1-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* s390/sclpconsole: handle char layer busy conditionsHeinz Graalfs2013-07-301-17/+1
| | | | | | | | Handle busy conditions (errno=EAGAIN) in char layer by using the new char layer in the sclp console. Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
* pl011: QOM'ify pl011 and pl011_luminaryAndreas Färber2013-07-291-30/+32
| | | | | | | | Let the Luminary variant inherit from the ARM one, overwriting its ID on instance_init. Introduce type constant and use QOM casts. Replace triplicated SysBusDevice initfn with QOM realizefn and instance_init. Signed-off-by: Andreas Färber <afaerber@suse.de>
* pl011: Rename pl011_stateAndreas Färber2013-07-291-26/+26
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* milkymist-uart: QOM cast cleanupAndreas Färber2013-07-291-5/+10
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* lm32_uart: QOM cast cleanupAndreas Färber2013-07-291-4/+8
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* lm32_juart: QOM cast cleanupAndreas Färber2013-07-291-8/+11
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* lm32_juart: Relocate and tidy headerAndreas Färber2013-07-291-1/+1
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* imx_serial: QOM cast cleanupAndreas Färber2013-07-291-6/+10
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* grlib_apbuart: QOM cast cleanupAndreas Färber2013-07-291-4/+9
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* exynos4210_uart: QOM cast cleanupAndreas Färber2013-07-291-11/+15
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* escc: QOM cast cleanupAndreas Färber2013-07-291-8/+11
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* cadence_uart: QOM cast cleanupAndreas Färber2013-07-291-3/+7
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* xilinx_uartlite: QOM cast cleanupsAndreas Färber2013-07-291-3/+8
| | | | | | | Introduce type constant and use QOM casts. Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* xilinx_uartlite: Rename xlx_uartlite to XilinxUARTLiteAndreas Färber2013-07-291-11/+10
| | | | | Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* etraxfs_ser: QOM cast cleanupsAndreas Färber2013-07-291-16/+21
| | | | | | | | Rename etrax_serial to ETRAXSerial, introduce type constant and use QOM casts. Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* devices: Associate devices to their logical categoryMarcel Apfelbaum2013-07-299-0/+12
| | | | | | | | | The category will be used to sort the devices displayed in the command line help. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Message-id: 1375107465-25767-4-git-send-email-marcel.a@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pseries: savevm support for PAPR VIO logical ttyDavid Gibson2013-07-291-0/+16
| | | | | | | | | | This patch adds the necessary VMStateDescription information to support savevm/loadvm for the spapr_tty (PAPR logical serial) device. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1374175984-8930-5-git-send-email-aliguori@us.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* char/cadence_uart: Fix reset for unattached instancesPeter Crosthwaite2013-07-151-1/+3
| | | | | | | | | | | | | | commit 1db8b5efe0c2b5000e50691eea61264a615f43de introduced an issue where QEMU would segfault if you have an unattached Cadence UART. Fix by guarding the flush-on-reset logic on there being a qemu_chr attachment. Reported-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Tested-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Message-id: 9009578ee10a50d994b2e10aa2840d73765f5968.1370577272.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* hw/c*: pass owner to memory_region_init* functionsPaolo Bonzini2013-07-0414-23/+27
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* escc: rename struct to ESCCStatePaolo Bonzini2013-07-041-17/+17
| | | | | | | | We are using the same struct name for two devices. 8250 is widespread enough that this causes some confusion, rename the other instance. Reviewed-by: Andreas Faerber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* memory: add owner argument to initialization functionsPaolo Bonzini2013-07-0419-29/+29
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* cadence_uart: Handle backend tx errorsEdgar E. Iglesias2013-06-241-3/+1
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* char/serial: fix copy&paste error (fifo8_is_full vs empty)Vladimir Senkov2013-06-171-1/+1
| | | | | | | | | Copy&paste error in serial.c causes a crash when attempting to read from UART (if there is no data to be read) Signed-off-by: Vladimir Senkov <hangup@gmail.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpuBlue Swirl2013-06-155-43/+82
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu: qdev: Drop FROM_QBUS() macro isa: QOM'ify ISADevice isa: QOM'ify ISABus i8259: Convert PICCommonState to use QOM realizefn kvm/i8259: QOM'ify some more i8259: QOM'ify some more i8254: Convert PITCommonState to QOM realizefn kvm/i8254: QOM'ify some more i8254: QOM'ify some more isa: Use realizefn for ISADevice cs4231a: QOM'ify some more gus: QOM'ify some more
| * isa: QOM'ify ISADeviceAndreas Färber2013-06-071-6/+8
| | | | | | | | | | | | Rename its parent field and use DEVICE() where necessary. Signed-off-by: Andreas Färber <afaerber@suse.de>
| * isa: Use realizefn for ISADeviceAndreas Färber2013-06-075-37/+74
| | | | | | | | | | | | | | | | Drop ISADeviceClass::init and the resulting no-op initfn and let children implement their own realizefn. Adapt error handling. Split off an instance_init where sensible. Signed-off-by: Andreas Färber <afaerber@suse.de>
* | char/serial: serial_ioport_write: Factor out common codePeter Crosthwaite2013-06-111-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | These three lines are common to both FIFO and regular mode. Just factor them out to outside the if rather than replicate the same lines inside both if and else. Cc: qemu-trivial@nongnu.org Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* | char/serial: Use generic Fifo8Peter Crosthwaite2013-06-111-64/+34
| | | | | | | | | | | | | | | | Use the generic Fifo8 helper provided by QEMU, rather than re-implement privately. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* | char/serial: cosmetic fixes.Peter Crosthwaite2013-06-111-11/+19
|/ | | | | | | | | | Some cosmetic fixes to char/serial fixing some checkpatch errors. Cc: qemu-trivial@nongnu.org Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* debugcon: fix compiler warning when open DEBUG_DEBUGCONliguang2013-06-011-2/+2
| | | | | | | | | | | | compiler warnings: CC hw/char/debugcon.o hw/char/debugcon.c: In function ‘debugcon_ioport_write’: hw/char/debugcon.c:58: warning: format ‘%02x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’ hw/char/debugcon.c: In function ‘debugcon_ioport_read’: hw/char/debugcon.c:70: warning: format ‘%04x’ expects type ‘unsigned int’, but argument 2 has type ‘hwaddr’ Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* debugcon: make debug message more readableliguang2013-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | before change: Bdebugcon: write addr=0x0000 val=0x6f odebugcon: write addr=0x0000 val=0x6f odebugcon: write addr=0x0000 val=0x74 tdebugcon: write addr=0x0000 val=0x69 idebugcon: write addr=0x0000 val=0x6e ndebugcon: write addr=0x0000 val=0x67 gdebugcon: write addr=0x0000 val=0x20 debugcon: write addr=0x0000 val=0x66 after change: B [debugcon: write addr=0x0000 val=0x6f] o [debugcon: write addr=0x0000 val=0x6f] o [debugcon: write addr=0x0000 val=0x74] t [debugcon: write addr=0x0000 val=0x69] i [debugcon: write addr=0x0000 val=0x6e] n [debugcon: write addr=0x0000 val=0x67] g [debugcon: write addr=0x0000 val=0x20] [debugcon: write addr=0x0000 val=0x66] Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* debugcon: fix always print "addr=0x0, val=0x0" bug when use DEBUG_DEBUGCONliguang2013-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when use DEBUG_DEBUGCON, screen spits: debugcon: write addr=0x0000 val=0x00 Rdebugcon: write addr=0x0000 val=0x00 udebugcon: write addr=0x0000 val=0x00 ndebugcon: write addr=0x0000 val=0x00 ndebugcon: write addr=0x0000 val=0x00 idebugcon: write addr=0x0000 val=0x00 ndebugcon: write addr=0x0000 val=0x00 gdebugcon: write addr=0x0000 val=0x00 debugcon: write addr=0x0000 val=0x00 odebugcon: write addr=0x0000 val=0x00 pdebugcon: write addr=0x0000 val=0x00 tdebugcon: write addr=0x0000 val=0x00 idebugcon: write addr=0x0000 val=0x00 odebugcon: write addr=0x0000 val=0x00 ndebugcon: write addr=0x0000 val=0x00 debugcon: write addr=0x0000 val=0x00 rdebugcon: write addr=0x0000 val=0x00 odebugcon: write addr=0x0000 val=0x00 mdebugcon: write addr=0x0000 val=0x00 debugcon: write addr=0x0000 val=0x00 adebugcon: write addr=0x0000 val=0x00 tdebugcon: write addr=0x0000 val=0x00 debugcon: write addr=0x0000 val=0x00 Oh, that's wrong, val is not always be 0. this bug caused by lack of length modifier for specifier 'x'. Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* virtio-serial: fix command line compatibility.KONRAD Frederic2013-05-031-1/+2
| | | | | | | | | | | The bus name is wrong since the refactoring. This keeps the behaviour of the command line. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1367330931-12994-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* serial: QOM'ify ISA serialAndreas Färber2013-04-291-4/+7
| | | | | | | | | | | Introduce type constant and cast macro to obsolete DO_UPCAST(). Prepares for ISA realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1367093935-29091-16-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* parallel: QOM'ifyAndreas Färber2013-04-291-3/+8
| | | | | | | | | | | Introduce type constant and cast macro to obsolete DO_UPCAST(). Prepares for ISA realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1367093935-29091-11-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pseries: Convert VIO code to QOM style type safe(ish) castsDavid Gibson2013-04-261-7/+11
| | | | | | | | | | | Curerntly the pseries VIO device code contains quite a few explicit uses of DO_UPCAST and plain C casts. This is (obviously) type unsafe, and not the conventional way of doing things in the QOM model. This patch converts the code to use the QOM convention of per-type macros to do verified casts with OBJECT_CHECK(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
* virtio: cleanup: init and exit function.KONRAD Frederic2013-04-241-1/+1
| | | | | | | | | This clean the init and the exit functions and rename virtio_common_cleanup to virtio_cleanup. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio: remove the function pointer.KONRAD Frederic2013-04-241-6/+0
| | | | | | | | | This remove the function pointer in VirtIODevice, and use only VirtioDeviceClass function pointer. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-console: Remove any pending watches on closeHans de Goede2013-04-161-2/+22
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* virtio-console: Also throttle when less was written then requestedHans de Goede2013-04-161-3/+5
| | | | | | | | | | | 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, to avoid doing an unsigned signed comparison. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Merge remote-tracking branch 'bonzini/hw-dirs' into stagingAnthony Liguori2013-04-1522-22/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/hw-dirs: exec: remove useless declarations from memory-internal.h memory: move core typedefs to qemu/typedefs.h include: avoid useless includes of exec/ headers sysemu: avoid proliferation of include/ subdirectories tpm: reorganize headers and split hardware part configure: fix TPM logic acpi.h: make it self contained acpi: move declarations from pc.h to acpi.h hw: Add lost ARM core again Fix failure to create q35 machine Add linux-headers to QEMU_INCLUDES arm: fix location of some include files Conflicts: configure aliguori: trivial conflict in configure output Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * sysemu: avoid proliferation of include/ subdirectoriesPaolo Bonzini2013-04-1522-22/+22
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud