[Qemu-devel] [PATCH v2 5/5] iohandlers: Add IOHandlerOps struct

2011-01-13 Thread Amit Shah
Collect all the handlers in a IOHandlerOps struct instead of being passed one at a time to each function. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.h |7 ++- vl.c| 56 2 files changed, 38 insertions

[Qemu-devel] [PATCH v2 1/5] iohandlers: Avoid code duplication

2011-01-13 Thread Amit Shah
Add a get_iohandler() function instead of looking up the ioh twice in qemu_set_fd_handler2(). Signed-off-by: Amit Shah amit.s...@redhat.com --- vl.c | 44 ++-- 1 files changed, 26 insertions(+), 18 deletions(-) diff --git a/vl.c b/vl.c index 0292184

[Qemu-devel] [PATCH v2 2/5] iohandlers: Introduce assign_fd_handlers() and remove_fd_handlers

2011-01-13 Thread Amit Shah
a wrapper to assign_fd_handlers() with NULL handlers. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.h |6 ++ vl.c| 36 +--- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/qemu-char.h b/qemu-char.h index e6ee6c4..0ef83f4

[Qemu-devel] [PATCH v2 4/5] iohandlers: Enable an iohandler only if the associated handler exists

2011-01-13 Thread Amit Shah
If an iohandler is asked to be enabled but the handler doesn't exist, don't enable the handler. This can be used to simplify the conditions in main_loop_wait(). Signed-off-by: Amit Shah amit.s...@redhat.com --- vl.c | 29 - 1 files changed, 20 insertions(+), 9

[Qemu-devel] [PATCH v2 3/5] iohandlers: Allow each iohandler to be enabled/disabled individually

2011-01-13 Thread Amit Shah
Each iohandler for an fd can now be individually enabled or disabled. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.h |4 +++ vl.c| 78 -- 2 files changed, 79 insertions(+), 3 deletions(-) diff --git a/qemu

[Qemu-devel] Re: [PATCH v2 0/5] iohandlers: Add support for enabling/disabling individual handlers

2011-01-17 Thread Amit Shah
On (Thu) Jan 13 2011 [13:17:22], Anthony Liguori wrote: On 01/13/2011 09:00 AM, Amit Shah wrote: Hi, This patchset adds new interfaces to work with iohandlers. It adds: int assign_fd_handlers(int fd, IOHandlerOps *ops, void *opaque) -- Specify io handlers for an fd int

[Qemu-devel] Re: [PATCH v2 0/5] iohandlers: Add support for enabling/disabling individual handlers

2011-01-18 Thread Amit Shah
On (Mon) Jan 17 2011 [08:57:16], Anthony Liguori wrote: Also -- this patchset was prompted by a bug in qemu chardevs that freezes guests if they write faster than the chardevs can consume. What should the strategy on fixing that bug be? Fix the loop API such that we're not just fixing one

[Qemu-devel] [PATCH 0/7] virtio-serial: Don't copy guest buf to host, flow control

2011-01-19 Thread Amit Shah
. Please apply. Amit Shah (7): virtio-console: Factor out common init between console and generic ports virtio-console: Remove unnecessary braces virtio-serial-bus: separate out discard logic in a separate function virtio-serial: Don't copy over guest buffer to host virtio-serial: Let

[Qemu-devel] [PATCH 2/7] virtio-console: Remove unnecessary braces

2011-01-19 Thread Amit Shah
Remove unnecessary braces around a case statement. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index d7fe68b..d0b9354 100644 --- a/hw/virtio-console.c

[Qemu-devel] [PATCH 3/7] virtio-serial-bus: separate out discard logic in a separate function

2011-01-19 Thread Amit Shah
Instead of combining flush logic into the discard case and not discard case, have one function doing discard case. This will help later when adding flow control logic to the do_flush_queued_data() function. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 47

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

2011-01-19 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 4/7] virtio-serial: Don't copy over guest buffer to host

2011-01-19 Thread Amit Shah
When the guest writes something to a host, we copied over the entire buffer first into the host and then processed it. Do away with that, it could result in a malicious guest causing a DoS on the host. Reported-by: Paul Brook p...@codesourcery.com Signed-off-by: Amit Shah amit.s...@redhat.com

[Qemu-devel] [PATCH 5/7] virtio-serial: Let virtio-serial-bus know if all data was consumed

2011-01-19 Thread Amit Shah
The have_data() API to hand off guest data to apps using virtio-serial so far assumed all the data was consumed. Relax this assumption. Future commits will allow for incomplete writes. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c |4 ++-- hw/virtio-serial.h |7

[Qemu-devel] [PATCH 6/7] virtio-serial: Add support for flow control

