Re: [Qemu-devel] [PATCH 09/22] nbd: implement .bdrv_detach/attach_aio_context()

2014-05-02 Thread Paolo Bonzini
Il 01/05/2014 16:54, Stefan Hajnoczi ha scritto: Drop the assumption that we're using the main AioContext. Convert qemu_aio_set_fd_handler() calls to aio_set_fd_handler(). The .bdrv_detach/attach_aio_context() interfaces also need to be implemented to move the socket fd handler from the old to

Re: [Qemu-devel] [PATCH 13/22] block/raw-posix: implement .bdrv_detach/attach_aio_context()

2014-05-02 Thread Paolo Bonzini
Il 01/05/2014 16:54, Stefan Hajnoczi ha scritto: Drop the assumption that we're using the main AioContext for Linux AIO. Convert the Linux AIO event notifier to use aio_set_event_notifier(). The .bdrv_detach/attach_aio_context() interfaces also need to be implemented to move the event notifier h

Re: [Qemu-devel] [PATCH 00/22] dataplane: use QEMU block layer

2014-05-02 Thread Paolo Bonzini
Il 01/05/2014 16:54, Stefan Hajnoczi ha scritto: This patch series switches virtio-blk data-plane from a custom Linux AIO request queue to the QEMU block layer. The previous "raw files only" limitation is lifted. All image formats and protocols can now be used with virtio-blk data-plane. Yay!

Re: [Qemu-devel] [PATCH V5 03/28] qapi script: add event support

2014-05-02 Thread Markus Armbruster
Eric Blake writes: > On 04/30/2014 10:26 PM, Wenchao Xia wrote: >> qapi-event.py will parse the schema and generate qapi-event.c, then >> the API in qapi-event.c can be used to handle event in qemu code. >> All API have prefix "qapi_event". >> >> The script mainly includes two parts: generate AP

Re: [Qemu-devel] [PATCH v10 0/4] qapi: Allow modularization of QAPI schema files

2014-05-02 Thread Markus Armbruster
Lluís Vilanova writes: > Adds an include primitive to the syntax of QAPI schema files, allowing these > to > be modularized into multiple per-topic files in the future. > > Signed-off-by: Lluís Vilanova A few more things could be polished (see Eric's comments), but they can also be polished on

Re: [Qemu-devel] [PATCH v3] kvm: add set_one_reg/get_one_reg helpers

2014-05-02 Thread Paolo Bonzini
> > Applying it now to uq/master, thanks. > > I looked at git://github.com/bonzini/qemu.git, "uq/master", it is 7 months > old so I am obviously looking at the wrong repo. Where exactly did the subj > patch go? Or you just do not push "uq/master" very often? :) Thanks! It's git://git.kernel.org

Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests

2014-05-02 Thread Stefan Hajnoczi
On Tue, Mar 25, 2014 at 10:27:19AM -0300, Leandro Dorileo wrote: > Cover basic aspects and API usage for QemuOpt. The current implementation > covers the API's planned to be changed by Chunyan Liu in his > QEMUOptionParameter > replacement/cleanup job. > > Other APIs should be covered in future i

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-05-02 Thread Stefan Hajnoczi
On Thu, Apr 24, 2014 at 12:35:24PM +0400, poletaev wrote: The commit message is vague so I guess the maintainers skipped your email. I have CCed Paolo, Richard, and Andreas who may be able to review and apply your patch. Please make the commit message more specific: target-i386: don't touch und

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-05-02 Thread Stefan Hajnoczi
On Thu, Apr 24, 2014 at 12:35:24PM +0400, poletaev wrote: > There is a set of test, that checks QEMU CPU for similar behavior with real > hardware (http://roberto.greyhats.it/projects/pills.html). Test > reg/pill2579.c can detect, that program is execute in emulated environment. > It is related wit

Re: [Qemu-devel] [PATCH 0/9] usb: mtp: a bunch of fixes

2014-05-02 Thread Stefan Hajnoczi
On Fri, Apr 25, 2014 at 12:48:05PM +0200, Gerd Hoffmann wrote: > Hi, > > Here is a bunch of incremental fixes for the just merged > usb mtp device, coming from patch review by Peter and Stefan. > > cheers, > Gerd > > Gerd Hoffmann (9): > usb: mtp: replace debug printfs with trace points >

[Qemu-devel] [Bug 1312561] Re: libstdc++-6.dll is missing from your computer

2014-05-02 Thread Newton Kitonga
Also getting same error when running the following command on Windows 7 64 bit. qemu-system-arm -cpu? I also reinstalled qemu without any luck. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1312561

Re: [Qemu-devel] [PATCH 0/3] glib: move compat functions into glib-compat.h

2014-05-02 Thread Stefan Hajnoczi
On Mon, Feb 03, 2014 at 02:31:47PM +0100, Stefan Hajnoczi wrote: > glib has deprecated APIs like GStaticMutex, g_thread_create(), and others. In > QEMU support both old and new APIs since using deprecated APIs would flood us > with warnings but legacy distros must continue to build the QEMU source

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

2014-05-02 Thread Stefan Hajnoczi
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.

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

2014-05-02 Thread Stefan Hajnoczi
On Tue, Apr 29, 2014 at 10:02:25AM +0400, Michael Tokarev wrote: > 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,

Re: [Qemu-devel] [PULL 0/3] kvm/s390x/ppc: kvm_enable_cap helpers

2014-05-02 Thread Peter Maydell
On 30 April 2014 14:58, Cornelia Huck wrote: > The following changes since commit b006f8162e11f0395689a684d6e871b047c23481: > > Merge remote-tracking branch 'remotes/rth/tags/tcg-sparc-pull-20140428' > into staging (2014-04-29 13:03:25 +0100) > > are available in the git repository at: > > >

Re: [Qemu-devel] [PATCH] linux-user: Assert stack used for auxvec, envp, argv

2014-05-02 Thread Riku Voipio
Hi, I've rolled up a new patchset to: https://git.linaro.org/people/riku.voipio/qemu.git/shortlog/refs/heads/linux-user-for-upstream Should I submit this or wait for your AT_HWCAP2 patch? Riku On Thu, May 01, 2014 at 07:08:29PM +0100, Peter Maydell wrote: > Ping! > > Riku -- do you have this

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/2] ohw: let the right reset entry point 0xfff00100 jump to the currently wrong entry point (0xfffffffc)

2014-05-02 Thread Alexander Graf
On 04/23/2014 11:19 PM, Hervé Poussineau wrote: This is easier to do this than to copy the code from the wrong entry point to the right entry point. Suggested-by: Alexander Graf Signed-off-by: Hervé Poussineau Acked-by: Alexander Graf Alex

Re: [Qemu-devel] [PATCH] linux-user/signal.c: Set fault address in AArch64 signal info

2014-05-02 Thread Riku Voipio
On Thu, May 1, 2014 at 8:36 PM, Peter Maydell wrote: > Set the fault address correctly in the signal information passed > to a signal handler for AArch64 guests. > > Signed-off-by: Peter Maydell > --- > This would be a candidate for stable except that it depends on > the a64 system rework which a

Re: [Qemu-devel] [PATCH] linux-user: Assert stack used for auxvec, envp, argv

2014-05-02 Thread Peter Maydell
On 2 May 2014 11:03, Riku Voipio wrote: > Hi, > > I've rolled up a new patchset to: > > https://git.linaro.org/people/riku.voipio/qemu.git/shortlog/refs/heads/linux-user-for-upstream > > Should I submit this or wait for your AT_HWCAP2 patch? I have the AT_HWCAP2 patch (and some other related fixe

[Qemu-devel] [PATCH 1/3] glib: move g_poll() replacement into glib-compat.h

2014-05-02 Thread Michael Tokarev
Stefan Hajnoczi: > We have a dedicated header file for wrappers to smooth over glib version > differences. Move the g_poll() definition into glib-compat.h for > consistency. Ack. Reviewed-by: Michael Tokarev I wanted to include exactly this in my series too, but forgot. /mjt

Re: [Qemu-devel] [PULL 00/31] Block patches

2014-05-02 Thread Peter Maydell
On 30 April 2014 19:23, Kevin Wolf wrote: > 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 repository at: > > > git://repo.or.cz/qemu/

Re: [Qemu-devel] [PATCH 1/3] glib: move g_poll() replacement into glib-compat.h

2014-05-02 Thread Michael Tokarev
02.05.2014 14:32, Michael Tokarev wrote: > Stefan Hajnoczi: >> We have a dedicated header file for wrappers to smooth over glib version >> differences. Move the g_poll() definition into glib-compat.h for >> consistency. > > Ack. > > Reviewed-by: Michael Tokarev > > I wanted to include exactly

[Qemu-devel] [PATCH 2/3] glib: add g_thread_new() compat function

2014-05-02 Thread Michael Tokarev
Stefan Hajnoczi: > Implement g_thread_new() in terms of the deprecated g_thread_create(). > The API was changed in glib 2.31.0. > > The compat function allows us to write modern code and avoid ifdefs. ACK. With one small nit: [] > +#if !GLIB_CHECK_VERSION(2, 31, 0) > +static inline GThread *g_th

Re: [Qemu-devel] [PATCH 2/3] glib: add g_thread_new() compat function

2014-05-02 Thread Daniel P. Berrange
On Fri, May 02, 2014 at 02:52:23PM +0400, Michael Tokarev wrote: > Stefan Hajnoczi: > > Implement g_thread_new() in terms of the deprecated g_thread_create(). > > The API was changed in glib 2.31.0. > > > > The compat function allows us to write modern code and avoid ifdefs. > > ACK. With one sma

[Qemu-devel] [PATCH 3/3] glib: add compat wrapper for GStaticMutex

2014-05-02 Thread Michael Tokarev
Stefan Hajnoczi: > Avoid duplicating ifdefs for the deprecated GStaticMutex API by > introducing compat_g_static_mutex_*() in glib-compat.h. > > GStaticMutex users should use the compat API to avoid dealing with > deprecation. To my taste this is a wrong(ish) approach. GStaticMutex is nothing mo

Re: [Qemu-devel] [PATCH 2/3] glib: add g_thread_new() compat function

2014-05-02 Thread Peter Maydell
On 2 May 2014 12:01, Daniel P. Berrange wrote: > On Fri, May 02, 2014 at 02:52:23PM +0400, Michael Tokarev wrote: >> Stefan Hajnoczi: >> > +#if !GLIB_CHECK_VERSION(2, 31, 0) >> > +static inline GThread *g_thread_new(const gchar *unused, >> > +GThreadFunc func, >

Re: [Qemu-devel] [PULL 00/10] target-arm queue

2014-05-02 Thread Peter Maydell
On 1 May 2014 15:54, Peter Maydell wrote: > Nothing earthshattering here, but it does have the patch which > actually lets us boot an emulated AArch64 CPU on a board... > > thanks > -- PMM > > The following changes since commit 051b9980b99dbfba22ea5f79bd3708d513ae121d: > > Merge remote-tracking

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

2014-05-02 Thread Stefan Hajnoczi
On Tue, Apr 29, 2014 at 08:21:16AM +0200, 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 Weil > --- > > I

Re: [Qemu-devel] [PATCH 2/3] glib: add g_thread_new() compat function

2014-05-02 Thread Michael Tokarev
02.05.2014 15:08, Peter Maydell wrote: >>> Stefan Hajnoczi: +#if !GLIB_CHECK_VERSION(2, 31, 0) +static inline GThread *g_thread_new(const gchar *unused, +GThreadFunc func, +gpointer data) +{ +

[Qemu-devel] [PATCH v3 00/14] qmp qga: Purge error_is_set()

2014-05-02 Thread Markus Armbruster
I got a private branch getting rid of it entirely. This is the fifth part, covering QMP and the guest agent up to the point where I start messing with the QAPI code generators. That's left for the final part. Luiz agreed to take this through his tree. This series conflicts with Lluís's "qapi: A

[Qemu-devel] [PATCH v3 10/14] qga: Clean up fragile use of error_is_set()

2014-05-02 Thread Markus Armbruster
Using error_is_set(ERRP) to find out whether a function failed is either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP may be null, because errors go undetected when it is. It's fragile when proving ERRP non-null involves a non-local argument. Else, it's unnecessarily opaque (see

[Qemu-devel] [PATCH v3 03/14] qmp: Consistently name Error ** objects errp, and not err

2014-05-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qmp.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qmp.c b/qmp.c index 74107be..ee8357f 100644 --- a/qmp.c +++ b/qmp.c @@ -41,7 +41,7 @@ NameInfo *qmp_query_name(Error **errp) return info;

[Qemu-devel] [PATCH v3 12/14] qemu-option: Clean up fragile use of error_is_set()

2014-05-02 Thread Markus Armbruster
Using error_is_set(ERRP) to find out whether to bail out due to previous error is either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP may be null, because errors go undetected when it is. It's fragile when proving ERRP non-null involves a non-local argument. Else, it's unnecessar

[Qemu-devel] [PATCH v3 04/14] error: Consistently name Error ** objects errp, and not err

2014-05-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- include/qapi/error.h | 27 --- util/error.c | 8 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/include/qapi/error.h b/include/qapi/error.h index c0f0c3b..7995801 100644 --- a

[Qemu-devel] [PATCH v3 08/14] tests/qapi-schema: Drop superfluous error_is_set()

2014-05-02 Thread Markus Armbruster
visit_type_TestStruct() does nothing when called with an error set. Callers shouldn't do that, and no caller does. Drop the superfluous test. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Michael Roth --- tests/test-qmp-input-visitor.c | 25 - 1

[Qemu-devel] [PATCH v3 13/14] dump: Drop pointless error_is_set(), DumpState member errp

2014-05-02 Thread Markus Armbruster
In qmp_dump_guest_memory(), the error must be clear on entry, and we always bail out after setting it, directly or via dump_init(). Therefore, both error_is_set() are always false. Drop them. DumpState member errp is now write-only. Drop it, too. Signed-off-by: Markus Armbruster Reviewed-by: E

[Qemu-devel] [PATCH v3 06/14] hmp: Guard against misuse of hmp_handle_error()

2014-05-02 Thread Markus Armbruster
Null errp argument makes no sense. Assert it's not null, to make this explicit, and guard against misuse. All current callers pass non-null errp. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- hmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hmp.c b/hm

[Qemu-devel] [PATCH v3 11/14] qga: Drop superfluous error_is_set()

2014-05-02 Thread Markus Armbruster
acquire_privilege(), execute_async() and check_suspend_mode() do nothing when called with an error set. Callers shouldn't do that, and no caller does. Drop the superfluous tests. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Michael Roth --- qga/commands-win32.c | 10

[Qemu-devel] [PATCH v3 09/14] qapi: Clean up fragile use of error_is_set()

2014-05-02 Thread Markus Armbruster
Using error_is_set(ERRP) to find out whether a function failed is either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP may be null, because errors go undetected when it is. It's fragile when proving ERRP non-null involves a non-local argument. Else, it's unnecessarily opaque (see

[Qemu-devel] [PATCH v3 01/14] qmp hmp: Consistently name Error * objects err, and not errp

2014-05-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- docs/writing-qmp-commands.txt | 28 hmp.c | 138 ++--- include/qapi/qmp/dispatch.h| 2 +- qapi/qmp-dispatch.c| 6 +- tests/test-qmp

[Qemu-devel] [PATCH v3 05/14] qga: Use return values instead of error_is_set(errp)

2014-05-02 Thread Markus Armbruster
Using error_is_set(errp) to check whether a function call failed is fragile: it breaks when errp is null. ga_get_fd_handle() and guest_file_handle_add() don't return a useful value when they fail, but that's just stupid. Fix that, and check them instead. As far as I can tell, errp can't be null

[Qemu-devel] [PATCH] Makefiles: convert some obj-specific CFLAGS to use new foo.o-cflags syntax

2014-05-02 Thread Michael Tokarev
Current Makefile system allows using foo.o-cflags variables to store object-specific CFLAGS. Convert some usages of old syntax (using QEMU_CFLAGS += construct) to the new syntax. Do not touch multifile modules for now, as build system isn't ready for this. Signed-off-by: Michael Tokarev --- Ma

[Qemu-devel] [PATCH] configure: remove bashism

2014-05-02 Thread Michael Tokarev
Commit e26110cfc67d48 added a check for shacmd to create a hash for modules. This check in configure is using bash construct &> to redirect both stdout and stderr, whcih does fun things on some shells. Get rid of it, use standard redirection instead. Cc: Fam Zheng Signed-off-by: Michael Tokarev

Re: [Qemu-devel] [PATCH 13/22] block/raw-posix: implement .bdrv_detach/attach_aio_context()

2014-05-02 Thread Stefan Hajnoczi
On Fri, May 2, 2014 at 9:39 AM, Paolo Bonzini wrote: > Il 01/05/2014 16:54, Stefan Hajnoczi ha scritto: > >> Drop the assumption that we're using the main AioContext for Linux AIO. >> Convert the Linux AIO event notifier to use aio_set_event_notifier(). >> >> The .bdrv_detach/attach_aio_context()

[Qemu-devel] [PATCH v3 14/14] qmp: Don't use error_is_set() to suppress additional errors

2014-05-02 Thread Markus Armbruster
Using error_is_set(errp) that way can sweep programming errors under the carpet when we get called incorrectly with an error set. encrypted_bdrv_it() does it, because there's no way to make bdrv_iterate() break its loop. Actually safe, because qmp_cont() clears the error before the loop. Clean i

Re: [Qemu-devel] [PATCH 00/22] dataplane: use QEMU block layer

2014-05-02 Thread Stefan Hajnoczi
On Fri, May 2, 2014 at 9:42 AM, Paolo Bonzini wrote: > Il 01/05/2014 16:54, Stefan Hajnoczi ha scritto: > >> This patch series switches virtio-blk data-plane from a custom Linux AIO >> request queue to the QEMU block layer. The previous "raw files only" >> limitation is lifted. All image formats

[Qemu-devel] [PATCH v3 07/14] qapi: Drop redundant, unclean error_is_set()

2014-05-02 Thread Markus Armbruster
do_qmp_dispatch()'s test for qmp_dispatch_check_obj() failure examines both the return value and the error object. The latter part is unclean; it works only when do_qmp_dispatch()'s caller passes a non-null errp argument. That's the case, but it's not locally obvious. Unclean. Cleanup would be

[Qemu-devel] [PATCH v3 02/14] qga: Consistently name Error ** objects errp, and not err

2014-05-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qga/commands-posix.c | 199 ++- qga/commands-win32.c | 105 ++- qga/commands.c | 4 +- qga/vss-win32.c | 4 +- qga/vss-win32.h | 2 +- 5 file

Re: [Qemu-devel] status of cpu hotplug work for x86_64?

2014-05-02 Thread Vasilis Liaskovitis
Hi, On Mon, Apr 28, 2014 at 11:58:38AM -0600, Chris Friesen wrote: > Hi, > > I'm trying to figure out what the current status is for cpu hotplug > and hot-remove on x86_64. > > As far as I can tell, it seems like currently there is a QMP > "cpu-add" command but no matching remove...is that corre

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

2014-05-02 Thread Michael Tokarev
02.05.2014 13:45, Stefan Hajnoczi wrote: > On Tue, Apr 29, 2014 at 10:02:25AM +0400, Michael Tokarev wrote: >> 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'r

Re: [Qemu-devel] Qemu-devel Digest, Vol 133, Issue 401

2014-05-02 Thread Anshul Makkar
On Mon, Apr 14, 2014 at 6:49 PM, wrote: > Re: [PATCH 33/35] pc: ACPI BIOS: reserve SRAT entry for > hotplug mem hole (Igor Mammedov) Please can you share the patchset for memory hot unplugging. Is this the correct commit I am looking at https://github.com/taohu/qemu/commit/55c9540919e189b0

Re: [Qemu-devel] [PATCH v10 4/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-05-02 Thread Lluís Vilanova
Eric Blake writes: > On 04/30/2014 01:09 PM, Lluís Vilanova wrote: >> The primitive uses JSON syntax, and include paths are relative to the file >> using the directive: >> >> { 'include': 'path/to/file.json' } >> >> Signed-off-by: Lluís Vilanova >> --- >> +++ b/tests/qapi-schema/include-after

Re: [Qemu-devel] [PATCH v10 3/4] qapi: Use an explicit input file

2014-05-02 Thread Lluís Vilanova
Eric Blake writes: > On 04/30/2014 01:09 PM, Lluís Vilanova wrote: >> Use an explicit input file on the command-line instead of reading from >> standard >> input. >> >> It also outputs the proper file name when there's an error. >> >> Signed-off-by: Lluís Vilanova >> Reviewed-by: Eric Blake

Re: [Qemu-devel] [PATCH v10 1/4] qapi: [trivial] Break long command lines

2014-05-02 Thread Lluís Vilanova
Eric Blake writes: > On 04/30/2014 01:09 PM, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova >> Reviewed-by: Eric Blake >> --- >> Makefile | 24 ++-- >> tests/Makefile | 20 >> 2 files changed, 34 insertions(+), 10 deletions(-) >> >> @@ -

Re: [Qemu-devel] [PATCH v10 4/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-05-02 Thread Eric Blake
On 05/02/2014 06:16 AM, Lluís Vilanova wrote: >>> +++ b/tests/qapi-schema/include-after-err.json >>> @@ -0,0 +1,2 @@ >>> +{ 'include': 'include-simple-sub.json' } >>> +{ 'command' 'missing-colon' } > >> In v9, Markus pointed out that 'include-after-err' is the wrong name for >> this test - you ar

Re: [Qemu-devel] [PATCH 2/3] glib: add g_thread_new() compat function

2014-05-02 Thread Michael Tokarev
02.05.2014 15:08, Peter Maydell wrote: > On 2 May 2014 12:01, Daniel P. Berrange wrote: >> On Fri, May 02, 2014 at 02:52:23PM +0400, Michael Tokarev wrote: >>> Stefan Hajnoczi: +#if !GLIB_CHECK_VERSION(2, 31, 0) +static inline GThread *g_thread_new(const gchar *unused, +

Re: [Qemu-devel] [PATCH v3 00/14] qmp qga: Purge error_is_set()

2014-05-02 Thread Eric Blake
On 05/02/2014 05:26 AM, Markus Armbruster wrote: > I got a private branch getting rid of it entirely. This is the fifth > part, covering QMP and the guest agent up to the point where I start > messing with the QAPI code generators. That's left for the final > part. > > Luiz agreed to take this t

Re: [Qemu-devel] [PATCH v3 14/14] qmp: Don't use error_is_set() to suppress additional errors

2014-05-02 Thread Eric Blake
On 05/02/2014 05:26 AM, Markus Armbruster wrote: > Using error_is_set(errp) that way can sweep programming errors under > the carpet when we get called incorrectly with an error set. > > encrypted_bdrv_it() does it, because there's no way to make > bdrv_iterate() break its loop. Actually safe, be

Re: [Qemu-devel] [PATCH 5/5] linux-user/signal.c: define __SIGRTMIN/MAX for non-GNU platforms

2014-05-02 Thread Riku Voipio
On Tue, Apr 29, 2014 at 10:06:31PM +0200, Natanael Copa wrote: > On Tue, 29 Apr 2014 09:02:13 -0600 > Eric Blake wrote: > > > On 04/29/2014 08:53 AM, Natanael Copa wrote: > > > On Tue, 29 Apr 2014 08:28:29 -0600 > > > Eric Blake wrote: > > > > > >> On 04/29/2014 08:17 AM, Natanael Copa wrote: >

[Qemu-devel] [PATCH 04/13] qapi: Replace start_optional()/end_optional() by optional()

2014-05-02 Thread Markus Armbruster
Semantics of end_optional() differ subtly from the other end_FOO() callbacks: when start_FOO() succeeds, the matching end_FOO() gets called regardless of what happens in between. end_optional() gets called only when everything in between succeeds as well. Entirely undocumented, like all of the vi

[Qemu-devel] [PATCH 08/13] qapi: Un-inline visit of implicit struct

2014-05-02 Thread Markus Armbruster
In preparation of error handling changes. Bonus: generates less duplicated code. Signed-off-by: Markus Armbruster --- scripts/qapi-visit.py | 48 ++-- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/scripts/qapi-visit.py b/scripts/qapi

[Qemu-devel] [PATCH 00/13] qapi: Purge error_is_set()

2014-05-02 Thread Markus Armbruster
This is the sixth and final part, covering QAPI and its users. PATCH 01-08 are preparatory cleanups. PATCH 09-11 fix a misuse of the visitor API in hand-written code. Generated code uses the API correctly. PATCH 12 converts QAPI and its users to the common use of the error API, purging error_is_

[Qemu-devel] [PATCH 01/13] qapi: Update qapi-code-gen.txt example to match current code

2014-05-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- docs/qapi-code-gen.txt | 146 ++--- 1 file changed, 90 insertions(+), 56 deletions(-) diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt index d78921f..923565e 100644 --- a/docs/qapi-code-gen.txt +++ b/do

[Qemu-devel] [PATCH 06/13] qapi: Clean up shadowing of parameters and locals in inner scopes

2014-05-02 Thread Markus Armbruster
By un-inlining the visit of nested complex types. Signed-off-by: Markus Armbruster --- scripts/qapi-visit.py | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py index 3eeb435..222ce62 100644 --- a/scripts/qapi-vi

[Qemu-devel] [PATCH 05/13] qapi-visit.py: Clean up confusing push_indent() / pop_indent() use

2014-05-02 Thread Markus Armbruster
Changing implicit indentation in the middle of generating a block makes following the code being generated unnecessarily hard. Signed-off-by: Markus Armbruster --- scripts/qapi-visit.py | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/scripts

[Qemu-devel] [PATCH 03/13] qapi: Remove unused Visitor callbacks start_handle(), end_handle()

2014-05-02 Thread Markus Armbruster
These have never been called or implemented by anything, and their intended use is undocumented, like all of the visitor API. Signed-off-by: Markus Armbruster --- include/qapi/visitor-impl.h | 3 --- qapi/qapi-visit-core.c | 15 --- 2 files changed, 18 deletions(-) diff --git

[Qemu-devel] [PATCH 07/13] qapi-visit.py: Clean up a sloppy use of field prefix

2014-05-02 Thread Markus Armbruster
generate_visit_struct_fields() generates the base type's struct member name both with and without the field prefix. Harmless, because the field prefix is always empty there: only unboxed complex members have a prefix, and those can't have a base type. Clean it up anyway. Signed-off-by: Markus Ar

[Qemu-devel] [PATCH 02/13] qapi: Normalize marshalling's visitor initialization and cleanup

2014-05-02 Thread Markus Armbruster
Input and output marshalling functions do it differently. Change them to work the same: initialize the I/O visitor, use it, clean it up, initialize the dealloc visitor, use it, clean it up. This delays dealloc visitor initialization in output marshalling functions, and input visitor cleanup in in

[Qemu-devel] [PATCH 11/13] tests: Don't call visit_end_struct() after visit_start_struct() fails

2014-05-02 Thread Markus Armbruster
When visit_start_struct() succeeds, visit_end_struct() must not be called. Three out of four visit_type_TestStruct() call it anyway. As far as I can tell, visit_start_struct() doesn't actually fail there. Fix them anyway. Signed-off-by: Markus Armbruster --- tests/test-qmp-input-strict.c

[Qemu-devel] [PATCH 13/13] error: error_is_set() is finally unused; remove

2014-05-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/error.h | 6 -- util/error.c | 5 - 2 files changed, 11 deletions(-) diff --git a/include/qapi/error.h b/include/qapi/error.h index 7995801..d712089 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -67,12 +67,6 @@

[Qemu-devel] [PATCH 12/13] qapi: Replace uncommon use of the error API by the common one

2014-05-02 Thread Markus Armbruster
We commonly use the error API like this: err = NULL; foo(..., &err); if (err) { goto out; } bar(..., &err); Every error source is checked separately. The second function is only called when the first one succeeds. Both functions are free to pass their argument to err

[Qemu-devel] [PATCH 10/13] hw: Don't call visit_end_struct() after visit_start_struct() fails

2014-05-02 Thread Markus Armbruster
When visit_start_struct() succeeds, visit_end_struct() must not be called. rtc_get_date() and balloon_stats_all() call it anyway. As far as I can tell, they're only used with the string output visitor, which doesn't care. Fix them anyway. Signed-off-by: Markus Armbruster --- hw/timer/mc146818

Re: [Qemu-devel] [PATCH 0/5] fix building with musl libc

2014-05-02 Thread Paolo Bonzini
Il 29/04/2014 16:17, Natanael Copa ha scritto: In addition to the previoiusly sent "linux-user: avoid using glibc internals in _syscall5 and in definition of target_sigevent struct", those are needed for making qemu build with musl libc on Alpine Linux. There is still 2 missing fcntl.h definitio

[Qemu-devel] [PATCH 09/13] hmp: Call visit_end_struct() after visit_start_struct() succeeds

2014-05-02 Thread Markus Armbruster
When visit_start_struct() succeeds, visit_end_struct() must be called. hmp_object_add() doesn't when a member visit fails. As far as I can tell, the opts visitor copes okay with the misuse. Fix it anyway. Signed-off-by: Markus Armbruster --- hmp.c | 16 1 file changed, 8 inser

[Qemu-devel] [PATCH] qemu-img: sort block formats in help message

2014-05-02 Thread Mike Day
The help message for qemu-img lists the supported block formats, of which there are 27 as of version 2.0.50. The formats are printed in the order of their driver's position in a linked list, which appears random. This patch prints the formats in sorted order, making it easier to read and to find a

Re: [Qemu-devel] [PATCH v6 12/14] iotests: Add test for backing-chain commits

2014-05-02 Thread Max Reitz
On 30.04.2014 05:10, Eric Blake wrote: On 04/29/2014 09:17 AM, Max Reitz wrote: Add a test for qemu-img commit on backing chains with more than two images. This test also checks whether the images above the base image are emptied and does therefore not work for qed and vmdk which requires it to

[Qemu-devel] Patchset for memory hot unplugging.

2014-05-02 Thread Anshul Makkar
Please can you share the patchset for memory hot unplugging. Is this the correct commit I am looking at https://github.com/taohu/qemu/commit/55c9540919e189b0ad2e6a759af742080f8f5dc4 Thanks Anshul Makkar

Re: [Qemu-devel] status of cpu hotplug work for x86_64?

2014-05-02 Thread Igor Mammedov
On Fri, 2 May 2014 14:10:35 +0200 Vasilis Liaskovitis wrote: > Hi, > > On Mon, Apr 28, 2014 at 11:58:38AM -0600, Chris Friesen wrote: > > Hi, > > > > I'm trying to figure out what the current status is for cpu hotplug > > and hot-remove on x86_64. > > > > As far as I can tell, it seems like cu

Re: [Qemu-devel] [PATCH v10 4/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-05-02 Thread Lluís Vilanova
Eric Blake writes: > On 05/02/2014 06:16 AM, Lluís Vilanova wrote: +++ b/tests/qapi-schema/include-after-err.json @@ -0,0 +1,2 @@ +{ 'include': 'include-simple-sub.json' } +{ 'command' 'missing-colon' } >> >>> In v9, Markus pointed out that 'include-after-err' is the wrong nam

[Qemu-devel] [PATCH 3/4] linux-user/elfload.c: Fix A64 code which was incorrectly acting like A32

2014-05-02 Thread Peter Maydell
The ARM target-specific code in elfload.c was incorrectly allowing the 64-bit ARM target to use most of the existing 32-bit definitions: most noticably this meant that our HWCAP bits passed to the guest were wrong, and register handling when dumping core was totally broken. Fix this by properly sep

Re: [Qemu-devel] [PATCH v6 03/14] qcow2: Optimize bdrv_make_empty()

2014-05-02 Thread Max Reitz
On 30.04.2014 00:24, Eric Blake wrote: On 04/29/2014 09:07 AM, Max Reitz wrote: bdrv_make_empty() is currently only called if the current image represents an external snapshot that has been committed to its base image; it is therefore unlikely to have internal snapshots. In this case, bdrv_make_

Re: [Qemu-devel] [RFC 0/5] Allow object-add on X86CPU subclasses, for CPU model probing

2014-05-02 Thread Igor Mammedov
On Wed, 30 Apr 2014 17:29:28 -0300 Eduardo Habkost wrote: > This series allows management code to use object-add on X86CPU subclasses, so > it Is there any reason why "device-add" couldn't be used? > can use it to probe for CPU model information without re-running QEMU. The > main > use case

[Qemu-devel] [PATCH v11 0/4] qapi: Allow modularization of QAPI schema files

2014-05-02 Thread Lluís Vilanova
Adds an include primitive to the syntax of QAPI schema files, allowing these to be modularized into multiple per-topic files in the future. Signed-off-by: Lluís Vilanova --- Changes in v11: * Rename "tests/include-after-err*" to "tests/include-before-err*" (Markus Armbruster). * Do not use to

[Qemu-devel] [PATCH v11 1/4] qapi: [trivial] Break long command lines

2014-05-02 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake --- Makefile | 24 ++-- tests/Makefile | 18 ++ 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index ec74039..84345ee 100644 --- a/Makefile +++ b/Makefile @@

[Qemu-devel] [PATCH v11 3/4] qapi: Use an explicit input file

2014-05-02 Thread Lluís Vilanova
Use an explicit input file on the command-line instead of reading from standard input. It also outputs the proper file name when there's an error. Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake --- Makefile | 12 ++-- docs/qapi-code-ge

[Qemu-devel] [PATCH v11 2/4] qapi: [trivial] Do not catch unknown exceptions in "test-qapi.py"

2014-05-02 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake --- tests/qapi-schema/test-qapi.py |3 --- 1 file changed, 3 deletions(-) diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py index b3d1e1d..5a26ef3 100644 --- a/tests/qapi-schema/test-qapi.py +++ b/tests/qapi-sc

[Qemu-devel] [PATCH v11 4/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-05-02 Thread Lluís Vilanova
The primitive uses JSON syntax, and include paths are relative to the file using the directive: { 'include': 'path/to/file.json' } Signed-off-by: Lluís Vilanova --- docs/qapi-code-gen.txt | 11 + scripts/qapi.py| 65

Re: [Qemu-devel] [PATCH v11 0/4] qapi: Allow modularization of QAPI schema files

2014-05-02 Thread Lluís Vilanova
Please disregard this thread. I forgot to add the reviewed-by lines. Will resend later as v12. Sorry, Lluis Lluís Vilanova writes: > Adds an include primitive to the syntax of QAPI schema files, allowing these > to > be modularized into multiple per-topic files in the future. > Signed-off-b

[Qemu-devel] [PATCH v12 0/4] qapi: Allow modularization of QAPI schema files

2014-05-02 Thread Lluís Vilanova
Adds an include primitive to the syntax of QAPI schema files, allowing these to be modularized into multiple per-topic files in the future. Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- Changes in v12: * Fix "Reviewed-by" lines. Changes in v11: * R

[Qemu-devel] [PATCH v12 2/4] qapi: [trivial] Do not catch unknown exceptions in "test-qapi.py"

2014-05-02 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- tests/qapi-schema/test-qapi.py |3 --- 1 file changed, 3 deletions(-) diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py index b3d1e1d..5a26ef3 100644 --- a/tests/qapi-schema/

[Qemu-devel] [PATCH v12 3/4] qapi: Use an explicit input file

2014-05-02 Thread Lluís Vilanova
Use an explicit input file on the command-line instead of reading from standard input. It also outputs the proper file name when there's an error. Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- Makefile | 12

[Qemu-devel] [PATCH v12 1/4] qapi: [trivial] Break long command lines

2014-05-02 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- Makefile | 24 ++-- tests/Makefile | 18 ++ 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index ec74039..84345ee 100644 -

[Qemu-devel] [PATCH v12 4/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-05-02 Thread Lluís Vilanova
The primitive uses JSON syntax, and include paths are relative to the file using the directive: { 'include': 'path/to/file.json' } Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- docs/qapi-code-gen.txt | 11 + scripts/qapi.

[Qemu-devel] [PATCH 0/4] linux-user: fix ARM hwcaps related issues

2014-05-02 Thread Peter Maydell
This patchset fixes a number of issues in the ARM elfload.c, mostly relating to the AT_HWCAP bits: * off-by-one error for some of the existing ARM bits * update to include bits defined in newer kernels, and fix some bugs in how we were handling existing bits * properly separate out 64-bit fro

[Qemu-devel] [PATCH 1/4] linux-user/elfload.c: Fix incorrect ARM HWCAP bits

2014-05-02 Thread Peter Maydell
The ELF HWCAP bits for ARM features THUMBEE, NEON, VFPv3 and VFPv3D16 are all off by one compared to the kernel definitions. Fix this discrepancy and add in the missing CRUNCH bit which was the cause of the off-by-one error. (We don't emulate any of the CPUs which have that weird hardware, so it's

[Qemu-devel] [PATCH 2/4] linux-user/elfload.c: Update ARM HWCAP bits

2014-05-02 Thread Peter Maydell
The kernel has added support for a number of new ARM HWCAP bits; add them to QEMU, including support for setting them where we have a corresponding CPU feature bit. We were also incorrectly setting the VFPv3D16 HWCAP -- this means "only 16 D registers", not "supports 16-bit floating point format";

[Qemu-devel] [PATCH 4/4] linux-user/elfload.c: Support ARM HWCAP2 flags

2014-05-02 Thread Peter Maydell
The ARM kernel has chosen to spill into the HWCAP2 ELF feature bit flags early, even though it hasn't yet exhausted all 32 bits of the HWCAP word. Add support for setting this in the same way we do for HWCAP. Signed-off-by: Peter Maydell --- include/elf.h| 1 + linux-user/elfload.c | 30

Re: [Qemu-devel] [PATCH v3] apic: bump emulated lapic version to 0x14 on pc machines >= 2.1

2014-05-02 Thread Gabriel L. Somlo
On Thu, May 01, 2014 at 05:43:23PM -0400, Don Slutz wrote: > On 05/01/14 14:52, Alexander Graf wrote: > >With qdev we basically had an array of constructor parameters in the qdev > >definition. You could set these from the outside between create and init, > >basically: > > > > dev = dev_create()

Re: [Qemu-devel] [PATCH v3] apic: bump emulated lapic version to 0x14 on pc machines >= 2.1

2014-05-02 Thread Paolo Bonzini
Il 02/05/2014 16:23, Gabriel L. Somlo ha scritto: Did I miss anything ? Is there a way to override the default for all apics, which I set in DEFINE_PROP_UINT32, *before* anything gets initialized/realized/constructed/whatever ? :) Yes, there is. :) It's compat_props. You can set 0x14 in the

[Qemu-devel] [PATCH v2 1/8] kvm: reset state from the CPU's reset method

2014-05-02 Thread Paolo Bonzini
Now that we have a CPU object with a reset method, it is better to keep the KVM reset close to the CPU reset. Using qemu_register_reset as we do now keeps them far apart. With this patch, PPC no longer calls the kvm_arch_ function, so it can get removed there. Other arches call it from their CPU

  1   2   >