[Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-29 Thread Michael Tokarev
Replace QemuMutex with GMutex and QemuCond with GCond (with corresponding function changes), to make libcacard independent of qemu internal functions. Also replace single instance pstrcpy() in vcard_emul_nss.c to strncpy(). This reverts commit 2e679780ae86c6ca8. After this step, none of

[Qemu-devel] [PATCH 1/5] do not call g_thread_init() for glib = 2.31

2014-04-29 Thread Michael Tokarev
glib = 2.31 always enables thread support and g_thread_supported() is #defined to 1, there's no need to call g_thread_init() anymore, and it definitely does not need to report error which never happens. Keep code for old 2.31 glibc anyway for now, just #ifdef it differently. Signed-off-by:

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

2014-04-29 Thread Michael Tokarev
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, -export-symbols, to actually get the right export list. Signed-off-by: Michael Tokarev

[Qemu-devel] [PATCH 3/5] vscclient: use glib thread primitives not qemu

2014-04-29 Thread Michael Tokarev
Use glib-provided thread primitives in vscclient, not qemu thread primitives. This way, vscclient becomes more stand-alone. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- libcacard/vscclient.c | 75 + 1 file changed, 44 insertions(+), 31

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

2014-04-29 Thread Michael Tokarev
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 were sufficiently different to warrant large ifdeffery across all code using it. Here's a patchset which tries to clean usage of glib

[Qemu-devel] [PATCH 2/5] glib-compat.h: add new thread API emulation on top of pre-2.31 API

2014-04-29 Thread Michael Tokarev
Thread API changed in glib-2.31 significantly. Before that version, conditionals and mutexes were only allocated dynamically, using _new()/_free() interface. in 2.31 and up, they're allocated statically as regular variables, and old interface is deprecated. (Note: glib docs says the new

Re: [Qemu-devel] [PATCH 1/3] megasas: add MegaRAID SAS 2108 emulation

2014-04-29 Thread Hannes Reinecke
On 04/28/2014 05:20 PM, Andreas Färber wrote: Am 28.04.2014 15:01, schrieb Hannes Reinecke: The 2108 chip supports MSI and MSI-X, so update the emulation to support both chips. Signed-off-by: Hannes Reinecke h...@suse.de --- hw/scsi/megasas.c| 138

[Qemu-devel] [PATCH] configure: Enable dead code (lzo, snappy, quorum)

2014-04-29 Thread Stefan Weil
Those options were not enabled by default, even when the build environment would have supported them, so the corresponding code was not compiled in normal test builds like on build bots. Signed-off-by: Stefan Weil s...@weilnetz.de --- I'm not sure whether this patch is trivial enough for

Re: [Qemu-devel] [patch 2/2] target-i386: block migration and savevm if invariant tsc is exposed

2014-04-29 Thread Paolo Bonzini
Il 28/04/2014 21:23, Eduardo Habkost ha scritto: Makes sense. Basically -cpu host,migratable=yes is close to libvirt's host-model and Alex Graf's proposed -cpu best. Should we call it -cpu best and drop migratability of -cpu host? -cpu best is different from the modes above. It means use

[Qemu-devel] [PATCH] qga: Fix typo (plural) in comment

2014-04-29 Thread Stefan Weil
Signed-off-by: Stefan Weil s...@weilnetz.de --- qga/main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/main.c b/qga/main.c index d838c3e..38219c9 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1110,7 +1110,7 @@ int main(int argc, char **argv) if

[Qemu-devel] [PATCH 4/3] qemu-socket: Clean up inet_connect_opts()

2014-04-29 Thread Markus Armbruster
Separate the search for a working addrinfo from the code that does something with it. Makes for a clearer search loop. Use a local Error * to simplify resetting the error in the search loop. Signed-off-by: Markus Armbruster arm...@redhat.com --- Forgot to include this one. inet_connect_opts()

Re: [Qemu-devel] [PATCH] Makefile: Fix per-object variables for Makefile.target

2014-04-29 Thread Paolo Bonzini
Il 29/04/2014 05:29, Fam Zheng ha scritto: The compiling is done in a subdir, so the extraction of per-object libs and cflags are referencing objects with ../ prefixed. So prefix the per-object variables foo.o-cflags and foo.o-libs to ../foo.o-cflags and ../foo.o-libs. Signed-off-by: Fam

Re: [Qemu-devel] [PATCH 4/3] qemu-socket: Clean up inet_connect_opts()

2014-04-29 Thread Markus Armbruster
In-Reply-To missing, sorry! Markus Armbruster arm...@redhat.com writes: Separate the search for a working addrinfo from the code that does something with it. Makes for a clearer search loop. Use a local Error * to simplify resetting the error in the search loop. Signed-off-by: Markus

Re: [Qemu-devel] [PATCH] MAINTAINERS: addresses for responsible disclosure

2014-04-29 Thread Michael S. Tsirkin
On Mon, Apr 28, 2014 at 09:00:40PM +, Liguori, Anthony wrote: I think this is a bit overkill. Hmm to clarify, this forces people to send info about 0 day exploits over the internet in cleartext. What do we get in return for sacrificing the privacy? A small convenience of not typing in 3

Re: [Qemu-devel] [PATCH] configure: Enable dead code (lzo, snappy, quorum)

2014-04-29 Thread qiaonuohan
On 04/29/2014 02:21 PM, Stefan Weil wrote: Those options were not enabled by default, even when the build environment would have supported them, so the corresponding code was not compiled in normal test builds like on build bots. Signed-off-by: Stefan Weils...@weilnetz.de Reviewed-by: Qiao

[Qemu-devel] E1000 emulation in QEMU (address range)

2014-04-29 Thread Ayaz Akram
Hi !! Can anyone tell me, what IO and mem address range is used by e1000 emulation in QEMU ??

Re: [Qemu-devel] KVM call agenda for 2014-04-28

2014-04-29 Thread Michael S. Tsirkin
On Mon, Apr 28, 2014 at 05:34:34PM +0200, Markus Armbruster wrote: Juan Quintela quint...@redhat.com writes: Hi Please, send any topic that you are interested in covering. [...] I'd like to have these things settled sooner than five minutes before the scheduled hour, so here goes:

[Qemu-devel] [Bug 1313816] Re: qemu should close sound device when no more needs.

2014-04-29 Thread Michael Tokarev
This will not work if qemu is chrooted, because audio devices (/dev) aren't usually available there. So at least a naive approach should not be used. If nothing else, it should be an option. But really, with pulseaudio backend, there should be no need to go this route and to add new code. --

Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-29 Thread Gerd Hoffmann
On Mo, 2014-04-28 at 11:00 -0400, Mike Day wrote: When the deprecated -nographic option is used with the -mon option in readline mode, qemu will create a second character device for stdio and place it over the stdio chardev put into place by the -mon option. This causes the terminal to stop

Re: [Qemu-devel] [PATCH] linux-user: avoid using glibc internals

2014-04-29 Thread Natanael Copa
On Wed, 23 Apr 2014 19:00:41 +0100 Peter Maydell peter.mayd...@linaro.org wrote: On 23 April 2014 15:59, Natanael Copa nc...@alpinelinux.org wrote: Avoid using glibc specific internals. Calculate the sigevent pad size is calculated in similar way as kernel does it. This is needed for

Re: [Qemu-devel] [PATCH] Makefile: Fix per-object variables for Makefile.target

2014-04-29 Thread Fam Zheng
On Tue, 04/29 08:29, Paolo Bonzini wrote: Il 29/04/2014 05:29, Fam Zheng ha scritto: The compiling is done in a subdir, so the extraction of per-object libs and cflags are referencing objects with ../ prefixed. So prefix the per-object variables foo.o-cflags and foo.o-libs to

[Qemu-devel] [PATCH] mirror: Fix resource leak when bdrv_getlength fails

2014-04-29 Thread Fam Zheng
The direct return will skip releasing of all the resouces at immediate_exit, don't miss that. Signed-off-by: Fam Zheng f...@redhat.com --- block/mirror.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index 2618c37..56dfee2 100644 ---

[Qemu-devel] [PATCH v3] mirror: Check for bdrv_get_info result

2014-04-29 Thread Fam Zheng
bdrv_get_info could fail. Add check before using the returned value. Signed-off-by: Fam Zheng f...@redhat.com --- v3: Don't leak things, jump to immediate_exit. (Kevin) Signed-off-by: Fam Zheng f...@redhat.com --- block/mirror.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH] linux-user: avoid using glibc internals in _syscall5 and in definition of target_sigevent struct

2014-04-29 Thread Natanael Copa
Use the public sigset_t instead of the glibc specific internal __sigset_t in _syscall. Calculate the sigevent pad size is calculated in similar way as kernel does it instead of using glibc internal field _pad. This is needed for building with musl libc. Signed-off-by: Natanael Copa

Re: [Qemu-devel] [PATCH 3/5] vscclient: use glib thread primitives not qemu

2014-04-29 Thread Christophe Fergeau
Hey, On Tue, Apr 29, 2014 at 10:02:26AM +0400, Michael Tokarev wrote: Use glib-provided thread primitives in vscclient, not qemu thread primitives. This way, vscclient becomes more stand-alone. For what it's worth, this patch has a few non-threading related bits in it because of the removal

Re: [Qemu-devel] [PATCH 3/5] vscclient: use glib thread primitives not qemu

2014-04-29 Thread Michael Tokarev
29.04.2014 12:03, Christophe Fergeau wrote: Hey, On Tue, Apr 29, 2014 at 10:02:26AM +0400, Michael Tokarev wrote: Use glib-provided thread primitives in vscclient, not qemu thread primitives. This way, vscclient becomes more stand-alone. For what it's worth, this patch has a few

Re: [Qemu-devel] [PATCH 1/5] do not call g_thread_init() for glib = 2.31

2014-04-29 Thread Christophe Fergeau
On Tue, Apr 29, 2014 at 10:02:24AM +0400, Michael Tokarev wrote: glib = 2.31 always enables thread support and g_thread_supported() is #defined to 1, there's no need to call g_thread_init() anymore, and it definitely does not need to report error which never happens. Keep code for old 2.31

Re: [Qemu-devel] [PATCH 23/35] acpi:piix4: make plug/unlug callbacks generic

2014-04-29 Thread Paolo Bonzini
Il 07/04/2014 17:36, Michael S. Tsirkin ha scritto: * What if there would be more handlers that could or should handle event for device? That's actually very useful. We could scan top to bottom so e.g. acpi can intercept bridges. Be careful about top to bottom. Does top-to-bottom mean

Re: [Qemu-devel] [PATCH 23/35] acpi:piix4: make plug/unlug callbacks generic

2014-04-29 Thread Michael S. Tsirkin
On Tue, Apr 29, 2014 at 10:12:34AM +0200, Paolo Bonzini wrote: Il 07/04/2014 17:36, Michael S. Tsirkin ha scritto: * What if there would be more handlers that could or should handle event for device? That's actually very useful. We could scan top to bottom so e.g. acpi can intercept

Re: [Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-29 Thread Christophe Fergeau
Hey, patch looks good On Tue, Apr 29, 2014 at 10:02:27AM +0400, Michael Tokarev wrote: Replace QemuMutex with GMutex and QemuCond with GCond (with corresponding function changes), to make libcacard independent of qemu internal functions. Also replace single instance pstrcpy() in

Re: [Qemu-devel] [PATCH 23/35] acpi:piix4: make plug/unlug callbacks generic

2014-04-29 Thread Michael S. Tsirkin
On Fri, Apr 11, 2014 at 09:40:19PM -0400, Paolo Bonzini wrote: Il 07/04/2014 11:19, Michael S. Tsirkin ha scritto: This means we can't cleanly implement an option for guest to disable ACPI and switch to native if supported, like the ACPI spec allows. If we change hotplug code to walk the

Re: [Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-29 Thread Paolo Bonzini
Il 29/04/2014 10:26, Christophe Fergeau ha scritto: Replace QemuMutex with GMutex and QemuCond with GCond (with corresponding function changes), to make libcacard independent of qemu internal functions. Also replace single instance pstrcpy() in vcard_emul_nss.c to strncpy(). This reverts

Re: [Qemu-devel] [PATCH] linux-user: avoid using glibc internals

2014-04-29 Thread Natanael Copa
On Wed, 23 Apr 2014 19:00:41 +0100 Peter Maydell peter.mayd...@linaro.org wrote: On 23 April 2014 15:59, Natanael Copa nc...@alpinelinux.org wrote: Avoid using glibc specific internals. Calculate the sigevent pad size is calculated in similar way as kernel does it. This is needed for

Re: [Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-29 Thread Michael Tokarev
29.04.2014 12:38, Paolo Bonzini wrote: Il 29/04/2014 10:26, Christophe Fergeau ha scritto: Replace QemuMutex with GMutex and QemuCond with GCond (with corresponding function changes), to make libcacard independent of qemu internal functions. Also replace single instance pstrcpy() in

[Qemu-devel] [PATCH 0/2] usb: mtp: incremental fixes

2014-04-29 Thread Gerd Hoffmann
Hi, Resending updates for the two mtp patches which has review comments. cheers, Gerd Gerd Hoffmann (2): usb: mtp: fix possible buffer overflow usb: mtp: reply INCOMPLETE_TRANSFER on read errors hw/usb/dev-mtp.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) --

[Qemu-devel] [PATCH 2/2] usb: mtp: reply INCOMPLETE_TRANSFER on read errors

2014-04-29 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/dev-mtp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 62428d8..943f930 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -50,6 +50,7 @@ enum mtp_code {

[Qemu-devel] [PATCH 1/2] usb: mtp: fix possible buffer overflow

2014-04-29 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/dev-mtp.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index b6eaeae..62428d8 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -998,6 +998,14 @@ static void

Re: [Qemu-devel] [PATCH 23/35] acpi:piix4: make plug/unlug callbacks generic

2014-04-29 Thread Paolo Bonzini
Il 29/04/2014 09:25, Michael S. Tsirkin ha scritto: But to repeat what I was saying, this check (that object passed in is a PCI DEVICE) belongs in acpi_pcihp_device_plug_cb and should not be piix specific, I don't want to duplicate this logic in q35 later. Similar checks should be added in

Re: [Qemu-devel] [PATCH] block: Add '--version' option to qemu-img

2014-04-29 Thread Kevin Wolf
Am 28.04.2014 um 20:37 hat Jeff Cody geschrieben: This allows qemu-img to print out version information, without needing to print the long help wall of text. While there, perform some minor whitespace cleanup, and remove the unused option_index variable in the call to getopt_long().

Re: [Qemu-devel] KVM call agenda for 2014-04-28

2014-04-29 Thread Alexander Graf
On 28.04.2014, at 17:34, Markus Armbruster arm...@redhat.com wrote: Juan Quintela quint...@redhat.com writes: Hi Please, send any topic that you are interested in covering. [...] I'd like to have these things settled sooner than five minutes before the scheduled hour, so here goes:

Re: [Qemu-devel] KVM call agenda for 2014-04-28

2014-04-29 Thread Peter Maydell
On 29 April 2014 06:51, Michael S. Tsirkin m...@redhat.com wrote: If not too late, I'd like to discuss our security process. Do we as the project generally agree to use responsible disclosure policy http://en.wikipedia.org/wiki/Responsible_disclosure ? I think something like that makes sense.

Re: [Qemu-devel] [PATCHv2 RESEND] block/iscsi: speed up read for unallocated sectors

2014-04-29 Thread Peter Lieven
Am 28.04.2014 16:56, schrieb Paolo Bonzini: Il 28/04/2014 16:41, Peter Lieven ha scritto: What if opt_unmap_gran is 32K or lower? In this case you're not using an allocationmap. As written I am fine with lowering this to 4K. Follow-Up or v3? Follow up is okay. 2 follow ups send. I

[Qemu-devel] [PULL 0/1] hda-audio: fix non-mixer codecs

2014-04-29 Thread Gerd Hoffmann
Hi, pretty short audio patch queue, featuring a single hda-audio fix. please pull, Gerd The following changes since commit e2da502c003b9a91b4aea7684959192bd07c1f1d: Merge remote-tracking branch 'remotes/otubo/seccomp' into staging (2014-04-28 14:14:35 +0100) are available in the git

[Qemu-devel] [PULL 1/1] hda-audio: fix non-mixer codecs

2014-04-29 Thread Gerd Hoffmann
They don't advertise mixer support, but still allow the guest change mixer settings. Add a check to avoid it. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/audio/hda-codec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index

[Qemu-devel] [PATCH V26 01/32] QemuOpts: move find_desc_by_name ahead for later calling

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Chunyan Liu cy...@suse.com --- util/qemu-option.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/util/qemu-option.c b/util/qemu-option.c

[Qemu-devel] [PATCH V26 03/32] QemuOpts: repurpose qemu_opts_print to replace print_option_parameters

2014-04-29 Thread Chunyan Liu
Currently this function is not used anywhere. In later patches, it will replace print_option_parameters. To avoid print info changes, change qemu_opts_print from fprintf stderr to printf to keep consistent with print_option_parameters, remove last printf and print size/number with opt-value.uint

Re: [Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-29 Thread Paolo Bonzini
Il 29/04/2014 10:42, Michael Tokarev ha scritto: Also replace single instance pstrcpy() in vcard_emul_nss.c to strncpy(). This reverts commit 2e679780ae86c6ca8. An alternative would be to use g_strlcpy which guarantees nul-termination. Yes, that is better. Actually in this very place

[Qemu-devel] [PATCH V26 05/32] QemuOpts: change opt-name|str from (const char *) to (char *)

2014-04-29 Thread Chunyan Liu
qemu_opt_del() already assumes that all QemuOpt instances contain malloc'd name and value; but it had to cast away const because opts_start_struct() was doing its own thing and using static storage instead. By using the correct type and malloced strings everywhere, the usage of this struct

[Qemu-devel] [PATCH V26 00/32] replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
This patch series is to replace QEMUOptionParameter with QemuOpts, so that only one Qemu Option structure is kept in QEMU code. --- Changes to v25: * split v25 2/31 (add def_value_str to QemuOptDesc) into two patches: 1st patch adds def_value_str, 2nd patch repurpose qemu_opts_print. *

[Qemu-devel] [PATCH V26 08/32] QemuOpts: add qemu_opts_print_help to replace print_option_help

2014-04-29 Thread Chunyan Liu
print_option_help takes QEMUOptionParameter as parameter, add qemu_opts_print_help to take QemuOptsList as parameter for later replace work. Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com ---

[Qemu-devel] [PATCH V26 10/32] QemuOpts: add qemu_opts_append to replace append_option_parameters

2014-04-29 Thread Chunyan Liu
For later merge .create_opts of drv and proto_drv in qemu-img commands. Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Leandro Dorileo l...@dorileo.org Signed-off-by: Chunyan Liu cy...@suse.com --- include/qemu/option.h | 5

[Qemu-devel] [PATCH V26 04/32] qapi: output def_value_str when query command line options

2014-04-29 Thread Chunyan Liu
Change qapi interfaces to output the newly added def_value_str when querying command line options. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- Changes to V25: * update @default description in .json file qapi-schema.json | 5 -

[Qemu-devel] [PATCH V26 07/32] QemuOpts: add qemu_opt_get_*_del functions for replace work

2014-04-29 Thread Chunyan Liu
Add qemu_opt_get_del, qemu_opt_get_bool_del, qemu_opt_get_number_del and qemu_opt_get_size_del to replace the same handling of QEMUOptionParameter (get and delete). Several drivers are coded to parse a known subset of options, then remove them from the list before handing all remaining options to

[Qemu-devel] [PATCH V26 02/32] QemuOpts: add def_value_str to QemuOptDesc

2014-04-29 Thread Chunyan Liu
Add def_value_str (default value) to QemuOptDesc, to replace function of the default value in QEMUOptionParameter. Improve qemu_opts_get_* functions: if find opt, return opt-str; otherwise, if desc-def_value_str is set, return desc-def_value_str; otherwise, return input defval. Improve

[Qemu-devel] [PATCH V26 09/32] QemuOpts: add conversion between QEMUOptionParameter to QemuOpts

2014-04-29 Thread Chunyan Liu
Add two temp conversion functions between QEMUOptionParameter to QemuOpts, so that next patch can use it. It will simplify later patch for easier review. And will be finally removed after all backend drivers switch to QemuOpts. Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Eric

[Qemu-devel] [PATCH V26 11/32] QemuOpts: check NULL input for qemu_opts_del

2014-04-29 Thread Chunyan Liu
To simplify later using of qemu_opts_del, accept NULL input. Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Chunyan Liu cy...@suse.com --- util/qemu-option.c | 4 1 file changed, 4 insertions(+) diff --git a/util/qemu-option.c

[Qemu-devel] [PATCH V26 15/32] gluster.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- Changes to V25: * fix create_opts, OPT_STRING - QEMU_OPT_STRING block/gluster.c | 81 ++--- 1 file changed, 42 insertions(+), 39 deletions(-)

[Qemu-devel] [PATCH V26 12/32] change block layer to support both QemuOpts and QEMUOptionParamter

2014-04-29 Thread Chunyan Liu
Change block layer to support both QemuOpts and QEMUOptionParameter. After this patch, it will change backend drivers one by one. At the end, QEMUOptionParameter will be removed and only QemuOpts is kept. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu

[Qemu-devel] [PATCH V26 06/32] QemuOpts: move qemu_opt_del ahead for later calling

2014-04-29 Thread Chunyan Liu
In later patch, qemu_opt_get_del functions will be added, they will first get the option value, then call qemu_opt_del to remove the option from opt list. To prepare for that purpose, move qemu_opt_del ahead first. Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Chunyan Liu

[Qemu-devel] [PATCH V26 24/32] rbd.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/rbd.c | 63 + 1 file changed, 30 insertions(+), 33 deletions(-) diff --git

[Qemu-devel] [PATCH V26 18/32] qcow.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/qcow.c | 72 ++-- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git

[Qemu-devel] [PATCH V26 14/32] cow.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/cow.c | 54 ++ 1 file changed, 26

[Qemu-devel] [PATCH V26 20/32] qed.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
One extra change is to define QED_DEFAULT_CLUSTER_SIZE = 65536 instead of 64 * 1024; because: according to existing create_options, cluster size has default value = QED_DEFAULT_CLUSTER_SIZE, after switching to create_opts, this has to be stringized and set to .def_value_str. That is,

[Qemu-devel] [PATCH V26 16/32] iscsi.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/iscsi.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/block/iscsi.c

[Qemu-devel] [PATCH V26 21/32] raw-posix.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/raw-posix.c | 59 +-- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git

[Qemu-devel] [PATCH V26 28/32] vhdx.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/vhdx.c | 99 +--- block/vhdx.h | 1 + 2 files changed, 48 insertions(+), 52

[Qemu-devel] [PATCH V26 23/32] raw_bsd.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/raw_bsd.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/block/raw_bsd.c b/block/raw_bsd.c

[Qemu-devel] [PATCH V26 25/32] sheepdog.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/sheepdog.c | 108 --- 1 file changed, 55 insertions(+), 53 deletions(-) diff --git

[Qemu-devel] [PATCH V26 19/32] qcow2.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/qcow2.c | 265 +++--- include/qemu/option.h | 1 + util/qemu-option.c| 2 +- 3 files changed, 143 insertions(+), 125 deletions(-)

[Qemu-devel] [PATCH V26 27/32] vdi.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/vdi.c | 73 + 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index 820cd37..950cf46

[Qemu-devel] [PATCH V26 17/32] nfs.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- block/nfs.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 9fa831f..8633c04 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -357,20 +357,14 @@ static int nfs_file_open(BlockDriverState

Re: [Qemu-devel] [PATCH 3/4] target-ppc: ppc can be either endian

2014-04-29 Thread Alexander Graf
On 28.04.14 14:47, Andreas Färber wrote: [fixing Bharata's address] Am 28.04.2014 13:29, schrieb Greg Kurz: POWER7, POWER7+ and POWER8 families use the ILE bit of the LPCR special purpose register to decide the endianness to use when entering interrupt handlers. When running a linux guest,

[Qemu-devel] [PATCH V26 29/32] vmdk.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/vmdk.c | 123 ++- 1 file changed, 63 insertions(+), 60 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 4/3] qemu-socket: Clean up inet_connect_opts()

2014-04-29 Thread Paolo Bonzini
Il 29/04/2014 08:28, Markus Armbruster ha scritto: Separate the search for a working addrinfo from the code that does something with it. Makes for a clearer search loop. Use a local Error * to simplify resetting the error in the search loop. Signed-off-by: Markus Armbruster arm...@redhat.com

Re: [Qemu-devel] [PATCH 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-04-29 Thread Alexander Graf
On 28.04.14 13:29, Greg Kurz wrote: From: Bharata B Rao bhar...@linux.vnet.ibm.com Make DumpState and endian conversion routines available for arch-specific dump code by moving into dump.h. DumpState will be needed by arch-specific dump code to access target endian information from

[Qemu-devel] [PATCH V26 26/32] ssh.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/ssh.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index

[Qemu-devel] [PATCH V26 30/32] vpc.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/vpc.c | 62 + 1 file changed, 34 insertions(+), 28 deletions(-) diff --git

[Qemu-devel] [PATCH v2] target-ppc: ppc can be either endian

2014-04-29 Thread Greg Kurz
POWER7, POWER7+ and POWER8 families use the ILE bit of the LPCR special purpose register to decide the endianness to use when entering interrupt handlers. When running a Linux guest, this provides a hint on the endianness used by the kernel. From a QEMU point of view, the information is needed for

Re: [Qemu-devel] [PATCHv2 RESEND] block/iscsi: speed up read for unallocated sectors

2014-04-29 Thread Paolo Bonzini
Il 29/04/2014 10:57, Peter Lieven ha scritto: Am 28.04.2014 16:56, schrieb Paolo Bonzini: Il 28/04/2014 16:41, Peter Lieven ha scritto: What if opt_unmap_gran is 32K or lower? In this case you're not using an allocationmap. As written I am fine with lowering this to 4K. Follow-Up or v3?

Re: [Qemu-devel] [PATCH 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-04-29 Thread Greg Kurz
On Tue, 29 Apr 2014 11:16:51 +0200 Alexander Graf ag...@suse.de wrote: On 28.04.14 13:29, Greg Kurz wrote: From: Bharata B Rao bhar...@linux.vnet.ibm.com Make DumpState and endian conversion routines available for arch-specific dump code by moving into dump.h. DumpState will be

Re: [Qemu-devel] [PATCH v2] target-ppc: ppc can be either endian

2014-04-29 Thread Alexander Graf
On 29.04.14 11:15, Greg Kurz wrote: POWER7, POWER7+ and POWER8 families use the ILE bit of the LPCR special purpose register to decide the endianness to use when entering interrupt handlers. When running a Linux guest, this provides a hint on the endianness used by the kernel. From a QEMU point

Re: [Qemu-devel] [PATCH 3/4] target-ppc: ppc can be either endian

2014-04-29 Thread Greg Kurz
On Tue, 29 Apr 2014 11:14:12 +0200 Alexander Graf ag...@suse.de wrote: On 28.04.14 14:47, Andreas Färber wrote: [fixing Bharata's address] Am 28.04.2014 13:29, schrieb Greg Kurz: POWER7, POWER7+ and POWER8 families use the ILE bit of the LPCR special purpose register to decide the

[Qemu-devel] [PATCH V26 14/32] cow.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/cow.c | 54 ++ 1 file changed, 26

[Qemu-devel] [PATCH V26 24/32] rbd.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/rbd.c | 63 + 1 file changed, 30 insertions(+), 33 deletions(-) diff --git

[Qemu-devel] [PATCH V26 06/32] QemuOpts: move qemu_opt_del ahead for later calling

2014-04-29 Thread Chunyan Liu
In later patch, qemu_opt_get_del functions will be added, they will first get the option value, then call qemu_opt_del to remove the option from opt list. To prepare for that purpose, move qemu_opt_del ahead first. Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Chunyan Liu

[Qemu-devel] [PATCH V26 22/32] raw-win32.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/raw-win32.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/block/raw-win32.c

[Qemu-devel] [PATCH V26 07/32] QemuOpts: add qemu_opt_get_*_del functions for replace work

2014-04-29 Thread Chunyan Liu
Add qemu_opt_get_del, qemu_opt_get_bool_del, qemu_opt_get_number_del and qemu_opt_get_size_del to replace the same handling of QEMUOptionParameter (get and delete). Several drivers are coded to parse a known subset of options, then remove them from the list before handing all remaining options to

[Qemu-devel] [PATCH V26 08/32] QemuOpts: add qemu_opts_print_help to replace print_option_help

2014-04-29 Thread Chunyan Liu
print_option_help takes QEMUOptionParameter as parameter, add qemu_opts_print_help to take QemuOptsList as parameter for later replace work. Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com ---

[Qemu-devel] [PATCH V26 15/32] gluster.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- Changes to V25: * fix create_opts, OPT_STRING - QEMU_OPT_STRING block/gluster.c | 81 ++--- 1 file changed, 42 insertions(+), 39 deletions(-)

[Qemu-devel] [PATCH V26 32/32] QemuOpts: cleanup tmp 'allocated' member from QemuOptsList

2014-04-29 Thread Chunyan Liu
Now only qemu_opts_append uses 'allocated' to indicate free memory. For this function only, we can also let result list's (const char *) members point to input list's members, only if the input list has longer lifetime than result list. In current code, that is true. So, we can remove the

[Qemu-devel] [PATCH V26 01/32] QemuOpts: move find_desc_by_name ahead for later calling

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Chunyan Liu cy...@suse.com --- util/qemu-option.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/util/qemu-option.c b/util/qemu-option.c

[Qemu-devel] [PATCH V26 04/32] qapi: output def_value_str when query command line options

2014-04-29 Thread Chunyan Liu
Change qapi interfaces to output the newly added def_value_str when querying command line options. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- Changes to V25: * update @default description in .json file qapi-schema.json | 5 -

[Qemu-devel] [PATCH V26 21/32] raw-posix.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/raw-posix.c | 59 +-- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git

[Qemu-devel] [PATCH V26 29/32] vmdk.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/vmdk.c | 123 ++- 1 file changed, 63 insertions(+), 60 deletions(-) diff --git

[Qemu-devel] [PATCH V26 03/32] QemuOpts: repurpose qemu_opts_print to replace print_option_parameters

2014-04-29 Thread Chunyan Liu
Currently this function is not used anywhere. In later patches, it will replace print_option_parameters. To avoid print info changes, change qemu_opts_print from fprintf stderr to printf to keep consistent with print_option_parameters, remove last printf and print size/number with opt-value.uint

[Qemu-devel] [PATCH V26 30/32] vpc.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/vpc.c | 62 + 1 file changed, 34 insertions(+), 28 deletions(-) diff --git

[Qemu-devel] [PATCH V26 18/32] qcow.c: replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- block/qcow.c | 72 ++-- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git

Re: [Qemu-devel] [PATCH] spapr_pci: Fix maximum IRQ number check in ibm, change-msi

2014-04-29 Thread Alexander Graf
On 29.04.14 05:17, Alexey Kardashevskiy wrote: Recently a check for maximum supported MSIX vectors number has been added. However the check always assumed that MSIX is the only case and failed on devices which have MSI but do not have MSIX such as QEMU's PCI Bridge. This results in assert in

[Qemu-devel] [PATCH V26 05/32] QemuOpts: change opt-name|str from (const char *) to (char *)

2014-04-29 Thread Chunyan Liu
qemu_opt_del() already assumes that all QemuOpt instances contain malloc'd name and value; but it had to cast away const because opts_start_struct() was doing its own thing and using static storage instead. By using the correct type and malloced strings everywhere, the usage of this struct

[Qemu-devel] [PATCH V26 10/32] QemuOpts: add qemu_opts_append to replace append_option_parameters

2014-04-29 Thread Chunyan Liu
For later merge .create_opts of drv and proto_drv in qemu-img commands. Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Leandro Dorileo l...@dorileo.org Signed-off-by: Chunyan Liu cy...@suse.com --- include/qemu/option.h | 5

  1   2   3   4   >