[Qemu-devel] [RFC PATCH v12 12/21] replay: recording and replaying clock ticks

2015-05-05 Thread Pavel Dovgalyuk
Clock ticks are considered as the sources of non-deterministic data for virtual machine. This patch implements saving the clock values when they are acquired (virtual, host clock). When replaying the execution corresponding values are read from log and transfered to the module, which wants to read

[Qemu-devel] [RFC PATCH v12 20/21] replay: command line options

2015-05-05 Thread Pavel Dovgalyuk
This patch introduces command line options for enabling recording or replaying virtual machine behavior. These options are added to icount command line parameter. They include 'rr' which switches between record and replay and 'rrfile' for specifying the filename for replay log. Signed-off-by: Pave

[Qemu-devel] [RFC PATCH v12 10/21] replay: interrupts and exceptions

2015-05-05 Thread Pavel Dovgalyuk
This patch includes modifications of common cpu files. All interrupts and exceptions occured during recording are written into the replay log. These events allow correct replaying the execution by kicking cpu thread when one of these events is found in the log. Signed-off-by: Pavel Dovgalyuk ---

Re: [Qemu-devel] [PATCH] cpu: Register QOM links at /machine/cpus/

2015-05-05 Thread Paolo Bonzini
On 01/05/2015 13:59, Eduardo Habkost wrote: >> I have a patch to add "." and ".." properties. You can use them to add >> an alias to an object. > > What's the difference between a link and an alias to an object? A (read-only) link adds a reference to the target, an alias doesn't. Paolo

[Qemu-devel] [RFC PATCH v12 13/21] replay: shutdown event

2015-05-05 Thread Pavel Dovgalyuk
This patch records and replays simulator shutdown event. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/replay-internal.h |2 ++ replay/replay.c | 14 ++ replay/replay.h |5 + vl.c |1 + 4 files changed,

Re: [Qemu-devel] [Qemu-block] [RFC] Differential Backups

2015-05-05 Thread Stefan Hajnoczi
On Wed, Apr 29, 2015 at 06:51:08PM -0400, John Snow wrote: > This is a feature that should be very easy to add on top of the existing > incremental feature, since it's just a difference in how the bitmap is > treated: > > Incremental > - Links to the last incremental (managed by libvirt) > - Clear

[Qemu-devel] [RFC PATCH v12 11/21] replay: asynchronous events infrastructure

2015-05-05 Thread Pavel Dovgalyuk
This patch adds module for saving and replaying asynchronous events. These events include network packets, keyboard and mouse input, USB packets, thread pool and bottom halves callbacks. All events are stored in the queue to be processed at synchronization points such as beginning of TB execution,

