Re: [Qemu-devel] Load primitive in linux-user/signal.c

2010-10-06 Thread Mulyadi Santosa
Hi :) On Thu, Oct 7, 2010 at 02:44, Lluís wrote: > I'm still not very tuned-in into the code, but I think this piece should > use _raw access primitives: I know nothing about your patch, but I suggest to rewrite this post so it follows patch submission format e.g comment, signed off then the pat

Re: Testing of russian keymap (was Re: [Qemu-devel] [PATCH] fix '/' and '|' on russian keymap)

2010-10-06 Thread Michael Tokarev
06.10.2010 23:56, Eduardo Habkost wrote: > > Anybody using a russian keyboard layout who can test this change and > confirm it works as expected? Um, regardless of my previous email, the change is indeed correct and needed, or else the slash/question key (the one that's usually on the left from t

Re: Testing of russian keymap (was Re: [Qemu-devel] [PATCH] fix '/' and '|' on russian keymap)

2010-10-06 Thread Michael Tokarev
06.10.2010 23:56, Eduardo Habkost wrote: > > Anybody using a russian keyboard layout who can test this change and > confirm it works as expected? I can perform such a testing - in theory. But in practice, I was never able to figure out this -k $lang stuff, -- neither in qemu nor in other apps li

[Qemu-devel] Re: [patch uq/master 7/8] MCE: Relay UCR MCE to guest

2010-10-06 Thread Hidetoshi Seto
(2010/10/07 3:10), Dean Nelson wrote: > On 10/06/2010 11:05 AM, Marcelo Tosatti wrote: >> On Wed, Oct 06, 2010 at 10:58:36AM +0900, Hidetoshi Seto wrote: >>> I got some more question: >>> >>> (2010/10/05 3:54), Marcelo Tosatti wrote: Index: qemu/target-i386/cpu.h =

[Qemu-devel] Re: [PATCHv2] qemu-kvm/vhost: fix up irqfd support

2010-10-06 Thread Alex Williamson
On Wed, 2010-10-06 at 23:44 +0200, Michael S. Tsirkin wrote: > On Wed, Oct 06, 2010 at 11:24:24AM -0600, Alex Williamson wrote: > > You could always keep the functions as separate wrapper callers of the > > common function so you only need to keep true = unset, false = set > > straight in one place

Re: [Qemu-devel] [PATCH 0/2] USB CCID device

2010-10-06 Thread Alon Levy
- "Anthony Liguori" wrote: > On 10/05/2010 07:28 PM, Alon Levy wrote: > > - "Anthony Liguori" wrote: > > > > > >> On 10/05/2010 04:32 PM, Alon Levy wrote: > >> > >>> This patch adds a new device, it is described in full in the > second > >>> > >> patch > >> > >>>

[Qemu-devel] Re: [PATCHv2] qemu-kvm/vhost: fix up irqfd support

2010-10-06 Thread Michael S. Tsirkin
On Wed, Oct 06, 2010 at 11:24:24AM -0600, Alex Williamson wrote: > You could always keep the functions as separate wrapper callers of the > common function so you only need to keep true = unset, false = set > straight in one place. Thanks, Just to show why it does not work, I did exactly this: a

Re: [Qemu-devel] [PATCH 0/2] USB CCID device

2010-10-06 Thread Alon Levy
- "Anthony Liguori" wrote: > On 10/06/2010 03:55 AM, Gerd Hoffmann wrote: > > On 10/06/10 02:28, Alon Levy wrote: > >> > >>> > >>> Does this work with live migration? I can't see how it would. > >>> > >> > >> No, it doesn't right now. It would require cooperation with the > client, > >> to

[Qemu-devel] [PATCH 10/11] ppc: avoid write only variables

2010-10-06 Thread Blue Swirl
Compiling with GCC 4.6.0 20100925 produced warnings: /src/qemu/target-ppc/op_helper.c: In function 'helper_icbi': /src/qemu/target-ppc/op_helper.c:351:14: error: variable 'tmp' set but not used [-Werror=unused-but-set-variable] /src/qemu/target-ppc/op_helper.c: In function 'do_6xx_tlb': /src/qemu/t

[Qemu-devel] [PATCH 09/11] i386: avoid a write only variable

2010-10-06 Thread Blue Swirl
Compiling with GCC 4.6.0 20100925 produced warnings: /src/qemu/target-i386/op_helper.c: In function 'switch_tss': /src/qemu/target-i386/op_helper.c:283:53: error: variable 'new_trap' set but not used [-Werror=unused-but-set-variable] Fix by deleting the variable. Alternatively the flag could be i

[Qemu-devel] Re: [PATCH 10/11] ppc: avoid write only variables

2010-10-06 Thread Alexander Graf
On 06.10.2010, at 23:34, Blue Swirl wrote: > Compiling with GCC 4.6.0 20100925 produced warnings: > /src/qemu/target-ppc/op_helper.c: In function 'helper_icbi': > /src/qemu/target-ppc/op_helper.c:351:14: error: variable 'tmp' set but > not used [-Werror=unused-but-set-variable] > /src/qemu/target

[Qemu-devel] [PATCH 08/11] vnc: avoid write only variables

2010-10-06 Thread Blue Swirl
Compiling with GCC 4.6.0 20100925 produced warnings: /src/qemu/ui/vnc.c: In function 'vnc_client_cache_auth': /src/qemu/ui/vnc.c:217:12: error: variable 'qdict' set but not used [-Werror=unused-but-set-variable] /src/qemu/ui/vnc.c: In function 'vnc_display_open': /src/qemu/ui/vnc.c:2526:9: error: v

[Qemu-devel] [PATCH 06/11] mips_fulong2e: Delete write only variables

2010-10-06 Thread Blue Swirl
Compiling with GCC 4.6.0 20100925 produced warnings like: /src/qemu/hw/mips_fulong2e.c: In function 'mips_fulong2e_init': /src/qemu/hw/mips_fulong2e.c:274:16: error: variable 'rtc_state' set but not used [-Werror=unused-but-set-variable] /src/qemu/hw/mips_fulong2e.c:268:16: error: variable 'isa_dev

[Qemu-devel] [PATCH 02/11] cirrus: avoid write only variables

2010-10-06 Thread Blue Swirl
Compiling with GCC 4.6.0 20100925 produced a lot of warnings like: In file included from /src/qemu/hw/cirrus_vga_rop.h:174:0, from /src/qemu/hw/cirrus_vga.c:284: /src/qemu/hw/cirrus_vga_rop2.h: In function 'cirrus_patternfill_0_8': /src/qemu/hw/cirrus_vga_rop2.h:48:18: error: varia

[Qemu-devel] [PATCH 07/11] cris: avoid write only variables

2010-10-06 Thread Blue Swirl
Compiling with GCC 4.6.0 20100925 produced warnings: /src/qemu/target-cris/op_helper.c: In function 'helper_movl_sreg_reg': /src/qemu/target-cris/op_helper.c:145:8: error: variable 'tlb_v' set but not used [-Werror=unused-but-set-variable] In file included from /src/qemu/target-cris/translate.c:315

[Qemu-devel] [PATCH 01/11] block: avoid a write only variable

2010-10-06 Thread Blue Swirl
Compiling with GCC 4.6.0 20100925 produced a warning: /src/qemu/block/qcow2-refcount.c: In function 'update_refcount': /src/qemu/block/qcow2-refcount.c:552:13: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable] Fix by adding a function that does not generate a warning when

