[Qemu-devel] [PATCH 3/3] virtio-serial: Add a new virtserialport device for generic serial port support

2009-12-22 Thread Amit Shah
://www.linux-kvm.org/page/VMchannel_Requirements Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 37 + 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index b2e4eb1..fc0c239 100644

[Qemu-devel] [PATCH 1/3] virtio: Remove duplicate macro definition for max. virtqueues, bump up the max

2009-12-22 Thread Amit Shah
VIRTIO_PCI_QUEUE_MAX is redefined in hw/virtio.c. Let's just keep it in hw/virtio.h. Also, bump up the value of the maximum allowed virtqueues to 32. This is in preparation to allow multiple ports per virtio-console device. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio.c |2

[Qemu-devel] [PATCH 2/3] virtio-console: Add a virtio-serial bus, support for multiple devices and ports

2009-12-22 Thread Amit Shah
. Signed-off-by: Amit Shah amit.s...@redhat.com --- Makefile.target|2 +- hw/pc.c|9 - hw/ppc440_bamboo.c |7 - hw/qdev.c |8 +- hw/s390-virtio-bus.c | 16 +- hw/s390-virtio-bus.h |1 + hw/virtio-console.c| 186 -- hw

[Qemu-devel] Re: [PATCH 2/3] virtio-console: Add a virtio-serial bus, support for multiple devices and ports

2009-12-22 Thread Amit Shah
On (Tue) Dec 22 2009 [18:55:16], Alexander Graf wrote: Amit Shah wrote: This patch migrates virtio-console to the qdev infrastructure and creates a new virtio-serial bus on which multiple ports are exposed as devices. The bulk of the code now resides in a new file with virtio-console.c

[Qemu-devel] Re: [PATCH 2/3] virtio-console: Add a virtio-serial bus, support for multiple devices and ports

2009-12-22 Thread Amit Shah
* - * Copyright IBM, Corp. 2008 + * Copyright Red Hat, Inc. 2009 * * Authors: - * Christian Ehrhardt ehrha...@linux.vnet.ibm.com + * Amit Shah amit.s...@redhat.com Please don't remove copyrights. It seems that way due to file name changes. This is actually a new file that has

Re: [Qemu-devel] [PATCH 2/3] virtio-console: Add a virtio-serial bus, support for multiple devices and ports

2009-12-23 Thread Amit Shah
On (Wed) Dec 23 2009 [14:54:55], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: This patch migrates virtio-console to the qdev infrastructure and creates a new virtio-serial bus on which multiple ports are exposed as devices. The bulk of the code now resides in a new file

Re: [Qemu-devel] [PATCH 2/3] virtio-console: Add a virtio-serial bus, support for multiple devices and ports

2009-12-23 Thread Amit Shah
On (Wed) Dec 23 2009 [20:02:19], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: On (Wed) Dec 23 2009 [14:54:55], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: This patch migrates virtio-console to the qdev infrastructure and creates a new virtio

[Qemu-devel] [RFC PATCH 0/8] virtio-console: Move to qdev, multiple devices, generic ports

2009-12-23 Thread Amit Shah
). - Locking isn't perfect, a few extra locks are needed, but it doesn't matter as long as qemu doesn't run it all separately (I've tested with the kvm tree with -smp 2 as well and it runs fine). Amit Shah (8): virtio: Remove duplicate macro definition for max. virtqueues, bump up the max

[Qemu-devel] [PATCH 1/8] virtio: Remove duplicate macro definition for max. virtqueues, bump up the max

2009-12-23 Thread Amit Shah
VIRTIO_PCI_QUEUE_MAX is redefined in hw/virtio.c. Let's just keep it in hw/virtio.h. Also, bump up the value of the maximum allowed virtqueues to 32. This is in preparation to allow multiple ports per virtio-console device. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio.c |2

[Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2009-12-23 Thread Amit Shah
port open/close, sending port properties over to the guest, etc. This commit is a part of a series of other commits to get the full implementation of multiport support. Future commits will add other support as well as ride on the savevm version that we bump up here. Signed-off-by: Amit Shah amit.s

[Qemu-devel] [PATCH 3/8] virtio-serial-bus: Maintain guest and host port open/close state

2009-12-23 Thread Amit Shah
Via control channel messages, the guest can tell us whether a port got opened or closed. Similarly, we can also indicate to the guest of host port open/close events. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 73

[Qemu-devel] [PATCH 4/8] virtio-serial-bus: Add a port 'name' property for port discovery in guests

2009-12-23 Thread Amit Shah
script can pick up this name and create the symlink mentioned above. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 16 hw/virtio-serial.c |1 + hw/virtio-serial.h |8 3 files changed, 25 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2009-12-23 Thread Amit Shah
the guest to restart sending data. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 315 +++- hw/virtio-serial.c |7 + hw/virtio-serial.h | 44 +++ 3 files changed, 364 insertions(+), 2 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 6/8] virtio-serial-bus: Add ability to hot-unplug ports

