Re: [Qemu-devel] [PATCH V2 4/4] hw/machine: qemu machine opts as properties to QemuMachineState

2014-06-01 Thread Marcel Apfelbaum
On Fri, 2014-05-30 at 16:45 -0300, Eduardo Habkost wrote: On Mon, May 26, 2014 at 03:40:58PM +0300, Marcel Apfelbaum wrote: Make machine's QemuOpts QOM properties of machine. The properties are automatically filled in. This opens the possiblity to create opts per machine rather than global.

Re: [Qemu-devel] [PATCH V2 4/4] hw/machine: qemu machine opts as properties to QemuMachineState

2014-06-01 Thread Marcel Apfelbaum
On Fri, 2014-05-30 at 16:25 -0300, Eduardo Habkost wrote: On Mon, May 26, 2014 at 03:40:58PM +0300, Marcel Apfelbaum wrote: [...] +static void machine_initfn(Object *obj) +{ +object_property_add_str(obj, accel, +machine_get_accel, machine_set_accel, NULL);

Re: [Qemu-devel] [PATCH 3/3] hw/machine: Free old values of string properties

2014-06-01 Thread Marcel Apfelbaum
On Fri, 2014-05-30 at 17:02 -0300, Eduardo Habkost wrote: Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Cc: Marcel Apfelbaum marce...@redhat.com Cc: Andreas Färber afaer...@suse.de --- hw/core/machine.c | 8 1 file changed, 8 insertions(+) diff --git

Re: [Qemu-devel] [PATCH] machine: Add kvm-type property

2014-06-01 Thread Marcel Apfelbaum
On Fri, 2014-05-30 at 17:41 -0300, Eduardo Habkost wrote: The kvm-type machine option was left out when MachineState was introduced, preventing the kvm-type option from being used. Add the missing property. Very interesting how did I miss that. Thanks! Marcel Signed-off-by: Eduardo Habkost

Re: [Qemu-devel] [PATCH v3 1/3] e1000: allow command-line selection of card model

2014-06-01 Thread Michael S. Tsirkin
On Sat, May 31, 2014 at 11:33:14PM -0400, Gabriel L. Somlo wrote: Allow selection of different card models from the qemu command line, to better accomodate a wider range of guests. Signed-off-by: Romain Dolbeau rom...@dolbeau.org Signed-off-by: Gabriel Somlo so...@cmu.edu ---

Re: [Qemu-devel] [PATCH v3 0/3] e1000: allow model/device_id selection on command line

2014-06-01 Thread Michael S. Tsirkin
On Sat, May 31, 2014 at 11:33:13PM -0400, Gabriel L. Somlo wrote: Allow selection of different card models from the qemu command line, to better accomodate a wider range of guests. Looks good to me. If possible pls address a nit I noted in one of the patches. Besides that: Reviewed-by:

[Qemu-devel] KVM call agenda ideas

2014-06-01 Thread Marcel Apfelbaum
Hi Juan, I want to add to the call Machine as QOM next steps: - Solve the 'sensible' issues. - Choose as first tasks the ones that will be more useful. - Select solutions agreed by everyone. Thanks, Marcel

Re: [Qemu-devel] [PATCH v3 1/3] e1000: allow command-line selection of card model

2014-06-01 Thread Peter Crosthwaite
On Sun, Jun 1, 2014 at 1:33 PM, Gabriel L. Somlo gso...@gmail.com wrote: Allow selection of different card models from the qemu command line, to better accomodate a wider range of guests. Signed-off-by: Romain Dolbeau rom...@dolbeau.org Signed-off-by: Gabriel Somlo so...@cmu.edu Reviewed-by:

Re: [Qemu-devel] [PATCH v3 2/3] tests: e1000: test additional device IDs

2014-06-01 Thread Peter Crosthwaite
On Sun, Jun 1, 2014 at 1:33 PM, Gabriel L. Somlo gso...@gmail.com wrote: Update e1000-test.c to check all currently supported devices. Suggested-by: Andreas Färber afaer...@suse.de Signed-off-by: Gabriel Somlo so...@cmu.edu Reviewed-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Peter

Re: [Qemu-devel] [PATCH v3 3/3] e1000: remove broken support for 82573L

2014-06-01 Thread Peter Crosthwaite
On Sun, Jun 1, 2014 at 1:33 PM, Gabriel L. Somlo gso...@gmail.com wrote: Currently, e1000 support is based on the manual for the 8254xx model series. 82573x models are documented in a separate manual (see

Re: [Qemu-devel] [PATCH v3 0/3] e1000: allow model/device_id selection on command line

2014-06-01 Thread Peter Crosthwaite
On Sun, Jun 1, 2014 at 1:33 PM, Gabriel L. Somlo gso...@gmail.com wrote: Allow selection of different card models from the qemu command line, to better accomodate a wider range of guests. New in v3: - 1/3 and 2/3 from v2 now merged into a single patch (1/3), with: -

[Qemu-devel] Nested KVM is weird?

2014-06-01 Thread Jun Koi
Hi, I managed to run VMWare ESXi hypervisor (type 1) inside KVM. From there, I can install run nested guest Linux on this ESXi. However, I find this very strange: I put some printk() at the top of function nested_vmx_run(), which should run to handle nested KVM. Below is the definition of

Re: [Qemu-devel] Nested KVM is weird?

2014-06-01 Thread Muli Ben-Yehuda
On Sun, Jun 01, 2014 at 05:54:25PM +0700, Jun Koi wrote: So this means ESXi never uses VMResume/VMLaunch? How is this possible, because it uses VMX for its implementation? ESXi will fall back to binary translation if it decides that it cannot use VMX for some reason. Look at the L2's log file

[Qemu-devel] [PATCH] readline: Clear screen on form feed.

2014-06-01 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- util/readline.c | 9 + 1 file changed, 9 insertions(+) diff --git a/util/readline.c b/util/readline.c index 8baec55..08d07e3 100644 --- a/util/readline.c +++ b/util/readline.c @@ -345,6 +345,12 @@ static void

Re: [Qemu-devel] [PATCH] trace: Replace fprintf with error_report and print location

2014-06-01 Thread Alexey Kardashevskiy
On 05/31/2014 12:08 AM, Lluís Vilanova wrote: Alexey Kardashevskiy writes: On 05/29/2014 10:42 PM, Lluís Vilanova wrote: Alexey Kardashevskiy writes: This replaces fprintf(stderr) with error_report. This prints line number of the trace which does not exist or is not traceable. A little

[Qemu-devel] [RFC PATCH] kvm: Enable -cpu option to hide KVM

2014-06-01 Thread Alex Williamson
The latest Nvidia driver (337.88) specifically checks for KVM as the hypervisor and reports Code 43 for the driver in a Windows guest when found. Removing or changing the KVM signature is sufficient to allow the driver to load. This patch adds an option to easily allow the KVM hypervisor

Re: [Qemu-devel] Nested KVM is weird?

2014-06-01 Thread Jun Koi
On Sun, Jun 1, 2014 at 5:59 PM, Muli Ben-Yehuda mu...@mulix.org wrote: On Sun, Jun 01, 2014 at 05:54:25PM +0700, Jun Koi wrote: So this means ESXi never uses VMResume/VMLaunch? How is this possible, because it uses VMX for its implementation? ESXi will fall back to binary translation if

Re: [Qemu-devel] [PATCH] thread-pool: fix deadlock when callbacks depends on each other

2014-06-01 Thread Paolo Bonzini
Il 31/05/2014 20:29, Marcin Gibuła ha scritto: @@ -185,6 +191,14 @@ restart: } if (elem-state == THREAD_DONE elem-common.cb) { QLIST_REMOVE(elem, all); +/* If more completed requests are waiting, notifier needs + * to be rearmed so

Re: [Qemu-devel] When should management tools use q35?

2014-06-01 Thread Paolo Bonzini
Il 01/06/2014 03:22, Cole Robinson ha scritto: Hi all, There was a bit of discussion recently about exposing q35 in virt-manager: http://www.redhat.com/archives/virt-tools-list/2014-May/msg1.html In that thread, Gerd suggested a 'rule of thumb' to use q35 for any guest OS released in 2010

Re: [Qemu-devel] [RFC PATCH] kvm: Enable -cpu option to hide KVM

2014-06-01 Thread Paolo Bonzini
Il 01/06/2014 18:25, Alex Williamson ha scritto: The latest Nvidia driver (337.88) specifically checks for KVM as the hypervisor and reports Code 43 for the driver in a Windows guest when found. Removing or changing the KVM signature is sufficient to allow the driver to load. This patch adds

Re: [Qemu-devel] [PATCH] thread-pool: fix deadlock when callbacks depends on each other

2014-06-01 Thread Marcin Gibuła
Good catch! The main problem with the patch is that you need to use atomic_inc/atomic_dec to increment and decrement pool-pending_completions. Ok. Secondarily, event_notifier_set is pretty heavy-weight, does it work if you wrap the loop like this? restart: QLIST_FOREACH_SAFE(elem,

Re: [Qemu-devel] [PATCH] trace: Replace fprintf with error_report and print location

2014-06-01 Thread Lluís Vilanova
Alexey Kardashevskiy writes: On 05/31/2014 12:08 AM, Lluís Vilanova wrote: Alexey Kardashevskiy writes: On 05/29/2014 10:42 PM, Lluís Vilanova wrote: Alexey Kardashevskiy writes: This replaces fprintf(stderr) with error_report. This prints line number of the trace which does not exist

Re: [Qemu-devel] [RFC PATCH] kvm: Enable -cpu option to hide KVM

2014-06-01 Thread Alex Williamson
On Sun, 2014-06-01 at 20:29 +0200, Paolo Bonzini wrote: Il 01/06/2014 18:25, Alex Williamson ha scritto: The latest Nvidia driver (337.88) specifically checks for KVM as the hypervisor and reports Code 43 for the driver in a Windows guest when found. Removing or changing the KVM signature

Re: [Qemu-devel] [PATCH qom v1 1/1] qom: object: remove parent pointer when unparenting

2014-06-01 Thread Peter Crosthwaite
Ping! On Tue, May 27, 2014 at 10:39 AM, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: Certain parts of the QOM framework test this pointer to determine if an object is parented. Nuke it when the object is unparented to allow for reuse of an object after unparenting. Signed-off-by:

Re: [Qemu-devel] [PATCH v1 14/16] target-arm: A64: Emulate the SMC insn

2014-06-01 Thread Edgar E. Iglesias
On Fri, May 30, 2014 at 05:28:29PM +1000, Edgar E. Iglesias wrote: From: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- target-arm/cpu.h | 1 + target-arm/helper-a64.c| 1 + target-arm/helper.c| 6 ++

Re: [Qemu-devel] [PATCH memory v2 6/9] memory: MemoryRegion: QOMify

2014-06-01 Thread Peter Crosthwaite
On Wed, May 28, 2014 at 2:24 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/05/2014 11:02, Peter Crosthwaite ha scritto: +void memory_region_destroy(MemoryRegion *mr) +{ +/*FIXME: whatever the opposite of object initialize is, do it here */ +memory_region_finalize(OBJECT(mr));

Re: [Qemu-devel] [PATCH memory v2 7/9] memory: MemoryRegion: Add container and addr props

2014-06-01 Thread Peter Crosthwaite
On Tue, May 27, 2014 at 7:03 PM, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: Expose the already existing .parent and .addr fields as QOM properties. .parent (i.e. the field describing the memory region that contains this one in Memory hierachy) is renamed container. This is to avoid

Re: [Qemu-devel] [PATCH memory v2 8/9] memory: MemoryRegion: Add may-overlap and priority props

2014-06-01 Thread Peter Crosthwaite
On Tue, May 27, 2014 at 7:04 PM, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: QOM propertyify the .may-overlap and .priority fields. The setters will re-add the memory as a subregion if needed (i.e. the values change when the memory region is already contained). Signed-off-by: Peter

[Qemu-devel] [PATCH memory v3 0/9] Memory Region QOMification

2014-06-01 Thread Peter Crosthwaite
Hi Paolo, Andreas, This patch series QOMifies Memory regions. This is the Memory API specific subset of patches forming part of the Memory/GPIO/Sysbus QOMification. I think Paolo already has P1 enqeued. Including for ease of review. some QOM patches in P2-3 that cut down on later boilerplate.

[Qemu-devel] [PATCH memory v3 1/9] memory: Simplify mr_add_subregion() if-else

2014-06-01 Thread Peter Crosthwaite
This if else is not needed. The previous call to memory_region_add (whether _overlap or not) will always set priority and may_overlap to desired values. And its not possible to get here without having called memory_region_add_subregion due to the null guard on parent. So we can just directly call

[Qemu-devel] [PATCH memory v3 2/9] qom: object: Ignore refs/unrefs of NULL

2014-06-01 Thread Peter Crosthwaite
Just do nothing if passed NULL for a ref or unref. This avoids call sites that manage a combination of NULL or non-NULL pointers having to add iffery around every ref and unref. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- qom/object.c | 14 -- 1 file changed, 8

[Qemu-devel] [PATCH memory v3 3/9] qom: Publish object_resolve_link

2014-06-01 Thread Peter Crosthwaite
The lower level API object_resolve_path is already published to the world as part of the QOM API. Add object_resolve link as well. This allows QOM clients to roll their own link property setters without having to fallback to the less safe object_resolve_path. Signed-off-by: Peter Crosthwaite

[Qemu-devel] [PATCH memory v3 4/9] memory: Coreify subregion add functionality

2014-06-01 Thread Peter Crosthwaite
Split off the core looping code that actually adds subregions into it's own fn. This prepares support for Memory Region qomification where setting the MR address or parent via QOM will back onto this more minimal function. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com ---

[Qemu-devel] [PATCH memory v3 6/9] memory: MemoryRegion: QOMify

2014-06-01 Thread Peter Crosthwaite
QOMify memory regions as an Object. The former init() and destroy() routines become instance_init() and instance_finalize() resp. memory_region_init() is re-implemented to be: object_initialize() + set fields memory_region_destroy() is re-implemented to call finalize(). Signed-off-by: Peter

[Qemu-devel] [PATCH memory v3 5/9] memory: MemoryRegion: factor out memory region re-adder

2014-06-01 Thread Peter Crosthwaite
memory_region_set_address is mostly just a function that deletes and re-adds a memory region. Factor this generic functionality out into a re-usable function. This prepares support for further QOMification of MemoryRegion. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com ---

[Qemu-devel] [PATCH memory v3 7/9] memory: MemoryRegion: Add container and addr props

2014-06-01 Thread Peter Crosthwaite
Expose the already existing .parent and .addr fields as QOM properties. .parent (i.e. the field describing the memory region that contains this one in Memory hierachy) is renamed container. This is to avoid confusion with the owner field, which is much more akin to an actual QOM parent. Setting

[Qemu-devel] [PATCH memory v3 8/9] memory: MemoryRegion: Add may-overlap and priority props

2014-06-01 Thread Peter Crosthwaite
QOM propertyify the .may-overlap and .priority fields. The setters will re-add the memory as a subregion if needed (i.e. the values change when the memory region is already contained). Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- changed since v2: Fixed priority getter

[Qemu-devel] [PATCH memory v3 9/9] memory: MemoryRegion: Add size property

2014-06-01 Thread Peter Crosthwaite
To allow devices to dynamically resize the device. The motivation is to allow devices with variable size to init their memory_region without size early and then correctly populate size at realize() time. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- memory.c | 38

Re: [Qemu-devel] [PATCH 3/3] block: Drop some superfluous casts from void *

2014-06-01 Thread Markus Armbruster
Max Reitz mre...@redhat.com writes: On 30.05.2014 18:30, Markus Armbruster wrote: They clutter the code. Unfortunately, I can't figure out how to make Coccinelle drop all of them, so I have to settle for common special cases: @@ type T; T *pt; void *pv; @@

Re: [Qemu-devel] [PATCH] qemu-img: Report error even with --oformat=json

2014-06-01 Thread Markus Armbruster
Max Reitz mre...@redhat.com writes: img_check() should report that the format of the given image does not support checks even if JSON output is desired. JSON data is output to stdout, as opposed to error messages, which are (in the case of qemu-img) printed to stderr. Therefore, it is easy to