[Qemu-devel] [PATCH 05/11] Delete write only variables

2010-10-06 Thread Blue Swirl
Compiling with GCC 4.6.0 20100925 produced warnings like: /src/qemu/net/tap-win32.c: In function 'tap_win32_open': /src/qemu/net/tap-win32.c:582:12: error: variable 'hThread' set but not used [-Werror=unused-but-set-variable] Fix by removing the unused variables. Signed-off-by: Blue Swirl --- h

[Qemu-devel] [PATCH 04/11] lsi53c895a: avoid a write only variable

2010-10-06 Thread Blue Swirl
Compiling with GCC 4.6.0 20100925 produced a warning: /src/qemu/hw/lsi53c895a.c: In function 'lsi_do_msgout': /src/qemu/hw/lsi53c895a.c:848:9: error: variable 'len' set but not used [-Werror=unused-but-set-variable] Fix by making the variable declaration and its uses also conditional to debug defi

[Qemu-devel] [PATCH 03/11] eepro100: initialize a variable in all cases

2010-10-06 Thread Blue Swirl
Compiling with GCC 4.6.0 20100925 produced warnings: /src/qemu/hw/eepro100.c: In function 'eepro100_read4': /src/qemu/hw/eepro100.c:1351:14: error: 'val' may be used uninitialized in this function [-Werror=uninitialized] /src/qemu/hw/eepro100.c: In function 'eepro100_read2': /src/qemu/hw/eepro100.c

[Qemu-devel] [PATCH 00/11] GCC 4.6.0 fixes