2009-12-23 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |2 ++ hw/virtio-serial.h |1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 12317ba..0a85f6e 100644 --- a/hw/virtio-serial-bus.c +++ b/hw

[Qemu-devel] [PATCH 7/8] virtio-serial: Add 'virtserialport' device for generic serial port support

2009-12-23 Thread Amit Shah
OOM conditions, etc. Sample uses for such a device can be obtaining info from the guest like the file systems used, apps installed, etc. for offline usage and logged-in users, clipboard copy-paste, etc. for online usage. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial.c | 36

[Qemu-devel] [PATCH 8/8] Move virtio-serial and virtio-serial-bus to Makefile.hw

2009-12-23 Thread Amit Shah
There's nothing target-dependent in the virtio-serial code so allow it to be compiled just once for all the targets. Signed-off-by: Amit Shah amit.s...@redhat.com --- Makefile.hw |2 +- Makefile.target |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.hw

Re: [Qemu-devel] [PATCH 2/3] virtio-console: Add a virtio-serial bus, support for multiple devices and ports

2009-12-23 Thread Amit Shah
On (Wed) Dec 23 2009 [23:07:24], Markus Armbruster wrote: Do you expect devices other than virtconsole to go on this bus? Yes; virtserialport, as the next patch in the series introduces. Also, virtserialvnc, etc. Since all devices on this bus need the same device address property