2011-01-19 Thread Amit Shah
This commit lets apps signal an incomplete write. When that happens, stop sending out any more data to the app and wait for it to unthrottle the port. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 49 +-- hw/virtio

[Qemu-devel] [PATCH 7/7] virtio-serial: save/restore new fields in port struct

2011-01-19 Thread Amit Shah
The new fields that got added as part of not copying over the guest buffer to the host need to be saved/restored across migration. Do that and bump up the version number. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 42

[Qemu-devel] [PULL] virtio-serial: Fixes, flow control

2011-01-23 Thread Amit Shah
/amit/virtio-serial.git for-anthony Amit Shah (7): virtio-console: Factor out common init between console and generic ports virtio-console: Remove unnecessary braces virtio-serial: move out discard logic in a separate function virtio-serial: Don't copy over guest buffer

Re: [Qemu-devel] [0.14] Queue of 0.14 patches/pull?

2011-01-28 Thread Amit Shah
On (Thu) Jan 27 2011 [09:29:36], Paolo Bonzini wrote: Before creating rc1 we need to make sure that all patches for 0.14 have been reviewed and applied. Please reply to this message with a subject starting with [PING 0.14] and a link to patchwork, gmane, or whatnot; or [PULL 0.14] for tree

[Qemu-devel] [PATCH master/0.14 1/2] virtio-serial: Use a struct to pass config information from proxy

2011-02-02 Thread Amit Shah
Instead of using a single variable to pass to the virtio_serial_init function, use a struct so that expanding the number of variables to be passed on later is easier. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-pci.c| 12 ++-- hw/virtio-serial-bus.c | 16

[Qemu-devel] [PATCH master/0.14 2/2] virtio-serial: Add older machine compat property for flow control

2011-02-02 Thread Amit Shah
'flow_control' and defaults to on. Reported-by: Alex Williamson alex.william...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/pc_piix.c | 16 ++ hw/virtio-pci.c|2 + hw/virtio-serial-bus.c | 77 +--- hw/virtio

[Qemu-devel] [PATCH master/0.14] virtio-serial: Disallow generic ports at id 0

2011-02-02 Thread Amit Shah
instantiating a port at id 0 as well. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 62624ec..3560db3 100644 --- a/hw/virtio-console.c +++ b/hw/virtio

[Qemu-devel] [PATCH REBASE/RESEND 0/4] Auto-document qdev devices

2011-02-03 Thread Amit Shah
and perhaps bug people based on git history as to what documentation is to be added for some options. Also to incorporate Markus's comments on beautifying output. The earlier this patchset goes in the better since it'll reduce conflicts and rebases needed. If this looks acceptable, please apply! Amit

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

2011-02-03 Thread Amit Shah
with this virtual NIC. Signed-off-by: Amit Shah amit.s...@redhat.com Acked-by: Markus Armbruster arm...@redhat.com --- net.h | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/net.h b/net.h index aa4454b..9cfd2ed 100644 --- a/net.h +++ b/net.h @@ -21,10 +21,14 @@ typedef struct

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

2011-02-03 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 Acked-by: Markus Armbruster arm...@redhat.com --- hw/virtio-console.c | 17

[Qemu-devel] [PATCH REBASE/RESEND 4/4] block_int.h: Provide documentation for common block qdev properties

2011-02-03 Thread Amit Shah
Document the options common to all block devices. This comes from Kevin. Signed-off-by: Amit Shah amit.s...@redhat.com Acked-by: Markus Armbruster arm...@redhat.com CC: Kevin Wolf kw...@redhat.com --- block_int.h | 20 1 files changed, 12 insertions(+), 8 deletions

[Qemu-devel] [PATCH master/0.14] virtio-serial: Make sure virtqueue is ready before discarding data

2011-02-04 Thread Amit Shah
This can happen if a port gets unplugged before guest has chance to initialise vqs. Reported-by: Juan Quintela quint...@redhat.com 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

Re: [Qemu-devel] [PATCH master/0.14] virtio-serial: Make sure virtqueue is ready before discarding data

2011-02-05 Thread Amit Shah
On (Fri) 04 Feb 2011 [06:52:04], Anthony Liguori wrote: On 02/04/2011 02:54 AM, Amit Shah wrote: This can happen if a port gets unplugged before guest has chance to initialise vqs. Reported-by: Juan Quintelaquint...@redhat.com Signed-off-by: Amit Shahamit.s...@redhat.com Applied

Re: [Qemu-devel] [PATCH master/0.14] virtio-serial: Make sure virtqueue is ready before discarding data