2010-10-06 Thread Blue Swirl
Blue Swirl (11): block: avoid a write only variable cirrus: avoid write only variables eepro100: initialize a variable in all cases lsi53c895a: avoid a write only variable Delete write only variables mips_fulong2e: Delete write only variables cris: avoid write only variables vnc: av

[Qemu-devel] [PATCH 6/6] savevm: Remove register_device_unmigratable()

2010-10-06 Thread Alex Williamson
Now that the save state handlers can return error, individual drivers can cancel a migration if they hit an error or don't support it. This makes the unmigratable callback redundant. Remove it and change the only user to cancel the migration in a set_params callback, which actually happens much e

[Qemu-devel] [PATCH 1/6] savevm: Allow SaveStateHandler() to return error

2010-10-06 Thread Alex Williamson
Some devices may not always able to save their state, allow the save handler to return an error. Signed-off-by: Alex Williamson --- hw/adb.c|8 ++-- hw/ads7846.c|4 +++- hw/arm_gic.c|4 +++- hw/arm_timer.c |6 +

[Qemu-devel] [PATCH 5/6] savevm: Allow set_params and save_live_state to error

2010-10-06 Thread Alex Williamson
This lets a save state handler NAK a migration or cancel if it runs into problems. Signed-off-by: Alex Williamson --- block-migration.c |4 +++- hw/hw.h |2 +- savevm.c | 18 +++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/block-mi

[Qemu-devel] [PATCH 2/6] savevm: Allow vmsd->pre_save to return error

2010-10-06 Thread Alex Williamson
This allows vmsd based saves to also have a way to signal that they can't be saved or migrated. Signed-off-by: Alex Williamson --- hw/fdc.c |3 ++- hw/hpet.c |3 ++- hw/hw.h |6 +++--- hw/i2c.c |3 ++- hw/ide/core.c |

[Qemu-devel] [PATCH 4/6] virtio: Allow virtio_save() errors

2010-10-06 Thread Alex Williamson
Carry pci_device_save() error through to virtio_save(). Signed-off-by: Alex Williamson --- hw/virtio-balloon.c|6 +- hw/virtio-blk.c|6 +- hw/virtio-net.c|7 ++- hw/virtio-pci.c| 10 -- hw/virtio-serial-bus.c |6 +- hw/virtio

[Qemu-devel] [PATCH 3/6] pci: Allow pci_device_save() to return error

2010-10-06 Thread Alex Williamson
Carry the vmsd pre_save error reporting through pci_device_save(). Signed-off-by: Alex Williamson --- hw/grackle_pci.c |4 +--- hw/gt64xxx.c |3 +-- hw/ivshmem.c |7 ++- hw/openpic.c |4 +--- hw/pci.c |9 +++-- hw/pci.h |2 +- hw/piix4

[Qemu-devel] [PATCH 0/6] Save state error handling (kill off no_migrate)

2010-10-06 Thread Alex Williamson
Our code paths for saving or migrating a VM are full of functions that return void, leaving no opportunity for a device to cancel a migration, either from error or incompatibility. The ivshmem driver attempted to solve this with a no_migrate flag on the save state entry. I think the more generic