Re: [Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2009-12-23 Thread Amit Shah
On (Wed) Dec 23 2009 [17:12:22], Anthony Liguori wrote: On 12/23/2009 01:52 PM, Amit Shah wrote: This commit converts the virtio-console device to create a new virtio-serial bus that can host console and generic serial ports. The file hosting this code is now called virtio-serial-bus.c

Re: [Qemu-devel] [PATCH 3/8] virtio-serial-bus: Maintain guest and host port open/close state

2009-12-23 Thread Amit Shah
On (Wed) Dec 23 2009 [17:14:28], Anthony Liguori wrote: +/* + * Items in struct VirtIOSerialPort. + */ +QTAILQ_FOREACH(port,s-ports, next) { +/* + * We put the port number because we may not have an active + * port at id 0 that's reserved for a

[Qemu-devel] Re: [RFC PATCH 0/8] virtio-console: Move to qdev, multiple devices, generic ports

2009-12-24 Thread Amit Shah
On (Thu) Dec 24 2009 [11:28:25], Alexander Graf wrote: ag...@s390t27:/tmp/qemu ./s390x-softmmu/qemu-system-s390x -enable-kvm -vnc :0 -kernel /boot/image Did not find PCI bus for virtio-serial-pci Did not find virtio-serial-bus bus for virtconsole ^cag...@s390t27:/tmp/qemu

[Qemu-devel] Re: [RFC PATCH 0/8] virtio-console: Move to qdev, multiple devices, generic ports

2009-12-24 Thread Amit Shah
On (Thu) Dec 24 2009 [11:26:00], Alexander Graf wrote: On 23.12.2009, at 20:52, Amit Shah wrote: Hello, This series splits up the patches by functionality. Note, however, that patches 2-6 introduce some functionality that's advertised to the guest as having to work all at once

Re: [Qemu-devel] Re: [RFC PATCH 0/8] virtio-console: Move to qdev, multiple devices, generic ports

2009-12-24 Thread Amit Shah
On (Thu) Dec 24 2009 [12:33:17], Alexander Graf wrote: On 24.12.2009, at 11:34, Amit Shah wrote: On (Thu) Dec 24 2009 [11:28:25], Alexander Graf wrote: ag...@s390t27:/tmp/qemu ./s390x-softmmu/qemu-system-s390x -enable-kvm -vnc :0 -kernel /boot/image Did not find PCI bus for virtio

[Qemu-devel] [PATCH 0/8] virtio-console: Move to qdev, multiple devices, generic ports

2010-01-04 Thread Amit Shah
-console.c file is completely removed and a new virtio-serial.c is introduced so that reviewing is easier. I can send a later patch to rename virtio-serial.c back to virtio-console.c. Amit Shah (8): virtio: Remove duplicate macro definition for max. virtqueues, bump up the max virtio-console: qdev

[Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-04 Thread Amit Shah
open/close, sending port properties over to the guest, etc. This commit is a part of a series of other commits to get the full implementation of multiport support. Future commits will add other support as well as ride on the savevm version that we bump up here. Signed-off-by: Amit Shah amit.s

[Qemu-devel] [PATCH 3/8] virtio-serial-bus: Maintain guest and host port open/close state

2010-01-04 Thread Amit Shah
Via control channel messages, the guest can tell us whether a port got opened or closed. Similarly, we can also indicate to the guest of host port open/close events. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 73

[Qemu-devel] [PATCH 4/8] virtio-serial-bus: Add a port 'name' property for port discovery in guests

2010-01-04 Thread Amit Shah
script can pick up this name and create the symlink mentioned above. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 16 hw/virtio-serial.c |1 + hw/virtio-serial.h |8 3 files changed, 25 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH 6/8] virtio-serial-bus: Add ability to hot-unplug ports

2010-01-04 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |2 ++ hw/virtio-serial.h |1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index bc47629..cf532f6 100644 --- a/hw/virtio-serial-bus.c +++ b/hw

[Qemu-devel] [PATCH 8/8] Move virtio-serial and virtio-serial-bus to Makefile.hw

2010-01-04 Thread Amit Shah
There's nothing target-dependent in the virtio-serial code so allow it to be compiled just once for all the targets. Signed-off-by: Amit Shah amit.s...@redhat.com --- Makefile.hw |2 +- Makefile.target |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.hw

[Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-04 Thread Amit Shah
the guest to restart sending data. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 305 +++- hw/virtio-serial.c | 11 +- hw/virtio-serial.h | 39 ++ 3 files changed, 348 insertions(+), 7 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 7/8] virtio-serial: Add 'virtserialport' device for generic serial port support

2010-01-04 Thread Amit Shah
OOM conditions, etc. Sample uses for such a device can be obtaining info from the guest like the file systems used, apps installed, etc. for offline usage and logged-in users, clipboard copy-paste, etc. for online usage. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial.c | 36

Re: [Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-05 Thread Amit Shah
Hey Anthony [skipping the part Gerd already answered] On (Tue) Jan 05 2010 [10:42:39], Anthony Liguori wrote: +static size_t send_control_msg(VirtIOSerialPort *port, void *buf, size_t len) +{ +VirtQueueElement elem; +VirtQueue *vq; +struct virtio_console_control *cpkt; + +

[Qemu-devel] Re: [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-05 Thread Amit Shah
On (Tue) Jan 05 2010 [10:27:19], Gerd Hoffmann wrote: Hi, +/* Guest wants to notify us of some event */ +static void handle_control_message(VirtIOSerial *vser, void *buf) +{ +cpkt-event = le16_to_cpu(cpkt-event); +cpkt-value = le16_to_cpu(cpkt-value); Does this modify guest

Re: [Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-05 Thread Amit Shah
On (Mon) Jan 04 2010 [14:46:58], Anthony Liguori wrote: I'll annotate and read/write using the le format. Just use ldl_p and stl_p. (or ldw/stw as appropriate). OK, I've switched to ldl/stl. I'll send out the new series once the one I posted yesterday gets some time on the list. +static

[Qemu-devel] [PATCH 0/8] virtio-console: Move to qdev, multiple devices, generic ports

2010-01-06 Thread Amit Shah
. They are split only for easier reviewability. The older virtio-console.c file is completely removed and a new virtio-serial.c is introduced so that reviewing is easier. I can send a later patch to rename virtio-serial.c back to virtio-console.c. Amit Shah (8): virtio: Remove duplicate macro

[Qemu-devel] [PATCH 1/8] virtio: Remove duplicate macro definition for max. virtqueues, bump up the max

2010-01-06 Thread Amit Shah
VIRTIO_PCI_QUEUE_MAX is redefined in hw/virtio.c. Let's just keep it in hw/virtio.h. Also, bump up the value of the maximum allowed virtqueues to 64. This is in preparation to allow multiple ports per virtio-console device. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio.c |2

[Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-06 Thread Amit Shah
open/close, sending port properties over to the guest, etc. This commit is a part of a series of other commits to get the full implementation of multiport support. Future commits will add other support as well as ride on the savevm version that we bump up here. Signed-off-by: Amit Shah amit.s

[Qemu-devel] [PATCH 3/8] virtio-serial-bus: Maintain guest and host port open/close state

2010-01-06 Thread Amit Shah
Via control channel messages, the guest can tell us whether a port got opened or closed. Similarly, we can also indicate to the guest of host port open/close events. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 91

[Qemu-devel] [PATCH 4/8] virtio-serial-bus: Add a port 'name' property for port discovery in guests

2010-01-06 Thread Amit Shah
script can pick up this name and create the symlink mentioned above. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 17 + hw/virtio-serial.c |1 + hw/virtio-serial.h |8 3 files changed, 26 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-06 Thread Amit Shah
the guest to restart sending data. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 309 +++- hw/virtio-serial.c | 11 +- hw/virtio-serial.h | 39 ++ 3 files changed, 352 insertions(+), 7 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 6/8] virtio-serial-bus: Add ability to hot-unplug ports

2010-01-06 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |2 ++ hw/virtio-serial.h |1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index c947143..6b3273d 100644 --- a/hw/virtio-serial-bus.c +++ b/hw

[Qemu-devel] [PATCH 7/8] virtio-serial: Add a 'virtserialport' device for generic serial port support

2010-01-06 Thread Amit Shah
OOM conditions, etc. Sample uses for such a device can be obtaining info from the guest like the file systems used, apps installed, etc. for offline usage and logged-in users, clipboard copy-paste, etc. for online usage. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial.c | 36

[Qemu-devel] [PATCH 8/8] Move virtio-serial to Makefile.hw

2010-01-06 Thread Amit Shah
There's nothing target-dependent in the virtio-serial code so allow it to be compiled just once for all the targets. Signed-off-by: Amit Shah amit.s...@redhat.com --- Makefile.hw |2 +- Makefile.target |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.hw

Re: [Qemu-devel] [PATCH 8/8] Move virtio-serial to Makefile.hw

2010-01-07 Thread Amit Shah
On (Fri) Jan 08 2010 [01:41:48], Andreas Färber wrote: Am 07.01.2010 um 08:31 schrieb Amit Shah: There's nothing target-dependent in the virtio-serial code so allow it to be compiled just once for all the targets. Signed-off-by: Amit Shah amit.s...@redhat.com --- Makefile.hw |2

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-07 Thread Amit Shah
On (Fri) Jan 08 2010 [01:12:31], Jamie Lokier wrote: Amit Shah wrote: Guests send us one buffer at a time. Current guests send buffers sized 4K bytes. If guest userspace applications sent out 4K bytes in one write() syscall, the write request actually sends out multiple buffers, each

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Amit Shah
On (Fri) Jan 08 2010 [13:35:03], Jamie Lokier wrote: Since VNC is clearly designed to work over TCP, and is written by people who know this, I'm wondering why you think it needs to be different for virtio-serial. For vnc putting stuff from a guest clipboard into vnc client clipboard using

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Amit Shah
On (Fri) Jan 08 2010 [10:26:59], Anthony Liguori wrote: On 01/08/2010 07:35 AM, Jamie Lokier wrote: Sometimes it looks like TCP is maintaining write boundaries, but it is just an artifact of its behaviour on many systems, and is not reliable even on those systems where it seems to happen most

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Amit Shah
On (Mon) Jan 11 2010 [10:45:53], Jamie Lokier wrote: Amit Shah wrote: On (Fri) Jan 08 2010 [13:35:03], Jamie Lokier wrote: Since VNC is clearly designed to work over TCP, and is written by people who know this, I'm wondering why you think it needs to be different for virtio-serial

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Amit Shah
On (Mon) Jan 11 2010 [18:28:52], Anthony Liguori wrote: I would think that any buffering should be pushed back to the guest. IOW, if there's available data from the char driver, but the guest doesn't have a buffer. Don't select on the char driver until the guest has a buffer available. If

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Amit Shah
On (Mon) Jan 11 2010 [23:33:56], Jamie Lokier wrote: Amit Shah wrote: Are you talking about a VNC protocol command between qemu's VNC server and the user's VNC client, or a private protocol between the guest and qemu's VNC server? What happens is: 1. Guest puts something on its

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-12 Thread Amit Shah
On (Tue) Jan 12 2010 [09:00:52], Anthony Liguori wrote: On 01/12/2010 01:16 AM, Amit Shah wrote: BTW I don't really want this too, I can get rid of it if everyone agrees we won't support clipboard writes 4k over vnc or if there's a better idea. Why bother trying to preserve message

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-12 Thread Amit Shah
On (Tue) Jan 12 2010 [09:46:55], Anthony Liguori wrote: On 01/12/2010 09:13 AM, Amit Shah wrote: On (Tue) Jan 12 2010 [09:00:52], Anthony Liguori wrote: On 01/12/2010 01:16 AM, Amit Shah wrote: BTW I don't really want this too, I can get rid of it if everyone agrees we won't

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-12 Thread Amit Shah
On (Tue) Jan 12 2010 [09:55:41], Anthony Liguori wrote: On 01/12/2010 09:49 AM, Amit Shah wrote: On (Tue) Jan 12 2010 [09:46:55], Anthony Liguori wrote: On 01/12/2010 09:13 AM, Amit Shah wrote: On (Tue) Jan 12 2010 [09:00:52], Anthony Liguori wrote: On 01/12/2010 01:16

[Qemu-devel] Static analysis using clang on the x86_64 target

2010-01-12 Thread Amit Shah
Hello, Here's a run of the clang analyzer on qemu sources for the x86_64 target. See http://amitshah.fedorapeople.org/clang-output/2010-01-12-9/ for the results. There are a few results there which look dubious but a lot of the output can be useful to fix the bugs. What's nice about the tool

Re: [Qemu-devel] Static analysis using clang on the x86_64 target

2010-01-12 Thread Amit Shah
On (Tue) Jan 12 2010 [19:35:08], Blue Swirl wrote: On Tue, Jan 12, 2010 at 6:13 PM, Amit Shah amit.s...@redhat.com wrote: Hello, Here's a run of the clang analyzer on qemu sources for the x86_64 target. See http://amitshah.fedorapeople.org/clang-output/2010-01-12-9

Re: [Qemu-devel] Static analysis using clang on the x86_64 target

2010-01-12 Thread Amit Shah
On (Tue) Jan 12 2010 [22:01:15], malc wrote: Both audio.c issues are wrong, dma/sb16 is of useless operation variety nevertheless the fix is pushed, hopefuly clang shouldn't complain about them anymore. Yes, the count went down to 95 from 98 after your commits. There are a few false

[Qemu-devel] [PATCH 0/6] Remove some dead assignments from clang analyzer report

2010-01-13 Thread Amit Shah
Running the static checker clang-analyzer on the qemu sources, I found a few dead assignments. This patchset removes a few of those. Amit Shah (6): vl.c: Remove dead assignment virtio: net: remove dead assignment x86: translate.c: remove dead assignment hw/vga.c: remove dead assignment

[Qemu-devel] [PATCH 1/6] vl.c: Remove dead assignment

2010-01-13 Thread Amit Shah
clang-analyzer pointed out the value of 'sockets' is never reused. Signed-off-by: Amit Shah amit.s...@redhat.com CC: Andre Przywara andre.przyw...@amd.com --- vl.c |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index b048e89..e49e7bd 100644 --- a/vl.c

[Qemu-devel] [PATCH 2/6] virtio: net: remove dead assignment

2010-01-13 Thread Amit Shah
clang-analyzer points out value assigned to 'len' is not used. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-net.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 02d9180..6e48997 100644 --- a/hw/virtio-net.c +++ b

[Qemu-devel] [PATCH 3/6] x86: translate.c: remove dead assignment

2010-01-13 Thread Amit Shah
clang-analyzer points out a redundant assignment. Signed-off-by: Amit Shah amit.s...@redhat.com --- target-i386/translate.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 511a4ea..8078112 100644 --- a/target-i386

[Qemu-devel] [PATCH 4/6] hw/vga.c: remove dead assignment

2010-01-13 Thread Amit Shah
clang-analyzer points out a redundant assignment. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/vga.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/vga.c b/hw/vga.c index d05f1f9..6a1a059 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -1303,7 +1303,6 @@ static void

[Qemu-devel] [PATCH 5/6] qcow2-refcount: remove dead assignment

2010-01-13 Thread Amit Shah
clang-analyzer points out a redundant assignment. Signed-off-by: Amit Shah amit.s...@redhat.com --- block/qcow2-refcount.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 54b19f8..3a2d44a 100644 --- a/block/qcow2

[Qemu-devel] [PATCH 6/6] json-parser: remove dead increment

2010-01-13 Thread Amit Shah
clang-analyzer points out a redundant increment. Signed-off-by: Amit Shah amit.s...@redhat.com --- json-parser.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/json-parser.c b/json-parser.c index 7624c0f..e04932f 100644 --- a/json-parser.c +++ b/json-parser.c @@ -247,8

[Qemu-devel] Re: [PATCH 5/6] qcow2-refcount: remove dead assignment

2010-01-13 Thread Amit Shah
On (Wed) Jan 13 2010 [12:46:22], Paolo Bonzini wrote: On 01/13/2010 11:54 AM, Amit Shah wrote: clang-analyzer points out a redundant assignment. Signed-off-by: Amit Shahamit.s...@redhat.com --- block/qcow2-refcount.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git

Re: [Qemu-devel] Static analysis using clang on the x86_64 target

2010-01-13 Thread Amit Shah
On (Wed) Jan 13 2010 [19:08:11], Blue Swirl wrote: Thanks. I fixed the warnings related to Sparc32. Were there really no new warnings for Sparc64? Looks like it; vl.c gets reported three times at the same locations so 3 arches have been compiled. My test machine is down ATM, I can confirm

[Qemu-devel] [PATCH 8/8] Move virtio-serial to Makefile.objs

2010-01-14 Thread Amit Shah
There's nothing target-dependent in the virtio-serial code so allow it to be compiled just once for all the targets. Signed-off-by: Amit Shah amit.s...@redhat.com --- Makefile.objs |2 +- Makefile.target |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 4/8] virtio-serial-bus: Add a port 'name' property for port discovery in guests

2010-01-14 Thread Amit Shah
script can pick up this name and create the symlink mentioned above. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 17 + hw/virtio-serial.c |1 + hw/virtio-serial.h |8 3 files changed, 26 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH 2/8] virtio-console: qdev conversion, new virtio-serial-bus

2010-01-14 Thread Amit Shah
open/close, sending port properties over to the guest, etc. This commit is a part of a series of other commits to get the full implementation of multiport support. Future commits will add other support as well as ride on the savevm version that we bump up here. Signed-off-by: Amit Shah amit.s

[Qemu-devel] [PATCH 6/8] virtio-serial-bus: Add ability to hot-unplug ports

2010-01-14 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |2 ++ hw/virtio-serial.h |1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 1ec67d2..d045ea5 100644 --- a/hw/virtio-serial-bus.c +++ b/hw

[Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-14 Thread Amit Shah
. When the number of bytes cached go lesser than the limit specified, we tell the guest to restart sending data. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 215 +++- hw/virtio-serial.c |6 -- hw/virtio-serial.h

[Qemu-devel] [PATCH 0/8] virtio-console: Move to qdev, multiple devices, generic ports

2010-01-14 Thread Amit Shah
is completely removed and a new virtio-serial.c is introduced so that reviewing is easier. I can send a later patch to rename virtio-serial.c back to virtio-console.c. Amit Shah (8): virtio: Remove duplicate macro definition for max. virtqueues, bump up the max virtio-console: qdev conversion, new

[Qemu-devel] [PATCH 3/8] virtio-serial-bus: Maintain guest and host port open/close state

2010-01-14 Thread Amit Shah
Via control channel messages, the guest can tell us whether a port got opened or closed. Similarly, we can also indicate to the guest of host port open/close events. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 91

[Qemu-devel] [PATCH 1/8] virtio: Remove duplicate macro definition for max. virtqueues, bump up the max

2010-01-14 Thread Amit Shah
VIRTIO_PCI_QUEUE_MAX is redefined in hw/virtio.c. Let's just keep it in hw/virtio.h. Also, bump up the value of the maximum allowed virtqueues to 64. This is in preparation to allow multiple ports per virtio-console device. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio.c |2

Re: [Qemu-devel] [PATCH 0/8] virtio-console: Move to qdev, multiple devices, generic ports

2010-01-19 Thread Amit Shah
On (Tue) Jan 19 2010 [17:59:33], Jamie Lokier wrote: What happens if the guest crashes, kexecs or whatever when it's half way through sending a cut buffer? A stream protocol will not have a nice way to recover from that unless there is an additional out of band way to say I'm starting

[Qemu-devel] [PATCH 0/8] virtio-console: Move to qdev, multiple devices, generic ports

2010-01-19 Thread Amit Shah
to rename virtio-serial.c back to virtio-console.c. Amit Shah (8): virtio: Remove duplicate macro definition for max. virtqueues, bump up the max virtio-console: qdev conversion, new virtio-serial-bus virtio-serial-bus: Maintain guest and host port open/close state virtio-serial-bus

[Qemu-devel] [PATCH 1/8] virtio: Remove duplicate macro definition for max. virtqueues, bump up the max

2010-01-19 Thread Amit Shah
VIRTIO_PCI_QUEUE_MAX is redefined in hw/virtio.c. Let's just keep it in hw/virtio.h. Also, bump up the value of the maximum allowed virtqueues to 64. This is in preparation to allow multiple ports per virtio-console device. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio.c |2

[Qemu-devel] [PATCH 3/8] virtio-serial-bus: Maintain guest and host port open/close state

2010-01-19 Thread Amit Shah
Via control channel messages, the guest can tell us whether a port got opened or closed. Similarly, we can also indicate to the guest of host port open/close events. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 94

[Qemu-devel] [PATCH 4/8] virtio-serial-bus: Add a port 'name' property for port discovery in guests

2010-01-19 Thread Amit Shah
script can pick up this name and create the symlink mentioned above. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 17 + hw/virtio-serial.c |1 + hw/virtio-serial.h |8 3 files changed, 26 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH 6/8] virtio-serial: Add a 'virtserialport' device for generic serial port support

2010-01-19 Thread Amit Shah
, etc. for online usage. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial.c | 34 ++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial.c b/hw/virtio-serial.c index 9c2c93c..bd44ec6 100644 --- a/hw/virtio-serial.c

[Qemu-devel] [PATCH 7/8] Move virtio-serial to Makefile.objs

2010-01-19 Thread Amit Shah
There's nothing target-dependent in the virtio-serial code so allow it to be compiled just once for all the targets. Signed-off-by: Amit Shah amit.s...@redhat.com --- Makefile.objs |2 +- Makefile.target |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 8/8] virtio-serial: Use MSI vectors for port virtqueues

2010-01-19 Thread Amit Shah
This commit enables the use of MSI interrupts for virtqueue notifications for ports. We use nr_ports + 1 (for control channel) msi entries for the ports, as only the in_vq operations need an interrupt on the guest. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-pci.c |4 1

Re: [Qemu-devel] [PATCH 1/8] virtio: Remove duplicate macro definition for max. virtqueues, bump up the max

2010-01-21 Thread Amit Shah
On (Thu) Jan 21 2010 [10:53:36], Markus Armbruster wrote: Amit, what about renaming hw/virtio-serial.c to a less misleading name now? I'm going to push that upstream; Anthony in the past indicated he was ok with it. Amit

[Qemu-devel] [PATCH] virtio-console: Rename virtio-serial.c back to virtio-console.c

2010-01-21 Thread Amit Shah
This file was renamed to ease the reviews of the recent changes that went in. Now that the changes are done, rename the file back to its original name. Signed-off-by: Amit Shah amit.s...@redhat.com --- Makefile.objs|2 +- hw/{virtio-serial.c = virtio-console.c

[Qemu-devel] [PATCH] virtio-console: Automatically use virtio-serial-bus for the older -virtioconsole invocation

2010-01-21 Thread Amit Shah
These hunks got dropped off mysteriously during the rebasing of my virtio-serial series. Thanks go to Markus for noticing it. Without these fixes, -virtioconsole doesn't actually have any effect. Signed-off-by: Amit Shah amit.s...@redhat.com Reported-by: Markus Armbruster arm...@redhat.com

Re: [Qemu-devel] Static analysis using clang on the x86_64 target

2010-01-21 Thread Amit Shah
On (Wed) Jan 13 2010 [12:32:54], Amit Shah wrote: I'd be very interested in the results of Sparc32 and Sparc64 analyses. OK, I added the two targets to the run and got the following result: http://amitshah.fedorapeople.org/clang-output/2010-01-13-1/ The bug count went up from 95

[Qemu-devel] [PATCH] virtio-serial-bus: Fix bus initialisation and allow for bus identification

2010-01-27 Thread Amit Shah
This commit enables one to use multiple virtio-serial devices and to assign ports to arbitrary devices like this: -device virtio-serial,id=foo -device virtio-serial,id=bar \ -device virtserialport,bus=foo.0,name=foo \ -device virtserialport,bus=bar.0,name=bar Signed-off-by: Amit Shah

[Qemu-devel] [PATCH] kvm: reduce code duplication in config_iothread

2010-02-04 Thread Amit Shah
We have some duplicated code in the CONFIG_IOTHREAD #ifdef and #else cases. Fix that. Signed-off-by: Amit Shah amit.s...@redhat.com --- kvm-all.c |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 15ec38e..a2bd78e 100644 --- a/kvm-all.c

[Qemu-devel] [PATCH] vnc: Migrate to using QTAILQ instead of custom implementation

2010-02-04 Thread Amit Shah
Just a 1-1 conversion for now. Signed-off-by: Amit Shah amit.s...@redhat.com --- vnc.c | 73 - vnc.h |5 ++- 2 files changed, 30 insertions(+), 48 deletions(-) diff --git a/vnc.c b/vnc.c index 92facde..16fc4e9 100644

[Qemu-devel] [PATCH v2] vnc: Migrate to using QTAILQ instead of custom implementation

2010-02-05 Thread Amit Shah
Just a 1-1 conversion for now. Signed-off-by: Amit Shah amit.s...@redhat.com --- v2: - QTAILQ_INIT the queue. vnc.c | 74 vnc.h |5 ++- 2 files changed, 31 insertions(+), 48 deletions(-) diff --git a/vnc.c b/vnc.c index

[Qemu-devel] Slowdowns comparing qemu-kvm.git to qemu.git: vcpu/thread scheduling differences

2010-02-08 Thread Amit Shah
Hello, In my testing of virtio-console, I found qemu-kvm.git introduces a lot of overhead in thread scheduling compared to qemu.git. My test sends a 260M file from the host to a guest via a virtio-console port and then computes the sha1sum of the file on the host as well as on the guest,

[Qemu-devel] Re: Slowdowns comparing qemu-kvm.git to qemu.git: vcpu/thread scheduling differences

2010-02-08 Thread Amit Shah
On (Mon) Feb 08 2010 [08:57:05], Anthony Liguori wrote: On 02/08/2010 07:46 AM, Amit Shah wrote: Hello, In my testing of virtio-console, I found qemu-kvm.git introduces a lot of overhead in thread scheduling compared to qemu.git. My test sends a 260M file from the host to a guest via

[Qemu-devel] Re: [PATCH] virtio-serial: don't set MULTIPORT for 1 port dev

2010-02-12 Thread Amit Shah
On (Fri) Feb 12 2010 [15:42:14], Michael S. Tsirkin wrote: Since commit 98b19252cf1bd97c54bc4613f3537c5ec0aae263, all serial devices declare MULTIPORT feature. To allow 0.12 compatibility, we should clear this when max_nr_ports is 1. In addition to this, setting max_nr_ports to 1 is needed

[Qemu-devel] Re: [PATCH] virtio-serial: don't set MULTIPORT for 1 port dev

2010-02-15 Thread Amit Shah
On (Mon) Feb 15 2010 [10:03:34], Gerd Hoffmann wrote: On 02/12/10 15:23, Amit Shah wrote: On (Fri) Feb 12 2010 [15:42:14], Michael S. Tsirkin wrote: Since commit 98b19252cf1bd97c54bc4613f3537c5ec0aae263, all serial devices declare MULTIPORT feature. To allow 0.12 compatibility, we should

[Qemu-devel] [PATCH 1/3] pc: Bump up pc version to 0.13 and add a 0.12 compat version

2010-02-15 Thread Amit Shah
The version 0.13 will be the new default and compatibility options will be added to the 0.12 version. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/pc.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 6fbe98b..7c9a24e 100644

[Qemu-devel] [PATCH 2/3] pc: Add backward compatibility options for virtio-serial

2010-02-15 Thread Amit Shah
virtio-serial-pci can support multiple ports in the current development version that will become 0.13. Add compatibility options for the 0.12 and 0.11 pc machine types. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/pc.c | 29 + 1 files changed, 29 insertions

[Qemu-devel] [PATCH 3/3] virtio-serial: don't set MULTIPORT for 1 port dev

2010-02-15 Thread Amit Shah
From: Michael S. Tsirkin m...@redhat.com Since commit 98b19252cf1bd97c54bc4613f3537c5ec0aae263, all serial devices declare MULTIPORT feature. To allow 0.12 compatibility, we should clear this when max_nr_ports is 1. Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Amit Shah

[Qemu-devel] Re: [PATCH 2/3] pc: Add backward compatibility options for virtio-serial

2010-02-15 Thread Amit Shah
On (Mon) Feb 15 2010 [15:36:34], Gerd Hoffmann wrote: @@ -1143,6 +1171,7 @@ static QEMUMachine isapc_machine = { static void pc_machine_init(void) { qemu_register_machine(pc_machine); +qemu_register_machine(pc_machine_v0_12); qemu_register_machine(pc_machine_v0_11);

[Qemu-devel] Re: [PATCH] virtio-serial: don't set MULTIPORT for 1 port dev

2010-02-15 Thread Amit Shah
On (Mon) Feb 15 2010 [16:07:28], Michael S. Tsirkin wrote: On Mon, Feb 15, 2010 at 06:51:31PM +0530, Amit Shah wrote: On (Fri) Feb 12 2010 [15:42:14], Michael S. Tsirkin wrote: Since commit 98b19252cf1bd97c54bc4613f3537c5ec0aae263, all serial devices declare MULTIPORT feature. To allow

[Qemu-devel] [PATCH v2 3/3] virtio-serial: don't set MULTIPORT for 1 port dev

2010-02-15 Thread Amit Shah
From: Michael S. Tsirkin m...@redhat.com Since commit 98b19252cf1bd97c54bc4613f3537c5ec0aae263, all serial devices declare MULTIPORT feature. To allow 0.12 compatibility, we should clear this when max_nr_ports is 1. Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Amit Shah

[Qemu-devel] [PATCH v2 1/3] pc: Bump up pc version to 0.13 and add a 0.12 compat version

2010-02-15 Thread Amit Shah
The version 0.13 will be the new default and compatibility options will be added to the 0.12 version. Signed-off-by: Amit Shah amit.s...@redhat.com --- v2: register the 0.12 version in this patch instead of the next one. hw/pc.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions

[Qemu-devel] [PATCH 0/4] Resend: Fixes for the qemu char layer

2009-10-20 Thread Amit Shah
Hello, These are fixes for qemu's char layer. All of the patches have been sent earlier, this is just a resend with the fix for console char devs included in the series that was sent separately earlier. Amit Shah (4): char: check for initial_reset_issued unnecessary char: rename

<    1   2   3   4   5   6   7   8   9   10   >