Re: [Qemu-devel] [PATCH v6 3/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-05-05 Thread Stefan Berger
On 05/04/2015 10:41 PM, Xu, Quan wrote: -Original Message- From: Stefan Berger [mailto:stef...@linux.vnet.ibm.com] Sent: Monday, May 04, 2015 11:36 PM To: Xu, Quan; stefano.stabell...@eu.citrix.com; ebl...@redhat.com Cc: qemu-devel@nongnu.org; wei.l...@citrix.com; dgde...@tycho.nsa.gov;

Re: [Qemu-devel] [Qemu-block] [PATCH 1/6] qcow2: use one single memory block for the L2/refcount cache tables

2015-05-05 Thread Stefan Hajnoczi
On Mon, May 04, 2015 at 12:58:13PM +0200, Kevin Wolf wrote: > Am 01.05.2015 um 16:23 hat Stefan Hajnoczi geschrieben: > > On Thu, Apr 30, 2015 at 01:11:40PM +0300, Alberto Garcia wrote: > > > Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, int num_tables) > > > { > > > BDRVQcowState *s

Re: [Qemu-devel] [PATCH] sheepdog: fix resource leak with sd_snapshot_create

2015-05-05 Thread Michael Tokarev
Applied to -trivial, thank you! /mjt

[Qemu-devel] [RFC PATCH v12 19/21] replay: replay blockers for devices

2015-05-05 Thread Pavel Dovgalyuk
Some devices are not supported by record/replay subsystem. This patch introduces replay blocker which denies starting record/replay if such devices are included into the configuration. Signed-off-by: Pavel Dovgalyuk --- hw/bt/hci.c |7 +++ include/qapi/qmp/qerror.h |3 +

[Qemu-devel] [RFC PATCH v12 16/21]

2015-05-05 Thread Pavel Dovgalyuk
Signed-off-by: Pavel Dovgalyuk --- async.c | 24 +++- dma-helpers.c|4 +++- hw/timer/arm_timer.c |2 +- include/block/aio.h | 18 ++ include/qemu/main-loop.h |1 + main-loop.c |5 + re

Re: [Qemu-devel] [PATCH] tests: consolidate common includes under libqtest.h

2015-05-05 Thread Paolo Bonzini
On 01/05/2015 00:21, Emilio G. Cota wrote: > Something like the appended? > > Cheers, > > Emilio Pretty good, but I wouldn't use qemu-common.h, at least not until all the function and macro declarations are moved to separate headers (some of them may indeed move to osdep.h, in fact

Re: [Qemu-devel] [PATCH] Remove various unused functions

2015-05-05 Thread Michael Tokarev
Applied to -trivial, thank you! /mjt

[Qemu-devel] [RFC PATCH v12 17/21] typedef: add typedef for QemuOpts

2015-05-05 Thread Pavel Dovgalyuk
This patch moves typedefs for QemuOpts and related types to qemu/typedefs.h file. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- include/qemu/option.h |5 + include/qemu/typedefs.h |3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/qemu/

Re: [Qemu-devel] [PATCH] Remove various unused functions

2015-05-05 Thread Stefan Hajnoczi
On Sun, May 03, 2015 at 10:47:22AM +0200, Thomas Huth wrote: > > The functions tpm_backend_thread_tpm_reset() and iothread_find() > are completely unused, let's remove them. > > Signed-off-by: Thomas Huth > --- > backends/tpm.c | 11 --- > include/sysemu/iothread.h

Re: [Qemu-devel] [PATCH v3 0/7] qom: misc fixes & enhancements to support TLS work

2015-05-05 Thread Paolo Bonzini
On 01/05/2015 12:29, Daniel P. Berrange wrote: > This series contains the 7 generic QOM API fixes and enhancements > that I previously posted as part of the large series refactoring > and extending the TLS support in QEMU: > > https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg02038.html

Re: [Qemu-devel] [RFC PATCH v12 16/21]

2015-05-05 Thread Pavel Dovgaluk
This patch is the reduced version of prior "bottom halves" patch. Pavel Dovgalyuk > -Original Message- > From: Pavel Dovgalyuk [mailto:pavel.dovga...@ispras.ru] > Sent: Tuesday, May 05, 2015 1:19 PM > To: qemu-devel@nongnu.org > Cc: peter.mayd...@linaro.org; peter.crosthwa...@xilinx.com;

Re: [Qemu-devel] [PATCH v2 4/4] libqos/ahci: Swap memread/write with bufread/write

2015-05-05 Thread Paolo Bonzini
On 02/05/2015 02:13, John Snow wrote: >> > > I wrote a loop to batch the ascii-hex conversion instead of letting > printf do it; then ran some more very, very scientific tests: > > memset alone: > real0m10.888s > user0m9.303s > sys0m9.146s > > send-batching: > real0m6.541s > us

Re: [Qemu-devel] Fwd: qemu drive mirror assert fault

2015-05-05 Thread Fam Zheng
On Tue, 05/05 12:13, Paolo Bonzini wrote: > > > On 05/05/2015 09:36, Fam Zheng wrote: > I don't think this commit is relevant. The bug is caused by > bdrv_co_discard clearing the bitmap (which is not supported during > iteration, and is caught by the assertion). That bdrv_reset_dirty is > not r

Re: [Qemu-devel] [PATCH] parallel: Allow to disable CONFIG_PARALLEL

2015-05-05 Thread Thomas Huth
On Tue, 5 May 2015 12:18:05 +0200 Miroslav Rezanina wrote: > On Tue, May 05, 2015 at 11:59:50AM +0200, Thomas Huth wrote: > > On Tue, 5 May 2015 11:30:49 +0200 > > mreza...@redhat.com wrote: > > > > > From: Miroslav Rezanina > > > > > > Disabling CONFIG_PARALLEL cause build failure as commit

[Qemu-devel] blkdebug and VMDK (iotests 033 failure on monolithicFlat)

2015-05-05 Thread Fam Zheng
Max, Since you once fixed VMDK with the json descriptor filename, could you take a look at the error: $ ./check -vmdk -o "subformat=monolithicFlat" 033 033 - output mismatch (see 033.out.bad) --- /home/fam/qemu/tests/qemu-iotests/033.out 2015-05-05 10:52:50.524378312 +0800 +++ 033.out

Re: [Qemu-devel] [RFC PATCH v12 16/21]

2015-05-05 Thread Paolo Bonzini
On 05/05/2015 12:22, Pavel Dovgaluk wrote: > This patch is the reduced version of prior "bottom halves" patch. dma-helpers.c is also related to block devices, so it's better not to change it now. Perhaps you can add a replay event for ptimers instead of touching bottom halves? Paolo > Pavel D

Re: [Qemu-devel] [PATCH v5 0/7] Add limited support of VMware's hyper-call rpc

2015-05-05 Thread Paolo Bonzini
On 30/04/2015 20:20, Don Slutz wrote: > Changes v4 to v5: > > Paolo Bonzini > What is VMPORT_SHORT about? > Dropped this. > Why not use a bool in CPUX86State? > Took his sugestion and moved to a bool in X86CPU. Looks good to me, but I'd like an ack from Michael Tsirkin as we

Re: [Qemu-devel] [PATCH 0/2] xhci: fix control transfer event reporting

2015-05-05 Thread Laszlo Ersek
On 05/05/15 11:59, Gerd Hoffmann wrote: > Hi, > > Laszlos fix unfortunaly had unwanted side effects, so we have > to take a different approach to fix the issue at hand. > > please review, > Gerd > > Gerd Hoffmann (2): > Revert "xhci: generate a Transfer Event for each Transfer TRB with the

Re: [Qemu-devel] [PULL 0/1] coverity: fix address_space_rw model

2015-05-05 Thread Peter Maydell
On 5 May 2015 at 09:50, Markus Armbruster wrote: > The following changes since commit 5bccbb04a4abba7af4398de992bf06d585fd1333: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2015-04-30 20:34:54 +0100) > > are available in the git repository at: > > > git:/

