Re: [Qemu-devel] 80-column rule and breaking output statements

2011-07-04 Thread Amit Shah
On (Sat) 02 Jul 2011 [09:38:30], Stefan Hajnoczi wrote: ... I don't see split lines as an issue because I never grep for an entire line. Pick a small, unique, fixed part of the message and you'll find it. Small in order to avoid any formatting or split line issues. Unless you pick your

[Qemu-devel] [PATCH 2/2] virtio-console: Add some trace events

2011-07-05 Thread Amit Shah
Add some trace events for messages passed between the char layer and the virtio-serial bus. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c |9 - trace-events|5 + 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/hw/virtio

[Qemu-devel] [PATCH 1/2] virtio-serial-bus: Add trace events

2011-07-05 Thread Amit Shah
Add some trace events for messages passed between the guest and host. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |7 +++ trace-events |6 ++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio

[Qemu-devel] [PATCH 2/3] virtio-console: Add some trace events

2011-07-07 Thread Amit Shah
Add some trace events for messages passed between the char layer and the virtio-serial bus. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c |9 - trace-events|5 + 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/hw/virtio

[Qemu-devel] [PATCH 1/3] virtio-serial-bus: Add trace events

2011-07-07 Thread Amit Shah
Add some trace events for messages passed between the guest and host. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |7 +++ trace-events |6 ++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio

[Qemu-devel] [PULL] virtio-serial: trace events, trivial fix

2011-07-07 Thread Amit Shah
9312805d33e8b106bae356d13a8071fb37d75554: pxa2xx_lcd: add proper rotation support (2011-07-04 22:12:21 +0200) 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-serial-bus: Add trace events virtio-console: Add some trace events

[Qemu-devel] [PATCH 3/3] virtio-serial-bus: Fix trailing \n in error_report string

2011-07-07 Thread Amit Shah
Markus fixed offenders in the file but one instance sneaked in via another patch. Fix it. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index

[Qemu-devel] [PATCH 1/1] virtio-console: Prevent abort()s in case of host chardev close

2011-07-07 Thread Amit Shah
to its users, all we get is -1 for any kind of error. Just return 0 for now and wait for chardevs to return better error messages to act better on the return messages. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 20 ++-- 1 files changed, 18 insertions

[Qemu-devel] [PATCH v2 1/1] virtio-console: Prevent abort()s in case of host chardev close

2011-07-12 Thread Amit Shah
to its users, all we get is -1 for any kind of error. Just return 0 for now and wait for chardevs to return better error messages to act better on the return messages. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 20 ++-- 1 files changed, 18 insertions

Re: [Qemu-devel] [PATCH v2 1/1] virtio-console: Prevent abort()s in case of host chardev close

2011-07-12 Thread Amit Shah
On (Tue) 12 Jul 2011 [14:58:57], Amit Shah wrote: A host chardev could close just before the guest sends some data to be written. This will cause an -EPIPE error. This shouldn't be propagated to virtio-serial-bus. Ideally we should close the port once -EPIPE is received, but since

[Qemu-devel] [PULL] virtio-serial: Fixes, trace points

2011-07-19 Thread Amit Shah
19:43:00 +) are available in the git repository at: git://git.kernel.org/pub/scm/qemu/amit/virtio-serial.git for-anthony Amit Shah (4): virtio-serial-bus: Add trace events virtio-console: Add some trace events virtio-serial-bus: Fix trailing \n in error_report string

Re: [Qemu-devel] [PATCH v2 1/1] virtio-console: Prevent abort()s in case of host chardev close

2011-07-20 Thread Amit Shah
On (Wed) 20 Jul 2011 [09:10:41], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: A host chardev could close just before the guest sends some data to be written. This will cause an -EPIPE error. This shouldn't be propagated to virtio-serial-bus. Ideally we should

[Qemu-devel] [PATCH 4/7] virtio-balloon: Separate status handling into separate function

2011-07-20 Thread Amit Shah
Separate out the code to retrieve balloon info from the code that sets balloon values. This will be used to separate the two callbacks from balloon.c and help cope with 'balloon 0' on the monitor. Currently, 'balloon 0' causes a segfault in monitor_resume(). Signed-off-by: Amit Shah amit.s

[Qemu-devel] [PATCH 1/7] balloon: Make functions, local vars static

2011-07-20 Thread Amit Shah
balloon.h had function declarations for a couple of functions that are local to balloon.c. Make them static. Drop the 'qemu_' prefix for balloon.c-local variables, and make them static. Signed-off-by: Amit Shah amit.s...@redhat.com --- balloon.c | 22 +++--- balloon.h |4

[Qemu-devel] [PATCH 0/7] balloon: cleanups, fix segfault

