[Qemu-devel] [PATCH v6 10/18] virtio-serial: Send out guest data to ports only if port is opened

2010-04-27 Thread Amit Shah
Data should be written only when ports are open. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 3a09f0d..6befd4d 100644 --- a/hw/virtio

[Qemu-devel] [PATCH v6 09/18] virtio-serial: Propagate errors in initialising ports / devices in guest

2010-04-27 Thread Amit Shah
If adding of ports or devices in the guest fails we can send out a QMP event so that management software can deal with it. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial

[Qemu-devel] [PATCH v6 11/18] iov: Introduce a new file for helpers around iovs, add iov_from_buf()

2010-04-27 Thread Amit Shah
to hold sizes, the new function is going to use size_t types. Later commits will add the opposite functionality -- going from an iov to a linear buffer. Signed-off-by: Amit Shah amit.s...@redhat.com --- Makefile |2 ++ Makefile.objs |1 + hw/iov.c

[Qemu-devel] [PATCH v6 12/18] iov: Add iov_to_buf and iov_size helpers

2010-04-27 Thread Amit Shah
iov_to_buf() puts the buffer contents in the iov in a linearized buffer. iov_size() gets the length of the contents in the iov. The iov_to_buf() function is the memcpy_to_iovec() function that was used in virtio-ballon.c. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/iov.c

[Qemu-devel] [PATCH v6 13/18] virtio-serial: Handle scatter-gather buffers for control messages

2010-04-27 Thread Amit Shah
expect otherwise we risk accessing memory that we don't own. Signed-off-by: Amit Shah amit.s...@redhat.com CC: Avi Kivity a...@redhat.com Reported-by: Avi Kivity a...@redhat.com --- hw/virtio-serial-bus.c | 31 --- 1 files changed, 28 insertions(+), 3 deletions

[Qemu-devel] [PATCH v6 15/18] virtio-serial: Apps should consume all data that guest sends out / Fix virtio api abuse

2010-04-27 Thread Amit Shah
We cannot indicate to the guest how much data was consumed by an app for out_bufs. So we just have to assume the apps will consume all the data that are handed over to them. Fix the virtio api abuse in control_out() and handle_output(). Signed-off-by: Amit Shah amit.s...@redhat.com --- hw

[Qemu-devel] [PATCH v6 16/18] virtio-serial: Discard data that guest sends us when ports aren't connected

2010-04-27 Thread Amit Shah
data. This commit really doesn't change anything from the current behaviour, just makes the code slightly better by spinning off data handling to ports in another function. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 69

[Qemu-devel] [PATCH v6 18/18] virtio-serial-bus: wake up iothread upon guest read notification

2010-04-27 Thread Amit Shah
From: Marcelo Tosatti mtosa...@redhat.com Wake up iothread when buffers are consumed. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/virtio

[Qemu-devel] [PATCH v6 17/18] virtio-serial: Implement flow control for individual ports

2010-04-27 Thread Amit Shah
buffers in the vq). The guest kernel can reclaim the buffers when it receives the port close event or when a port is being removed. Ensure we free up the buffers before we send out any events to the guest. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 50

[Qemu-devel] Re: [PATCH v6 05/18] virtio-serial: Use control messages to notify guest of new ports

2010-04-28 Thread Amit Shah
On (Tue) Apr 27 2010 [12:37:00], Anthony Liguori wrote: On 04/27/2010 07:33 AM, Amit Shah wrote: Allow the port 'id's to be set by a user on the command line. This is needed by management apps that will want a stable port numbering scheme for hot-plug/unplug and migration. Since the port

[Qemu-devel] Re: [PATCH v6 18/18] virtio-serial-bus: wake up iothread upon guest read notification

2010-04-28 Thread Amit Shah
On (Tue) Apr 27 2010 [12:41:27], Anthony Liguori wrote: On 04/27/2010 07:34 AM, Amit Shah wrote: From: Marcelo Tosattimtosa...@redhat.com Wake up iothread when buffers are consumed. Signed-off-by: Marcelo Tosattimtosa...@redhat.com Signed-off-by: Amit Shahamit.s...@redhat.com What's

[Qemu-devel] Re: [PATCH v6 18/18] virtio-serial-bus: wake up iothread upon guest read notification

2010-04-28 Thread Amit Shah
On (Wed) Apr 28 2010 [08:25:59], Anthony Liguori wrote: On 04/28/2010 02:29 AM, Amit Shah wrote: On (Tue) Apr 27 2010 [12:41:27], Anthony Liguori wrote: On 04/27/2010 07:34 AM, Amit Shah wrote: From: Marcelo Tosattimtosa...@redhat.com Wake up iothread when buffers are consumed