Re: [Qemu-devel] [RFC PATCH v12 16/21]

2015-05-05 Thread Peter Maydell
On 5 May 2015 at 11:19, Pavel Dovgalyuk wrote: > > > Signed-off-by: Pavel Dovgalyuk > --- > async.c | 24 +++- > dma-helpers.c|4 +++- > hw/timer/arm_timer.c |2 +- > include/block/aio.h | 18 ++ > include/qemu

Re: [Qemu-devel] [Qemu-block] [PATCH 1/6] qcow2: use one single memory block for the L2/refcount cache tables

2015-05-05 Thread Kevin Wolf
Am 05.05.2015 um 12:28 hat Stefan Hajnoczi geschrieben: > On Mon, May 04, 2015 at 12:58:13PM +0200, Kevin Wolf wrote: > > Am 01.05.2015 um 16:23 hat Stefan Hajnoczi geschrieben: > > > On Thu, Apr 30, 2015 at 01:11:40PM +0300, Alberto Garcia wrote: > > > > Qcow2Cache *qcow2_cache_create(BlockDriver

[Qemu-devel] [PATCH 2/5] console: add dpy_ui_info_supported

2015-05-05 Thread Gerd Hoffmann
Allow ui code to check whenever the emulated display supports display change notifications. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 1 + ui/console.c | 7 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/ui/console.h b/include/ui/console.h ind

[Qemu-devel] [PATCH 5/5] gtk: update mouse position in mouse_set()

2015-05-05 Thread Gerd Hoffmann
Without that the next mouse motion event uses the old position as base for relative move calculation, giving wrong results and making your mouse pointer jump around. Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 8b1458f.

Re: [Qemu-devel] [Qemu-block] [PATCH v3 3/9] libqos: Add migration helpers

2015-05-05 Thread Kevin Wolf
Am 04.05.2015 um 19:52 hat John Snow geschrieben: > > > On 05/04/2015 08:07 AM, Kevin Wolf wrote: > >Am 30.04.2015 um 20:07 hat John Snow geschrieben: > >>+/* Otherwise, we need to wait: poll until migration is completed. */ > >>+while (1) { > >>+rsp = qmp_execute("query-migrate")

Re: [Qemu-devel] [RFC PATCH 14/15] spapr_pci: add ibm, my-drc-index property for PHB hotplug

2015-05-05 Thread David Gibson
On Wed, Apr 29, 2015 at 02:20:23PM -0500, Michael Roth wrote: > This is needed to denote a boot-time PHB as being hot-pluggable. > > Signed-off-by: Michael Roth Reviewed-by: David Gibson > --- > hw/ppc/spapr_pci.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/hw/ppc/sp

Re: [Qemu-devel] [RFC PATCH 08/15] spapr: create DR connectors for PHBs and register reset hooks

2015-05-05 Thread David Gibson
On Wed, Apr 29, 2015 at 02:20:17PM -0500, Michael Roth wrote: > Since we route hotplugged PHBs to their DR connector using their > PHB.index value, we align the number of DR connectors with the > maximum index value: SPAPR_PCI_MAX_INDEX. > > Signed-off-by: Michael Roth As with Bharata's similar

Re: [Qemu-devel] [RFC PATCH 15/15] spapr: add hotplug hooks for PHB hotplug

2015-05-05 Thread David Gibson
On Wed, Apr 29, 2015 at 02:20:24PM -0500, Michael Roth wrote: > Hotplugging PHBs is a machine-level operation, but PHBs reside on the > main system bus, so we register spapr machine as the handler for the > main system bus. The entry point for plug/unplug is shared by all > such machine-level hotpl

Re: [Qemu-devel] [RFC PATCH 07/15] spapr: enable PHB hotplug for pseries-2.4

2015-05-05 Thread David Gibson
On Wed, Apr 29, 2015 at 02:20:16PM -0500, Michael Roth wrote: > Introduce an sPAPRMachineClass sub-class of MachineClass to > handle sPAPR-specific machine configuration properties. > > The 'dr_phb_enabled' field of that class can be set as > part of machine-specific init code, and is then propaga

Re: [Qemu-devel] [RFC PATCH 06/15] spapr_pci: also use 'index' property as DRC index for PHBs

2015-05-05 Thread David Gibson
On Wed, Apr 29, 2015 at 02:20:15PM -0500, Michael Roth wrote: > Prior to this patch 'index' is purely a shorthand for specifying > MMIO windows, BUIDs, and other configuration values for a PHB. > > With the addition of PHB hotplug, we have a static number of DRCs > that can be used to handle hotpl

Re: [Qemu-devel] Fwd: qemu drive mirror assert fault

2015-05-05 Thread Kevin Wolf
Am 05.05.2015 um 12:27 hat Fam Zheng geschrieben: > On Tue, 05/05 12:13, Paolo Bonzini wrote: > > > > > > On 05/05/2015 09:36, Fam Zheng wrote: > > I don't think this commit is relevant. The bug is caused by > > bdrv_co_discard clearing the bitmap (which is not supported during > > iteration, an

Re: [Qemu-devel] [RFC PATCH 11/15] qdev: add qbus_set_hotplug_handler_generic()

2015-05-05 Thread David Gibson
On Wed, Apr 29, 2015 at 02:20:20PM -0500, Michael Roth wrote: > Certain devices types, like memory/CPU, are now being handled using a > hotplug interface provided by a top-level MachineClass. Hotpluggable > host bridges are another such device where it makes sense to use a > machine-level hotplug h

Re: [Qemu-devel] [RFC PATCH 09/15] spapr: populate PHB DRC entries for root DT node

2015-05-05 Thread David Gibson
On Wed, Apr 29, 2015 at 02:20:18PM -0500, Michael Roth wrote: > From: Nathan Fontenot > > This add entries to the root OF node to advertise our PHBs as being > DR-capable in accordance with PAPR specification. > > Signed-off-by: Nathan Fontenot > Signed-off-by: Michael Roth > --- > hw/ppc/spa

Re: [Qemu-devel] [RFC PATCH 10/15] spapr_events: add support for phb hotplug events

2015-05-05 Thread David Gibson
On Wed, Apr 29, 2015 at 02:20:19PM -0500, Michael Roth wrote: > Extend the existing EPOW event format we use for PCI > devices to emit PHB plug/unplug events. > > Signed-off-by: Michael Roth Reviewed-by: David Gibson -- David Gibson| I'll have my music baroque, and my code

Re: [Qemu-devel] [RFC PATCH 13/15] spapr_pci: provide node start offset via spapr_populate_pci_dt()

2015-05-05 Thread David Gibson
On Wed, Apr 29, 2015 at 02:20:22PM -0500, Michael Roth wrote: > PHB hotplug re-uses PHB device tree generation code and passes > it to a guest via RTAS. Doing this requires knowledge of where > exactly in the device tree the node describing the PHB begins. > > Provide this via a new optional point

Re: [Qemu-devel] Fwd: qemu drive mirror assert fault

2015-05-05 Thread Paolo Bonzini
On 05/05/2015 13:48, Kevin Wolf wrote: > It depends. In its basic form, bdrv_discard() just means "I don't care > about the data any more". Then clearing the dirty bitmap is correct. > > The content is only important if the caller used discard to write zeros > because can_write_zeroes_with_unmap

[Qemu-devel] [PATCH 3/5] gtk: add ui_info support

2015-05-05 Thread Gerd Hoffmann
Pass new display size to the guest after window resizes. Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 51ea1b9..9163b43 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1478,6 +1478,19 @@ static gboolean gd_fo

Re: [Qemu-devel] Fwd: qemu drive mirror assert fault

2015-05-05 Thread Paolo Bonzini
On 05/05/2015 13:49, Paolo Bonzini wrote: > > > On 05/05/2015 13:48, Kevin Wolf wrote: >> It depends. In its basic form, bdrv_discard() just means "I don't care >> about the data any more". Then clearing the dirty bitmap is correct. >> >> The content is only important if the caller used discard

[Qemu-devel] [PATCH 1/5] console: delayed ui_info guest notification

2015-05-05 Thread Gerd Hoffmann
So we don't flood the guest with display change notifications while the user resizes the window. Signed-off-by: Gerd Hoffmann --- ui/console.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/ui/console.c b/ui/console.c index f5295c4..248dd60 100644 ---

[Qemu-devel] [PATCH 0/5] gtk: misc bits

2015-05-05 Thread Gerd Hoffmann
Hi, A few small gtk patches. The two console patches are dependencies for patch #3. Adding ui_info is preparation for virtio-gpu merge: virtio-gpu will be able to adapt the guest display to the user's window size, simliar to how spice is doing it with the spice guest agent. ui_info basically i

Re: [Qemu-devel] Fwd: qemu drive mirror assert fault

2015-05-05 Thread Fam Zheng
On Tue, 05/05 13:48, Kevin Wolf wrote: > Am 05.05.2015 um 12:27 hat Fam Zheng geschrieben: > > On Tue, 05/05 12:13, Paolo Bonzini wrote: > > > > > > > > > On 05/05/2015 09:36, Fam Zheng wrote: > > > I don't think this commit is relevant. The bug is caused by > > > bdrv_co_discard clearing the bi

[Qemu-devel] [PATCH 4/5] gtk: create gtk.h

2015-05-05 Thread Gerd Hoffmann
Move various gtk bits (includes, data structures) to a header file. Signed-off-by: Gerd Hoffmann --- include/ui/gtk.h | 76 ui/gtk.c | 73 ++--- 2 files changed, 78 insertions(+), 71

[Qemu-devel] [PATCH v3 04/14] qapi: Rename generate_enum_full_value() to c_enum_const()

2015-05-05 Thread Eric Blake
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Eric Blake --- scripts/qapi-event.py | 5 ++--- scripts/qapi-types.py | 6 +++--- scripts/qapi-visit.py | 4 ++-- scripts/qapi.py | 6 +++--- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/scripts/q

[Qemu-devel] [PATCH v3 11/14] qapi: Support downstream simple unions

2015-05-05 Thread Eric Blake
Enhance the testsuite to cover downstream simple unions, including when a union branch is a downstream name. Update the generator to mangle the union names in the appropriate places. Signed-off-by: Eric Blake --- scripts/qapi-types.py | 2 +- scripts/qapi-visit.py

[Qemu-devel] [PATCH v3 07/14] qapi: Move camel_to_upper(), c_enum_const() to closely related code

2015-05-05 Thread Eric Blake
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Eric Blake --- scripts/qapi.py | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 967dadb..b9822c6 100644 --- a/

[Qemu-devel] [PATCH v3 08/14] qapi: Make c_type() consistently convert qapi names

2015-05-05 Thread Eric Blake
Continuing the string of cleanups for supporting downstream names containing '.', this patch focuses on ensuring c_type() can handle a downstream name. This patch alone does not fix the places where generator output should be calling this function but was open-coding things instead, but it gets us

[Qemu-devel] [PATCH v3 12/14] qapi: Support downstream flat unions

2015-05-05 Thread Eric Blake
Enhance the testsuite to cover downstream flat unions, including the base type, discriminator name and type, and branch name and type. Update the generator to mangle the union names in the appropriate places. Signed-off-by: Eric Blake --- scripts/qapi-types.py | 2 +- scripts/

[Qemu-devel] [PATCH v3 05/14] qapi: Simplify c_enum_const()

2015-05-05 Thread Eric Blake
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Eric Blake --- scripts/qapi.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index b3628fd..9209fd5 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -961,6 +9

[Qemu-devel] [PATCH v3 02/14] qapi: Rename identical c_fun()/c_var() into c_name()

2015-05-05 Thread Eric Blake
Now that the two functions are identical, we only need one of them, and we might as well give it a more descriptive name. Basically, the function serves as the translation from a QAPI name into a (portion of a) C identifier, without regards to whether it is a variable or function name. Signed-off

Re: [Qemu-devel] [PATCH v2 3/4] qapi: Correctly handle downstream extensions in more locations

2015-05-05 Thread Eric Blake
On 04/29/2015 05:29 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Now that c_var() handles '.' in downstream extension names, fix >> the generator to support such names as additional types, enums, >> members within an enum, branches of a union or alternate, and >> in arrays. >> >> -def

[Qemu-devel] [PATCH v3 10/14] qapi: Support downstream structs

2015-05-05 Thread Eric Blake
Enhance the testsuite to cover downstream structs, including struct members and base structs. Update the generator to mangle the struct names in the appropriate places. Signed-off-by: Eric Blake --- scripts/qapi-types.py | 4 ++-- scripts/qapi-visit.py | 11

[Qemu-devel] [PATCH v3 13/14] qapi: Support downstream alternates

2015-05-05 Thread Eric Blake
Enhance the testsuite to cover downstream alternates, including whether the branch name or type is downstream. Update the generator to mangle alternate names in the appropriate places. Signed-off-by: Eric Blake --- scripts/qapi-types.py | 7 --- scripts/qapi-visit.py

[Qemu-devel] [PATCH v3 14/14] qapi: Support downstream events and commands

2015-05-05 Thread Eric Blake
Enhance the testsuite to cover downstream events and commands. Events worked without more tweaks, but commands needed a few final updates in the generator to mangle names in the appropriate places. In making those tweaks, it was easier to drop type_visitor() and inline its actions instead. Signed-

[Qemu-devel] [PATCH v3 00/14] Fix qapi mangling of downstream names

2015-05-05 Thread Eric Blake
This series makes it possible to use downstream extensions (such as __com.redhat_xyz) and temporary names (such as x-foo) in every position possible in QAPI schemes, with added tests that the generated code still compiles. There's still some things we could do to the qapi generator, such as normal

[Qemu-devel] [PATCH v3 01/14] qapi: Fix C identifiers generated for names containing '.'

2015-05-05 Thread Eric Blake
From: Markus Armbruster c_fun() maps '.' to '_', c_var() doesn't. Nothing prevents '.' in QAPI names that get passed to c_var(). Which QAPI names get passed to c_fun(), to c_var(), or to both is not obvious. Names of command parameters and struct type members get passed to c_var(). c_var() st

[Qemu-devel] [PATCH v3 03/14] qapi: Rename _generate_enum_string() to camel_to_upper()

2015-05-05 Thread Eric Blake
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Eric Blake --- scripts/qapi.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 2431327..d9ed73a 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@

[Qemu-devel] [PATCH v3 06/14] qapi: Use c_enum_const() in generate_alternate_qtypes()

2015-05-05 Thread Eric Blake
From: Markus Armbruster Missed in commit b0b5819. Signed-off-by: Markus Armbruster Signed-off-by: Eric Blake --- scripts/qapi-types.py | 6 ++ scripts/qapi.py | 11 --- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-type

[Qemu-devel] [PATCH v3 09/14] qapi: Support downstream enums

2015-05-05 Thread Eric Blake
Enhance the testsuite to cover a downstream enum type and enum string. Update the generator to mangle the enum name in the appropriate places. The code for generating list visitors must be careful how it mangles names for enum lists differently than code for builtin type lists. Signed-off-by: Er

Re: [Qemu-devel] [PATCH] QJSON: Use OBJECT_CHECK

2015-05-05 Thread Juan Quintela
Eduardo Habkost wrote: > On Sat, Apr 25, 2015 at 07:05:55PM +0200, Andreas Färber wrote: >> Am 25.04.2015 um 17:28 schrieb Eduardo Habkost: >> > The QJSON code used casts to (QJSON*) directly, instead of OBJECT_CHECK. >> > There were even some functions using object_dynamic_cast() calls >> > follo

[Qemu-devel] [PATCH 0/4] block: Mirror discarded sectors

2015-05-05 Thread Fam Zheng
This fixes the mirror assert failure reported by wangxiaolong: https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg04458.html The direct cause is that hbitmap code couldn't handle unset of bits *after* iterator's current position. We could fix that, but the bdrv_reset_dirty() call is more qu

[Qemu-devel] [PATCH 3/4] qemu-iotests: Make block job methods common

2015-05-05 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/041| 66 ++- tests/qemu-iotests/iotests.py | 28 ++ 2 files changed, 43 insertions(+), 51 deletions(-) diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index 59a8f73..3d46e

[Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard

2015-05-05 Thread Fam Zheng
Unsetting dirty globally with discard is not very correct. The discard may zero out sectors (depending on can_write_zeroes_with_unmap), we should replicate this change to destinition side to make sure that the guest sees the same data. Calling bdrv_reset_dirty also troubles mirror job because the

[Qemu-devel] [PATCH 2/4] block: Remove bdrv_reset_dirty

2015-05-05 Thread Fam Zheng
Using this function woule always be wrong because a dirty bitmap must have a specific owner that consumes the dirty bits and calls bdrv_reset_dirty_bitmap(). Remove the unused function to avoid future misuse. Signed-off-by: Fam Zheng --- block.c | 12 include/bloc

[Qemu-devel] [PATCH 4/4] qemu-iotests: Add test case for mirror with unmap

2015-05-05 Thread Fam Zheng
This checks that the discard on mirror source that effectively zeroes data is also reflected by the data of target. Signed-off-by: Fam Zheng --- tests/qemu-iotests/131 | 59 ++ tests/qemu-iotests/131.out | 5 tests/qemu-iotests/group | 1 +

Re: [Qemu-devel] [PATCH v4 0/4] scripts: qmp-shell: add transaction support

2015-05-05 Thread Luiz Capitulino
On Mon, 04 May 2015 15:24:02 -0400 John Snow wrote: > Ping > (I should've CC'd Luiz to begin with ...) > > Eric's given this series the once over and Kashyap has tested it, so it > should in theory be good to go. I lost track of it. Is v4 a new posting? > > On 04/29/2015 03:14 PM, John Snow

Re: [Qemu-devel] [PATCH] QJSON: Use OBJECT_CHECK

2015-05-05 Thread Luiz Capitulino
On Tue, 05 May 2015 14:43:19 +0200 Juan Quintela wrote: > Eduardo Habkost wrote: > > On Sat, Apr 25, 2015 at 07:05:55PM +0200, Andreas Färber wrote: > >> Am 25.04.2015 um 17:28 schrieb Eduardo Habkost: > >> > The QJSON code used casts to (QJSON*) directly, instead of OBJECT_CHECK. > >> > There w

Re: [Qemu-devel] [PATCH 1/6] qcow2: use one single memory block for the L2/refcount cache tables

2015-05-05 Thread Alberto Garcia
On Thu 30 Apr 2015 05:08:05 PM CEST, Eric Blake wrote: >> typedef struct Qcow2CachedTable { >> -void* table; >> int64_t offset; >> booldirty; >> int cache_hits; >> @@ -40,39 +39,34 @@ struct Qcow2Cache { >> struct Qcow2Cache* depends; >> int

Re: [Qemu-devel] [PATCH v5 4/7] vmport_rpc: Add QMP access to vmport_rpc object.

2015-05-05 Thread Eric Blake
On 04/30/2015 12:20 PM, Don Slutz wrote: > This adds one new inject command: > > inject-vmport-action > > And three guest info commands: > > vmport-guestinfo-set > vmport-guestinfo-get > query-vmport-guestinfo > > More details in qmp-commands.hx > > Signed-off-by: Don Slutz > --- > +++ b/qap

[Qemu-devel] [ARM]: Adding support for Cortex-M4

2015-05-05 Thread aurelio remonda
Hi, i would like to to add support for cortex-m4 on qemu. Most features of the Cortex-M3 and M4 are the same with the significant difference that Cortex-M4 has DSP extensions and optional FPU. Even so, i really need some pointers for this (im a newbie on qemu devel). I found out that qemu can manag

Re: [Qemu-devel] Fwd: qemu drive mirror assert fault

2015-05-05 Thread Kevin Wolf
Am 05.05.2015 um 13:49 hat Paolo Bonzini geschrieben: > > > On 05/05/2015 13:48, Kevin Wolf wrote: > > It depends. In its basic form, bdrv_discard() just means "I don't care > > about the data any more". Then clearing the dirty bitmap is correct. > > > > The content is only important if the call

Re: [Qemu-devel] [ARM]: Adding support for Cortex-M4

2015-05-05 Thread Peter Maydell
On 5 May 2015 at 13:52, aurelio remonda wrote: > Hi, i would like to to add support for cortex-m4 on qemu. Most features of > the Cortex-M3 and M4 are the same with the significant difference that > Cortex-M4 has DSP extensions and optional FPU. Even so, i really need some > pointers for this (im

Re: [Qemu-devel] [PATCH v8 20/40] qapi: Better error messages for duplicated expressions

2015-05-05 Thread Eric Blake
On 05/05/2015 03:11 AM, Markus Armbruster wrote: > Eric Blake writes: > >> The previous commit demonstrated that the generator overlooked >> duplicate expressions: >> - a complex type or command reusing a built-in type name >> - redeclaration of a type name, whether by the same or different >> me

Re: [Qemu-devel] [PATCH 2/6] qcow2: simplify qcow2_cache_put() and qcow2_cache_entry_mark_dirty()

2015-05-05 Thread Alberto Garcia
On Fri 01 May 2015 04:31:52 PM CEST, Stefan Hajnoczi wrote: >> int qcow2_cache_put(BlockDriverState *bs, Qcow2Cache *c, void **table) >> { >> -int i; >> +int i = (*table - c->table_array) / c->table_size; >> >> -for (i = 0; i < c->size; i++) { >> -if (table_addr(c, i) == *t

Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard

2015-05-05 Thread Paolo Bonzini
On 05/05/2015 14:46, Fam Zheng wrote: > Unsetting dirty globally with discard is not very correct. The discard may > zero > out sectors (depending on can_write_zeroes_with_unmap), we should replicate > this change to destinition side to make sure that the guest sees the same > data. > > Callin

Re: [Qemu-devel] [PATCH qemu v7 06/14] spapr_iommu: Introduce "enabled" state for TCE table

2015-05-05 Thread David Gibson
On Sat, Apr 25, 2015 at 10:24:36PM +1000, Alexey Kardashevskiy wrote: > Currently TCE tables are created once at start and their size never > changes. We are going to change that by introducing a Dynamic DMA windows > support where DMA configuration may change during the guest execution. > > This

Re: [Qemu-devel] Fwd: qemu drive mirror assert fault

2015-05-05 Thread Paolo Bonzini
On 05/05/2015 15:03, Kevin Wolf wrote: > > Yes, the SCSI command WRITE SAME with UNMAP = 1 (not coincidentially :)) > > calls discard too. Who knows what the guest used it for... > > > > However, write zeroes doesn't go through bdrv_co_discard, does it? > > Initially I expected that it does, b

Re: [Qemu-devel] [PATCH qemu v7 07/14] spapr_iommu: Add root memory region

2015-05-05 Thread David Gibson
On Sat, Apr 25, 2015 at 10:24:37PM +1000, Alexey Kardashevskiy wrote: > We are going to have multiple DMA windows at different offsets on > a PCI bus. For the sake of migration, we will have as many TCE table > objects pre-created as many windows supported. > So we need a way to map windows dynamic

Re: [Qemu-devel] [PATCH qemu v7 08/14] spapr_pci: Do complete reset of DMA config when resetting PHB

2015-05-05 Thread David Gibson
On Sat, Apr 25, 2015 at 10:24:38PM +1000, Alexey Kardashevskiy wrote: > On a system reset, DMA configuration has to reset too. At the moment > it clears the table content. This is enough for the single table case > but with DDW, we will also have to disable all DMA windows except > the default one.

Re: [Qemu-devel] [PATCH v6 03/17] Extend QMP command query-cpus to return accelerator id and model name

2015-05-05 Thread Eduardo Habkost
On Mon, Apr 27, 2015 at 04:53:17PM +0200, Michael Mueller wrote: > The QMP command query-cpus now additionally displays a model name and > the backing accelerator. Both are omitted if the model name is not > initialized. > > request: > { "execute" : "query-cpus" } > > answer: > { { "c

Re: [Qemu-devel] [PATCH qemu v7 14/14] vfio: Enable DDW ioctls to VFIO IOMMU driver

2015-05-05 Thread David Gibson
On Sat, Apr 25, 2015 at 10:24:44PM +1000, Alexey Kardashevskiy wrote: > This enables DDW RTAS-related ioctls in VFIO. > > Signed-off-by: Alexey Kardashevskiy This patch belongs before the last one (since the last one won't work without it). But otherwise, Reviewed-by: David Gibson -- David

Re: [Qemu-devel] [PATCH v3 3/6] spapr_pci: encode class code including Prog IF register

2015-05-05 Thread David Gibson
On Tue, May 05, 2015 at 02:23:53PM +0530, Nikunj A Dadhania wrote: > Current code missed the Prog IF register. All Class Code, Subclass, > and Prog IF registers are needed to identify the accurate device type. > > For example: USB controllers use the PROG IF for denoting: USB > FullSpeed, HighSpee

Re: [Qemu-devel] [PATCH v3 5/6] spapr_pci: fix boot-time device tree fields for pci hotplug

2015-05-05 Thread David Gibson
On Tue, May 05, 2015 at 02:23:55PM +0530, Nikunj A Dadhania wrote: > From: Michael Roth > > We need to set the proper drc_index values in ibm,my-drc-index > fields in order to allow a PCI device that was present at > boot-time to be unplugged. > > Previously SLOF handles this, but with QEMU hand

Re: [Qemu-devel] [PATCH qemu v7 13/14] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2015-05-05 Thread David Gibson
On Sat, Apr 25, 2015 at 10:24:43PM +1000, Alexey Kardashevskiy wrote: > This adds support for Dynamic DMA Windows (DDW) option defined by > the SPAPR specification which allows to have additional DMA window(s) > > This implements DDW for emulated and VFIO devices. As all TCE root regions > are map

Re: [Qemu-devel] [PATCH v6 04/17] Extend HMP command info cpus to display accelerator id and model name

2015-05-05 Thread Eduardo Habkost
On Mon, Apr 27, 2015 at 04:53:18PM +0200, Michael Mueller wrote: > The HMP command info cpus now displays the CPU model name and the > backing accelerator if part of the CPUState. > > (qemu) info cpus > * CPU #0: (halted) model=2827-ga2 accel=kvm thread_id=1679 > > Signed-off-by: Michael Mueller

Re: [Qemu-devel] [ARM]: Adding support for Cortex-M4

2015-05-05 Thread Liviu Ionescu
> On 05 May 2015, at 15:52, aurelio remonda wrote: > > Hi, i would like to to add support for cortex-m4 on qemu. ... For your information, I'm also planning to improve support for the Cortex-M family in my GNU ARM Eclipse QEMU fork. My first priority is fully supporting the Cortex-M system pe

Re: [Qemu-devel] [PATCH v6 02/17] Add accelerator id and model name to CPUState

2015-05-05 Thread Eduardo Habkost
On Mon, Apr 27, 2015 at 04:53:16PM +0200, Michael Mueller wrote: > The patch defines ids per accelerator and adds the accel_id and > the model_name to the CPUState. The accel_id is initialized by > common code, the model name needs to be initialized by target > specific code. > > Signed-off-by: Mi

Re: [Qemu-devel] Fwd: qemu drive mirror assert fault

2015-05-05 Thread Kevin Wolf
Am 05.05.2015 um 15:07 hat Paolo Bonzini geschrieben: > > > On 05/05/2015 15:03, Kevin Wolf wrote: > > > Yes, the SCSI command WRITE SAME with UNMAP = 1 (not coincidentially :)) > > > calls discard too. Who knows what the guest used it for... > > > > > > However, write zeroes doesn't go through

Re: [Qemu-devel] [PATCH] QJSON: Use OBJECT_CHECK

2015-05-05 Thread Juan Quintela
Luiz Capitulino wrote: > On Tue, 05 May 2015 14:43:19 +0200 > Juan Quintela wrote: > >> Eduardo Habkost wrote: >> > On Sat, Apr 25, 2015 at 07:05:55PM +0200, Andreas Färber wrote: >> >> Am 25.04.2015 um 17:28 schrieb Eduardo Habkost: >> >> > The QJSON code used casts to (QJSON*) directly, instea

Re: [Qemu-devel] [PATCH v1 RFC 34/34] char: introduce support for TLS encrypted TCP chardev backend

2015-05-05 Thread Daniel P. Berrange
On Mon, May 04, 2015 at 10:07:15PM +0200, Kashyap Chamarthy wrote: > On Fri, Apr 17, 2015 at 03:22:37PM +0100, Daniel P. Berrange wrote: > > This integrates support for QIOChannelTLS object in the TCP > > chardev backend. If the 'tls-cred=NAME' option is passed with > > the '-chardev tcp' argument,

Re: [Qemu-devel] [PATCH v1 RFC 34/34] char: introduce support for TLS encrypted TCP chardev backend

2015-05-05 Thread Paolo Bonzini
On 05/05/2015 15:49, Daniel P. Berrange wrote: >> > qemu-system-x86_64: -object qcrypto-tls-cred,id=tls0,credtype=x509,: >> > invalid object type: qcrypto-tls-cred > Typo in my commit message - it should end in '-creds' not '-cred' for > the object type. FWIW, I think just "tls-creds" i

Re: [Qemu-devel] [PATCH v3 1/6] spapr_pci: remove duplicate macros

2015-05-05 Thread Thomas Huth
On Tue, 5 May 2015 14:23:51 +0530 Nikunj A Dadhania wrote: > Signed-off-by: Nikunj A Dadhania > --- > hw/ppc/spapr_pci.c | 11 --- > 1 file changed, 11 deletions(-) > > diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c > index 2e7590c..4df3a33 100644 > --- a/hw/ppc/spapr_pci.c > ++

Re: [Qemu-devel] [PATCH v6 01/17] Introduce stub routine cpu_desc_avail

2015-05-05 Thread Eduardo Habkost
On Mon, Apr 27, 2015 at 04:53:15PM +0200, Michael Mueller wrote: > This patch introduces the function cpu_desc_avail() which returns by > default true if not architecture specific implemented. Its intention > is to indicate if the cpu model description is available for display > by list_cpus(). Thi

Re: [Qemu-devel] [PATCH v1 RFC 34/34] char: introduce support for TLS encrypted TCP chardev backend

2015-05-05 Thread Daniel P. Berrange
On Tue, May 05, 2015 at 03:53:41PM +0200, Paolo Bonzini wrote: > > > On 05/05/2015 15:49, Daniel P. Berrange wrote: > >> > qemu-system-x86_64: -object qcrypto-tls-cred,id=tls0,credtype=x509,: > >> > invalid object type: qcrypto-tls-cred > > Typo in my commit message - it should end in '-

Re: [Qemu-devel] [PATCH v3 2/6] spapr_pci: encode missing 64-bit memory address space

2015-05-05 Thread Thomas Huth
On Tue, 5 May 2015 14:23:52 +0530 Nikunj A Dadhania wrote: > The properties reg/assigned-resources need to encode 64-bit memory > address space as part of phys.hi dword. > > 00 if configuration space > 01 if IO region, > 10 if 32-bit MEM region > 11 if 64-bit MEM region > > Signed-off-

<    1   2   3   4   >