summaryrefslogtreecommitdiffstats
path: root/hw/char/virtio-serial-bus.c
Commit message (Collapse)AuthorAgeFilesLines
* virtio-serial-bus: use virtio wrappers to access headersRusty Russell2014-06-291-15/+31
| | | | | | | | | | | | | | | We also fix max_nr_ports at reset time as the device endianness may have changed. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> [ pass VirtIODevice * to memory accessors, fix max_nr_ports at reset time, Greg Kurz <gkurz@linux.vnet.ibm.com> ] Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio-serial: implement per-device migration callsGreg Kurz2014-06-291-14/+20
| | | | | | | Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio: introduce device specific migration callsGreg Kurz2014-06-291-1/+1
| | | | | | | | | | | | | In order to migrate virtio subsections, they should be streamed after the device itself. We need the device specific code to be called from the common migration code to achieve this. This patch introduces load and save methods for this purpose. Suggested-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio-serial: don't migrate the config spaceAlexander Graf2014-06-291-10/+6
| | | | | | | | | | | | | | | The device configuration is set at realize time and never changes. It should not be migrated as it is done today. For the sake of compatibility, let's just skip them at load time. Signed-off-by: Alexander Graf <agraf@suse.de> [ added missing casts to uint16_t *, added From, SoB and commit message, Greg Kurz <gkurz@linux.vnet.ibm.com> ] Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio-serial: remove useless set_config functionPaolo Bonzini2014-06-241-8/+0
| | | | | | | | Its only contents are a dead memcpy. Since it is optional, drop the function altogether. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* virtio-serial-port: Convert to QOM realize/unrealizeAndreas Färber2014-03-131-25/+26
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* virtio: Convert exit to unrealizeAndreas Färber2013-12-091-4/+5
| | | | | Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* virtio-serial: Convert to QOM realizeAndreas Färber2013-12-091-8/+8
| | | | | Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* virtio-serial: QOM realize preparationsAndreas Färber2013-12-091-5/+7
| | | | | Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* virtio-serial: switch exit callback to VirtioDeviceClassPaolo Bonzini2013-12-091-6/+4
| | | | | | | | | This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-stable@nongnu.org Acked-by: Andreas Faerber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qdev: Pass size to qbus_create_inplace()Andreas Färber2013-08-301-2/+2
| | | | | | | | | | 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>
* aio / timers: Switch entire codebase to the new timer APIAlex Bligh2013-08-221-5/+5
| | | | | | | | | | | 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>
* devices: Associate devices to their logical categoryMarcel Apfelbaum2013-07-291-0/+2
| | | | | | | | | 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>
* 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>
* 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-serial: cleanup: remove qdev field.KONRAD Frederic2013-04-151-2/+0
| | | | | | | | | | | | The qdev field is no longer needed, just drop it. 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> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1365512016-21944-8-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-serial: cleanup: use QOM casts.KONRAD Frederic2013-04-151-24/+26
| | | | | | | | | | | | | As the virtio-serial-pci and virtio-serial-s390 are switched to the new API, 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> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1365512016-21944-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-serial: cleanup: init and exit functions.KONRAD Frederic2013-04-151-73/+21
| | | | | | | | | | | | This remove old init and exit function as they are no longer needed. 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> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1365512016-21944-6-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-serial: add the virtio-serial device.KONRAD Frederic2013-04-151-7/+88
| | | | | | | | | | | | | Create virtio-serial which extends virtio-device, so it can be connected on virtio-bus. 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> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1365512016-21944-2-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hw: move virtio devices to hw/ subdirectoriesPaolo Bonzini2013-04-081-0/+1018
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud