Re: [Qemu-devel] [PATCH 3/3] libcacard: don't free sign buffer while sign op is pending

2014-10-19 Thread Alon Levy
and nullified while it's still being used. This commit corrects the bug by introducing a boolean to track whether or not the sign buffer should be freed in the function exit path. My bad, thanks for catching this. Reviewed-by: Alon Levy a...@pobox.com Signed-off-by: Ray Strode rstr

Re: [Qemu-devel] [PATCH] ccid-card-emulated: use EventNotifier

2014-06-23 Thread Alon Levy
Shut up Coverity's complaint about unchecked fcntl return values, and especially make the code simpler and more efficient. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Reviewed-by: Alon Levy al...@redhat.com one question below. --- hw/usb/ccid-card-emulated.c | 29

Re: [Qemu-devel] [PATCH] libcacard: improve documentation

2014-05-29 Thread Alon Levy
them with QEMU, based on Ray Strode's useful tutorial at https://blogs.gnome.org/halfline/2013/09/08/another-smartcard-post/ but with ccid-card-emulated or vscclient instead of SPICE. Cc: Alon Levy al...@redhat.com Cc: Ray Strode rstr...@redhat.com Did you mean Robert Relyea rrel...@redhat.com

Re: [Qemu-devel] [Qemu-trivial] [PATCH] libcacard: remove useless initializers

2014-05-25 Thread Alon Levy
12.05.2014 13:20, Markus Armbruster wrote: Michael Tokarev m...@tls.msk.ru writes: 11.05.2014 11:58, Alon Levy wrote: On 05/08/2014 08:19 PM, Michael Tokarev wrote: libcacard has many functions which initializes local variables at declaration time, which are always assigned some values later

Re: [Qemu-devel] [PATCH 0/7] libcacard: A few simple fixes and cleanups

2014-05-22 Thread Alon Levy
/vcard_emul_nss.c | 16 ++-- libcacard/vreader.c| 10 -- libcacard/vscclient.c | 7 +++ 4 files changed, 15 insertions(+), 31 deletions(-) Reviewed-by: Alon Levy al...@redhat.com

Re: [Qemu-devel] [PATCH] libcacard: remove useless initializers

2014-05-11 Thread Alon Levy
On 05/08/2014 08:19 PM, Michael Tokarev wrote: libcacard has many functions which initializes local variables at declaration time, which are always assigned some values later (often right after declaration). Clean up these initializers. How is this an improvement? Doesn't the compiler ignore

Re: [Qemu-devel] [PATCH] libcacard: g_malloc cleanups

2014-05-11 Thread Alon Levy
On 05/08/2014 06:54 PM, Michael Tokarev wrote: This patch replaces g_malloc() in libcacard into g_new() or g_new0() where appropriate (removing some init-to-zero surrounding code), g_malloc+memcpy into g_memdup() and the like. Reviewed-by: Alon Levy al...@redhat.com just one comment below

Re: [Qemu-devel] [PATCH 0/5] glib thread interface and libcacard cleanups

2014-05-06 Thread Alon Levy
On 05/05/2014 07:36 PM, Michael Tokarev wrote: 05.05.2014 18:49, Alon Levy wrote: On 04/29/2014 09:02 AM, Michael Tokarev wrote: Basically libgthread has been rewritten in glib version 2.31, and old ways to use thread primitives stopped working while new ways appeared. The two interfaces

Re: [Qemu-devel] [PATCH 0/5] glib thread interface and libcacard cleanups

2014-05-05 Thread Alon Levy
. This is because of large addition to glib-compat.h, plus addition of compat code to vscclient, to make it independent of qemu. and a few others. Thanks, Reviewed-by: Alon Levy al...@redhat.com Tested-by: Alon Levy al...@redhat.com This would be nice to have too (it has nothing to do with your

Re: [Qemu-devel] [PATCH] libcacard: actually use the symbols file

2014-04-27 Thread Alon Levy
On 04/21/2014 12:09 PM, Michael Tokarev wrote: 21.04.2014 13:01, Michael Tokarev wrote: libtool has an argument for .syms file, which is -export-symbols. There's no argument `-export-syms', and it looks like at least on linux, -export-syms is just ignored. Use the correct argument,

Re: [Qemu-devel] [PATCH] libcacard: actually use symbols file

2014-04-27 Thread Alon Levy
. This makes the binary as twice as large, but allows to have cleaner export table for libcacard.so. Reviewed-by: Alon Levy al...@redhat.com Any chance to get this through the trivial patch queue? Signed-off-by: Michael Tokarev m...@tls.msk.ru --- libcacard/Makefile |4 ++-- 1 file

[Qemu-devel] [PATCH] display/qxl: don't abort on reset with non empty rings

2014-03-24 Thread Alon Levy
The command ring and cursor rings are pushed to by the guest, and cleared asynchronously by qemu's spice thread. It is easy to have them non empty by bad guest behaviour, and we must never abort on bad guest behaviour. Signed-off-by: Alon Levy al...@redhat.com --- hw/display/qxl.c | 8

[Qemu-devel] [PULL 0/1 v2] libcacard glusterfs fix

2014-02-09 Thread Alon Levy
changes from v1: Added Signed-of by me. The following changes since commit 1f6b12f75f2c22f861d0202374033a7594c91707: Merge remote-tracking branch 'remotes/mwalle/tags/lm32-fixes/20140204' into staging (2014-02-08 15:57:51 +) are available in the git repository at:

[Qemu-devel] [PULL 1/1] libcacard: Don't link with all libraries QEMU links to

2014-02-09 Thread Alon Levy
linked with the libraries it needs. Signed-off-by: Christophe Fergeau cferg...@redhat.com Signed-off-by: Alon Levy al...@redhat.com --- libcacard/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcacard/Makefile b/libcacard/Makefile index 4d15da4..6b06448 100644

Re: [Qemu-devel] [PATCH] libcacard: Don't link with all libraries QEMU links to

2014-01-30 Thread Alon Levy
On 01/30/2014 03:56 PM, Christophe Fergeau wrote: Acked-by: Alon Levy al...@redhat.com As described in https://bugzilla.redhat.com/show_bug.cgi?id=987441 , libcacard currently links to all the libraries QEMU is linking to, including glusterfs libraries, libiscsi, ... libcacard does not need

[Qemu-devel] [PULL 1/1] libcacard: Don't link with all libraries QEMU links to

2014-01-30 Thread Alon Levy
From: Christophe Fergeau cferg...@redhat.com As described in https://bugzilla.redhat.com/show_bug.cgi?id=987441 , libcacard currently links to all the libraries QEMU is linking to, including glusterfs libraries, libiscsi, ... libcacard does not need all of these. This patch ensures it's only

[Qemu-devel] [PULL 0/1] libcacard glusterfs fix

2014-01-30 Thread Alon Levy
The following changes since commit 0706f7c85b3c0783f92d44b551f362884db0f4bd: Merge remote-tracking branch 'mjt/tags/trivial-patches-2014-01-16' into staging (2014-01-30 13:56:00 +) are available in the git repository at: git://people.freedesktop.org/~alon/qemu pull-libcacard.glusterfs

[Qemu-devel] [PATCH 1/2] hw/display/qxl: improve framebuffer error message

2014-01-20 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- hw/display/qxl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index e4f172e..f6af470 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1367,7 +1367,8 @@ static void

[Qemu-devel] [PATCH 2/2] qxl: clear irq on reset

2014-01-20 Thread Alon Levy
that the irq is clear. Signed-off-by: Alon Levy al...@redhat.com --- hw/display/qxl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index f6af470..e164d96 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1126,6 +1126,7 @@ static void qxl_reset_state

[Qemu-devel] [PATCH v2] hw/display/qxl: fix signed to unsigned comparison

2014-01-20 Thread Alon Levy
Fix signed to unsigned comparison in qxl_create_guest_primary and add the size of the framebuffer to the error message used when setting the guest bug state (which causes a complete guess blackout until reset, so it helps if it is verbose). Signed-off-by: Alon Levy al...@redhat.com --- hw

[Qemu-devel] [PATCH v3] hw/display/qxl: fix signed to unsigned comparison

2014-01-20 Thread Alon Levy
guess blackout until reset, so it helps if it is verbose). Signed-off-by: Alon Levy al...@redhat.com --- hw/display/qxl.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index e4f172e..ba752b5 100644 --- a/hw/display/qxl.c +++ b/hw

[Qemu-devel] [PATCH v4] hw/display/qxl: fix signed to unsigned comparison

2014-01-20 Thread Alon Levy
guess blackout until reset, so it helps if it is verbose). Signed-off-by: Alon Levy al...@redhat.com --- hw/display/qxl.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index e4f172e..ceae1d9 100644 --- a/hw/display/qxl.c +++ b

[Qemu-devel] [PULL] libcacard fixes

2013-12-09 Thread Alon Levy
Anthony, The following changes since commit a1d22a367d5780c9553b2cd5a24f665534ce6ed6: target-cris: Use new qemu_ld/st opcodes (2013-12-08 09:36:02 +0100) are available in the git repository at: git://people.freedesktop.org/~alon/qemu libcacard_ccid.4 for you to fetch changes up to

[Qemu-devel] [PULL] libcacard: Fix compilation for older versions of glib (bug #1258168)

2013-12-09 Thread Alon Levy
From: Stefan Weil s...@weilnetz.de See https://bugs.launchpad.net/bugs/1258168 libcacard/vscclient.c: In function 'do_socket_read': libcacard/vscclient.c:410: warning: implicit declaration of function 'g_warn_if_reached' libcacard/vscclient.c:410: warning: nested extern declaration of

Re: [Qemu-devel] [PATCH v2] libcacard: Fix compilation for older versions of glib (bug #1258168)

2013-12-08 Thread Alon Levy
On 12/05/2013 08:41 PM, Stefan Weil wrote: See https://bugs.launchpad.net/bugs/1258168 libcacard/vscclient.c: In function 'do_socket_read': libcacard/vscclient.c:410: warning: implicit declaration of function 'g_warn_if_reached' libcacard/vscclient.c:410: warning: nested extern declaration

Re: [Qemu-devel] [PATCH] spice: flip streaming video mode to off by default

2013-12-02 Thread Alon Levy
what it thinks is a video stream. Turn off video detection by default to avoid these artifacts. Reviewed-by: Alon Levy al...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/spice-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/spice-core.c b/ui/spice

Re: [Qemu-devel] [PATCH 05/21] char: add qemu_chr_fe_event()

2013-11-18 Thread Alon Levy
On 11/18/2013 02:25 PM, Marc-André Lureau wrote: From: Marc-André Lureau marcandre.lur...@redhat.com The patch description is incomplete, or the patch should be split - this patch also implements qemu_chr_fe_event for spiceport. Signed-off-by: Marc-André Lureau marcandre.lur...@redhat.com

Re: [Qemu-devel] [Spice-devel] [PATCH 20/21] spice-core: allow an interface to be in AIO context

2013-11-18 Thread Alon Levy
On 11/18/2013 02:25 PM, Marc-André Lureau wrote: The Spice block driver must be able complete operations within a AIO context only. Spice is currently only running within the main loop, and doesn't allow the block driver to complete operations, such as flush during migration. This patch

Re: [Qemu-devel] [PATCH] qxl: replace pipe signaling with bottom half

2013-10-30 Thread Alon Levy
it up. Signed-off-by: Gerd Hoffmann kra...@redhat.com Reviewed-by: Alon Levy al...@redhat.com --- hw/display/qxl.c | 33 +++-- hw/display/qxl.h | 3 +-- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c

Re: [Qemu-devel] [PATCH 0/2] Try to fix problem with emulated smartcards where invalid PIN succeeds

2013-09-08 Thread Alon Levy
I started writing a blog post yesterday about virtualized smartcards here: https://blogs.gnome.org/halfline/2013/09/08/another-smartcard-post/ and while testing what I was writing I noticed an invalid PIN worked when it shouldn't have. It turns out that typing a valid PIN once in one

Re: [Qemu-devel] [PATCH v3 RESEND] libxl: Spice vdagent support for upstream qemu

2013-08-14 Thread Alon Levy
Il 23/07/2013 15:42, Fabio Fantoni ha scritto: Il 03/07/2013 15:54, fantonifa...@tiscali.it ha scritto: Usage: spicevdagent=1|0 (default=0) Enables spice vdagent. The Spice vdagent is an optional component for enhancing user experience and performing guest-oriented management tasks. Its

[Qemu-devel] [PATCH] libcacard/vreader: remove never used define

2013-08-06 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- libcacard/vreader.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libcacard/vreader.c b/libcacard/vreader.c index 60eb43b..fd1a9ac 100644 --- a/libcacard/vreader.c +++ b/libcacard/vreader.c @@ -21,8 +21,6 @@ #include vevent.h #include cac.h

Re: [Qemu-devel] [PATCH 1/1] spice: fix display initialization

2013-07-30 Thread Alon Levy
qxl-vga goes unnoticed. Fix that by adding a check in the spice interface registration so we'll notice the qxl card no matter how it is created. https://bugzilla.redhat.com/show_bug.cgi?id=981094 Reviewed-by: Alon Levy al...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com

Re: [Qemu-devel] [PATCH] make screendump an async command

2013-06-17 Thread Alon Levy
On Mon, 2013-06-17 at 08:06 +0200, Gerd Hoffmann wrote: Hi, Why is QXL unable to do a synchronous screendump? Lazy rendering. By default spice-server doesn't render anything, it just sends over all drawing ops to the client who does the actual rendering for the user. qemu can kick

Re: [Qemu-devel] [PATCH] make screendump an async command

2013-06-14 Thread Alon Levy
Hi, Note: due to QAPI not generating async commands yet I had to remove the schema screendump definition. Hmm, that will break libvirt I suspect. Guess this one has to wait until QAPI gained proper async command support. It doesn't break anything. I've tested, and here is the QMP

Re: [Qemu-devel] [PATCH] make screendump an async command

2013-06-14 Thread Alon Levy
Hi, Note: due to QAPI not generating async commands yet I had to remove the schema screendump definition. Hmm, that will break libvirt I suspect. Guess this one has to wait until QAPI gained proper async command support. It doesn't break anything. I've tested, To clarify, I

Re: [Qemu-devel] [PATCH] make screendump an async command

2013-06-14 Thread Alon Levy
On Fri, 2013-06-14 at 13:21 -0500, Anthony Liguori wrote: Alon Levy al...@redhat.com writes: This fixes the broken screendump behavior for qxl devices in native mode since 81fb6f1504fb9ef71f2382f44af34756668296e8. Note: due to QAPI not generating async commands yet I had to remove

[Qemu-devel] [PATCH] make screendump an async command

2013-06-13 Thread Alon Levy
, with the linux qxl driver you get garbage still, just not out of date garbage. Signed-off-by: Alon Levy al...@redhat.com --- hmp.c | 2 +- hw/display/qxl-render.c | 1 + hw/display/vga.c | 1 + include/qapi/qmp/qerror.h | 6 + include/ui/console.h | 10

Re: [Qemu-devel] [PATCH] make screendump an async command

2013-06-13 Thread Alon Levy
Il 13/06/2013 15:27, Alon Levy ha scritto: This fixes the broken screendump behavior for qxl devices in native mode since 81fb6f1504fb9ef71f2382f44af34756668296e8. Note: due to QAPI not generating async commands yet I had to remove the schema screendump definition. Related RHBZ

Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/5] oslib-posix: add qemu_pipe_non_block

2013-06-12 Thread Alon Levy
05.06.2013 00:23, Alon Levy wrote: [PATCH 1/5] oslib-posix: add qemu_pipe_non_block [PATCH 2/5] use qemu_pipe_non_block [PATCH 3/5] libcacard/vscclient: fix leakage of socket on error paths [PATCH 4/5] libcacard/vreader.c: fix possible NULL dereference [PATCH 5/5] libcacard

[Qemu-devel] [PATCH 1/5] oslib-posix: add qemu_pipe_non_block

2013-06-04 Thread Alon Levy
Used by the followin patch. Signed-off-by: Alon Levy al...@redhat.com --- include/qemu-common.h | 1 + util/oslib-posix.c| 19 +++ 2 files changed, 20 insertions(+) diff --git a/include/qemu-common.h b/include/qemu-common.h index cb82ef3..c24d75c 100644 --- a/include/qemu

[Qemu-devel] [PATCH 2/5] use qemu_pipe_non_block

2013-06-04 Thread Alon Levy
This fixes six instances of unchecked fcntl return status, spotted by Coverity. Signed-off-by: Alon Levy al...@redhat.com --- hw/display/qxl.c| 10 +++--- hw/usb/ccid-card-emulated.c | 8 +++- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/hw/display/qxl.c b

[Qemu-devel] [PATCH 4/5] libcacard/vreader.c: fix possible NULL dereference

2013-06-04 Thread Alon Levy
: var_deref_op: Dereferencing null pointer response. Signed-off-by: Alon Levy al...@redhat.com --- libcacard/vreader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcacard/vreader.c b/libcacard/vreader.c index 5793d73..60eb43b 100644 --- a/libcacard/vreader.c +++ b/libcacard/vreader.c

[Qemu-devel] [PATCH 3/5] libcacard/vscclient: fix leakage of socket on error paths

2013-06-04 Thread Alon Levy
Spotted by Coverity. Signed-off-by: Alon Levy al...@redhat.com --- libcacard/vscclient.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index ac23647..5180d29 100644 --- a/libcacard/vscclient.c +++ b/libcacard

[Qemu-devel] [PATCH 5/5] libcacard/vscclient.c: fix use of uninitialized variable

2013-06-04 Thread Alon Levy
Found by Coverity. Signed-off-by: Alon Levy al...@redhat.com --- libcacard/vscclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index 5180d29..4275c23 100644 --- a/libcacard/vscclient.c +++ b/libcacard/vscclient.c @@ -645,7

Re: [Qemu-devel] [PATCH 2/5] use qemu_pipe_non_block

2013-06-04 Thread Alon Levy
On 4 June 2013 21:23, Alon Levy al...@redhat.com wrote: --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1797,15 +1797,11 @@ static void qxl_send_events(PCIQXLDevice *d, uint32_t events) static void init_pipe_signaling(PCIQXLDevice *d) { -if (pipe(d-pipe) 0

Re: [Qemu-devel] [PATCH 2/5] use qemu_pipe_non_block

2013-06-04 Thread Alon Levy
Il 04/06/2013 22:23, Alon Levy ha scritto: This fixes six instances of unchecked fcntl return status, spotted by Coverity. I think we're just assuming that they cannot fail... I don't think we need the previous patch and this one, unless they help porting stuff to Windows

Re: [Qemu-devel] [PATCH 1/5] oslib-posix: add qemu_pipe_non_block

2013-06-04 Thread Alon Levy
On 06/04/2013 02:23 PM, Alon Levy wrote: Used by the followin patch. s/followin/following/ Thanks. +int qemu_pipe_non_block(int pipefd[2]) +{ +int ret; + +ret = qemu_pipe(pipefd); qemu_pipe() already uses pipe2() when available; it seems like it would be nicer

[Qemu-devel] [PATCH] libcacard/vscclient: fix leakage of socket on error paths

2013-05-31 Thread Alon Levy
Spotted by Coverity. Signed-off-by: Alon Levy al...@redhat.com --- libcacard/vscclient.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index ac23647..9fcc548 100644 --- a/libcacard/vscclient.c +++ b/libcacard/vscclient.c

Re: [Qemu-devel] [PATCH] libcacard/vscclient: fix leakage of socket on error paths

2013-05-31 Thread Alon Levy
Spotted by Coverity. Self NACK. I'll send a more complete patch, and use closesocket. Signed-off-by: Alon Levy al...@redhat.com --- libcacard/vscclient.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index

Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory

2013-05-28 Thread Alon Levy
On Mon, 2013-05-27 at 08:32 +0200, Paolo Bonzini wrote: Il 27/05/2013 04:19, Alon Levy ha scritto: For systemtap the location of the process being tapped is crucial, so the existing stp file requires installation to use. A new file providing qemu.local prefixed probes lets scripts run

Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory

2013-05-28 Thread Alon Levy
On Tue, 2013-05-28 at 14:18 +0200, Paolo Bonzini wrote: Il 28/05/2013 14:09, Alon Levy ha scritto: + --probe-prefix=qemu.local \ Why change the prefix? It was one way to verify I was using the correct file. I'll change it back. But in general does it make sense for you

Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory

2013-05-28 Thread Alon Levy
Il 28/05/2013 14:33, Alon Levy ha scritto: On Tue, 2013-05-28 at 14:18 +0200, Paolo Bonzini wrote: Il 28/05/2013 14:09, Alon Levy ha scritto: + --probe-prefix=qemu.local \ Why change the prefix? It was one way to verify I was using the correct file. I'll change

Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory

2013-05-28 Thread Alon Levy
On Tue, 2013-05-28 at 09:25 -0400, Alon Levy wrote: Il 28/05/2013 14:33, Alon Levy ha scritto: On Tue, 2013-05-28 at 14:18 +0200, Paolo Bonzini wrote: Il 28/05/2013 14:09, Alon Levy ha scritto: + --probe-prefix=qemu.local \ Why change the prefix? Actually the problem

[Qemu-devel] [PATCH] Add a stp file for usage from build directory

2013-05-28 Thread Alon Levy
-I $(TARGET_DIR) .. Signed-off-by: Alon Levy al...@redhat.com --- Makefile.target | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile.target b/Makefile.target index ce4391f..54687e2 100644 --- a/Makefile.target +++ b/Makefile.target @@ -35,7 +35,7

[Qemu-devel] [PATCH v2] Add a stp file for usage from build directory

2013-05-28 Thread Alon Levy
, usable without installation To use: stap -I $(TARGET_DIR) ... Signed-off-by: Alon Levy al...@redhat.com --- Makefile.target | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile.target b/Makefile.target index ce4391f

[Qemu-devel] [RFC] Add a stp file for usage from build directory

2013-05-26 Thread Alon Levy
For systemtap the location of the process being tapped is crucial, so the existing stp file requires installation to use. A new file providing qemu.local prefixed probes lets scripts run without an install step. Signed-off-by: Alon Levy al...@redhat.com --- Makefile.target | 13 - 1

[Qemu-devel] [PATCH v3] arch_init/ram_load: add error message for block length mismatch

2013-05-12 Thread Alon Levy
Makes it easier to debug situations where the source and target have different ram blocks in a device and migration fails due to that, for instance a BAR size change on a PCI device. Signed-off-by: Alon Levy al...@redhat.com --- v3: use RAM_ADDR_FMT arch_init.c | 3 +++ 1 file changed, 3

[Qemu-devel] [PULL] libcacard fix from Cole Robinson

2013-04-26 Thread Alon Levy
The following changes since commit 909eedb74f88d1d6d9e6bbdc34875772e7a8a5ab: target-ppc: slightly optimize lfiwax (2013-04-27 00:37:46 +0200) are available in the git repository at: git://people.freedesktop.org/~alon/qemu libcacard_ccid.2 for you to fetch changes up to

[Qemu-devel] [PULL] libcacard and ccid fixes

2013-04-24 Thread Alon Levy
to fetch changes up to 203a368e66f5211b832e17b85c6f5dacfc8d7bf9: libcacard/cac: change big switch functions to single return point (2013-04-24 10:57:48 +0300) Alon Levy (15): dev-smartcard-reader: white space fixes dev

[Qemu-devel] [PATCH v3 00/28] ccid and libcacard fixes for windows/mingw

2013-04-22 Thread Alon Levy
not acked before. did all the changes per Marc Andre's comments. Please look at the g_debug one, I'm not sure about the ifdeffery there (not if it works, but if it looks ok). Alon Levy (15): dev-smartcard-reader: white space fixes dev-smartcard-reader: nicer debug messages dev-smartcard

[Qemu-devel] [PATCH v3 04/28] ccid: declare DEFAULT_ATR table to be static const

2013-04-22 Thread Alon Levy
From: Jim Meyering meyer...@redhat.com Signed-off-by: Jim Meyering meyer...@redhat.com --- hw/usb/ccid-card-passthru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index 71a45f6..275b887 100644 ---

[Qemu-devel] [PATCH v3 07/28] build-sys: must link with -fstack-protector

2013-04-22 Thread Alon Levy
From: Marc-André Lureau marcandre.lur...@gmail.com It is needed to give that flag to the linker as well, but latest libtool 2.4.2 still swallows that argument, so let's pass it with libtool -Wc argument. qemu-1.4.0/stubs/arch-query-cpu-def.c:6: undefined reference to `__stack_chk_guard'

[Qemu-devel] [PATCH v3 06/28] util: move socket_init() to osdep.c

2013-04-22 Thread Alon Levy
From: Marc-André Lureau marcandre.lur...@redhat.com vscclient needs to call socket_init() for portability. Moving to osdep.c since it has no internal dependency. Signed-off-by: Marc-André Lureau marcandre.lur...@redhat.com --- util/osdep.c| 23 +++

[Qemu-devel] [PATCH v3 02/28] ccid-card-emul: do not crash if backend is not provided

2013-04-22 Thread Alon Levy
From: Marc-André Lureau marcandre.lur...@gmail.com Program received signal SIGSEGV, Segmentation fault. __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164 164 movdqu(%rsi), %xmm2 (gdb) bt at /home/elmarco/320g/src/qemu/hw/ccid-card-emulated.c:477 at

[Qemu-devel] [PATCH v3 03/28] ccid: make backend_enum_table static const and adjust users

2013-04-22 Thread Alon Levy
From: Jim Meyering meyer...@redhat.com Signed-off-by: Jim Meyering meyer...@redhat.com --- hw/usb/ccid-card-emulated.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index 6cbb176..094284d 100644 ---

[Qemu-devel] [PATCH v3 08/28] libcacard: fix mingw64 cross-compilation

2013-04-22 Thread Alon Levy
From: Marc-André Lureau marcandre.lur...@gmail.com Compile and link with version.lo Signed-off-by: Marc-André Lureau marcandre.lur...@redhat.com --- Makefile | 8 ++-- rules.mak | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index

[Qemu-devel] [PATCH v3 12/28] libcacard: remove sql: prefix

2013-04-22 Thread Alon Levy
From: Marc-André Lureau marcandre.lur...@gmail.com For some reason, with sql:/ prefix, the PKCS11 modules are not loaded. This patch goes on top of Alon smartcard series. --- libcacard/vcard_emul_nss.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH v3 13/28] libcacard: remove default libcoolkey loading

2013-04-22 Thread Alon Levy
From: Marc-André Lureau marcandre.lur...@gmail.com Use only the modules defined in the NSS database. --- libcacard/vcard_emul_nss.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index 6b1ca8a..9ba80fb

[Qemu-devel] [PATCH v3 05/28] libcacard: use system config directory for nss db on win32

2013-04-22 Thread Alon Levy
From: Marc-André Lureau marcandre.lur...@gmail.com It's a bit nicer to look for default database under CSIDL_COMMON_APPDATA\pki\nss rather that /etc/pki/nss. Signed-off-by: Marc-André Lureau marcandre.lur...@redhat.com --- libcacard/vcard_emul_nss.c | 18 +- 1 file changed, 17

[Qemu-devel] [PATCH v3 14/28] dev-smartcard-reader: white space fixes

2013-04-22 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- hw/usb/dev-smartcard-reader.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index db8ce02..57eb803 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c

[Qemu-devel] [PATCH v3 17/28] dev-smartcard-reader: support windows guest

2013-04-22 Thread Alon Levy
By not advertising USB wakeup support (which we don't). Signed-off-by: Alon Levy al...@redhat.com --- hw/usb/dev-smartcard-reader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 6133edf..38c3c0e 100644

[Qemu-devel] [PATCH v3 11/28] libcacard: teach vscclient to use GMainLoop for portability

2013-04-22 Thread Alon Levy
From: Marc-André Lureau marcandre.lur...@gmail.com This version handles non-blocking sending and receiving from the socket. Signed-off-by: Marc-André Lureau marcandre.lur...@redhat.com --- libcacard/vscclient.c | 391 +++--- 1 file changed, 246

[Qemu-devel] [PATCH v3 19/28] libcacard: change default ATR

2013-04-22 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- libcacard/vcardt.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libcacard/vcardt.h b/libcacard/vcardt.h index 538bdde..3b9a619 100644 --- a/libcacard/vcardt.h +++ b/libcacard/vcardt.h @@ -26,9 +26,17 @@ typedef

[Qemu-devel] [PATCH v3 16/28] dev-smartcard-reader: remove aborts (never triggered, but just in case)

2013-04-22 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- hw/usb/dev-smartcard-reader.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 6653619..6133edf 100644 --- a/hw/usb/dev-smartcard-reader.c

[Qemu-devel] [PATCH v3 20/28] ccid-card-passthru: add atr check

2013-04-22 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- hw/usb/ccid-card-passthru.c | 59 + 1 file changed, 59 insertions(+) diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index 275b887..16d51c9 100644 --- a/hw/usb/ccid-card-passthru.c

[Qemu-devel] [PATCH v3 22/28] dev-smartcard-reader: define structs for CCID_Parameter internals

2013-04-22 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- hw/usb/dev-smartcard-reader.c | 74 +++ 1 file changed, 47 insertions(+), 27 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 35f234e..0d482a9 100644 --- a/hw/usb

[Qemu-devel] [PATCH v3 25/28] libcacard/vreader: add debugging messages for apdu

2013-04-22 Thread Alon Levy
Using g_debug with log domain libcacard Signed-off-by: Alon Levy al...@redhat.com --- libcacard/cac.c | 7 - libcacard/cac.h | 8 ++ libcacard/vreader.c | 77 + 3 files changed, 85 insertions(+), 7 deletions(-) diff --git

[Qemu-devel] [PATCH v3 21/28] ccid-card-passthru, dev-smartcard-reader: add debug environment variables

2013-04-22 Thread Alon Levy
namespace, i.e: domain type='kvm' id='3' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0' qemu:commandline qemu:env name='QEMU_CCID_PASSTHRU_DEBUG' value='4'/ qemu:env name='QEMU_CCID_DEBUG' value='4'/ /qemu:commandline /domain Signed-off-by: Alon Levy al...@redhat.com --- hw

[Qemu-devel] [PATCH v3 10/28] libcacard: vscclient to use QemuThread for portability

2013-04-22 Thread Alon Levy
From: Marc-André Lureau marcandre.lur...@redhat.com --- libcacard/vscclient.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index 5e00db3..5f47634 100644 --- a/libcacard/vscclient.c +++ b/libcacard/vscclient.c @@ -218,8

[Qemu-devel] [PATCH v3 01/28] libcacard: correct T0 historical bytes size

2013-04-22 Thread Alon Levy
From: Marc-André Lureau marcandre.lur...@gmail.com The VCARD_ATR_PREFIX macro adds a prefix of 6 characters only. pcsc_scan was complaining before the patch: + Historical bytes: 56 43 41 52 44 5F 4E 53 53 ERROR! ATR is truncated: 2 byte(s) is/are missing --- libcacard/vcardt.h | 2 +- 1 file

[Qemu-devel] [PATCH v3 15/28] dev-smartcard-reader: nicer debug messages

2013-04-22 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- hw/usb/dev-smartcard-reader.c | 69 +++ 1 file changed, 63 insertions(+), 6 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 57eb803..6653619 100644 --- a/hw/usb/dev

[Qemu-devel] [PATCH v3 26/28] libcacard: move atr setting from macro to function

2013-04-22 Thread Alon Levy
Only because qemu's checkpatch complains about it. Signed-off-by: Alon Levy al...@redhat.com --- Makefile.objs | 1 + libcacard/vcard_emul_nss.c | 14 +++--- libcacard/vcardt.c | 40 libcacard/vcardt.h | 13

[Qemu-devel] [PATCH v3 27/28] dev-smartcard-reader: empty implementation for Mechanical (fail correctly)

2013-04-22 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- hw/usb/dev-smartcard-reader.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 78ef504..125cc2c 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c

[Qemu-devel] [PATCH v3 18/28] dev-smartcard-reader: reuse usb.h definitions

2013-04-22 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- hw/usb/dev-smartcard-reader.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 38c3c0e..98f3be1 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b

[Qemu-devel] [PATCH v3 23/28] dev-smartcard-reader: change default protocol to T=0

2013-04-22 Thread Alon Levy
We don't support T=1 so we shouldn't advertise it by default. Two independent changes: * Default ATR sets T=0. This gets overwritten by the client provided ATR later. * Class descriptor changes dwAdvertise dwProtocols. to 0x1 and dwProtocols.=0 per spec. Signed-off-by: Alon Levy al

[Qemu-devel] [PATCH v3 28/28] libcacard/cac: change big switch functions to single return point

2013-04-22 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- libcacard/cac.c | 73 - 1 file changed, 52 insertions(+), 21 deletions(-) diff --git a/libcacard/cac.c b/libcacard/cac.c index 5864539..7a06b5a 100644 --- a/libcacard/cac.c +++ b/libcacard/cac.c

[Qemu-devel] [PATCH v3 09/28] libcacard: split vscclient main() from socket reading

2013-04-22 Thread Alon Levy
From: Marc-André Lureau marcandre.lur...@redhat.com --- libcacard/vscclient.c | 314 ++ 1 file changed, 162 insertions(+), 152 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index 9b744f2..5e00db3 100644 ---

[Qemu-devel] [PATCH v3 24/28] dev-smartcard-reader: copy atr protocol to ccid parameters

2013-04-22 Thread Alon Levy
Adds todos. Signed-off-by: Alon Levy al...@redhat.com --- hw/usb/dev-smartcard-reader.c | 45 +++ 1 file changed, 45 insertions(+) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 8022f9f..78ef504 100644 --- a/hw/usb/dev

Re: [Qemu-devel] [PATCH v2 00/10] ccid and libcacard fixes for windows/mingw

2013-04-17 Thread Alon Levy
On Mon, 2013-04-15 at 15:31 +0200, Marc-André Lureau wrote: Hi On Wed, Mar 27, 2013 at 9:36 PM, Alon Levy al...@redhat.com wrote: This series: 1. fixes windows guests to show the ccid device 2. changes libcacard to use glib 3. makes libcacard build under

Re: [Qemu-devel] [PATCH] ccid: Fix crash when backend isn't specified

2013-04-15 Thread Alon Levy
On Sun, 2013-04-14 at 16:06 -0400, Cole Robinson wrote: Reproducer: ./x86_64-softmmu/qemu-system-x86_64 -device usb-ccid,id=ccid0 -usb -device ccid-card-emulated -monitor stdio ACK, thanks. Marc-Andre, could you review the fixed patches I sent previously, and then I can put this on top

Re: [Qemu-devel] [PATCH 18/26] hw/usb/dev-smartcard-reader.c: copy atr's protocol to ccid's parameters (adds todo's)

2013-03-27 Thread Alon Levy
On Fri, Mar 22, 2013 at 03:23:15PM +0100, Marc-André Lureau wrote: Hi, On Mon, Mar 18, 2013 at 2:11 PM, Alon Levy al...@redhat.com wrote: +if (atr_protocol_num == 0) { +DPRINTF(s, D_WARN, %s: error: unimplemented ATR T0 parameters + setting\n, __func__

[Qemu-devel] [PATCH v2 00/10] ccid and libcacard fixes for windows/mingw

2013-03-27 Thread Alon Levy
Andre's comments. Please look at the g_debug one, I'm not sure about the ifdeffery there (not if it works, but if it looks ok). Alon Levy (10): libcacard: change default ATR ccid-card-passthru: add atr check ccid-card-passthru, dev-smartcard-reader: add debug environment variables dev

[Qemu-devel] [PATCH v2 01/10] libcacard: change default ATR

2013-03-27 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- libcacard/vcardt.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libcacard/vcardt.h b/libcacard/vcardt.h index 538bdde..3b9a619 100644 --- a/libcacard/vcardt.h +++ b/libcacard/vcardt.h @@ -26,9 +26,17 @@ typedef

[Qemu-devel] [PATCH v2 02/10] ccid-card-passthru: add atr check

2013-03-27 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- hw/ccid-card-passthru.c | 59 + 1 file changed, 59 insertions(+) diff --git a/hw/ccid-card-passthru.c b/hw/ccid-card-passthru.c index 3566e55..111894f 100644 --- a/hw/ccid-card-passthru.c +++ b/hw/ccid

[Qemu-devel] [PATCH v2 05/10] dev-smartcard-reader: change default protocol to T=0

2013-03-27 Thread Alon Levy
We don't support T=1 so we shouldn't advertise it by default. Two independent changes: * Default ATR sets T=0. This gets overwritten by the client provided ATR later. * Class descriptor changes dwAdvertise dwProtocols. to 0x1 and dwProtocols.=0 per spec. Signed-off-by: Alon Levy al

[Qemu-devel] [PATCH v2 08/10] libcacard: move atr setting from macro to function

2013-03-27 Thread Alon Levy
Only because qemu's checkpatch complains about it. Signed-off-by: Alon Levy al...@redhat.com --- Makefile.objs | 1 + libcacard/vcard_emul_nss.c | 14 +++--- libcacard/vcardt.c | 40 libcacard/vcardt.h | 13

[Qemu-devel] [PATCH v2 04/10] dev-smartcard-reader: define structs for CCID_Parameter internals

2013-03-27 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- hw/usb/dev-smartcard-reader.c | 74 +++ 1 file changed, 47 insertions(+), 27 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 751bd04..014c0b1 100644 --- a/hw/usb

[Qemu-devel] [PATCH v2 06/10] dev-smartcard-reader: copy atr protocol to ccid parameters

2013-03-27 Thread Alon Levy
Adds todos. Signed-off-by: Alon Levy al...@redhat.com --- hw/usb/dev-smartcard-reader.c | 45 +++ 1 file changed, 45 insertions(+) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index bb96f02..7040e8d 100644 --- a/hw/usb/dev

[Qemu-devel] [PATCH v2 07/10] libcacard/vreader: add debugging messages for apdu

2013-03-27 Thread Alon Levy
Using g_debug with log domain libcacard Signed-off-by: Alon Levy al...@redhat.com --- libcacard/cac.c | 7 - libcacard/cac.h | 8 ++ libcacard/vreader.c | 77 + 3 files changed, 85 insertions(+), 7 deletions(-) diff --git

  1   2   3   4   5   6   7   8   9   10   >