Re: [Qemu-devel] [PATCH 2/2] virtio-console: Notify resize to the guest.

2010-04-29 Thread Amit Shah
On (Thu) Apr 29 2010 [16:12:38], Kusanagi Kouichi wrote: On 2010-04-16 18:32:19 +0530, Amit Shah wrote: On (Fri) Apr 16 2010 [20:42:47], Kusanagi Kouichi wrote: Signed-off-by: Kusanagi Kouichi sl...@ac.auone-net.jp --- hw/virtio-console.c|3 +++ hw/virtio-serial-bus.c

Re: [Qemu-devel] [PATCH 2/2] virtio-console: Notify resize to the guest.

2010-04-29 Thread Amit Shah
On (Thu) Apr 29 2010 [21:36:30], Kusanagi Kouichi wrote: Please include me in the CC when you send it. Also please mention how you test this feature. Amit I put printf()s into involved functions. Then ran qemu on a terminal emulator, and resized it. That's how I did. Is

[Qemu-devel] Re: [PATCH v2 2/2] virtio-console: Notify resize to the guest.

2010-04-30 Thread Amit Shah
On (Fri) Apr 30 2010 [17:12:19], Kusanagi Kouichi wrote: I tested this patch as follows: I put printf()s into involved functions. Then ran qemu on a terminal emulator, and resized it. The guest kernel gets initial size. However, it doesn't update the size. It seems to need to enable multiport

[Qemu-devel] [PATCH] virtio-serial: Fix check for 'assert'; prevent NULL derefs

2010-04-30 Thread Amit Shah
In the flush_queued_data() function, we expect port to be valid. Assert only for port and not port || discard. Reported-by: Juan Quintela quint...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

[Qemu-devel] [PATCH 1/2] char: Handle resize.

2010-05-03 Thread Amit Shah
From: Kusanagi Kouichi sl...@ac.auone-net.jp Signed-off-by: Kusanagi Kouichi sl...@ac.auone-net.jp Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 34 ++ qemu-char.h |3 +++ 2 files changed, 37 insertions(+), 0 deletions(-) diff --git a/qemu

[Qemu-devel] [PATCH 2/2] virtio-console: Notify resize to the guest.

2010-05-03 Thread Amit Shah
Kouichi sl...@ac.auone-net.jp Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c|3 +++ hw/virtio-serial-bus.c | 15 +++ hw/virtio-serial.h | 11 +-- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio

[Qemu-devel] Re: [PATCH v3 2/2] virtio-console: Notify resize to the guest.

2010-05-03 Thread Amit Shah
On (Mon) May 03 2010 [13:58:13], Kusanagi Kouichi wrote: I tested this patch as follows: I put printf()s into involved functions. Then ran qemu on a terminal emulator, and resized it. The guest kernel gets initial size, and follows host resize. Both singleport and multiport work. v3: If

[Qemu-devel] Re: [PATCH 2/2] virtio-console: Notify resize to the guest.

2010-05-03 Thread Amit Shah
On (Mon) May 03 2010 [12:06:33], Amit Shah wrote: From: Kusanagi Kouichi sl...@ac.auone-net.jp I tested this patch as follows: I put printf()s into involved functions. Then ran qemu on a terminal emulator, and resized it. The guest kernel gets initial size, and follows host resize. Both

Re: [Qemu-devel] hw/iov.[ch]?

2010-05-03 Thread Amit Shah
On (Mon) May 03 2010 [12:17:28], Christoph Hellwig wrote: Any reasons these files are under hw? They're completely generic routines that might come in handy for block work, too. No particular reason. They can be moved around. Amit

[Qemu-devel] [PATCH v4 1/5] char: Let writers know how much data was written in case of errors

2010-05-04 Thread Amit Shah
On writing errors, we just returned -1 even if some bytes were already written out. Ensure we return the number of bytes written before we return the error (on a subsequent call to qemu_chr_write()). Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c |9 +++-- 1 files changed

[Qemu-devel] [PATCH v4 3/5] char: unix/tcp: Add a non-blocking write handler

2010-05-04 Thread Amit Shah
. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 50 ++ 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 1cae1d2..476bb4e 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2117,11 +2117,60

[Qemu-devel] [PATCH v4 4/5] virtio-console: Factor out common init between console and generic ports