Re: [Qemu-devel] virtio-9p.c:401: v9fs_string_sprintf: Assertion `!(err == -1)' failed.

2010-10-06 Thread Venkateswararao Jujjuri (JV)
On 10/6/2010 10:58 AM, Venkateswararao Jujjuri (JV) wrote: > On 10/6/2010 5:48 AM, Gerd Hoffmann wrote: >> Hi, >> >> $subject says all ... >> >> Triggered by mounting the filesystem. F14 guest. >> > > Ah. This is introduced by c9ba47dc5d8679efa4d5425aa27e0f8132920fb5 > v9fs_string_sprintf() does

Testing of russian keymap (was Re: [Qemu-devel] [PATCH] fix '/' and '|' on russian keymap)

2010-10-06 Thread Eduardo Habkost
Anybody using a russian keyboard layout who can test this change and confirm it works as expected? There's no need to rebuild qemu to test it. Just changing the keymap file on /us/share/qemu to remove the last two lines (shown below) should be enough. On Fri, Oct 01, 2010 at 03:14:28PM -0300, E

[Qemu-devel] Load primitive in linux-user/signal.c

2010-10-06 Thread Lluís
I'm still not very tuned-in into the code, but I think this piece should use _raw access primitives: diff --git a/linux-user/signal.c b/linux-user/signal.c index 77683f7..097da9d 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -982,8 +982,8 @@ restore_sigcontext(CPUX86State *env, str

[Qemu-devel] Re: [patch uq/master 4/8] kvm: x86: add mce support

2010-10-06 Thread Anthony Liguori
On 10/06/2010 12:34 PM, Marcelo Tosatti wrote: Port qemu-kvm's MCE support commit c68b2374c9048812f488e00ffb95db66c0bc07a7 Author: Huang Ying Date: Mon Jul 20 10:00:53 2009 +0800 Add MCE simulation support to qemu/kvm KVM ioctls are used to initialize MCE simulation and inject MCE.

[Qemu-devel] Re: [PATCH 1/3] Make kvm64 the default cpu model when kvm_enabled()

2010-10-06 Thread Anthony Liguori
On 10/06/2010 01:53 PM, Marcelo Tosatti wrote: On Mon, Sep 27, 2010 at 03:16:15PM +0200, Joerg Roedel wrote: As requested by Alex this patch makes kvm64 the default CPU model when qemu is started with -enable-kvm. This takes only effect for qemu-versions newer or equal to 0.14.0. Signed-off

[Qemu-devel] [PATCH] configure: Remove unneeded defines from checks

2010-10-06 Thread Stefan Weil
_GNU_SOURCE is already defined in QEMU_CFLAGS which is passed to gcc in shell function compile_prog. Removing the definition from several checks avoids compiler warnings (which are now written to config.log). Signed-off-by: Stefan Weil --- configure |4 1 files changed, 0 insertions(+)

Re: [Qemu-devel] [PATCH 0/2] USB CCID device

2010-10-06 Thread Anthony Liguori
On 10/06/2010 03:55 AM, Gerd Hoffmann wrote: On 10/06/10 02:28, Alon Levy wrote: Does this work with live migration? I can't see how it would. No, it doesn't right now. It would require cooperation with the client, to tell it to reconnect to the target qemu (kind of like spice). I think

Re: [Qemu-devel] [PATCH 0/2] USB CCID device

2010-10-06 Thread Anthony Liguori
On 10/05/2010 07:28 PM, Alon Levy wrote: - "Anthony Liguori" wrote: On 10/05/2010 04:32 PM, Alon Levy wrote: This patch adds a new device, it is described in full in the second patch intro and also in the documentation in docs. In brief it provides a sta

[Qemu-devel] Re: [PATCH 1/3] Make kvm64 the default cpu model when kvm_enabled()

2010-10-06 Thread Marcelo Tosatti
On Mon, Sep 27, 2010 at 03:16:15PM +0200, Joerg Roedel wrote: > As requested by Alex this patch makes kvm64 the default CPU > model when qemu is started with -enable-kvm. This takes only > effect for qemu-versions newer or equal to 0.14.0. > > Signed-off-by: Joerg Roedel > --- > hw/boards.h|

[Qemu-devel] Re: [PATCH 3/3] Add svm cpuid features

2010-10-06 Thread Marcelo Tosatti
On Tue, Sep 28, 2010 at 12:05:20PM +0200, Roedel, Joerg wrote: > On Tue, Sep 28, 2010 at 05:37:58AM -0400, Avi Kivity wrote: > > On 09/28/2010 11:28 AM, Roedel, Joerg wrote: > > > > Weird, it worked here as I tested it. I had it on qemu/master and with > > > all three patches. But patch 1 should

Re: [Qemu-devel] virtio-9p.c:401: v9fs_string_sprintf: Assertion `!(err == -1)' failed.

2010-10-06 Thread Venkateswararao Jujjuri (JV)
On 10/6/2010 7:42 AM, Stefan Hajnoczi wrote: > On a related note, there are more uses of BUG_ON() in hw/virtio-9p.c > which can be triggered from the guest: > > submit_pdu(): > BUG_ON(pdu->id >= ARRAY_SIZE(pdu_handlers)); > BUG_ON(handler == NULL); > > handle_9p_output(): > BUG_ON

[Qemu-devel] Re: [patch uq/master 7/8] MCE: Relay UCR MCE to guest

2010-10-06 Thread Dean Nelson
On 10/06/2010 11:05 AM, Marcelo Tosatti wrote: On Wed, Oct 06, 2010 at 10:58:36AM +0900, Hidetoshi Seto wrote: I got some more question: (2010/10/05 3:54), Marcelo Tosatti wrote: Index: qemu/target-i386/cpu.h === --- qemu.orig/tar

Re: [Qemu-devel] virtio-9p.c:401: v9fs_string_sprintf: Assertion `!(err == -1)' failed.

2010-10-06 Thread Venkateswararao Jujjuri (JV)
On 10/6/2010 5:48 AM, Gerd Hoffmann wrote: > Hi, > > $subject says all ... > > Triggered by mounting the filesystem. F14 guest. > Ah. This is introduced by c9ba47dc5d8679efa4d5425aa27e0f8132920fb5 v9fs_string_sprintf() doesn't support %lu. I will send a patch to fix this shortly. - JV > (g

[Qemu-devel] [patch uq/master 7/8] MCE: Relay UCR MCE to guest

2010-10-06 Thread Marcelo Tosatti
Port qemu-kvm's commit 4b62fff1101a7ad77553147717a8bd3bf79df7ef Author: Huang Ying Date: Mon Sep 21 10:43:25 2009 +0800 MCE: Relay UCR MCE to guest UCR (uncorrected recovery) MCE is supported in recent Intel CPUs, where some hardware error such as some memory error can be repo

[Qemu-devel] [patch uq/master 2/8] iothread: use signalfd

2010-10-06 Thread Marcelo Tosatti
Block SIGALRM, SIGIO and consume them via signalfd. Signed-off-by: Marcelo Tosatti Index: qemu/cpus.c === --- qemu.orig/cpus.c +++ qemu/cpus.c @@ -33,6 +33,7 @@ #include "exec-all.h" #include "cpus.h" +#include "compatfd.h" #

[Qemu-devel] [patch uq/master 5/8] Export qemu_ram_addr_from_host

2010-10-06 Thread Marcelo Tosatti
To be used by next patches. Signed-off-by: Marcelo Tosatti Index: qemu/cpu-common.h === --- qemu.orig/cpu-common.h +++ qemu/cpu-common.h @@ -47,7 +47,8 @@ void qemu_ram_free(ram_addr_t addr); /* This should only be used for ram loc

[Qemu-devel] [patch uq/master 6/8] Add RAM -> physical addr mapping in MCE simulation

2010-10-06 Thread Marcelo Tosatti
From: Huang Ying In QEMU-KVM, physical address != RAM address. While MCE simulation needs physical address instead of RAM address. So kvm_physical_memory_addr_from_ram() is implemented to do the conversion, and it is invoked before being filled in the IA32_MCi_ADDR MSR. Reported-by: Dean Nelson

[Qemu-devel] [patch uq/master 1/8] signalfd compatibility

2010-10-06 Thread Marcelo Tosatti
Port qemu-kvm's signalfd compat code. commit 5a7fdd0abd7cd24dac205317a4195446ab8748b5 Author: Anthony Liguori Date: Wed May 7 11:55:47 2008 -0500 Use signalfd() in io-thread This patch reworks the IO thread to use signalfd() instead of sigtimedwait() This will eliminate the ne

[Qemu-devel] [patch uq/master 4/8] kvm: x86: add mce support

2010-10-06 Thread Marcelo Tosatti
Port qemu-kvm's MCE support commit c68b2374c9048812f488e00ffb95db66c0bc07a7 Author: Huang Ying Date: Mon Jul 20 10:00:53 2009 +0800 Add MCE simulation support to qemu/kvm KVM ioctls are used to initialize MCE simulation and inject MCE. The real MCE simulation is implemented in

[Qemu-devel] [patch uq/master 8/8] Add savevm/loadvm support for MCE

2010-10-06 Thread Marcelo Tosatti
Port qemu-kvm's commit 1bab5d11545d8de5facf46c28630085a2f9651ae Author: Huang Ying Date: Wed Mar 3 16:52:46 2010 +0800 Add savevm/loadvm support for MCE MCE registers are saved/load into/from CPUState in kvm_arch_save/load_regs. To simulate the MCG_STATUS clearing upon res

[Qemu-devel] [patch uq/master 3/8] Expose thread_id in info cpus

2010-10-06 Thread Marcelo Tosatti
commit ce6325ff1af34dbaee91c8d28e792277e43f1227 Author: Glauber Costa Date: Wed Mar 5 17:01:10 2008 -0300 Augment info cpus This patch exposes the thread id associated with each cpu through the already well known 'info cpus' interface. Signed-off-by: Marcelo Tosatti Index: q

[Qemu-devel] [patch uq/master 0/8] port qemu-kvm's MCE support (v2)

2010-10-06 Thread Marcelo Tosatti
Port qemu-kvm's KVM MCE (Machine Check Exception) handling to qemu. It allows qemu to propagate MCEs to the guest. v2: - rename do_qemu_ram_addr_from_host. - fix kvm_on_sigbus/kvm_on_sigbus_vcpu naming. - fix bank register restoration (Dean Nelson).

[Qemu-devel] Re: [PATCHv2] qemu-kvm/vhost: fix up irqfd support

2010-10-06 Thread Michael S. Tsirkin
On Wed, Oct 06, 2010 at 11:24:24AM -0600, Alex Williamson wrote: > On Wed, 2010-10-06 at 19:02 +0200, Michael S. Tsirkin wrote: > > On Wed, Oct 06, 2010 at 10:48:44AM -0600, Alex Williamson wrote: > > > > -int msix_unset_mask_notifier(PCIDevice *dev, unsigned vector) > > > > +static int msix_unset_

[Qemu-devel] Re: [PATCHv2] qemu-kvm/vhost: fix up irqfd support

2010-10-06 Thread Alex Williamson
On Wed, 2010-10-06 at 19:02 +0200, Michael S. Tsirkin wrote: > On Wed, Oct 06, 2010 at 10:48:44AM -0600, Alex Williamson wrote: > > > -int msix_unset_mask_notifier(PCIDevice *dev, unsigned vector) > > > +static int msix_unset_mask_notifier_for_vector(PCIDevice *dev, unsigned > > > vector) > > > {

Re: [Qemu-devel] [PATCHv4] net: delay freeing peer host device

2010-10-06 Thread Michael S. Tsirkin
On Wed, Oct 06, 2010 at 12:13:35PM -0500, Anthony Liguori wrote: > On 10/06/2010 11:58 AM, Michael S. Tsirkin wrote: > >On Wed, Oct 06, 2010 at 11:35:08AM -0500, Anthony Liguori wrote: > >>On 10/06/2010 11:04 AM, Michael S. Tsirkin wrote: > >>>With -netdev, virtio devices present offload > >>>featu

Re: [Qemu-devel] [PATCHv4] net: delay freeing peer host device

2010-10-06 Thread Anthony Liguori
On 10/06/2010 11:58 AM, Michael S. Tsirkin wrote: On Wed, Oct 06, 2010 at 11:35:08AM -0500, Anthony Liguori wrote: On 10/06/2010 11:04 AM, Michael S. Tsirkin wrote: With -netdev, virtio devices present offload features to guest, depending on the backend used. Thus, removing host netde

[Qemu-devel] Re: [PATCHv2] qemu-kvm/vhost: fix up irqfd support

2010-10-06 Thread Michael S. Tsirkin
On Wed, Oct 06, 2010 at 10:48:44AM -0600, Alex Williamson wrote: > > -int msix_unset_mask_notifier(PCIDevice *dev, unsigned vector) > > +static int msix_unset_mask_notifier_for_vector(PCIDevice *dev, unsigned > > vector) > > { > > int r = 0; > > -void *opaque; > > if (vector >= dev-

Re: [Qemu-devel] [PATCHv4] net: delay freeing peer host device

2010-10-06 Thread Michael S. Tsirkin
On Wed, Oct 06, 2010 at 11:35:08AM -0500, Anthony Liguori wrote: > On 10/06/2010 11:04 AM, Michael S. Tsirkin wrote: > >With -netdev, virtio devices present offload > >features to guest, depending on the backend used. > >Thus, removing host netdev peer while guest is > >active leads to guest-visibl

[Qemu-devel] Re: [PATCHv2] qemu-kvm/vhost: fix up irqfd support

2010-10-06 Thread Alex Williamson
On Wed, 2010-10-06 at 16:56 +0200, Michael S. Tsirkin wrote: > vhost irqfd support: case where many vqs are > mapped to a single msix vector is currently broken. > Fix it up. > > Signed-off-by: Michael S. Tsirkin > --- > > This is on top of the qemu patchset, which is unchanged. > Fixes from v1:

Re: [Qemu-devel] [Bug 655555] [NEW] "-cpu ?" doesn't work as documented

2010-10-06 Thread Martin von Gagern
On 06.10.2010 18:30, Stefan Weil wrote: > Does one of these work: > > -cpu \? > -cpu '?' > > If yes, then the shell's wildcard expansion caused your problem. Yes indeed. Should have thought of that myself. Nevertheless, a note in the manual might help others like me. Thanks in any case!

Re: [Qemu-devel] [PATCHv4] net: delay freeing peer host device

2010-10-06 Thread Anthony Liguori
On 10/06/2010 11:04 AM, Michael S. Tsirkin wrote: With -netdev, virtio devices present offload features to guest, depending on the backend used. Thus, removing host netdev peer while guest is active leads to guest-visible inconsistency and/or crashes. As a solution, while guest (NIC) peer device

Re: [Qemu-devel] [Bug 655555] [NEW] "-cpu ?" doesn't work as documented

2010-10-06 Thread Stefan Weil
Am 06.10.2010 09:58, schrieb Martin von Gagern: Public bug reported: I've got qemu-kvm 0.12.5 on Gentoo Linux on an amd64 host. Both HTML documentation and compiled-in command line help state that "-cpu ?" should give me a list of possible values for the -cpu command line switch. In fact that sw

[Qemu-devel] Re: [PATCHv3] net: delay freeing peer host device

2010-10-06 Thread Michael S. Tsirkin
On Wed, Oct 06, 2010 at 09:48:06AM -0600, Alex Williamson wrote: > > +void qemu_del_vlan_client(VLANClientState *vc) > > +{ > > +/* If there is a peer NIC, delete and cleanup client, but do not free. > > */ > > +if (!vc->vlan && vc->peer && vc->peer->info->type == > > NET_CLIENT_TYPE_NIC)

[Qemu-devel] Re: [patch uq/master 7/8] MCE: Relay UCR MCE to guest

2010-10-06 Thread Marcelo Tosatti
On Wed, Oct 06, 2010 at 10:58:36AM +0900, Hidetoshi Seto wrote: > I got some more question: > > (2010/10/05 3:54), Marcelo Tosatti wrote: > > Index: qemu/target-i386/cpu.h > > === > > --- qemu.orig/target-i386/cpu.h > > +++ qemu/targe

[Qemu-devel] Re: [patch uq/master 7/8] MCE: Relay UCR MCE to guest

2010-10-06 Thread Marcelo Tosatti
On Wed, Oct 06, 2010 at 10:10:51AM +0900, Hidetoshi Seto wrote: > > (snip) > > > Index: qemu/kvm.h > > === > > --- qemu.orig/kvm.h > > +++ qemu/kvm.h > > @@ -110,6 +110,9 @@ int kvm_arch_init_vcpu(CPUState *env); > > > > void kvm_

[Qemu-devel] Re: [PATCHv4] net: delay freeing peer host device

2010-10-06 Thread Alex Williamson
On Wed, 2010-10-06 at 18:04 +0200, Michael S. Tsirkin wrote: > With -netdev, virtio devices present offload > features to guest, depending on the backend used. > Thus, removing host netdev peer while guest is > active leads to guest-visible inconsistency and/or crashes. > > As a solution, while gu

[Qemu-devel] [PATCHv4] net: delay freeing peer host device

2010-10-06 Thread Michael S. Tsirkin
With -netdev, virtio devices present offload features to guest, depending on the backend used. Thus, removing host netdev peer while guest is active leads to guest-visible inconsistency and/or crashes. As a solution, while guest (NIC) peer device exists, we prevent the host peer from being deleted

[Qemu-devel] Re: [PATCHv3] net: delay freeing peer host device

2010-10-06 Thread Alex Williamson
On Mon, 2010-10-04 at 18:13 +0200, Michael S. Tsirkin wrote: > With -netdev, virtio devices present offload > features to guest, depending on the backend used. > Thus, removing host netdev peer while guest is > active leads to guest-visible inconsistency and/or crashes. > > As a solution, while gu

[Qemu-devel] Re: [PATCHv3] virtio-net: unify vhost-net start/stop

2010-10-06 Thread Alex Williamson
On Sun, 2010-10-03 at 22:18 +0200, Michael S. Tsirkin wrote: > Move all of vhost-net start/stop logic to a single routine, > and call it from everywhere. > > Additionally, start/stop vhost-net on link up/down: > we should not transmit anything if user asked us to > put the link down. > > Signed-o

[Qemu-devel] [PATCHv2] qemu-kvm/vhost: fix up irqfd support

2010-10-06 Thread Michael S. Tsirkin
vhost irqfd support: case where many vqs are mapped to a single msix vector is currently broken. Fix it up. Signed-off-by: Michael S. Tsirkin --- This is on top of the qemu patchset, which is unchanged. Fixes from v1: correct error handling hw/msix.c | 68 +

Re: [Qemu-devel] virtio-9p.c:401: v9fs_string_sprintf: Assertion `!(err == -1)' failed.

2010-10-06 Thread Stefan Hajnoczi
On a related note, there are more uses of BUG_ON() in hw/virtio-9p.c which can be triggered from the guest: submit_pdu(): BUG_ON(pdu->id >= ARRAY_SIZE(pdu_handlers)); BUG_ON(handler == NULL); handle_9p_output(): BUG_ON(pdu->elem.out_num == 0 || pdu->elem.in_num == 0); BUG_

[Qemu-devel] [PATCH 0/3] qemu-kvm/vhost: fix qemu assert triggerable by guest

2010-10-06 Thread Michael S. Tsirkin
When guest maps a vector to multiple vqs, qemu kvm triggers an assert. A simple way to test this is by supplying vectors=2 for virtio-net-pci in qemu-kvm. The first 2 patches apply to qemu.git. The 3d does not, it has to be applied only to qemu-kvm.git. Avi, marcelo, I think to prevent bisect err

[Qemu-devel] [PATCH 1/3] virtio: change set guest notifier to per-device

2010-10-06 Thread Michael S. Tsirkin
When using irqfd with vhost-net to inject interrupts, a single evenfd might inject multiple interrupts. Implementing this is much easier with a single per-device callback to set guest notifiers. Signed-off-by: Michael S. Tsirkin --- hw/vhost.c | 52