2011-02-07 Thread Amit Shah
On (Sun) 06 Feb 2011 [11:50:46], Amit Shah wrote: On (Fri) 04 Feb 2011 [06:52:04], Anthony Liguori wrote: On 02/04/2011 02:54 AM, Amit Shah wrote: This can happen if a port gets unplugged before guest has chance to initialise vqs. Reported-by: Juan Quintelaquint...@redhat.com Signed

Re: [Qemu-devel] [PATCH master/0.14] virtio-serial: Make sure virtqueue is ready before discarding data

2011-02-07 Thread Amit Shah
On (Mon) 07 Feb 2011 [20:25:59], Anthony Liguori wrote: On 02/07/2011 08:14 PM, Amit Shah wrote: On (Sun) 06 Feb 2011 [11:50:46], Amit Shah wrote: On (Fri) 04 Feb 2011 [06:52:04], Anthony Liguori wrote: On 02/04/2011 02:54 AM, Amit Shah wrote: This can happen if a port gets unplugged before

[Qemu-devel] Re: new-old version migration

2011-02-07 Thread Amit Shah
On (Tue) 08 Feb 2011 [08:42:14], Michael S. Tsirkin wrote: I see. I'm unhappy with the facts that 1. if (feature) is spread all over the code instead of just in migration 2. it is also obfuscated with if (flow_control) instead of plain if (migrate to qemu 0.14) so removing it will

Re: [Qemu-devel] Re: new-old version migration

2011-02-07 Thread Amit Shah
On (Tue) 08 Feb 2011 [01:44:32], Anthony Liguori wrote: On 02/08/2011 01:07 AM, Amit Shah wrote: On (Tue) 08 Feb 2011 [08:42:14], Michael S. Tsirkin wrote: I see. I'm unhappy with the facts that 1. if (feature) is spread all over the code instead of just in migration 2. it is also

Re: [Qemu-devel] [PATCH master/0.14] virtio-serial: Make sure virtqueue is ready before discarding data

2011-02-07 Thread Amit Shah
On (Tue) 08 Feb 2011 [01:40:09], Anthony Liguori wrote: However, virtio doesn't have vmstate yet. Are we willing to put vmstate in 0.14 to introduce subsections? I doubt that. Not, that's why I suggested reverting this change and pushing it to 0.15. We're not going to fix it properly in

[Qemu-devel] [PATCH] char: Prevent multiple devices opening same chardev

2011-02-09 Thread Amit Shah
Prevent: -chardev socket,path=/tmp/foo,server,nowait,id=c0 \ -device virtserialport,chardev=c0,id=vs0 \ -device virtserialport,chardev=c0,id=vs1 Reported-by: Mike Cao b...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/qdev-properties.c |7 ++- qemu-char.h

[Qemu-devel] [PATCH 1/2] qdev: Allow hot-plug for lists with pre-filled descriptors

2011-02-10 Thread Amit Shah
This will be needed for hot-plugging chardevs. Signed-off-by: Amit Shah amit.s...@redhat.com --- monitor.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/monitor.c b/monitor.c index 7fc311d..f3d7ab3 100644 --- a/monitor.c +++ b/monitor.c @@ -74,8 +74,6 @@ * 'O

[Qemu-devel] [PATCH 2/2] qdev: Allow chardevs to be hot-plugged

2011-02-10 Thread Amit Shah
This commit enables chardevs to be hot-plugged to a running qemu machine. The syntax is similar to the -chardev command line: (qemu) chardev_add socket,path=/tmp/foo,server,nowait,id=char0 Signed-off-by: Amit Shah amit.s...@redhat.com --- hmp-commands.hx | 16 hw/qdev.c

Re: [Qemu-devel] KVM call agenda for Feb 15

2011-02-15 Thread Amit Shah
On (Mon) 14 Feb 2011 [16:18:10], Anthony Liguori wrote: On 02/14/2011 11:56 AM, Chris Wright wrote: Please send in any agenda items you are interested in covering. -rc2 is tagged and waiting for announcement. Please take a look at -rc2 and make sure there is nothing critical missing. Will

Re: [Qemu-devel] KVM call minutes for Feb 15

2011-02-16 Thread Amit Shah
On (Tue) 15 Feb 2011 [17:13:13], Anthony Liguori wrote: On 02/15/2011 10:26 AM, Chris Wright wrote: revisit new - old migration - Amit offers virtio-serial patches and some legwork So, to me, migration correctness trumps compatibility. I don't think compatibility is useful if it means

[Qemu-devel] [PATCH] virtio-serial: Enable ioeventfd

2011-02-17 Thread Amit Shah
Enable ioeventfd for virtio-serial devices by default. Commit 25db9ebe15125deb32958c6df74996f745edf1f9 lists the benefits of using ioeventfd. Copying a file from guest to host over a virtio-serial channel didn't show much difference in time or io_exit rate. Signed-off-by: Amit Shah amit.s