2010-05-04 Thread Amit Shah
The initialisation for generic ports and console ports is similar. Factor out the parts that are the same in a different function that can be called from each of the initfns. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 31 ++- 1 files

[Qemu-devel] [PATCH v4 2/5] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-04 Thread Amit Shah
. No backend currently supports non-blocking writes. Signed-off-by: Amit Shah amit.s...@redhat.com --- gdbstub.c|2 +- hw/debugcon.c|2 +- hw/escc.c|3 ++- hw/etraxfs_ser.c |4 ++-- hw/mcf_uart.c|2 +- hw/pl011.c |2

[Qemu-devel] [PATCH v4 5/5] virtio-console: Throttle virtio-serial-bus if we can't consume any more guest data

2010-05-04 Thread Amit Shah
migration. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 127 +-- 1 files changed, 123 insertions(+), 4 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 1552f47..035ef94 100644 --- a/hw/virtio-console.c

[Qemu-devel] [PATCH v4 0/5] char: non-blocking writes, virtio-console flow control

2010-05-04 Thread Amit Shah
or if no callback was supplied. Support for other backend types is easy to add and will be done in later patches. Amit Shah (5): char: Let writers know how much data was written in case of errors char: Add qemu_chr_write_nb() for nonblocking writes char: unix/tcp: Add a non-blocking write handler

[Qemu-devel] [PATCH v5 1/6] virtio-console: Factor out common init between console and generic ports

2010-05-04 Thread Amit Shah
The initialisation for generic ports and console ports is similar. Factor out the parts that are the same in a different function that can be called from each of the initfns. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 31 ++- 1 files

[Qemu-devel] [PATCH v5 0/6] char: non-blocking writes, virtio-console flow control

2010-05-04 Thread Amit Shah
by Juan's comment) - Re-arranged patches Amit Shah (6): virtio-console: Factor out common init between console and generic ports char: Add a QemuChrHandlers struct to initialise chardev handlers char: Let writers know how much data was written in case of errors char: Add

[Qemu-devel] [PATCH v5 3/6] char: Let writers know how much data was written in case of errors

2010-05-04 Thread Amit Shah
On writing errors, we just returned -1 even if some bytes were already written out. Ensure we return the number of bytes written before we return the error (on a subsequent call to qemu_chr_write()). Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c |9 - 1 files changed