[Qemu-devel] [PATCH 3/3] vhost: fix up irqfd support

2010-10-06 Thread Michael S. Tsirkin
vhost irqfd support: case where many vqs are mapped to a single msix vector is currently broken. Fix it up. Signed-off-by: Michael S. Tsirkin --- hw/msix.c | 68 ++- hw/msix.h |4 +- hw/pci.h|3 +- hw/virtio-pci.c

[Qemu-devel] [PATCH 2/3] vhost: error code

2010-10-06 Thread Michael S. Tsirkin
fix up errors returned to include errno, not just -1 Signed-off-by: Michael S. Tsirkin --- hw/vhost.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/vhost.c b/hw/vhost.c index 5ac283b..2e5d7a6 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -516,12 +516,14 @@ static int

[Qemu-devel] Re: [RFC PATCH 0/5] Save state error handling (kill off no_migrate)

2010-10-06 Thread Anthony Liguori
On 10/05/2010 09:29 PM, Alex Williamson wrote: On Tue, 2010-10-05 at 14:58 -0600, Alex Williamson wrote: On Tue, 2010-10-05 at 15:49 -0500, Anthony Liguori wrote: On 10/05/2010 03:46 PM, Alex Williamson wrote: On Tue, 2010-10-05 at 15:41 -0500, Anthony Liguori wrote:

[Qemu-devel] Re: 8 NIC limit - patch - places limit at 32

2010-10-06 Thread Anthony Liguori
On 10/06/2010 12:46 AM, linux_...@proinbox.com wrote: Attached is a patch that allows qemu to have up to 32 NICs, without using the qdev -device method. I'd rather there be no fixed limit and we validate that when add fails because there isn't a TCP slot available, we do the right thing.

[Qemu-devel] virtio-9p.c:401: v9fs_string_sprintf: Assertion `!(err == -1)' failed.

2010-10-06 Thread Gerd Hoffmann
Hi, $subject says all ... Triggered by mounting the filesystem. F14 guest. (gdb) #0 0x00399f4329c5 in raise () from /lib64/libc.so.6 #1 0x00399f4341a5 in abort () from /lib64/libc.so.6 #2 0x00399f42b955 in __assert_fail () from /lib64/libc.so.6 #3 0x004209a4 in v9fs_st

[Qemu-devel] [PATCH] Use preadv/pwritev instead of readv/writev

2010-10-06 Thread Sanchit Garg
readv & writev, read & write respectively from the current offset of the file & hence their use has to be preceeded by a call to lseek. preadv/writev can be used instead, as they take the offset as an argument. This saves one system call( lseek ). In case preadv is not supported, it is implemented

Re: [Qemu-devel] [PATCH 0/2] USB CCID device

2010-10-06 Thread Gerd Hoffmann
On 10/06/10 02:28, Alon Levy wrote: Does this work with live migration? I can't see how it would. No, it doesn't right now. It would require cooperation with the client, to tell it to reconnect to the target qemu (kind of like spice). I think until we have this migration should have pret

[Qemu-devel] [Bug 655555] [NEW] "-cpu ?" doesn't work as documented

2010-10-06 Thread Martin von Gagern
Public bug reported: I've got qemu-kvm 0.12.5 on Gentoo Linux on an amd64 host. Both HTML documentation and compiled-in command line help state that "-cpu ?" should give me a list of possible values for the -cpu command line switch. In fact that switch results in an error message: "Unable to find