7385b275 | 28-Aug-2014 |
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> |
serial: fixing vmstate for save/restore
Some fields were added to VMState by this patch to preserve correct loading of the serial port controller state. Updating FCR value while loading was also mod
serial: fixing vmstate for save/restore
Some fields were added to VMState by this patch to preserve correct loading of the serial port controller state. Updating FCR value while loading was also modified to disable generating an interrupt by loadvm.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
461a2753 | 28-Aug-2014 |
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> |
parallel: adding vmstate for save/restore
VMState added by this patch preserves correct loading of the parallel port controller state.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Acke
parallel: adding vmstate for save/restore
VMState added by this patch preserves correct loading of the parallel port controller state.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
d0a0bfe6 | 14-Jul-2014 |
Amit Shah <amit.shah@redhat.com> |
virtio-serial: search for duplicate port names before adding new ports
Before adding new ports to VirtIOSerial devices, check if there's a conflict in the 'name' parameter. This ensures two virtser
virtio-serial: search for duplicate port names before adding new ports
Before adding new ports to VirtIOSerial devices, check if there's a conflict in the 'name' parameter. This ensures two virtserialports with identical names are not initialized.
Reported-by: <mazhang@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
a1857ad1 | 16-Jul-2014 |
Amit Shah <amit.shah@redhat.com> |
virtio-serial: create a linked list of all active devices
To ensure two virtserialports don't get added to the system with the same 'name' parameter, we need to access all the ports on all the devic
virtio-serial: create a linked list of all active devices
To ensure two virtserialports don't get added to the system with the same 'name' parameter, we need to access all the ports on all the devices added, and compare the names.
We currently don't have a list of all VirtIOSerial devices added to the system. This commit adds a simple linked list in which devices are put when they're initialized, and removed when they go away.
Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
469b046e | 11-Jun-2014 |
Paolo Bonzini <pbonzini@redhat.com> |
memory: remove memory_region_destroy
The function is empty after the previous patch, so remove it.
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzi
memory: remove memory_region_destroy
The function is empty after the previous patch, so remove it.
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
af52fe86 | 15-Jul-2014 |
KONRAD Frederic <fred.konrad@greensocs.com> |
cadence_uart: check for serial backend before using it.
This checks that s->chr is not NULL before using it.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Crosthwait
cadence_uart: check for serial backend before using it.
This checks that s->chr is not NULL before using it.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
57d84cf3 | 14-Jul-2014 |
Amit Shah <amit.shah@redhat.com> |
virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug
We keep port 0 reserved for compat with older guests, where only virtio-console was expected. Even if a system is started with
virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug
We keep port 0 reserved for compat with older guests, where only virtio-console was expected. Even if a system is started without a virtio-console port, port #0 is kept aside. However, after a virtconsole port is unplugged, port id 0 became available, and the next hotplug of a virtserialport caused failure due to it not being a console port.
Steps to reproduce:
$ ./x86_64-softmmu/qemu-system-x86_64 -m 512 -cpu host -enable-kvm -device virtio-serial-pci -monitor stdio -vnc :1 QEMU 2.0.91 monitor - type 'help' for more information (qemu) device_add virtconsole,id=p1 (qemu) device_del p1 (qemu) device_add virtserialport,id=p1 Port number 0 on virtio-serial devices reserved for virtconsole devices for backward compatibility. Device 'virtserialport' could not be initialized (qemu) quit
Reported-by: dengmin <mdeng@redhat.com> Reviewed-by: Amos Kong <akong@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
show more ...
|
7497bce6 | 25-Jun-2014 |
Paolo Bonzini <pbonzini@redhat.com> |
serial-pci: remove memory regions from BAR before destroying them
Otherwise, hot-unplug of pci-serial-2x trips the assertion in memory_region_destroy:
(qemu) device_del gg (qemu) qemu-syste
serial-pci: remove memory regions from BAR before destroying them
Otherwise, hot-unplug of pci-serial-2x trips the assertion in memory_region_destroy:
(qemu) device_del gg (qemu) qemu-system-x86_64: /work/armbru/tmp/qemu/memory.c:1021: memory_region_destroy: Assertion `((&mr->subregions)->tqh_first == ((void *)0))' failed. Aborted (core dumped)
Reported-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
f702e62a | 11-Jul-2014 |
Kirill Batuzov <batuzovk@ispras.ru> |
serial: change retry logic to avoid concurrency
Whenever serial_xmit fails to transmit a byte it adds a watch that would call it again when the "line" becomes ready. This results in a retry chain:
serial: change retry logic to avoid concurrency
Whenever serial_xmit fails to transmit a byte it adds a watch that would call it again when the "line" becomes ready. This results in a retry chain: serial_xmit -> add_watch -> serial_xmit Each chain is able to transmit one character, and for every character passed to serial by the guest driver a new chain is spawned.
The problem lays with the fact that a new chain is spawned even when there is one already waiting on the watch. So there can be several retry chains waiting concurrently on one "line". Every chain tries to transmit current character, so character order is not messed up. But also every chain increases retry counter (tsr_retry). If there are enough concurrent chains this counter will hit MAX_XMIT_RETRY value and the character will be dropped.
To reproduce this bug you need to feed serial output to some program consuming it slowly enough. A python script from bug #1335444 description is an example of such program.
This commit changes retry logic in the following way to avoid concurrency: instead of spawning a new chain for each character being transmitted spawn only one and make it transmit characters until FIFO is empty.
The change consists of two parts: - add a do {} while () loop in serial_xmit (diff is a bit erratic for this part, diff -w will show actual change), - do not call serial_xmit from serial_ioport_write if there is one waiting on the watch already.
This should fix another issue causing bug #1335444.
Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
f173d57a | 18-Jun-2014 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
irq: Allocate IRQs individually
Allocate each IRQ individually on array allocations. This prepares for QOMification of IRQs, where pointers to individual IRQs may be taken and handed around for usag
irq: Allocate IRQs individually
Allocate each IRQ individually on array allocations. This prepares for QOMification of IRQs, where pointers to individual IRQs may be taken and handed around for usage as QOM Links. The g_renew() scheme used here is too fragile and would break all existing links should an IRQ list be extended.
We now have to pass the IRQ count to qemu_free_irqs(). We have so few call sites however, so this change is reasonably trivial.
Cc: agarcia@igalia.com Cc: mst@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Alberto Garcia <agarcia@igalia.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|
e02bc6de | 23-May-2014 |
Roger Pau Monne <roger.pau@citrix.com> |
serial: poll the serial console with G_IO_HUP
On FreeBSD polling a master pty while the other end is not connected with G_IO_OUT only results in an endless wait. This is different from the Linux beh
serial: poll the serial console with G_IO_HUP
On FreeBSD polling a master pty while the other end is not connected with G_IO_OUT only results in an endless wait. This is different from the Linux behaviour, that returns immediately. In order to demonstrate this, I have the following example code:
http://xenbits.xen.org/people/royger/test_poll.c
When executed on Linux:
$ ./test_poll In callback
On FreeBSD instead, the callback never gets called:
$ ./test_poll
So, in order to workaround this, poll the source with G_IO_HUP (which makes the code behave the same way on both Linux and FreeBSD).
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Cc: Michael Tokarev <mjt@tls.msk.ru> Cc: "Andreas Färber" <afaerber@suse.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: xen-devel@lists.xenproject.org [Add hw/char/cadence_uart.c too. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
e0ab7fac | 24-Jun-2014 |
Rusty Russell <rusty@rustcorp.com.au> |
virtio-serial-bus: use virtio wrappers to access headers
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> Revie
virtio-serial-bus: use virtio wrappers to access headers
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>
show more ...
|
13c6855a | 24-Jun-2014 |
Greg Kurz <gkurz@linux.vnet.ibm.com> |
virtio-serial: implement per-device migration calls
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> S
virtio-serial: implement per-device migration calls
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>
show more ...
|
1b5fc0de | 24-Jun-2014 |
Greg Kurz <gkurz@linux.vnet.ibm.com> |
virtio: introduce device specific migration calls
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 comm
virtio: introduce device specific migration calls
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>
show more ...
|
e38e943a | 24-Jun-2014 |
Alexander Graf <agraf@suse.de> |
virtio-serial: don't migrate the config space
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 j
virtio-serial: don't migrate the config space
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>
show more ...
|
e2ae6159 | 26-Jun-2014 |
Laszlo Ersek <lersek@redhat.com> |
virtio-serial: report frontend connection state via monitor
Libvirt wants to know about the guest-side connection state of some virtio-serial ports (in particular the one(s) assigned to guest agent(
virtio-serial: report frontend connection state via monitor
Libvirt wants to know about the guest-side connection state of some virtio-serial ports (in particular the one(s) assigned to guest agent(s)). Report such states with a new monitor event.
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1080376 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
show more ...
|
10358b6a | 12-Jun-2014 |
Paolo Bonzini <pbonzini@redhat.com> |
virtio-serial: remove useless set_config function
Its only contents are a dead memcpy. Since it is optional, drop the function altogether.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed
virtio-serial: remove useless set_config function
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>
show more ...
|
d49805ae | 16-Apr-2014 |
Juan Quintela <quintela@redhat.com> |
savevm: Remove all the unneeded version_minimum_id_old (x86)
After previous Peter patch, they are redundant. This way we don't assign them except when needed. Once there, there were lots of case w
savevm: Remove all the unneeded version_minimum_id_old (x86)
After previous Peter patch, they are redundant. This way we don't assign them except when needed. Once there, there were lots of case where the ".fields" indentation was wrong:
.fields = (VMStateField []) { and .fields = (VMStateField []) {
Change all the combinations to:
.fields = (VMStateField[]){
The biggest problem (appart from aesthetics) was that checkpatch complained when we copy&pasted the code from one place to another.
Signed-off-by: Juan Quintela <quintela@redhat.com> Acked-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
3aff6c2f | 16-Apr-2014 |
Juan Quintela <quintela@redhat.com> |
savevm: Remove all the unneeded version_minimum_id_old (ppc)
After previous Peter patch, they are redundant. This way we don't assign them except when needed. Once there, there were lots of case w
savevm: Remove all the unneeded version_minimum_id_old (ppc)
After previous Peter patch, they are redundant. This way we don't assign them except when needed. Once there, there were lots of case where the ".fields" indentation was wrong:
.fields = (VMStateField []) { and .fields = (VMStateField []) {
Change all the combinations to:
.fields = (VMStateField[]){
The biggest problem (appart from aesthetics) was that checkpatch complained when we copy&pasted the code from one place to another.
Signed-off-by: Juan Quintela <quintela@redhat.com> Acked-by: Alexey Kardashevskiy <aik@ozlabs.ru>
show more ...
|
aa0f607f | 29-May-2014 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
char: xilinx_uartlite: Convert to realize()
SysBusDevice::init is depracated. Convert to Object::init and Device::realize as prescribed by QOM conventions.
Signed-off-by: Peter Crosthwaite <peter.c
char: xilinx_uartlite: Convert to realize()
SysBusDevice::init is depracated. Convert to Object::init and Device::realize as prescribed by QOM conventions.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
show more ...
|
95faaa73 | 29-May-2014 |
Peter Crosthwaite <peter.crosthwaite@xilinx.com> |
char: xilinx_uartlite: Don't reset from init
This refresh of the device state is intended to be a reset side effect. Move it to a proper reset handler rather than do it at init time.
Signed-off-by:
char: xilinx_uartlite: Don't reset from init
This refresh of the device state is intended to be a reset side effect. Move it to a proper reset handler rather than do it at init time.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
show more ...
|
13cc2c3e | 26-Feb-2014 |
BALATON Zoltan <balaton@eik.bme.hu> |
serial-pci: Set prog interface field of pci config to 16550 compatible
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. T
serial-pci: Set prog interface field of pci config to 16550 compatible
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
59e7a130 | 06-May-2014 |
Gerd Hoffmann <kraxel@redhat.com> |
input: sparc32 kbd: claim en-us layout
Reported-by: Olivier Danet <odanet@caramail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
97256073 | 29-Apr-2014 |
Gerd Hoffmann <kraxel@redhat.com> |
input: sparc32 kbd: fix some key mappings
Reported-by: Olivier Danet <odanet@caramail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
65e7545e | 25-Mar-2014 |
Gerd Hoffmann <kraxel@redhat.com> |
input: switch sparc32 kbd to new input api
Nasty 0xe0 logic is gone. We map through QKeyCode now, giving us a nice, readable mapping table.
Quick smoke test in OpenFirmware looks ok. Careful chec
input: switch sparc32 kbd to new input api
Nasty 0xe0 logic is gone. We map through QKeyCode now, giving us a nice, readable mapping table.
Quick smoke test in OpenFirmware looks ok. Careful check from arch maintainers would be very nice, especially on the capslock and numlock logic. I'm not fully sure whenever I got it translated correctly and also what it is supposed to do in the first place ...
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|