[Qemu-devel] [PATCH v5 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-04 Thread Amit Shah
to add a callback handler, call qemu_chr_write_nb() instead of qemu_chr_write() if they wish to receive -EAGAIN notifications. No backend currently supports non-blocking writes. Signed-off-by: Amit Shah amit.s...@redhat.com --- net/socket.c |4 ++-- qemu-char.c | 31

[Qemu-devel] [PATCH v5 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-04 Thread Amit Shah
Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shah amit.s...@redhat.com --- gdbstub.c|9 +++-- hw/debugcon.c|2 +- hw/escc.c|9

[Qemu-devel] [PATCH v5 6/6] virtio-console: Throttle virtio-serial-bus if we can't consume any more guest data

2010-05-04 Thread Amit Shah
migration. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 126 +- 1 files changed, 123 insertions(+), 3 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 749ed59..7eb6aa1 100644 --- a/hw/virtio-console.c

[Qemu-devel] [PATCH] iov: Move from hw/ to topdir

2010-05-04 Thread Amit Shah
The iov functions can be useful to other code as well. Signed-off-by: Amit Shah amit.s...@redhat.com CC: Christoph Hellwig h...@lst.de --- hw/iov.c = iov.c |0 hw/iov.h = iov.h |0 2 files changed, 0 insertions(+), 0 deletions(-) rename hw/iov.c = iov.c (100%) rename hw/iov.h = iov.h

[Qemu-devel] Re: [PATCH v5 3/6] char: Let writers know how much data was written in case of errors

2010-05-04 Thread Amit Shah
On (Tue) May 04 2010 [13:24:58], Gerd Hoffmann wrote: @@ -531,8 +534,12 @@ static int unix_write(int fd, const uint8_t *buf, int len1) while (len 0) { ret = write(fd, buf, len); if (ret 0) { -if (errno != EINTR errno != EAGAIN) +if (len1

[Qemu-devel] Re: [PATCH v4 3/5] char: unix/tcp: Add a non-blocking write handler

2010-05-04 Thread Amit Shah
On (Tue) May 04 2010 [09:43:04], Gerd Hoffmann wrote: On 05/04/10 09:17, Amit Shah wrote: Add a non-blocking write handler that can return with -EAGAIN to the caller and also callback when the socket becomes writable. Non-blocking writes are only enabled for sockets that are opened in non

[Qemu-devel] [PATCH v6 0/6] char: non-blocking writes, virtio-console flow control

2010-05-05 Thread Amit Shah
for passing on handlers to qemu_chr_add_handlers() instead of passing each one individually. Simplifies patches. (Inspired by Juan's comment) - Re-arranged patches Amit Shah (6): virtio-console: Factor out common init between console and generic ports char: Add a QemuChrHandlers struct

[Qemu-devel] [PATCH v6 1/6] virtio-console: Factor out common init between console and generic ports

2010-05-05 Thread Amit Shah
The initialisation for generic ports and console ports is similar. Factor out the parts that are the same in a different function that can be called from each of the initfns. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 31 ++- 1 files

[Qemu-devel] [PATCH v6 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-05 Thread Amit Shah
Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shah amit.s...@redhat.com --- gdbstub.c|9 +++-- hw/debugcon.c|2 +- hw/escc.c|9

[Qemu-devel] [PATCH v6 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Amit Shah
On writing errors, we just returned -1 even if some bytes were already written out. Ensure we return the number of bytes written before we return the error (on a subsequent call to qemu_chr_write()). Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 12 +++- 1 files

[Qemu-devel] [PATCH v6 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Amit Shah
to add a callback handler, call qemu_chr_write_nb() instead of qemu_chr_write() if they wish to receive -EAGAIN notifications. No backend currently supports non-blocking writes. Signed-off-by: Amit Shah amit.s...@redhat.com --- net/socket.c |4 ++-- qemu-char.c | 31

[Qemu-devel] [PATCH v6 5/6] char: unix/tcp: Add a non-blocking write handler

2010-05-05 Thread Amit Shah
. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 50 ++ 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index e6934f6..da70b9b 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2129,11 +2129,60

[Qemu-devel] [PATCH v6 6/6] virtio-console: Throttle virtio-serial-bus if we can't consume any more guest data

2010-05-05 Thread Amit Shah
migration. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 126 +- 1 files changed, 123 insertions(+), 3 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 749ed59..7eb6aa1 100644 --- a/hw/virtio-console.c

[Qemu-devel] Re: [PATCH v6 5/6] char: unix/tcp: Add a non-blocking write handler

2010-05-05 Thread Amit Shah
On (Tue) May 04 2010 [21:54:09], Juan Quintela wrote: static void tcp_chr_connect(void *opaque) { CharDriverState *chr = opaque; TCPCharDriver *s = chr-opaque; +IOHandler *write_cb; +int flags; +bool nonblock; + +flags = fcntl(s-fd, F_GETFL); +if

[Qemu-devel] [PATCH v7 0/6]

2010-05-05 Thread Amit Shah
to qemu_chr_add_handlers() instead of passing each one individually. Simplifies patches. (Inspired by Juan's comment) - Re-arranged patches Amit Shah (6): virtio-console: Factor out common init between console and generic ports char: Add a QemuChrHandlers struct to initialise chardev handlers char: Let

[Qemu-devel] [PATCH v7 1/6] virtio-console: Factor out common init between console and generic ports

2010-05-05 Thread Amit Shah
The initialisation for generic ports and console ports is similar. Factor out the parts that are the same in a different function that can be called from each of the initfns. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 31 ++- 1 files

[Qemu-devel] [PATCH v7 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-05 Thread Amit Shah
Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shah amit.s...@redhat.com --- gdbstub.c|9 +++-- hw/debugcon.c|2 +- hw/escc.c|9

[Qemu-devel] [PATCH v7 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Amit Shah
On writing errors, we just returned -1 even if some bytes were already written out. Ensure we return the number of bytes written before we return the error (on a subsequent call to qemu_chr_write()). Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 12 +++- 1 files

[Qemu-devel] [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Amit Shah
to add a callback handler, call qemu_chr_write_nb() instead of qemu_chr_write() if they wish to receive -EAGAIN notifications. No backend currently supports non-blocking writes. Signed-off-by: Amit Shah amit.s...@redhat.com --- net/socket.c |4 ++-- qemu-char.c | 31

[Qemu-devel] [PATCH v7 5/6] char: unix/tcp: Add a non-blocking write handler

2010-05-05 Thread Amit Shah
. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 47 +++ 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 5e4dec3..9aa3401 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2129,11 +2129,57

[Qemu-devel] [PATCH v7 6/6] virtio-console: Throttle virtio-serial-bus if we can't consume any more guest data

2010-05-05 Thread Amit Shah
migration. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 120 +- 1 files changed, 117 insertions(+), 3 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 862a431..b0b4351 100644 --- a/hw/virtio-console.c

[Qemu-devel] Re: [PATCH v7 0/6] char: non-blocking writes, virtio-console flow control

2010-05-05 Thread Amit Shah
[Fix subject] Amit

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Amit Shah
On (Wed) May 05 2010 [08:16:37], Anthony Liguori wrote: On 05/04/2010 04:39 PM, Amit Shah wrote: For char devices whose backing files are open in non-blocking mode, non-blocking writes can now be made using qemu_chr_write_nb(). For non-blocking chardevs, we can return -EAGAIN to callers

[Qemu-devel] Re: [PATCH v7 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Amit Shah
On (Wed) May 05 2010 [08:15:19], Anthony Liguori wrote: On 05/04/2010 04:39 PM, Amit Shah wrote: On writing errors, we just returned -1 even if some bytes were already written out. Ensure we return the number of bytes written before we return the error (on a subsequent call to qemu_chr_write

[Qemu-devel] Re: [PATCH v7 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-05 Thread Amit Shah
On (Wed) May 05 2010 [08:13:58], Anthony Liguori wrote: On 05/04/2010 04:39 PM, Amit Shah wrote: Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shahamit.s...@redhat.com

[Qemu-devel] Re: [PATCH v7 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Amit Shah
On (Wed) May 05 2010 [08:54:48], Anthony Liguori wrote: On 05/05/2010 08:23 AM, Amit Shah wrote: On (Wed) May 05 2010 [08:15:19], Anthony Liguori wrote: On 05/04/2010 04:39 PM, Amit Shah wrote: On writing errors, we just returned -1 even if some bytes were already written out

[Qemu-devel] [PATCH] virtio-serial: Send per-console port resize notifications to guest

2010-05-05 Thread Amit Shah
, the config changes are deprecated and the VIRTIO_CONSOLE_RESIZE control message is used instead. [Amit: Add per-port row,col notification to the guest via control message, split off virtio-console.c patch] Signed-off-by: Kusanagi Kouichi sl...@ac.auone-net.jp Signed-off-by: Amit Shah amit.s

[Qemu-devel] [PATCH 2/2] virtio-console: Notify guest of console size resize

2010-05-05 Thread Amit Shah
From: Kusanagi Kouichi sl...@ac.auone-net.jp When we receive a CHR_EVENT_RESIZE notification, let the guest know of the console size update. Signed-off-by: Kusanagi Kouichi sl...@ac.auone-net.jp Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c |3 +++ 1 files changed, 3

[Qemu-devel] [PATCH 1/2] char: Handle resize.

2010-05-05 Thread Amit Shah
From: Kusanagi Kouichi sl...@ac.auone-net.jp Signed-off-by: Kusanagi Kouichi sl...@ac.auone-net.jp Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 34 ++ qemu-char.h |3 +++ 2 files changed, 37 insertions(+), 0 deletions(-) diff --git a/qemu

[Qemu-devel] Re: [PATCH] virtio-serial-bus: fix ports_map allocation on init

2010-05-12 Thread Amit Shah
On (Wed) May 12 2010 [17:50:02], Alon Levy wrote: Fix for too small allocation to ports_map Signed-off-by: Alon Levy al...@redhat.com ACK Amit

[Qemu-devel] [PATCH] virtio-serial-bus: fix ports_map allocation on init

2010-05-19 Thread Amit Shah
From: Alon Levy al...@redhat.com Fix for too small allocation to ports_map Signed-off-by: Alon Levy al...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw

[Qemu-devel] [RFC PATCH 2/3] virtio-serial: Add description fields for qdev properties

2010-05-28 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 17 ++--- hw/virtio-serial.h | 12 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index ccd277a..8a99a99 100644 --- a/hw/virtio

[Qemu-devel] [RFC PATCH 1/3] qdev: Add a description field for qdev properties for documentation

2010-05-28 Thread Amit Shah
Add a 'description' along with each qdev property to document the input each qdev property takes. Signed-off-by: Amit Shah amit.s...@redhat.com --- block_int.h | 10 +++--- hw/a9mpcore.c |2 +- hw/acpi_piix4.c |2 +- hw/arm11mpcore.c |4 +- hw

[Qemu-devel] [RFC PATCH 3/3] net.h: Add description fields for qdev properites

2010-05-28 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- net.h | 13 ++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/net.h b/net.h index 0e9cc5d..8ad439a 100644 --- a/net.h +++ b/net.h @@ -20,10 +20,17 @@ typedef struct NICConf { VLANClientState *peer; } NICConf

Re: [Qemu-devel] [RFC PATCH 1/3] qdev: Add a description field for qdev properties for documentation

2010-05-28 Thread Amit Shah
On (Fri) May 28 2010 [14:49:39], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: Add a 'description' along with each qdev property to document the input each qdev property takes. Signed-off-by: Amit Shah amit.s...@redhat.com I always wanted this, and never got around

Re: [Qemu-devel] [RFC PATCH 2/3] virtio-serial: Add description fields for qdev properties

2010-05-28 Thread Amit Shah
On (Fri) May 28 2010 [14:50:17], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 17 ++--- hw/virtio-serial.h | 12 2 files changed, 22 insertions(+), 7 deletions

[Qemu-devel] [PATCH 0/5] Add '-device help' output for device params and help text

2010-05-31 Thread Amit Shah
target. Changes from previous send: - Removed the 'RFC' tag - Not using macros in net.h (Markus) It'll be helpful to have people submit some short descriptive text for the subsystems they care about. Amit Shah (5): qdev: Add a description field for qdev properties for documentation virtio-serial

[Qemu-devel] [PATCH 1/5] qdev: Add a description field for qdev properties for documentation

2010-05-31 Thread Amit Shah
Add a 'description' along with each qdev property to document the input each qdev property takes. Signed-off-by: Amit Shah amit.s...@redhat.com --- block_int.h | 10 +++--- hw/a9mpcore.c |2 +- hw/acpi_piix4.c |2 +- hw/arm11mpcore.c |4 +- hw

[Qemu-devel] [PATCH 2/5] virtio-serial: Add description fields for qdev properties

2010-05-31 Thread Amit Shah
. virtserialport.chardev=chr, The chardev to associate this port with. virtserialport.name=string, Name for the port that's exposed to \ the guest for port discovery. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 17 ++--- hw/virtio-serial.h | 13

[Qemu-devel] [PATCH 4/5] qdev: Re-arrange code to have device properties shown from own function

2010-05-31 Thread Amit Shah
with the device as part of a complete coverage for all devices and options associated with each of them. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/qdev.c | 41 - 1 files changed, 24 insertions(+), 17 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c

[Qemu-devel] [PATCH 5/5] qdev: Add new '-device help' option, shows all devices and properties

2010-05-31 Thread Amit Shah
The new '-device help' option shows all the devices that are registered with qdev and prints out all the properties each device has, along with the description for each property. This is useful in creating automatic documentation for all the options that we have and support. Signed-off-by: Amit

[Qemu-devel] [PATCH 3/5] net.h: Add description fields for qdev properites

2010-05-31 Thread Amit Shah
with this virtual NIC. Signed-off-by: Amit Shah amit.s...@redhat.com --- net.h |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/net.h b/net.h index 0e9cc5d..9ffd4d0 100644 --- a/net.h +++ b/net.h @@ -21,9 +21,12 @@ typedef struct NICConf { } NICConf; #define

[Qemu-devel] Re: [PATCH] virtio-serial: Simplify virtio_serial_load()

2010-06-01 Thread Amit Shah
, 3 insertions(+), 9 deletions(-) Thanks, Acked-by: Amit Shah amit.s...@redhat.com Amit

Re: [Qemu-devel] [PATCH 5/5] qdev: Add new '-device help' option, shows all devices and properties

2010-06-07 Thread Amit Shah
On (Mon) Jun 07 2010 [16:43:05], Markus Armbruster wrote: There is -device \? and -device help, but the user interface provides no clue about the difference between them. -device help loses when we ever pick up a device model with name help. Not that ? was a particularly smart choice...

Re: [Qemu-devel] [PATCH 0/5] Add '-device help' output for device params and help text

2010-06-07 Thread Amit Shah
On (Mon) Jun 07 2010 [11:09:32], Anthony Liguori wrote: On 05/31/2010 07:41 AM, Amit Shah wrote: Hello, This patch series adds support to specify some descriptive help text to qdev device parameters. This series adds some help text to the virtserialport and net family of devices

[Qemu-devel] [PATCH] net: Fix hotplug with pci_add

2010-06-08 Thread Amit Shah
The correct model type wasn't getting added when hotplugging nics with pci_add. Testcase: start VM with default nic type. In the qemu_monitor: (qemu) pci_add auto nic model=virtio This results in a nic hot-plug of the same nic type as the default. Signed-off-by: Amit Shah amit.s...@redhat.com

[Qemu-devel] [PATCH v2] net: Fix hotplug with pci_add

2010-06-08 Thread Amit Shah
in 5294e2c774f120e10b44652ac143abda356f44eb Also changes the behaviour where no .init is defined for a net_client_type. Previously, 0 was returned, which indicated the init was successful and that 0 was the index into the nd_tables[] array. Return -1, indicating unsuccessful init, in such a case. Signed-off-by: Amit Shah

[Qemu-devel] Re: [PATCH] net: Fix hotplug with pci_add

2010-06-08 Thread Amit Shah
On (Tue) Jun 08 2010 [17:31:04], Gerd Hoffmann wrote: On 06/08/10 17:17, Amit Shah wrote: The correct model type wasn't getting added when hotplugging nics with pci_add. Testcase: start VM with default nic type. In the qemu_monitor: (qemu) pci_add auto nic model=virtio This results

Re: [Qemu-devel] [PATCH v2] net: Fix hotplug with pci_add

2010-06-08 Thread Amit Shah
On (Tue) Jun 08 2010 [18:33:00], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: The correct model type wasn't getting added when hotplugging nics with pci_add. Testcase: start VM with default nic type. In the qemu_monitor: (qemu) pci_add auto nic model=virtio

[Qemu-devel] Re: [PATCH v2] net: Fix hotplug with pci_add

2010-06-09 Thread Amit Shah
On (Wed) Jun 09 2010 [09:59:50], Juan Quintela wrote: BTW, once here, didn't default nic should be e1000? not rtl8139? Are you looking at qemu-kvm sources? ;-) Amit

[Qemu-devel] [PATCH] net: Fix VM start with '-net none'

2010-06-15 Thread Amit Shah
to an entry in nd_table[]. With the current code, callers can erroneously poke into nd_table[0] when -net nic is used, which can lead to badness. However, this commit just returns to the previous behaviour before the offending commit. Signed-off-by: Amit Shah amit.s...@redhat.com --- net.c |2 +- 1

Re: [Qemu-devel] [PATCH v2] net: Fix hotplug with pci_add

2010-06-15 Thread Amit Shah
On (Wed) Jun 09 2010 [15:28:11], Amit Shah wrote: Let me rephrase: Behavior changes for -net types without an init() method. The only one without an init() method is none. Before, net_client_init() succeeded for it. Now it fails. What's the impact of that change? And why does it make

[Qemu-devel] Re: [PATCH] virtio-pci: fix bus master bug setting on load

2010-06-17 Thread Amit Shah
On (Thu) Jun 17 2010 [09:15:02], Alex Williamson wrote: The comment suggests we're checking for the driver in the ready state and bus master disabled, but the code is checking that it's not in the ready state. Signed-off-by: Alex Williamson alex.william...@redhat.com Found-by: Amit Shah

[Qemu-devel] [PATCH STABLE-0.12] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-06-22 Thread Amit Shah
from commit 2dedf83ef0cc3463783d6b71bf1b25476f691f3a) Signed-off-by: Amit Shah amit.s...@redhat.com --- block/vvfat.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index c1acb35..592d6e6 100644 --- a/block/vvfat.c +++ b/block/vvfat.c

[Qemu-devel] [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386

2010-06-23 Thread Amit Shah
. Signed-off-by: Amit Shah amit.s...@redhat.com --- vl.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 920717a..f9c8086 100644 --- a/vl.c +++ b/vl.c @@ -418,6 +418,7 @@ static void configure_rtc(QemuOpts *opts) exit(1

[Qemu-devel] [PATCH 2/2] rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix

2010-06-23 Thread Amit Shah
qemu-config.c doesn't contain any target-specific code, and the TARGET_I386 conditional code didn't get compiled as a result. Removing this enables the driftfix parameter for rtc. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-config.c |2 -- 1 files changed, 0 insertions(+), 2

[Qemu-devel] Re: [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386

2010-06-23 Thread Amit Shah
On (Wed) Jun 23 2010 [16:35:26], Paolo Bonzini wrote: On 06/23/2010 04:29 PM, Amit Shah wrote: The driftfix option is only useful for Windows guests, and for the x86 architecture, so limit the option parsing to TARGET_I386. This ifdef conditional is moved from qemu-config.c to vl.c. The next

[Qemu-devel] [PATCH v2] rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix

2010-06-23 Thread Amit Shah
qemu-config.c doesn't contain any target-specific code, and the TARGET_I386 conditional code didn't get compiled as a result. Removing this enables the driftfix parameter for rtc. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-config.c |2 -- 1 files changed, 0 insertions(+), 2

[Qemu-devel] [PATCH] virtio-serial: Fix compat property name

2010-06-23 Thread Amit Shah
-by: Daniel P. Berrange berra...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/pc_piix.c |6 +++--- hw/ppc440_bamboo.c |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 68040b7..84e6c7f 100644 --- a/hw/pc_piix.c +++ b

[Qemu-devel] Re: [PATCH] virtio-net: correct header length math

2010-06-24 Thread Amit Shah
On (Wed) Jun 23 2010 [12:51:18], Michael S. Tsirkin wrote: We were requesting too much when checking buffer length: size already includes host header length. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio-net.c | 20 +++- 1 files changed, 11

[Qemu-devel] Re: [PATCHv3] virtio-net: correct packet length math

2010-06-25 Thread Amit Shah
On (Thu) Jun 24 2010 [18:54:07], Michael S. Tsirkin wrote: We were requesting too much when checking buffer length: size already includes host header length. Further, we should not exit if we get a packet that is too long, since this might not be under control of the guest. Just drop the

[Qemu-devel] [PATCH 1/2] virtio-serial: Check if virtio queue is ready before consuming data

2010-07-01 Thread Amit Shah
virtqueue operations. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 7f9d28f..b89daa6 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial

[Qemu-devel] [PATCH 2/2] virtio-serial: Assert for virtio queue ready before virtqueue operations

2010-07-01 Thread Amit Shah
In addition to the previous fix for calling do_flush_queued_data() only when the virtqueue is ready, ensure do_flush_queued_data() gets a vq that's suitably initialised. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |1 + 1 files changed, 1 insertions(+), 0

Re: [Qemu-devel] [PATCH 1/2] virtio-serial: Check if virtio queue is ready before consuming data

2010-07-14 Thread Amit Shah
On (Thu) Jul 01 2010 [14:58:16], Amit Shah wrote: If a virtio-serial port is removed before the guest comes up and initialises the virtqueues, qemu exits with the message Guest moved used index from 0 to 61440 This happens because we try to clear any pending buffers from the virtqueue

Re: [Qemu-devel] [PATCH] virtio-serial: Fix compat property name

2010-07-14 Thread Amit Shah
On (Wed) Jun 23 2010 [22:49:20], Amit Shah wrote: Starting with qemu -M pc-0.12 -device virtio-serial results in -device virtio-serial: Property 'virtio-serial-pci.max_nr_ports' not found The property name 'max_ports' is incorrectly named 'max_nr_ports'. Fix that. Also fix the ppc440

Re: [Qemu-devel] [PATCH v2] rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix

2010-07-14 Thread Amit Shah
On (Wed) Jun 23 2010 [20:14:04], Amit Shah wrote: qemu-config.c doesn't contain any target-specific code, and the TARGET_I386 conditional code didn't get compiled as a result. Removing this enables the driftfix parameter for rtc. Signed-off-by: Amit Shah amit.s...@redhat.com Ping

[Qemu-devel] [PATCH] virtio-serial: Check if more max_ports specified than we can handle

2010-07-21 Thread Amit Shah
Currently virtio-serial supports a maximum of 31 ports. Specifying the 'max_ports' parameter to be 31 on the cmd line causes badness. Ensure we initialise virtio-serial only if max_ports is within the supported range. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c

[Qemu-devel] [PATCH] migration: Issue 'cont' only on successful incoming migration

2010-07-23 Thread Amit Shah
successfully completes. Reported-by: Laine Stump la...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- migration.c |3 +++ monitor.c |4 sysemu.h|1 + vl.c|3 +++ 4 files changed, 11 insertions(+), 0 deletions(-) diff --git a/migration.c b/migration.c

[Qemu-devel] Re: [PATCH] migration: Issue 'cont' only on successful incoming migration

2010-07-24 Thread Amit Shah
On (Fri) Jul 23 2010 [15:08:18], Luiz Capitulino wrote: diff --git a/monitor.c b/monitor.c index 45fd482..d12a7b5 100644 --- a/monitor.c +++ b/monitor.c @@ -1056,6 +1056,10 @@ static int do_cont(Monitor *mon, const QDict *qdict, QObject **ret_data) { struct

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

2009-12-22 Thread Amit Shah
. The major change from the last time this patch series was sent is that each port now has its own IO vqs instead of a common pair for all the ports. Please review, Amit. Amit Shah (3): virtio: Remove duplicate macro definition for max. virtqueues, bump up the max virtio

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