Re: [Qemu-devel] KVM call minutes for Feb 15

2011-02-17 Thread Amit Shah
On (Wed) 16 Feb 2011 [08:41:27], Anthony Liguori wrote: On 02/16/2011 08:39 AM, Amit Shah wrote: On (Tue) 15 Feb 2011 [17:13:13], Anthony Liguori wrote: On 02/15/2011 10:26 AM, Chris Wright wrote: revisit new - old migration - Amit offers virtio-serial patches and some legwork So, to me

Re: [Qemu-devel] [PATCH REBASE/RESEND 2/4] virtio-serial: Add description fields for qdev properties

2011-02-17 Thread Amit Shah
On (Tue) 15 Feb 2011 [10:10:23], Anthony Liguori wrote: diff --git a/hw/virtio-serial.h b/hw/virtio-serial.h index a308196..2c5e336 100644 --- a/hw/virtio-serial.h +++ b/hw/virtio-serial.h @@ -57,6 +57,19 @@ struct virtio_console_control { /* == In-qemu interface == */ +#define

Re: [Qemu-devel] [PATCH REBASE/RESEND 1/4] qdev: Add a description field for qdev properties for documentation

2011-02-17 Thread Amit Shah
On (Tue) 15 Feb 2011 [10:43:42], Anthony Liguori wrote: #define DEFINE_BLOCK_PROPERTIES(_state, _conf) \ -DEFINE_PROP_DRIVE(drive, _state, _conf.bs), \ +DEFINE_PROP_DRIVE(drive, _state, _conf.bs, ), \

Re: [Qemu-devel] [PATCH REBASE/RESEND 1/4] qdev: Add a description field for qdev properties for documentation

2011-02-17 Thread Amit Shah
On (Thu) 17 Feb 2011 [07:12:42], Anthony Liguori wrote: On 02/17/2011 07:06 AM, Amit Shah wrote: On (Tue) 15 Feb 2011 [10:43:42], Anthony Liguori wrote: #define DEFINE_BLOCK_PROPERTIES(_state, _conf) \ -DEFINE_PROP_DRIVE(drive, _state, _conf.bs

Re: [Qemu-devel] [PATCH REBASE/RESEND 2/4] virtio-serial: Add description fields for qdev properties

2011-02-17 Thread Amit Shah
On (Thu) 17 Feb 2011 [07:11:44], Anthony Liguori wrote: On 02/17/2011 07:03 AM, Amit Shah wrote: On (Tue) 15 Feb 2011 [10:10:23], Anthony Liguori wrote: diff --git a/hw/virtio-serial.h b/hw/virtio-serial.h index a308196..2c5e336 100644 --- a/hw/virtio-serial.h +++ b/hw/virtio-serial.h

Re: [Qemu-devel] [PATCH REBASE/RESEND 0/4] Auto-document qdev devices

2011-02-17 Thread Amit Shah
On (Tue) 15 Feb 2011 [10:12:23], Anthony Liguori wrote: On 02/04/2011 12:18 AM, Amit Shah wrote: Hello, This is yet another rebase of the patchset I'd sent earlier. The usual notes apply: this is just the start, just getting the framework in place and a few examples so that people can

[Qemu-devel] [PATCH RESEND 2/3] virtio-serial: Disallow generic ports at id 0

2011-02-21 Thread Amit Shah
instantiating a port at id 0 as well. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 62624ec..3560db3 100644 --- a/hw/virtio-console.c +++ b/hw/virtio

[Qemu-devel] [PULL] virtio-serial: fixes, enable ioeventfd

2011-02-21 Thread Amit Shah
The following changes since commit 57a8821bc6e4457230075a5c8da5f8a083889686: w32: Remove implementation of function ffs (2011-02-20 20:18:21 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/qemu/amit/virtio-serial.git for-anthony Amit Shah (3): virtio

[Qemu-devel] [PATCH RESEND 1/3] virtio-serial: Use a struct to pass config information from proxy

2011-02-21 Thread Amit Shah
Instead of using a single variable to pass to the virtio_serial_init function, use a struct so that expanding the number of variables to be passed on later is easier. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-pci.c| 12 ++-- hw/virtio-serial-bus.c | 16

[Qemu-devel] [PATCH RESEND 3/3] virtio-serial: Enable ioeventfd

2011-02-21 Thread Amit Shah
Enable ioeventfd for virtio-serial devices by default. Commit 25db9ebe15125deb32958c6df74996f745edf1f9 lists the benefits of using ioeventfd. Copying a file from guest to host over a virtio-serial channel didn't show much difference in time or io_exit rate. Signed-off-by: Amit Shah amit.s

[Qemu-devel] [PATCH RESEND] char: Prevent multiple devices opening same chardev

2011-02-21 Thread Amit Shah
Prevent: -chardev socket,path=/tmp/foo,server,nowait,id=c0 \ -device virtserialport,chardev=c0,id=vs0 \ -device virtserialport,chardev=c0,id=vs1 Reported-by: Mike Cao b...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/qdev-properties.c |7 ++- qemu-char.h

[Qemu-devel] [PATCH 1/7] iohandlers: Mark current implementation as 'old'

2011-02-22 Thread Amit Shah
Mark the current iohandler list as 'old'. In the next commit we'll introduce a new iohandler api that will replace the list name. The 'old' list will eventually be completely replaced by the new implementation. Signed-off-by: Amit Shah amit.s...@redhat.com --- vl.c | 14 +++--- 1

[Qemu-devel] [PATCH 4/7] char: udp: Use new iohandler api

2011-02-22 Thread Amit Shah
Update the udp code to use the new iohandler api. The change is mostly mechanical with a new iohandler function calling the older functions depending on the value of the 'mask' field. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 22 +++--- 1 files changed

[Qemu-devel] [PATCH 0/7] New iohandler API

2011-02-22 Thread Amit Shah
tested this series in two scenarios: monitor on stdio and by running the virtio-serial testsuite, which uses unix sockets and does open/close/read/write/poll calls on the sockets. It all works fine. Please review and apply. Amit Shah (7): iohandlers: Mark current implementation as 'old

[Qemu-devel] [PATCH 5/7] char: fd: Use new iohandler api

2011-02-22 Thread Amit Shah
Update the fd code to use the new iohandler api. The change is mostly mechanical with a new iohandler function calling the older functions depending on the value of the 'mask' field. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 24 1 files changed

[Qemu-devel] [PATCH 2/7] iohandlers: Introduce a new API

2011-02-22 Thread Amit Shah
Introduce a new iohandler api that doesn't have multiple callbacks. Instead, a single callback and a mask of events that got set will be passed on to the handler. This will ease our transition to a poll() interface instead of the current select() that happens on the fds. Signed-off-by: Amit Shah

[Qemu-devel] [PATCH 3/7] char: tcp: Use new iohandler api

2011-02-22 Thread Amit Shah
Update the tcp code to use the new iohandler api. The change is mostly mechanical with a new iohandler function calling the older functions depending on the value of the 'mask' field. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 48

[Qemu-devel] [PATCH 6/7] char: stdio: Use new iohandler api

2011-02-22 Thread Amit Shah
Update the stdio code to use the new iohandler api. The change is mostly mechanical with a new iohandler function calling the older functions depending on the value of the 'mask' field. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 22 +++--- 1 files changed

[Qemu-devel] [PATCH 7/7] char: pty: Use new iohandler api

2011-02-22 Thread Amit Shah
Update the pty code to use the new iohandler api. The change is mostly mechanical with a new iohandler function calling the older functions depending on the value of the 'mask' field. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 24 1 files changed

Re: [Qemu-devel] [PATCH 1/7] iohandlers: Mark current implementation as 'old'

2011-02-22 Thread Amit Shah
On (Tue) 22 Feb 2011 [13:09:34], Avi Kivity wrote: On 02/22/2011 12:18 PM, Amit Shah wrote: Mark the current iohandler list as 'old'. In the next commit we'll introduce a new iohandler api that will replace the list name. The 'old' list will eventually be completely replaced by the new

Re: [Qemu-devel] [PATCH 2/7] iohandlers: Introduce a new API

2011-02-22 Thread Amit Shah
On (Tue) 22 Feb 2011 [14:39:03], Alon Levy wrote: On Tue, Feb 22, 2011 at 03:48:31PM +0530, Amit Shah wrote: Introduce a new iohandler api that doesn't have multiple callbacks. Instead, a single callback and a mask of events that got set will be passed on to the handler. This will ease our

Re: [Qemu-devel] [PATCH 1/7] iohandlers: Mark current implementation as 'old'

2011-02-22 Thread Amit Shah
On (Tue) 22 Feb 2011 [15:28:59], Avi Kivity wrote: On 02/22/2011 01:17 PM, Amit Shah wrote: On (Tue) 22 Feb 2011 [13:09:34], Avi Kivity wrote: On 02/22/2011 12:18 PM, Amit Shah wrote: Mark the current iohandler list as 'old'. In the next commit we'll introduce a new iohandler api

Re: [Qemu-devel] [PATCH 2/7] iohandlers: Introduce a new API

2011-02-22 Thread Amit Shah
On (Tue) 22 Feb 2011 [15:28:02], Avi Kivity wrote: On 02/22/2011 12:18 PM, Amit Shah wrote: Introduce a new iohandler api that doesn't have multiple callbacks. Instead, a single callback and a mask of events that got set will be passed on to the handler. This will ease our transition

[Qemu-devel] [PATCH] migration: Accept 'cont' only after successful incoming migration

2010-07-27 Thread Amit Shah
successfully completes. A new qerror, QERR_MIGRATION_EXPECTED, is added to signal that 'cont' failed due to no incoming migration has been attempted yet. Reported-by: Laine Stump la...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- Luiz, does the QERR bit look OK? migration.c |2

Re: [Qemu-devel] [PATCH] Introduce a -libvirt-caps flag as a stop-gap

2010-07-28 Thread Amit Shah
On (Tue) Jul 27 2010 [10:55:03], Anthony Liguori wrote: +case QEMU_OPTION_libvirt_caps: +printf(version: QEMU_VERSION \n + package: QEMU_PKGVERSION \n + caps: name,enable-kvm,no-reboot,uuid,xen-domid,drive +

Re: [Qemu-devel] RFC adding ioctl's to virtserial/virtconsole

2010-08-02 Thread Amit Shah
On (Mon) Aug 02 2010 [04:33:49], Alon Levy wrote: Hi, This patch adds three CHR_IOCTLs and uses them in virtserial devices, to be used by a chardev backend, such as a spice vm channel (spice is a vdi solution). Basically virtio-serial provides three driver initiated events for guest

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

2010-08-06 Thread Amit Shah
On (Fri) Aug 06 2010 [12:12:45], Daniel P. Berrange wrote: On Wed, Jun 23, 2010 at 08:14:04PM +0530, 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

[Qemu-devel] [PATCH] virtio-serial: Cleanup on device hot-unplug

2010-08-18 Thread Amit Shah
Free malloc'ed memory, unregister from savevm and clean up virtio-common bits on device hot-unplug. This was found performing a migration after device hot-unplug. Reported-by: lihu...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-pci.c| 10 +- hw

[Qemu-devel] [PATCH] balloon: Don't try fetching info if machine is stopped

2010-08-18 Thread Amit Shah
If the machine is stopped and 'info balloon' is invoked, the monitor process just hangs waiting for info from the guest. Return the most recent balloon data in that case. See https://bugzilla.redhat.com/show_bug.cgi?id=623903 Reported-by: lihu...@redhat.com Signed-off-by: Amit Shah amit.s

[Qemu-devel] [PATCH V2] balloon: Don't try fetching info if machine is stopped

2010-08-19 Thread Amit Shah
If the machine is stopped and 'info balloon' is invoked, the monitor process just hangs waiting for info from the guest. Return the most recent balloon data in that case. See https://bugzilla.redhat.com/show_bug.cgi?id=623903 Reported-by: lihu...@redhat.com Signed-off-by: Amit Shah amit.s

Re: [Qemu-devel] [PATCH] virtio-serial: Cleanup on device hot-unplug

2010-08-20 Thread Amit Shah
On (Thu) Aug 19 2010 [06:51:04], Amit Shah wrote: Free malloc'ed memory, unregister from savevm and clean up virtio-common bits on device hot-unplug. This was found performing a migration after device hot-unplug. Reported-by: lihu...@redhat.com Signed-off-by: Amit Shah amit.s

Re: [Qemu-devel] [PATCH V2] balloon: Don't try fetching info if machine is stopped

2010-08-20 Thread Amit Shah
On (Fri) Aug 20 2010 [06:18:11], Amit Shah wrote: If the machine is stopped and 'info balloon' is invoked, the monitor process just hangs waiting for info from the guest. Return the most recent balloon data in that case. See https://bugzilla.redhat.com/show_bug.cgi?id=623903 Reported

Re: [Qemu-devel] [PATCH V2] balloon: Don't try fetching info if machine is stopped

2010-08-25 Thread Amit Shah
On (Sun) Aug 22 2010 [16:54:06], Anthony Liguori wrote: On 08/19/2010 07:48 PM, Amit Shah wrote: If the machine is stopped and 'info balloon' is invoked, the monitor process just hangs waiting for info from the guest. Return the most recent balloon data in that case. See https

Re: [Qemu-devel] [PATCH V2] balloon: Don't try fetching info if machine is stopped

2010-08-26 Thread Amit Shah
On (Sun) Aug 22 2010 [16:54:06], Anthony Liguori wrote: On 08/19/2010 07:48 PM, Amit Shah wrote: If the machine is stopped and 'info balloon' is invoked, the monitor process just hangs waiting for info from the guest. Return the most recent balloon data in that case. See https

Re: [Qemu-devel] [PATCH V2] balloon: Don't try fetching info if machine is stopped

2010-08-26 Thread Amit Shah
On (Thu) Aug 26 2010 [10:05:44], Paolo Bonzini wrote: On 08/26/2010 08:05 AM, Amit Shah wrote: This is what I have currently. It would need some timer handling in the save/load case as well, right? When loading you won't have any pending info balloon command, so I think the timer need

[Qemu-devel] [PATCH v3 0/3] virtio-balloon: Don't wait indefinitely for guest response

2010-08-26 Thread Amit Shah
we do that for any other command. libvirt should be prepared to handle this. If not, please suggest a better alternative. Differences from v2: - Add a timeout for uncooperative/hung guests - Add an qerror message for letting users/management know of guest stopped status. Amit Shah (3): balloon

[Qemu-devel] [PATCH v3 1/3] balloon: Don't try fetching info if guest is unresponsive

2010-08-26 Thread Amit Shah
://bugzilla.redhat.com/show_bug.cgi?id=623903 Reported-by: lihu...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-balloon.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 9fe3886..d6c66cf 100644

[Qemu-devel] [PATCH v3 2/3] qerror: Add a new MACHINE_STOPPED error message

2010-08-26 Thread Amit Shah
This error message denotes some command was not successful in completing as the guest was unresponsive. Use it in the virtio-balloon code when showing older, cached data. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-balloon.c |1 + qerror.c|4 qerror.h

[Qemu-devel] [PATCH v3 3/3] balloon: Don't try fetching info if machine is stopped

2010-08-26 Thread Amit Shah
-by: Amit Shah amit.s...@redhat.com --- balloon.c | 11 +++ balloon.h |6 -- hw/virtio-balloon.c |9 +++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/balloon.c b/balloon.c index 8e0b7f1..8b05d20 100644 --- a/balloon.c +++ b/balloon.c

[Qemu-devel] Re: [PATCH v3 2/3] qerror: Add a new MACHINE_STOPPED error message

2010-08-27 Thread Amit Shah
On (Fri) Aug 27 2010 [07:39:37], Anthony Liguori wrote: NACK. It has always been allowed valid to call query-balloon to get the current balloon level. We must not throw an error just because the recently added mem stats can't be refreshed. I think that's a fair comment but why even bother

[Qemu-devel] Re: [PATCH] Disable virtio-balloon memory stats interface

2010-08-30 Thread Amit Shah
, the virtio balloon memory stats feature is being + * disabled in qemu-0.13. + * + * -aglitke + */ +/* f |= (1 VIRTIO_BALLOON_F_STATS_VQ); */ return f; } Acked-by: Amit Shah amit.s...@redhat.com Amit

[Qemu-devel] Re: [PATCH] virtio-serial: Unplug port if guest reports failure in adding it

2010-09-01 Thread Amit Shah
On (Tue) Aug 31 2010 [13:52:22], Amit Shah wrote: If a guest reports failure in adding a port, we shouldn't keep it lying around. 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 0/4] Backport fixes from master to stable-0.13

2010-09-08 Thread Amit Shah
. The commit ids from which they're backported are mentioned in the individual patches. Please apply. Amit Shah (4): virtio-serial: Check if more max_ports specified than we can handle migration: Accept 'cont' only after successful incoming migration rtc: Remove TARGET_I386 from qemu-config.c

[Qemu-devel] [PATCH 2/4] migration: Accept 'cont' only after successful incoming migration

2010-09-08 Thread Amit Shah
successfully completes. A new qerror, QERR_MIGRATION_EXPECTED, is added to signal that 'cont' failed due to no incoming migration has been attempted yet. Reported-by: Laine Stump la...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com Reviewed-by: Luiz Capitulino lcapitul...@redhat.com Signed

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

2010-09-08 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 Signed-off-by: Aurelien Jarno

[Qemu-devel] [PATCH 4/4] virtio-serial: Cleanup on device hot-unplug

2010-09-08 Thread Amit Shah
Free malloc'ed memory, unregister from savevm and clean up virtio-common bits on device hot-unplug. This was found performing a migration after device hot-unplug. Reported-by: lihu...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com

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

2010-09-08 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 Signed-off-by: Anthony Liguori aligu...@us.ibm.com (cherry picked from

[Qemu-devel] Re: [PATCH] Disable virtio-balloon memory stats interface

2010-09-08 Thread Amit Shah
On (Tue) Aug 31 2010 [09:12:39], Amit Shah wrote: On (Mon) Aug 30 2010 [14:17:51], Adam Litke wrote: The addition of memory stats reporting to the virtio balloon causes the 'info balloon' command to become asynchronous. This is a regression because management tools that consume

[Qemu-devel] [PATCH 4/4] block_int.h: Provide documentation for common block qdev properties

2010-09-15 Thread Amit Shah
Document the options common to all block devices. This comes from Kevin. Signed-off-by: Amit Shah amit.s...@redhat.com CC: Kevin Wolf kw...@redhat.com --- block_int.h | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/block_int.h b/block_int.h index ce20285

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

2010-09-15 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 f11c108..b6658fd 100644 --- a/net.h +++ b/net.h @@ -20,9 +20,12 @@ typedef struct NICConf { } NICConf; #define

[Qemu-devel] [PATCH 0/4] First steps towards documenting qdev devices/options

2010-09-15 Thread Amit Shah
be preparing follow-on patches that add doc strings for a few more options and perhaps bug people based on git history as to what documentation is to be added for some options. If this looks acceptable, please apply! Amit Shah (4): qdev: Add a description field for qdev properties for documentation

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

2010-09-15 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

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

2010-09-28 Thread Amit Shah
On (Tue) Sep 28 2010 [15:48:26], Markus Armbruster wrote: diff --git a/hw/virtio-serial.h b/hw/virtio-serial.h index ff08c40..187d5e4 100644 --- a/hw/virtio-serial.h +++ b/hw/virtio-serial.h @@ -57,6 +57,19 @@ struct virtio_console_control { /* == In-qemu interface == */

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

2010-09-28 Thread Amit Shah
On (Tue) Sep 28 2010 [15:52:02], 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. [...] diff --git a/hw/qdev.c b/hw/qdev.c index 35858cb..b415025 100644 --- a/hw/qdev.c

[Qemu-devel] [PATCH v6 00/18] PULL: virtio-serial fixes

2010-04-27 Thread Amit Shah
there are empty buffers to fill data in. Amit Shah (17): virtio-serial: save/load: Ensure target has enough ports virtio-serial: save/load: Ensure nr_ports on src and dest are same. virtio-serial: save/load: Ensure we have hot-plugged ports instantiated virtio-serial: save/load: Send

[Qemu-devel] [PATCH v6 01/18] virtio-serial: save/load: Ensure target has enough ports

2010-04-27 Thread Amit Shah
The target could be started with max_nr_ports for a virtio-serial device lesser than what was available on the source machine. Fail the migration in such a case. Signed-off-by: Amit Shah amit.s...@redhat.com Reported-by: Juan Quintela quint...@redhat.com --- hw/virtio-serial-bus.c | 13

[Qemu-devel] [PATCH v6 02/18] virtio-serial: save/load: Ensure nr_ports on src and dest are same.

2010-04-27 Thread Amit Shah
The number of ports on the source as well as the destination machines should match. If they don't, it means some ports that got hotplugged on the source aren't instantiated on the destination. Or that ports that were hot-unplugged on the source are created on the destination. Signed-off-by: Amit

[Qemu-devel] [PATCH v6 03/18] virtio-serial: save/load: Ensure we have hot-plugged ports instantiated

2010-04-27 Thread Amit Shah
If some ports that were hot-plugged on the source are not available on the destination, fail migration instead of trying to deref a NULL pointer. Signed-off-by: Amit Shah amit.s...@redhat.com Reported-by: Juan Quintela quint...@redhat.com --- hw/virtio-serial-bus.c |7 +++ 1 files

[Qemu-devel] [PATCH v6 04/18] virtio-serial: save/load: Send target host connection status if different

2010-04-27 Thread Amit Shah
If the host connection to a port is closed on the destination machine after migration, whereas the connection was open on the source, the guest has to be informed of that. Similar for a host connection open on the destination. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial

[Qemu-devel] [PATCH v6 07/18] virtio-serial: Remove redundant check for 0-sized write request

2010-04-27 Thread Amit Shah
The check for a 0-sized write request to a guest port is not necessary; the while loop below won't be executed in this case and all will be fine. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/hw

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

2010-04-27 Thread Amit Shah
to the guest indicating addition of new ports (hot-plug) or notifying the guest of the available ports when the guest sends us a DEVICE_READY control message. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c|2 + hw/virtio-serial-bus.c | 184

[Qemu-devel] [PATCH v6 06/18] virtio-serial: whitespace: match surrounding code

2010-04-27 Thread Amit Shah
The virtio-serial code doesn't mix declarations and definitions, so separate them out on different lines. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio

[Qemu-devel] [PATCH v6 08/18] virtio-serial: Update copyright year to 2010

2010-04-27 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c|2 +- hw/virtio-serial-bus.c |2 +- hw/virtio-serial.h |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 17b221d..6b8 100644 --- a/hw

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