2011-07-20 Thread Amit Shah
the way. Amit Shah (7): balloon: Make functions, local vars static balloon: Add braces around if statements balloon: Simplify code flow virtio-balloon: Separate status handling into separate function balloon: Separate out stat and balloon handling balloon: Fix header comment; add Copyright

[Qemu-devel] [PATCH 5/7] balloon: Separate out stat and balloon handling

2011-07-20 Thread Amit Shah
Passing on '0' as ballooning target to indicate retrieval of stats is bad API. It also makes 'balloon 0' in the monitor cause a segfault. Have two different functions handle the different functionality instead. Reported-by: Mike Cao b...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com

[Qemu-devel] [PATCH 2/7] balloon: Add braces around if statements

2011-07-20 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- balloon.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/balloon.c b/balloon.c index f9bcf07..86f629e 100644 --- a/balloon.c +++ b/balloon.c @@ -65,9 +65,10 @@ static void print_balloon_stat(const char *key, QObject

[Qemu-devel] [PATCH 3/7] balloon: Simplify code flow

2011-07-20 Thread Amit Shah
Replace: if (foo) { ... } else { return 0; } by if (!foo) { return 0; } ... Signed-off-by: Amit Shah amit.s...@redhat.com --- balloon.c | 16 +++- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/balloon.c b/balloon.c index 86f629e..d40be39

[Qemu-devel] [PATCH 6/7] balloon: Fix header comment; add Copyright

2011-07-20 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- balloon.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/balloon.c b/balloon.c index 8be3812..a938475 100644 --- a/balloon.c +++ b/balloon.c @@ -1,7 +1,9 @@ /* - * QEMU System Emulator + * Generic Balloon handlers

[Qemu-devel] [PATCH 7/7] virtio-balloon: Fix header comment; add Copyright

2011-07-20 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-balloon.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 40b43b0..2ba7e95 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -1,7 +1,9

Re: [Qemu-devel] [PATCH 5/7] balloon: Separate out stat and balloon handling

2011-07-22 Thread Amit Shah
On (Fri) 22 Jul 2011 [16:45:55], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: Passing on '0' as ballooning target to indicate retrieval of stats is bad API. It also makes 'balloon 0' in the monitor cause a segfault. Have two different functions handle the different

Re: [Qemu-devel] [PATCH 00/55] Block layer cleanup fixes

2011-07-22 Thread Amit Shah
On (Wed) 20 Jul 2011 [18:23:34], Markus Armbruster wrote: This patch series looks bigger than it is. All the patches are small and hopefully easy to review. Objectives: * Push BlockDriverState members locked, tray_open, media_changed into device models, where they belong. *

Re: [Qemu-devel] [PATCH 0/7] balloon: cleanups, fix segfault

2011-07-25 Thread Amit Shah
On (Mon) 25 Jul 2011 [16:13:33], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: 'balloon 0' in the monitor causes a segfault. This happens because the function that handles change in balloon values is also tasked with handling stats retrieval from the guest, and it does

Re: [Qemu-devel] [PATCH 00/55] Block layer cleanup fixes

2011-07-25 Thread Amit Shah
On (Mon) 25 Jul 2011 [17:33:12], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: On (Wed) 20 Jul 2011 [18:23:34], Markus Armbruster wrote: This patch series looks bigger than it is. All the patches are small and hopefully easy to review. Objectives: * Push

[Qemu-devel] [PULL 0/7] virtio-balloon: cleanups, fix segfault from use-after-free

2011-07-26 Thread Amit Shah
commit c886edfb851c0c590d4e77f058f2ec8ed95ad1b5: Let users select their pythons (2011-07-25 16:50:12 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/qemu/amit/misc.git for-anthony Amit Shah (7): balloon: Make functions, local vars static balloon: Add

[Qemu-devel] [PATCH 1/7] balloon: Make functions, local vars static

2011-07-26 Thread Amit Shah
balloon.h had function declarations for a couple of functions that are local to balloon.c. Make them static. Drop the 'qemu_' prefix for balloon.c-local variables, and make them static. Signed-off-by: Amit Shah amit.s...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com --- balloon.c

[Qemu-devel] [PATCH 2/7] balloon: Add braces around if statements

2011-07-26 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com --- balloon.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/balloon.c b/balloon.c index f9bcf07..86f629e 100644 --- a/balloon.c +++ b/balloon.c @@ -65,9 +65,10 @@ static

[Qemu-devel] [PATCH 7/7] virtio-balloon: Fix header comment; add Copyright

2011-07-26 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-balloon.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 40b43b0..2ba7e95 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -1,7 +1,9

[Qemu-devel] [PATCH 3/7] balloon: Simplify code flow

2011-07-26 Thread Amit Shah
Replace: if (foo) { ... } else { return 0; } by if (!foo) { return 0; } ... Signed-off-by: Amit Shah amit.s...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com --- balloon.c | 16 +++- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git

[Qemu-devel] [PATCH 4/7] virtio-balloon: Separate status handling into separate function

2011-07-26 Thread Amit Shah
Separate out the code to retrieve balloon info from the code that sets balloon values. This will be used to separate the two callbacks from balloon.c and help cope with 'balloon 0' on the monitor. Currently, 'balloon 0' causes a segfault in monitor_resume(). Signed-off-by: Amit Shah amit.s

[Qemu-devel] [PATCH 5/7] balloon: Separate out stat and balloon handling

2011-07-26 Thread Amit Shah
(). Reported-by: Mike Cao b...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com --- balloon.c | 17 ++--- balloon.h |8 +--- hw/virtio-balloon.c |7 ++- 3 files changed, 17 insertions(+), 15

[Qemu-devel] [PATCH 6/7] balloon: Fix header comment; add Copyright

2011-07-26 Thread Amit Shah
Signed-off-by: Amit Shah amit.s...@redhat.com --- balloon.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/balloon.c b/balloon.c index 8be3812..a938475 100644 --- a/balloon.c +++ b/balloon.c @@ -1,7 +1,9 @@ /* - * QEMU System Emulator + * Generic Balloon handlers

[Qemu-devel] [PATCH 1/2] balloon: Don't allow multiple balloon handler registrations

2011-07-27 Thread Amit Shah
Multiple balloon devices don't make sense; disallow more than one registration attempt to register handlers. Signed-off-by: Amit Shah amit.s...@redhat.com --- balloon.c | 11 +-- balloon.h |4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/balloon.c b

[Qemu-devel] [PATCH 2/2] virtio-balloon: Check if balloon registration failed

2011-07-27 Thread Amit Shah
Multiple balloon registrations are not allowed; check if the registration with the qemu balloon api succeeded. If not, fail the device init. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-balloon.c | 10 +- hw/virtio-pci.c |3 +++ 2 files changed, 12 insertions

[Qemu-devel] [PATCH 0/4] Fix virtio memleaks

2011-07-27 Thread Amit Shah
The memory allocated in virtio_common_init() wasn't being freed anywhere. Fix that. The balloon handler wasn't unregistering its savevm section, adding an exit handler fixes that as well. This patchset is on top of the two balloon series I've sent out yesterday and today. Amit Shah (4

[Qemu-devel] [PATCH 1/4] virtio-balloon: Add exit handler, fix memleaks

2011-07-27 Thread Amit Shah
Add an exit handler that will free up RAM and unregister the savevm section after a virtio-balloon device is unplugged. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-balloon.c |9 + hw/virtio-pci.c | 11 ++- hw/virtio.h |1 + 3 files changed

[Qemu-devel] [PATCH 2/4] virtio-blk: Fix memleak on exit

2011-07-27 Thread Amit Shah
Calling virtio_cleanup() will free up memory allocated in virtio_common_init(). Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-blk.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 6471ac8..836dbc3 100644 --- a/hw

[Qemu-devel] [PATCH 4/4] virtio: Plug memleak by freeing vdev

2011-07-27 Thread Amit Shah
virtio_common_init() allocates RAM for the vdev struct (and any additional memory, depending on the size passed to the function). This memory wasn't being freed until now. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio.c |1 + 1 files changed, 1 insertions(+), 0 deletions

[Qemu-devel] [PATCH 3/4] virtio-net: Fix potential use-after-free

2011-07-27 Thread Amit Shah
virtio_cleanup() will remove the VirtIONet struct that gets allocated via virtio_common_init(). Ensure we don't dereference the structure after calling the cleanup function. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-net.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [Qemu-devel] [PATCH 3/4] virtio-net: Fix potential use-after-free

2011-07-27 Thread Amit Shah
On (Wed) 27 Jul 2011 [11:43:44], Michael S. Tsirkin wrote: On Wed, Jul 27, 2011 at 02:00:31PM +0530, Amit Shah wrote: virtio_cleanup() will remove the VirtIONet struct that gets allocated via virtio_common_init(). Ensure we don't dereference the structure after calling the cleanup function

Re: [Qemu-devel] [PATCH 2/2] virtio-balloon: Check if balloon registration failed

2011-07-27 Thread Amit Shah
On (Wed) 27 Jul 2011 [12:06:32], Michael S. Tsirkin wrote: On Wed, Jul 27, 2011 at 12:31:08PM +0530, Amit Shah wrote: Multiple balloon registrations are not allowed; check if the registration with the qemu balloon api succeeded. If not, fail the device init. Signed-off-by: Amit Shah

Re: [Qemu-devel] [PATCH 0/4] Fix virtio memleaks

2011-07-27 Thread Amit Shah
On (Wed) 27 Jul 2011 [12:08:52], Michael S. Tsirkin wrote: On Wed, Jul 27, 2011 at 02:00:28PM +0530, Amit Shah wrote: The memory allocated in virtio_common_init() wasn't being freed anywhere. Fix that. The balloon handler wasn't unregistering its savevm section, adding an exit handler

Re: [Qemu-devel] [PATCH] virtio-serial-bus: replay guest_open on migration

2011-07-27 Thread Amit Shah
On (Wed) 27 Jul 2011 [10:07:56], Alon Levy wrote: On Wed, Jul 27, 2011 at 07:45:25AM +0200, Markus Armbruster wrote: Alon Levy al...@redhat.com writes: Signed-off-by: Alon Levy al...@redhat.com --- hw/virtio-serial-bus.c |8 +++- 1 files changed, 7 insertions(+), 1

[Qemu-devel] [PATCH 1/1] balloon: Ignore negative balloon values

2011-07-27 Thread Amit Shah
Negative balloon values don't make sense, ignore them. Reported-by: Mike Cao b...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- I'm not sure if error_report is the right thing to use or should a new qerror_report() be used. Luiz, comments? balloon.c |8 +++- 1 files

Re: [Qemu-devel] [PATCH] virtio-serial-bus: replay guest_open on migration

2011-07-27 Thread Amit Shah
On (Wed) 27 Jul 2011 [14:09:45], Alon Levy wrote: Also, we'll be lying that a guest opened, since a guest was opened much earlier, before migration. Nothing has changed as far as the guest is concerned, this is just some host-side tracking that has to be done post-migrate, which belongs

Re: [Qemu-devel] [PATCH 1/1] balloon: Ignore negative balloon values

2011-07-27 Thread Amit Shah
On (Wed) 27 Jul 2011 [15:49:18], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: Negative balloon values don't make sense, ignore them. Reported-by: Mike Cao b...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- I'm not sure if error_report is the right

[Qemu-devel] [PATCH v2 0/5] balloon: fix memleaks, invalid arguments, unplug

2011-07-28 Thread Amit Shah
small tweaks suggested: - Error is shown by balloon.c instead of virtio-balloon.c in patch 1 (mst) - Filter out negative input in do_balloon() and add qerror message (Markus) - Separate out savevm section unregistering from memleak fix Amit Shah (5): balloon: Don't allow multiple

[Qemu-devel] [PATCH v2 2/5] virtio-balloon: Check if balloon registration failed

2011-07-28 Thread Amit Shah
Multiple balloon registrations are not allowed; check if the registration with the qemu balloon api succeeded. If not, fail the device init. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-balloon.c |9 - hw/virtio-pci.c |3 +++ 2 files changed, 11 insertions

Re: [Qemu-devel] [PATCH v2 4/5] virtio-balloon: Add exit handler, fix memleaks

2011-07-28 Thread Amit Shah
On (Thu) 28 Jul 2011 [11:47:15], Amit Shah wrote: Add an exit handler that will free up RAM and unregister the savevm section after a virtio-balloon device is unplugged. This commit message should be changed; I'll do that in the pull request I send out. Amit

[Qemu-devel] [PATCH v2 5/5] virtio-balloon: Unregister savevm section on device unplug

2011-07-28 Thread Amit Shah
Migrating after unplugging a virtio-balloon device resulted in an error message on the destination: Unknown savevm section or instance ':00:04.0/virtio-balloon' 0 load of migration failed Fix this by unregistering the section on device unplug. Signed-off-by: Amit Shah amit.s...@redhat.com

[Qemu-devel] [PATCH v2 3/5] balloon: Ignore negative balloon values

2011-07-28 Thread Amit Shah
Negative balloon values don't make sense, ignore them. Reported-by: Mike Cao b...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- balloon.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/balloon.c b/balloon.c index 5200565..f56fdc1 100644

[Qemu-devel] [PATCH v2 4/5] virtio-balloon: Add exit handler, fix memleaks

2011-07-28 Thread Amit Shah
Add an exit handler that will free up RAM and unregister the savevm section after a virtio-balloon device is unplugged. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-balloon.c |5 + hw/virtio-pci.c | 11 ++- hw/virtio.h |1 + 3 files changed, 16

[Qemu-devel] [PATCH v2 1/5] balloon: Don't allow multiple balloon handler registrations

2011-07-28 Thread Amit Shah
Multiple balloon devices don't make sense; disallow more than one registration attempt to register handlers. Signed-off-by: Amit Shah amit.s...@redhat.com --- balloon.c | 12 ++-- balloon.h |4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/balloon.c b

Re: [Qemu-devel] [PATCH 00/55] Block layer cleanup fixes

2011-07-28 Thread Amit Shah
On (Wed) 20 Jul 2011 [18:23:34], Markus Armbruster wrote: This patch series looks bigger than it is. All the patches are small and hopefully easy to review. Nice series! ACK the entire series (barring the non-qdev users connecting to bdrv and scsi patches, which I didn't quite follow).

Re: [Qemu-devel] [PATCH v2 3/5] balloon: Ignore negative balloon values

2011-07-28 Thread Amit Shah
On (Thu) 28 Jul 2011 [09:31:53], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: Negative balloon values don't make sense, ignore them. Actually, they aren't ignored, they're rejected. Will update commit log. Amit

Re: [Qemu-devel] [PATCH v2 4/5] virtio-balloon: Add exit handler, fix memleaks

2011-07-28 Thread Amit Shah
On (Thu) 28 Jul 2011 [09:39:40], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: On (Thu) 28 Jul 2011 [11:47:15], Amit Shah wrote: Add an exit handler that will free up RAM and unregister the savevm section after a virtio-balloon device is unplugged. This commit

Re: [Qemu-devel] [PATCH v2 5/5] virtio-balloon: Unregister savevm section on device unplug

2011-07-28 Thread Amit Shah
On (Thu) 28 Jul 2011 [09:45:44], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: Migrating after unplugging a virtio-balloon device resulted in an error message on the destination: Unknown savevm section or instance ':00:04.0/virtio-balloon' 0 load of migration

[Qemu-devel] [PULL v2][ALSO STABLE] balloon: multiple fixes and cleanups

2011-07-28 Thread Amit Shah
repository at: git://git.kernel.org/pub/scm/virt/qemu/amit/misc.git for-anthony Amit Shah (12): balloon: Make functions, local vars static balloon: Add braces around if statements balloon: Simplify code flow virtio-balloon: Separate status handling into separate function

Re: [Qemu-devel] [PATCH 00/12][RFC] char: add flow control and fix guest_[open|close]

2011-08-04 Thread Amit Shah
On (Mon) 01 Aug 2011 [09:22:58], Anthony Liguori wrote: The char layer has been growing some nasty warts for some time now as we ask it to do things it was never intended on doing. It's been long over due for an overhaul and its become evident to me that we need to address this first

Re: [Qemu-devel] [PATCH 00/12][RFC] char: add flow control and fix guest_[open|close]

2011-08-04 Thread Amit Shah
(Adding Gerd to cc) On (Thu) 04 Aug 2011 [08:11:23], Anthony Liguori wrote: On 08/04/2011 01:45 AM, Amit Shah wrote: On (Mon) 01 Aug 2011 [09:22:58], Anthony Liguori wrote: The char layer has been growing some nasty warts for some time now as we ask it to do things it was never intended

Re: [Qemu-devel] [PATCH 00/14] char: flow control part I

2011-08-16 Thread Amit Shah
On (Mon) 15 Aug 2011 [11:17:27], Anthony Liguori wrote: This is a dump of some of the easier stuff to merge from my character backend flow control branch. It's mostly just renaming functions and adding documentation. Acked-by: Amit Shah amit.s...@redhat.com Amit

[Qemu-devel] [PATCH 1/2] balloon: Disassociate handlers from balloon device on unplug

2011-09-09 Thread Amit Shah
When a balloon device gets unplugged, allow the balloon handlers to be freed. Signed-off-by: Amit Shah amit.s...@redhat.com --- balloon.c | 10 ++ balloon.h |1 + 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/balloon.c b/balloon.c index f56fdc1..a2133db 100644

[Qemu-devel] [PATCH 2/2] virtio-balloon: Disassociate from the balloon handlers on unplug

2011-09-09 Thread Amit Shah
-pci' could not be initialized Reported-by: Shaolong Hu s...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-balloon.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 072a88a..5f8f4bd 100644 --- a/hw

[Qemu-devel] [PATCH 0/3] virtio-serial: Bug fix, add stats for bytes transferred

2011-09-14 Thread Amit Shah
Hello, These patches fix one bug (patch 2), and add some stats for bytes sent, received and discarded, mainly for debugging purposes.. These stats are shown in the 'info qtree' output. More details in the commit logs. Please apply, Amit Shah (3): virtio-serial-bus: add port arg

[Qemu-devel] [PATCH 1/3] virtio-serial-bus: add port arg to discard_vq_data()

2011-09-14 Thread Amit Shah
To discard throttled data as well as maintain statistics of bytes received and discarded, discard_vq_data() will need the port associated with the vq. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff

[Qemu-devel] [PATCH 2/3] virtio-serial-bus: discard data in already popped-out elem

2011-09-14 Thread Amit Shah
-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 6838d73..2c84398 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -122,6 +122,10 @@ static

[Qemu-devel] [PATCH 3/3] virtio-serial-bus: Add per-port stats for received, sent, discarded bytes

2011-09-14 Thread Amit Shah
such a need. The stats remain valid throughout the lifetime of the port. Unplugging a port will reset the stats. The numbers are not reset across port opens/closes. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 24 ++-- hw/virtio-serial.h | 11

Re: [Qemu-devel] [PATCH 1/3] virtio-serial-bus: add port arg to discard_vq_data()

2011-09-14 Thread Amit Shah
On (Wed) 14 Sep 2011 [14:52:50], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: To discard throttled data as well as maintain statistics of bytes received and discarded, discard_vq_data() will need the port associated with the vq. Signed-off-by: Amit Shah amit.s

Re: [Qemu-devel] [PATCH 3/3] virtio-serial-bus: Add per-port stats for received, sent, discarded bytes

2011-09-28 Thread Amit Shah
On (Wed) 14 Sep 2011 [15:07:57], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: This commit adds port-specific stats for the number of bytes received, sent and discarded. They can be seen in the 'info qtree' monitor output for the specific port. This data can be used

Re: [Qemu-devel] [PATCH 3/3] Delayed IP packets

2011-09-29 Thread Amit Shah
On (Wed) 03 Aug 2011 [13:24:22], Jan Kiszka wrote: From: Fabien Chouteau chout...@adacore.com In the current implementation, if Slirp tries to send an IP packet to a client with an unknown hardware address, the packet is simply dropped and an ARP request is sent (if_encap in slirp/slirp.c).

Re: [Qemu-devel] [PATCH 3/3] Delayed IP packets

2011-09-29 Thread Amit Shah
On (Thu) 29 Sep 2011 [19:41:33], Jan Kiszka wrote: On 2011-09-29 18:06, Amit Shah wrote: On (Wed) 03 Aug 2011 [13:24:22], Jan Kiszka wrote: From: Fabien Chouteau chout...@adacore.com In the current implementation, if Slirp tries to send an IP packet to a client with an unknown

Re: [Qemu-devel] [PATCH 3/3] Delayed IP packets

2011-09-29 Thread Amit Shah
On (Thu) 29 Sep 2011 [19:53:47], Jan Kiszka wrote: Can't reproduce, I'm not getting stable hibernation here even without any network configured. With virtio devices and the patches applied? Can you tell me what you're seeing? No, I didn't patch my guest. I was using standard IDE

Re: [Qemu-devel] [PATCH 3/3] Delayed IP packets

2011-09-29 Thread Amit Shah
On (Thu) 29 Sep 2011 [20:19:42], Jan Kiszka wrote: On 2011-09-29 20:05, Amit Shah wrote: On (Thu) 29 Sep 2011 [19:53:47], Jan Kiszka wrote: Can't reproduce, I'm not getting stable hibernation here even without any network configured. With virtio devices and the patches applied? Can you

Re: [Qemu-devel] [PATCH] qed: fix use-after-free during l2 cache commit

2011-09-30 Thread Amit Shah
-by: Amit Shah amit.s...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- Hi Amit, Thanks for reporting the assertion failure you saw at http://fpaste.org/CDuv/. Does this patch fix the problem? Yes, this fixes it. Thanks, Amit

Re: [Qemu-devel] [PATCH] qed: fix use-after-free during l2 cache commit

2011-09-30 Thread Amit Shah
On (Fri) 30 Sep 2011 [16:23:30], Stefan Hajnoczi wrote: On Fri, Sep 30, 2011 at 12:27 PM, Amit Shah amit.s...@redhat.com wrote: On (Fri) 30 Sep 2011 [11:39:11], Stefan Hajnoczi wrote: QED's metadata caching strategy allows two parallel requests to race for metadata lookup.  The first one

Re: [Qemu-devel] [PATCH v2 3/3] raw-posix: Re-open host CD-ROM after media change

2011-04-05 Thread Amit Shah
On (Mon) 04 Apr 2011 [16:09:05], Stefan Hajnoczi wrote: On Mon, Apr 4, 2011 at 2:49 PM, Avi Kivity a...@redhat.com wrote: On 04/04/2011 04:38 PM, Anthony Liguori wrote: On 04/04/2011 08:22 AM, Avi Kivity wrote: On 04/03/2011 02:57 PM, Stefan Hajnoczi wrote: In order for media change

Re: [Qemu-devel] [PATCH v2 3/3] raw-posix: Re-open host CD-ROM after media change

2011-04-05 Thread Amit Shah
On (Tue) 05 Apr 2011 [10:48:16], Avi Kivity wrote: On 04/05/2011 09:41 AM, Amit Shah wrote: See http://www.spinics.net/lists/linux-scsi/msg51504.html I see this is quite fresh. What are the plans here? We're still discussing where the fix should be, but it certainly is a kernel bug

Re: [Qemu-devel] [PATCH v2 3/3] raw-posix: Re-open host CD-ROM after media change

2011-04-05 Thread Amit Shah
On (Tue) 05 Apr 2011 [09:40:05], Stefan Hajnoczi wrote: See http://www.spinics.net/lists/linux-scsi/msg51504.html I don't think that patch updates the block inode size. We'd need to call fs/block_dev.c:revalidate_disk() instead of directly calling cdi-disk-fops-revalidate_disk(cdi-disk).

Re: [Qemu-devel] [PATCH v2 3/3] raw-posix: Re-open host CD-ROM after media change

2011-04-05 Thread Amit Shah
On (Tue) 05 Apr 2011 [12:00:38], Avi Kivity wrote: On 04/05/2011 11:09 AM, Amit Shah wrote: On (Tue) 05 Apr 2011 [10:48:16], Avi Kivity wrote: On 04/05/2011 09:41 AM, Amit Shah wrote: See http://www.spinics.net/lists/linux-scsi/msg51504.html I see this is quite fresh. What

Re: [Qemu-devel] [PATCH v2 3/3] raw-posix: Re-open host CD-ROM after media change

2011-04-05 Thread Amit Shah
On (Tue) 05 Apr 2011 [12:17:30], Avi Kivity wrote: On 04/05/2011 12:12 PM, Amit Shah wrote: On (Tue) 05 Apr 2011 [12:00:38], Avi Kivity wrote: On 04/05/2011 11:09 AM, Amit Shah wrote: On (Tue) 05 Apr 2011 [10:48:16], Avi Kivity wrote: On 04/05/2011 09:41 AM, Amit Shah wrote

Re: [Qemu-devel] [PATCH v2 3/3] raw-posix: Re-open host CD-ROM after media change

2011-04-06 Thread Amit Shah
On (Tue) 05 Apr 2011 [12:17:30], Avi Kivity wrote: Guest kernel bug: CDROM change event missed, so the the revalidate call isn't made, which causes stale data (like disc size) to be used on newer media. qemu bug: We don't handle the GET_EVENT_STATUS_NOTIFICATION command from guests (which

[Qemu-devel] [PATCH 0/2] Correct transitions for cd change state

2011-04-06 Thread Amit Shah
errors. I've not handled save/load state in these patches. There's no harm in always letting one extra 'cd not present' event being sent to the guest, so things should continue working fine across migrations. Please apply. Amit Shah (2): cdrom: Allow the TEST_UNIT_READY command after a cdrom

[Qemu-devel] [PATCH 1/2] cdrom: Allow the TEST_UNIT_READY command after a cdrom change

2011-04-06 Thread Amit Shah
We restrict the commands that a guest can send us after a cdrom change event. The current list includes REQUEST_SENSE and INQUIRY commands. Guests can also issue TEST_UNIT_READY to inquire for the status, so allow this command as well. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/ide

[Qemu-devel] [PATCH 2/2] cdrom: Make disc change event visible to guests

2011-04-06 Thread Amit Shah
just fine. For newer Linux guests (2.6.38+) cd change events break again and that will be fixed by implementing the GET_EVENT_STATUS_NOTIFICATION command. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/ide/core.c | 40 +--- hw/ide/internal.h |1 + 2

[Qemu-devel] [PATCH v2 0/2] Correct transitions for cd change state

2011-04-06 Thread Amit Shah
errors. v2: Set media_change_notified to 1 if SENSE_UNIT_ATTENTION is not set after migration. This is the only thing needed for migration compat. Please apply. Amit Shah (2): cdrom: Allow the TEST_UNIT_READY command after a cdrom change cdrom: Make disc change event visible to guests hw/ide

[Qemu-devel] [PATCH v2 1/2] cdrom: Allow the TEST_UNIT_READY command after a cdrom change

2011-04-06 Thread Amit Shah
We restrict the commands that a guest can send us after a cdrom change event. The current list includes REQUEST_SENSE and INQUIRY commands. Guests can also issue TEST_UNIT_READY to inquire for the status, so allow this command as well. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/ide

[Qemu-devel] [PATCH v2 2/2] cdrom: Make disc change event visible to guests

2011-04-06 Thread Amit Shah
just fine. For newer Linux guests (2.6.38+) cd change events break again and that will be fixed by implementing the GET_EVENT_STATUS_NOTIFICATION command. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/ide/core.c | 42 +++--- hw/ide/internal.h |1

[Qemu-devel] [PATCH v3 1/2] cdrom: Allow the TEST_UNIT_READY command after a cdrom change

2011-04-07 Thread Amit Shah
in Linux guests. Those errors came up because we had the UNIT_ATTENTION event pending and we replied with an error message to a command that should be allowed in such a condition. The guest then did a soft reset to get to a sane state. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/ide

[Qemu-devel] Re: [PATCH v2 1/2] cdrom: Allow the TEST_UNIT_READY command after a cdrom change

2011-04-07 Thread Amit Shah
On (Thu) 07 Apr 2011 [09:42:30], Stefan Hajnoczi wrote: On Thu, Apr 07, 2011 at 10:35:18AM +0530, Amit Shah wrote: @@ -1105,10 +1105,11 @@ static void ide_atapi_cmd(IDEState *s) /* If there's a UNIT_ATTENTION condition pending, only REQUEST_SENSE and INQUIRY commands

[Qemu-devel] [PATCH v3 0/2] Correct transitions for cd change state

2011-04-07 Thread Amit Shah
messages Please apply. Amit Shah (2): cdrom: Allow the TEST_UNIT_READY command after a cdrom change cdrom: Make disc change event visible to guests hw/ide/core.c | 56 +++- 1 files changed, 47 insertions(+), 9 deletions(-) -- 1.7.4

[Qemu-devel] [PATCH v3 2/2] cdrom: Make disc change event visible to guests

2011-04-07 Thread Amit Shah
changes just fine. For newer Linux guests (2.6.38+) cd change events break again and that will be fixed by implementing the GET_EVENT_STATUS_NOTIFICATION command. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/ide/core.c | 47 ++- 1 files changed

[Qemu-devel] Re: [PATCH v2 2/2] cdrom: Make disc change event visible to guests

2011-04-07 Thread Amit Shah
On (Thu) 07 Apr 2011 [09:41:09], Stefan Hajnoczi wrote: On Thu, Apr 07, 2011 at 10:35:19AM +0530, Amit Shah wrote: + /* +* First, check if there's any pending media change +* notification to be given. +* +* We want the guest to notice an empty tray

[Qemu-devel] Re: [PATCH v2 1/2] cdrom: Allow the TEST_UNIT_READY command after a cdrom change

2011-04-07 Thread Amit Shah
On (Thu) 07 Apr 2011 [10:59:20], Kevin Wolf wrote: Am 07.04.2011 07:05, schrieb Amit Shah: We restrict the commands that a guest can send us after a cdrom change event. The current list includes REQUEST_SENSE and INQUIRY commands. Guests can also issue TEST_UNIT_READY to inquire

[Qemu-devel] Re: [PATCH v2 1/2] cdrom: Allow the TEST_UNIT_READY command after a cdrom change

2011-04-07 Thread Amit Shah
On (Thu) 07 Apr 2011 [12:20:16], Kevin Wolf wrote: Am 07.04.2011 11:11, schrieb Amit Shah: On (Thu) 07 Apr 2011 [10:59:20], Kevin Wolf wrote: Am 07.04.2011 07:05, schrieb Amit Shah: We restrict the commands that a guest can send us after a cdrom change event. The current list includes

[Qemu-devel] [PATCH 1/5] atapi: Allow GET_EVENT_STATUS_NOTIFICATION after media change

2011-04-08 Thread Amit Shah
After a media change, the only commands allowed from the guest were REQUEST_SENSE and INQUIRY. The guest may also issue GET_EVENT_STATUS_NOTIFICATION commands to get media changed notification. After this, the HSM violation messages from Linux guests aren't seen. Signed-off-by: Amit Shah amit.s

[Qemu-devel] [PATCH 0/5] atapi: Implement 'media' subcommand for GESN

2011-04-08 Thread Amit Shah
for the block layer, but this is a good first step in being spec-compliant and at the same time making guests work. Please apply! Amit Shah (5): atapi: Allow GET_EVENT_STATUS_NOTIFICATION after media change ide: Move GET_EVENT_STATUS_NOTIFICATION command handling to its own function atapi

[Qemu-devel] [PATCH 4/5] atapi: GESN: Add enums for commonly-used field types

2011-04-08 Thread Amit Shah
Instead of using magic numbers, use enums that are more descriptive of the fields being used. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/ide/core.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 730587e..cdc2c56

[Qemu-devel] [PATCH 2/5] ide: Move GET_EVENT_STATUS_NOTIFICATION command handling to its own function

2011-04-08 Thread Amit Shah
This makes the code more readable. Also, there's a block like: if () { ... } else { ... } Split that into if () { ... return; } ... Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/ide/core.c | 37 - 1 files changed, 24 insertions(+), 13

[Qemu-devel] [PATCH 3/5] atapi: GESN: Spin off No Event Available handling into own function

2011-04-08 Thread Amit Shah
Handle GET_EVENT_STATUS_NOTIFICATION's No Event Available status in its own function. Also ensure the buffer the driver sent us is big enough to fill in all the data we have -- else just fill in as much as the buffer can hold. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/ide/core.c

[Qemu-devel] Re: [PATCH 1/5] atapi: Allow GET_EVENT_STATUS_NOTIFICATION after media change

2011-04-08 Thread Amit Shah
On (Fri) 08 Apr 2011 [12:45:15], Amit Shah wrote: After a media change, the only commands allowed from the guest were REQUEST_SENSE and INQUIRY. The guest may also issue GET_EVENT_STATUS_NOTIFICATION commands to get media changed notification. After this, the HSM violation messages from

<    3   4   5   6   7   8   9   10   11   12   >