Re: [Qemu-devel] [PATCH RESEND v2 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-08-04 Thread Gavin Shan
On Tue, Aug 04, 2015 at 02:49:14PM +1000, Alexey Kardashevskiy wrote: >On 08/03/2015 01:32 PM, Gavin Shan wrote: >>On Mon, Aug 03, 2015 at 12:51:09PM +1000, David Gibson wrote: >>>On Mon, Aug 03, 2015 at 09:23:19AM +1000, Gavin Shan wrote: The patch supports RTAS calls "ibm,{open,close}-errinjc

Re: [Qemu-devel] [PATCH RESEND v2 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-08-04 Thread Alexey Kardashevskiy
On 08/04/2015 05:16 PM, Gavin Shan wrote: On Tue, Aug 04, 2015 at 02:49:14PM +1000, Alexey Kardashevskiy wrote: On 08/03/2015 01:32 PM, Gavin Shan wrote: On Mon, Aug 03, 2015 at 12:51:09PM +1000, David Gibson wrote: On Mon, Aug 03, 2015 at 09:23:19AM +1000, Gavin Shan wrote: The patch support

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 11/11] new: arm/barrier-test for memory barriers

2015-08-04 Thread Alex Bennée
alvise rigo writes: > On Mon, Aug 3, 2015 at 6:06 PM, Alex Bennée wrote: > >> >> alvise rigo writes: >> >> > On Mon, Aug 3, 2015 at 12:30 PM, Alex Bennée >> wrote: >> >> >> >> alvise rigo writes: >> >> >> >>> Hi Alex, >> >>> >> >>> Nice set of tests, they are proving to be helpful. >> >>> On

Re: [Qemu-devel] [PATCH v4 01/11] tcg: add ability to dump /tmp/perf-.map files

2015-08-04 Thread Alex Bennée
Paolo Bonzini writes: > On 03/08/2015 11:14, Alex Bennée wrote: >> This allows the perf tool to map samples to each individual translation >> block. This could be expanded for user space but currently it gives >> enough information to find any hotblocks by other means. >> >> Signed-off-by: Alex

Re: [Qemu-devel] [PATCH v3 10/12] netfilter: add a netbuffer filter

2015-08-04 Thread Yang Hongyang
On 08/04/2015 02:30 PM, Jason Wang wrote: On 08/04/2015 02:05 PM, Yang Hongyang wrote: On 08/04/2015 01:03 PM, Jason Wang wrote: On 08/03/2015 04:30 PM, Yang Hongyang wrote: This filter is to buffer/release packets, this feature can be used when using MicroCheckpointing, or other Remus lik

Re: [Qemu-devel] [sheepdog] [PATCH] sheepdog: fix overlapping metadata update

2015-08-04 Thread Vasiliy Tolstov
2015-08-03 3:41 GMT+03:00 Liu Yuan : > What did you mean by 'not able to completely install'? It is a installation > problem or something else? > i have simple test that works as: 1) boot 3.18.x kernel and initrd with static compiled golang binary 2) binary bringup dhcp network 3) fetch from http

Re: [Qemu-devel] [PATCH v2 1/3] target-mips: Copy restrictions from ext/ins to dext/dins

2015-08-04 Thread Leon Alrae
On 03/08/2015 23:09, Aurelien Jarno wrote: >>> Should we try to get this one into 2.4, if not already too late? >> >> Perhaps. Otherwise via stable after the fact. > > Ok. Leon, do you have other pending patches for 2.4/2.4.1? The > semihosting microMIPS R6 one maybe? Yes, it would be good also

[Qemu-devel] [PATCH][TRIVIAL] i6300esb: fix timer overflow

2015-08-04 Thread Laurent Vivier
We use muldiv64() to compute the time to wait: timeout = muldiv64(get_ticks_per_sec(), timeout, 3300); but get_ticks_per_sec() is 10^9 (30 bit value) and timeout is a 35 bit value. Whereas muldiv64 is: uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c) So we loose 3 bits of time

[Qemu-devel] [PATCH v4 01/11] net: add a new object netfilter

2015-08-04 Thread Yang Hongyang
Add the framework for a new netfilter object and a new -netfilter CLI option as a basis for the following patches. Signed-off-by: Yang Hongyang CC: Paolo Bonzini CC: Eric Blake Reviewed-by: Thomas Huth --- include/net/filter.h| 15 +++ include/sysemu/sysemu.h | 1 + net/Makef

[Qemu-devel] [PATCH v4 00/11] For QEMU 2.5: Add a netfilter object and netbuffer filter

2015-08-04 Thread Yang Hongyang
This patch add a new object netfilter, capture all network packets. Also implement a netbuffer based on this object. the "buffer" netfilter could be used by VM FT solutions like MicroCheckpointing, to buffer/release packets. Or to simulate packet delay. You can also get the series from: https://gi

[Qemu-devel] [PATCH v4 02/11] init/cleanup of netfilter object

2015-08-04 Thread Yang Hongyang
QTAILQ_ENTRY global_list but used by filter layer, so that we can manage all filters together. QTAILQ_ENTRY next used by netdev, filter belongs to the specific netdev is in this queue. This is mostly the same with init/cleanup of netdev object. Signed-off-by: Yang Hongyang --- include/net/filter

[Qemu-devel] [PATCH v4 07/11] net/queue: export qemu_net_queue_append_iov

2015-08-04 Thread Yang Hongyang
Signed-off-by: Yang Hongyang --- include/net/queue.h | 7 +++ net/queue.c | 12 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/include/net/queue.h b/include/net/queue.h index fc02b33..f10fab0 100644 --- a/include/net/queue.h +++ b/include/net/queue.h @@

[Qemu-devel] [PATCH v4 10/11] filter/buffer: update command description and help

2015-08-04 Thread Yang Hongyang
now that we have a buffer netfilter, update the command description and help. Signed-off-by: Yang Hongyang CC: Luiz Capitulino CC: Markus Armbruster --- hmp-commands.hx | 2 +- qemu-options.hx | 5 - qmp-commands.hx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hmp

[Qemu-devel] [PATCH v4 04/11] net: delete netfilter object when delete netdev

2015-08-04 Thread Yang Hongyang
When we delete the netdev, we also delete the netfilter object attached to it, because if the netdev is removed, the filters which attached to it is useless. Signed-off-by: Yang Hongyang --- include/net/filter.h | 1 + net/filter.c | 2 +- net/net.c| 14 ++ 3 fi

[Qemu-devel] [PATCH v4 06/11] netfilter: add an API to pass the packet to next filter

2015-08-04 Thread Yang Hongyang
add an API qemu_netfilter_pass_to_next_iov() to pass the packet to next filter, and a wrapper qemu_netfilter_pass_to_next(). Signed-off-by: Yang Hongyang --- include/net/filter.h | 12 net/filter.c | 43 +++ 2 files changed, 55 inserti

[Qemu-devel] [PATCH v4 05/11] netfilter: hook packets before net queue send

2015-08-04 Thread Yang Hongyang
Capture packets that will be sent. Signed-off-by: Yang Hongyang --- net/net.c | 66 ++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index 03b2296..efccd56 100644 --- a/net/net.c +++ b/net/net.c @@

[Qemu-devel] [PATCH v4 08/11] move out net queue structs define

2015-08-04 Thread Yang Hongyang
Signed-off-by: Yang Hongyang --- include/net/queue.h | 19 +++ net/queue.c | 19 --- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/net/queue.h b/include/net/queue.h index f10fab0..e139cc7 100644 --- a/include/net/queue.h +++ b/inc

[Qemu-devel] [PATCH v4 03/11] netfilter: add netfilter_{add|del} commands

2015-08-04 Thread Yang Hongyang
add netfilter_{add|del} commands This is mostly the same with netdev_{add|del} commands. Signed-off-by: Yang Hongyang CC: Luiz Capitulino CC: Markus Armbruster CC: Eric Blake --- hmp-commands.hx | 30 + hmp.c| 29 hmp.h

[Qemu-devel] [PATCH v4 09/11] netfilter: add a netbuffer filter

2015-08-04 Thread Yang Hongyang
This filter is to buffer/release packets, this feature can be used when using MicroCheckpointing, or other Remus like VM FT solutions, you can also use it to simulate the network delay. It has an interval option, if supplied, this filter will release packets by interval. Usage: -netdev tap,id=bn0

[Qemu-devel] [PATCH v4 11/11] tests: add test cases for netfilter object

2015-08-04 Thread Yang Hongyang
Using qtest qmp interface to implement following cases: 1) add/remove netfilter 2) add a netfilter then delete the netdev 3) add/remove more than one netfilters 4) add more than one netfilters and then delete the netdev Signed-off-by: Yang Hongyang --- tests/.gitignore | 1 + tests/Makef

[Qemu-devel] [PATCH v16 06/21] replay: introduce icount event

2015-08-04 Thread Pavel Dovgalyuk
This patch adds icount event to the replay subsystem. This event corresponds to execution of several instructions and used to synchronize input events in the replay phase. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/replay-internal.c | 24 re

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

2015-08-04 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] [PATCH v16 02/21] replay: global variables and function stubs

2015-08-04 Thread Pavel Dovgalyuk
This patch adds global variables, defines, function declarations, and function stubs for deterministic VM replay used by external modules. Reviewed-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Pavel Dovgalyuk --- Makefile.target |1 docs/replay.txt | 167 ++

[Qemu-devel] [PATCH v16 04/21] replay: internal functions for replay log

2015-08-04 Thread Pavel Dovgalyuk
This patch adds functions to perform read and write operations with replay log. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/Makefile.objs |1 replay/replay-internal.c | 155 ++ replay/replay-internal.h | 46 ++

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

2015-08-04 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 ---

[Qemu-devel] [PATCH v16 05/21] replay: introduce mutex to protect the replay log

2015-08-04 Thread Pavel Dovgalyuk
This mutex will protect read/write operations for replay log. Using mutex is necessary because most of the events consist of several fields stored in the log. The mutex will help to avoid races. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/replay-internal.c | 27 +

[Qemu-devel] [PATCH v16 03/21] sysemu: system functions for replay

2015-08-04 Thread Pavel Dovgalyuk
This patch removes "static" specifier from several qemu function to make them visible to the replay module. It also invents several system functions that will be used by replay. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- cpus.c |2 +- include/exec/exec-a

Re: [Qemu-devel] [PATCH V3 1/2] tests: introduce basic pci test for virtio-net

2015-08-04 Thread Stefan Hajnoczi
On Fri, Jul 17, 2015 at 03:25:53PM +0800, Jason Wang wrote: > Signed-off-by: Jason Wang > --- > Changes from V2: > - Remove duplicated code of gtest_start() > Changes from V1: > - replace the magic value 12 with a macro > --- > tests/Makefile | 2 +- > tests/virtio-net-test.c | 185 >

[Qemu-devel] [PATCH v16 08/21] cpu: replay instructions sequence

2015-08-04 Thread Pavel Dovgalyuk
This patch adds calls to replay functions into the icount setup block. In record mode number of executed instructions is written to the log. In replay mode number of istructions to execute is taken from the replay log. When replayed instructions counter is expired qemu_notify_event() function is ca

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

2015-08-04 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] [PATCH v16 09/21] i386: interrupt poll processing

2015-08-04 Thread Pavel Dovgalyuk
This patch updates x86_cpu_exec_interrupt function. It can process two interrupt request at a time (poll and another one). This makes its execution non-deterministic. Determinism is requred for recorded icount execution. Signed-off-by: Pavel Dovgalyuk --- target-i386/seg_helper.c |3 +++ 1 f

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

2015-08-04 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,

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

2015-08-04 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] [PATCH v16 21/21] replay: recording of the user input

2015-08-04 Thread Pavel Dovgalyuk
This records user input (keyboard and mouse events) in record mode and replays these input events in replay mode. Signed-off-by: Pavel Dovgalyuk --- include/ui/input.h |2 + replay/Makefile.objs |1 replay/replay-events.c | 33 + replay/replay-input.c| 160 +++

Re: [Qemu-devel] [PATCHv2] sdhci: Pass drive parameter to sdhci-pci via qdev property

2015-08-04 Thread Stefan Hajnoczi
On Sun, Aug 02, 2015 at 12:44:16PM -0400, Kevin O'Connor wrote: > Commit 19109131 disabled the sdhci-pci support because it used > drive_get_next(). This patch reenables sdhci-pci and changes it to > pass the drive via a qdev property - for example: > -device sdhci-pci,drive=drive0 -drive id=driv

Re: [Qemu-devel] [PATCH] virtio-net: remove useless codes

2015-08-04 Thread Stefan Hajnoczi
On Mon, Aug 03, 2015 at 01:20:38PM +0800, Jason Wang wrote: > After commit 40bad8f3deba15e2074ff34cfe923c12916b1cc5("virtio-net: fix > used len for tx"), async_tx.len was no longer used afterwards. So > remove useless codes with it. > > Signed-off-by: Jason Wang > --- > hw/net/virtio-net.c

Re: [Qemu-devel] [PATCH RFC v2 19/47] qapi: Generated code cleanup

2015-08-04 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: > >> On 07/01/2015 02:22 PM, Markus Armbruster wrote: [...] >>> @@ -105,7 +103,8 @@ struct %(name)s >>> >>> def generate_enum_lookup(name, values): >>> ret = mcgen(''' >>> -const char * const %(name)s_lookup[] = { >>> + >>> +const char *cons

[Qemu-devel] [PATCH v16 15/21] bottom halves: introduce bh call function

2015-08-04 Thread Pavel Dovgalyuk
This patch introduces aio_bh_call function. It is used to execute bottom halves as callbacks without adding them to the queue. Signed-off-by: Pavel Dovgalyuk --- async.c |7 ++- include/block/aio.h |5 + 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/

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

2015-08-04 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/

[Qemu-devel] [PATCH 01/26] qapi: Clarify docs on including the same file multiple times

2015-08-04 Thread Markus Armbruster
It's idempotent. While there, update examples to current code. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- docs/qapi-code-gen.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt index 61b5be4..e7e7281 1006

[Qemu-devel] [PATCH 04/26] qapi-event: Clean up how name of enum QAPIEvent is made

2015-08-04 Thread Markus Armbruster
Use c_name() instead of ad hoc code. Doesn't upcase the -p prefix, which is an improvement in my book. Unbreaks prefix containing '.', but other funny characters remain broken. To be fixed next. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- docs/qapi-code-gen.txt | 8

[Qemu-devel] [PATCH 10/26] qapi-visit: Replace list implicit_structs by set

2015-08-04 Thread Markus Armbruster
Use set because that's what it is. While there, rename to implicit_structs_seen. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi-visit.py | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py index b3a

[Qemu-devel] [PATCH 08/26] qapi: Generate a nicer struct for flat unions

2015-08-04 Thread Markus Armbruster
The struct generated for a flat union is weird: the members of its base are at the end, except for the union tag, which is at the beginning. Example: qapi-schema-test.json has { 'struct': 'UserDefUnionBase', 'data': { 'string': 'str', 'enum1': 'EnumOne' } } { 'union': 'UserDefFlatU

[Qemu-devel] [PATCH 05/26] qapi: Reject -p arguments that break qapi-event.py

2015-08-04 Thread Markus Armbruster
qapi-event.py breaks when you ask for a funny prefix like '@'. Protect it. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/scripts/qapi.py b/scripts/qapi.py index 2bbc8ff..04c1d96 100644 --- a/scripts/qapi.py

[Qemu-devel] [PATCH 07/26] qapi: Fix generated code when flat union has member 'kind'

2015-08-04 Thread Markus Armbruster
A flat union's tag member gets renamed to 'kind' in the generated code. Breaks when another member is named 'kind' exists. Example, adapted from qapi-schema-test.json: { 'struct': 'UserDefUnionBase', 'data': { 'kind': 'str', 'enum1': 'EnumOne' } } We generate: struct UserDefFlatU

[Qemu-devel] [PATCH 14/26] qapi: Document that input visitor semantics are prone to leaks

2015-08-04 Thread Markus Armbruster
From: Eric Blake Most functions that can return a pointer or set an Error ** value are decent enough to guarantee a NULL return when reporting an error. Not so with our generated qapi visitor functions. If the caller is not careful to clean up partially-allocated objects on error, then the calle

[Qemu-devel] [PATCH 02/26] qapi: Clean up cgen() and mcgen()

2015-08-04 Thread Markus Armbruster
Commit 05dfb26 added eatspace stripping to mcgen(). Move it to cgen(), just in case somebody gets tempted to use cgen() directly instead of via mcgen(). cgen() indents blank lines. No such lines get generated right now, but fix it anyway. We use triple-quoted strings for program text, like this

[Qemu-devel] [PATCH 00/26] qapi: Another round of fixes and cleanups

2015-08-04 Thread Markus Armbruster
Previously posted as part of "[PATCH RFC v2 00/47] qapi: QMP introspection". Changes since then: * Trivially rebased, R-bys retained unless noted otherwise. * PATCH 01: Squash in update of qapi-code-gen.txt examples to current code. * PATCH 04: Update qapi-code-gen.txt for the change. * PATCH 05

[Qemu-devel] [PATCH 03/26] qapi: Simplify guardname()

2015-08-04 Thread Markus Armbruster
The guards around built-in declarations lose their _H. It never made much sense anyway. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi.py | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 20383ef..2

[Qemu-devel] [PATCH 19/26] qapi-tests: New tests for union, alternate command arguments

2015-08-04 Thread Markus Armbruster
A command's 'data' must be a struct type, given either as a dictionary, or as struct type name. Existing test case data-int.json covers simple type 'int'. Add test cases for type names referring to union and alternate types. The latter is caught (good), but the former is not (bug). Events have

[Qemu-devel] [PATCH 17/26] tests/qapi-schema: Restore test case for flat union base bug

2015-08-04 Thread Markus Armbruster
Test case added in commit 2fc0043, and messed up in commit 5223070. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/qapi-schema/qapi-schema-test.json | 5 +++-- tests/qapi-schema/qapi-schema-test.out | 8 2 files changed, 7 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH 06/26] qapi: Drop unused and useless parameters and variables

2015-08-04 Thread Markus Armbruster
gen_sync_call()'s parameter indent is useless: gen_sync_call() uses it only as optional argument for push_indent() and pop_indent(), their default is four, and gen_sync_call()'s only caller passes four. Drop the parameter. gen_visitor_input_containers_decl()'s parameter obj is always "QOBJECT(arg

[Qemu-devel] [PATCH 20/26] qapi: Fix to reject union command and event arguments

2015-08-04 Thread Markus Armbruster
A command's or event's 'data' must be a struct type, given either as a dictionary, or as struct type name. Commit dd883c6 tightened the checking there, but not enough: we still accept 'union'. Fix to reject it. We may want to support union types there, but we'll have to extend qapi-commands.py a

[Qemu-devel] [PATCH v16 00/21] Deterministic replay core

2015-08-04 Thread Pavel Dovgalyuk
This set of patches is related to the reverse execution and deterministic replay of qemu execution. This implementation of deterministic replay can be used for deterministic debugging of guest code through gdb remote interface. Core set of patches does not include support for reverse debugging c

[Qemu-devel] [PATCH 09/26] qapi-visit: Fix generated code when schema has forward refs

2015-08-04 Thread Markus Armbruster
The visit_type_implicit_FOO() are generated on demand, right before their first use. Used by visit_type_STRUCT_fields() when STRUCT has base FOO, and by visit_type_UNION() when flat UNION has member a FOO. If the schema defines FOO after its first use as struct base or flat union member, visit_ty

[Qemu-devel] [PATCH 26/26] qapi: Generated code cleanup

2015-08-04 Thread Markus Armbruster
Clean up white-space, brace placement, and superfluous #ifdef QAPI_TYPES_BUILTIN_CLEANUP_DEF. Signed-off-by: Markus Armbruster --- docs/qapi-code-gen.txt | 12 - scripts/qapi-commands.py | 1 + scripts/qapi-event.py| 3 +-- scripts/qapi-types.py| 66 +++---

[Qemu-devel] [PATCH 25/26] qapi-commands: Drop useless initialization

2015-08-04 Thread Markus Armbruster
In generated command handlers, the assignment to retval dominates its only use. Therefore, its initialization is useless. Drop it. Suggested-by: Eric Blake Signed-off-by: Markus Armbruster --- docs/qapi-code-gen.txt | 2 +- scripts/qapi-commands.py | 8 ++-- 2 files changed, 3 insertion

Re: [Qemu-devel] [PATCH v5 2/2] vhost user: add rarp sending after live migration for legacy guest

2015-08-04 Thread Thibaut Collet
On Tue, Aug 4, 2015 at 8:22 AM, Jason Wang wrote: > > > On 08/03/2015 05:22 PM, Thibaut Collet wrote: >> A new vhost user message is added to allow QEMU to ask to vhost user backend >> to >> broadcast a fake RARP after live migration for guest without GUEST_ANNOUNCE >> capability. >> >> This new

[Qemu-devel] [PATCH 21/26] qapi: Command returning anonymous type doesn't work, outlaw

2015-08-04 Thread Markus Armbruster
Reproducer: with { 'command': 'user_def_cmd4', 'returns': { 'a': 'int' } } added to qapi-schema-test.json, qapi-commands.py dies when it tries to generate the command handler function Traceback (most recent call last): File "/work/armbru/qemu/scripts/qapi-commands.py", line 359, in

[Qemu-devel] [PATCH 11/26] qapi-visit: Fix two name arguments passed to visitors

2015-08-04 Thread Markus Armbruster
The generated code passes mangled schema names to visit_type_enum() and union's visit_start_struct(). Fix it to pass the names unadulterated, like we do everywhere else. Only qapi-schema-test.json actually has names where this makes a difference: enum __org.qemu_x-Enum, flat union __org.qemu_x-Un

[Qemu-devel] [PATCH 22/26] qapi-commands: Fix gen_err_check(e) for e and e != 'local_err'

2015-08-04 Thread Markus Armbruster
gen_err_check() hard-codes 'local_err' instead of substituting the argument. Currently harmless, since all callers pass either None or 'local_err'. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi-commands.py | 13 +++-- 1 file changed, 7 insertions(+), 6 delet

[Qemu-devel] [PATCH 16/26] qapi: Document flaws in checking of names

2015-08-04 Thread Markus Armbruster
We don't actually enforce our "other than downstream extensions [...], all names should begin with a letter" rule. Add a FIXME. We should reject names that differ only in '_' vs. '.' vs. '-', because they're liable to clash in generated C. Add a FIXME. Signed-off-by: Markus Armbruster --- sc

[Qemu-devel] [PATCH 12/26] tests/qapi-schema: Document alternate's enum lacks visit function

2015-08-04 Thread Markus Armbruster
We generate a declaration, but no definition. The QMP schema has two: Qcow2OverlapChecks and BlockdevRef. Neither visit_type_Qcow2OverlapChecksKind() nor visit_type_BlockdevRefKind() is actually used. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/qapi-schema/qapi-schema-t

[Qemu-devel] [PATCH 18/26] tests/qapi-schema: Rename tests from data- to args-

2015-08-04 Thread Markus Armbruster
Since every schema entity has 'data', the data- prefix conveys no information. These tests actually exercise commands. Only commands have arguments, so change the prefix to to args-. Signed-off-by: Markus Armbruster --- tests/Makefile | 6 ++

[Qemu-devel] [PATCH v16 18/21] replay: initialization and deinitialization

2015-08-04 Thread Pavel Dovgalyuk
This patch introduces the functions for enabling the record/replay and for freeing the resources when simulator closes. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- exec.c |2 + replay/replay-internal.h |2 + replay/replay.c | 129 ++

[Qemu-devel] [PATCH 24/26] qapi-commands: Don't feed output of mcgen() to mcgen() again

2015-08-04 Thread Markus Armbruster
Multiple passes through mcgen() is prone to produce unwanted blank lines, which we then combat by sprinkling .rstrip() on top. Just don't do it. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi-commands.py | 52 +++- 1 file c

Re: [Qemu-devel] [Qemu-stable] Recent patches for 2.4

2015-08-04 Thread Peter Lieven
Am 31.07.2015 um 11:29 schrieb Paolo Bonzini: On 31/07/2015 10:35, Peter Lieven wrote: Am 31.07.2015 um 10:22 schrieb Paolo Bonzini: 52c91da memory: do not add a reference to the owner of aliased regions This could be backported, yes. Feel free to send it to qemu-stable. However, the bug was

[Qemu-devel] [PATCH v16 16/21] replay: ptimer

2015-08-04 Thread Pavel Dovgalyuk
This patch adds deterministic replay for hardware periodic countdown timers. ptimer uses bottom halves layer to execute such an asynchronous callback. We put this callback into the replay queue instead of bottom halves one. When checkpoint is met by main loop thread, the replay queue is processed a

[Qemu-devel] [PATCH 23/26] qapi-commands: Inline gen_marshal_output_call()

2015-08-04 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi-commands.py | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index 3965ca8..6de5229 100644 --- a/scripts/qapi-commands.py +++ b/scripts/qa

[Qemu-devel] [PATCH 15/26] qapi: Document shortcoming with union 'data' branch

2015-08-04 Thread Markus Armbruster
From: Eric Blake Add a FIXME to remind us to fully audit whether removing the 'void *data' branch of each qapi union type can be done safely. Signed-off-by: Eric Blake Message-Id: <1438297637-26789-1-git-send-email-ebl...@redhat.com> Signed-off-by: Markus Armbruster --- scripts/qapi-types.py

[Qemu-devel] [PATCH 13/26] tests/qapi-schema: Document events with base don't work

2015-08-04 Thread Markus Armbruster
When event FOO's 'data' is a struct with a base, we consider only the struct's direct members, and ignore its base. The generated qapi_event_send_foo() doesn't take arguments for base members. No such events currently exist in the QMP schema. Signed-off-by: Markus Armbruster Reviewed-by: Eric B

Re: [Qemu-devel] [PULL for-2.4 0/1] cve-2015-5166-tag

2015-08-04 Thread Peter Maydell
On 3 August 2015 at 15:32, Stefano Stabellini wrote: > The following changes since commit 2a3612ccc1fa9cea77bd193afbfe21c77e7e91ef: > > Merge remote-tracking branch > 'remotes/stefanha/tags/rtl8139-cplus-tx-input-validation-pull-request' into > staging (2015-08-03 13:09:10 +0100) > > are avail

[Qemu-devel] [PATCH v16 01/21] i386: partial revert of interrupt poll fix

2015-08-04 Thread Pavel Dovgalyuk
Processing CPU_INTERRUPT_POLL requests in cpu_has_work functions break the determinism of cpu_exec. This patch is required to make interrupts processing deterministic. Signed-off-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- cpu-exec.c|6 ++ target-i386/cpu.c | 10 ++--

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

2015-08-04 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 + stubs/replay.c |5 + vl.c

[Qemu-devel] [PATCH v16 14/21] replay: checkpoints

2015-08-04 Thread Pavel Dovgalyuk
This patch introduces checkpoints that synchronize cpu thread and iothread. When checkpoint is met in the code all asynchronous events from the queue are executed. Signed-off-by: Pavel Dovgalyuk --- cpus.c |5 + main-loop.c |4 qemu-timer.c

[Qemu-devel] [PATCH v16 07/21] cpu-exec: allow temporary disabling icount

2015-08-04 Thread Pavel Dovgalyuk
This patch is required for deterministic replay to generate an exception by trying executing an instruction without changing icount. It adds new flag to TB for disabling icount while translating it. Signed-off-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- cpu-exec.c |7

Re: [Qemu-devel] [PATCH v4 01/11] tcg: add ability to dump /tmp/perf-.map files

2015-08-04 Thread Paolo Bonzini
On 04/08/2015 09:39, Alex Bennée wrote: > At the point of a tb_flush all bets are off as we will re-generate all > the blocks at potentially different locations in the translation buffer. > However for most analysis cases you are unlikely to cause the code > buffer to overflow. Most other uses of

Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds

2015-08-04 Thread Richard W.M. Jones
On Mon, Aug 03, 2015 at 03:52:28PM +0200, Laurent Vivier wrote: > +/* A 33 Mhz clock gives a 30 ns tick, > + * convert timeout from ticks to ns > */ > -timeout = muldiv64(get_ticks_per_sec(), timeout, 3300); > +timeout *= 30; I see that you've just posted a v2 of this pat

[Qemu-devel] [PATCH 1/2] throttle: refuse bps_max/iops_max without bps/iops

2015-08-04 Thread Stefan Hajnoczi
The bps_max/iops_max values are meaningless without corresponding bps/iops values. Reported an error if bps_max/iops_max is given without bps/iops. Signed-off-by: Stefan Hajnoczi --- blockdev.c | 6 ++ include/qemu/throttle.h | 2 ++ util/throttle.c | 15 +

[Qemu-devel] [PATCH 0/2] throttle: refuse bps_max/iops_max without bps/iops

2015-08-04 Thread Stefan Hajnoczi
A bps_max/iops_max value without a corresponding bps/iops does nothing. Avoid confusing the user by refusing invalid inputs instead of silently ignoring them. Stefan Hajnoczi (2): throttle: refuse bps_max/iops_max without bps/iops throttle: add throttle_max_is_missing_limit() test blockdev.

[Qemu-devel] [PATCH 2/2] throttle: add throttle_max_is_missing_limit() test

2015-08-04 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- tests/test-throttle.c | 21 + 1 file changed, 21 insertions(+) diff --git a/tests/test-throttle.c b/tests/test-throttle.c index 0168445..85c9b6c 100644 --- a/tests/test-throttle.c +++ b/tests/test-throttle.c @@ -329,6 +329,26 @@ static void

Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds

2015-08-04 Thread Laurent Vivier
On 04/08/2015 12:13, Richard W.M. Jones wrote: > On Mon, Aug 03, 2015 at 03:52:28PM +0200, Laurent Vivier wrote: >> +/* A 33 Mhz clock gives a 30 ns tick, >> + * convert timeout from ticks to ns >> */ >> -timeout = muldiv64(get_ticks_per_sec(), timeout, 3300); >> +timeou

Re: [Qemu-devel] [PATCH v2 1/3] target-mips: Copy restrictions from ext/ins to dext/dins

2015-08-04 Thread Leon Alrae
On 03/08/2015 20:35, Richard Henderson wrote: > The checks in dins is required to avoid triggering an assertion > in tcg_gen_deposit_tl. The check in dext is just for completeness. > Fold the other D cases in via fallthru. > > In this case the errant dins appears to be data, not code, as > transl

[Qemu-devel] [PATCH v5] hw/arm/virt: Add high MMIO PCI region, 512G in size

2015-08-04 Thread Pavel Fedin
This large region is necessary for some devices like ivshmem and video cards 32-bit kernels can be built without LPAE support. In this case such a kernel will not be able to use PCI controller which has windows in high addresses. In order to work around the problem, "highmem" option is introduced.

Re: [Qemu-devel] [PATCH RESEND v2 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-08-04 Thread Gavin Shan
On Tue, Aug 04, 2015 at 05:23:30PM +1000, Alexey Kardashevskiy wrote: >On 08/04/2015 05:16 PM, Gavin Shan wrote: >>On Tue, Aug 04, 2015 at 02:49:14PM +1000, Alexey Kardashevskiy wrote: >>>On 08/03/2015 01:32 PM, Gavin Shan wrote: On Mon, Aug 03, 2015 at 12:51:09PM +1000, David Gibson wrote: >>>

Re: [Qemu-devel] [PATCH 2/2] throttle: add throttle_max_is_missing_limit() test

2015-08-04 Thread Alberto Garcia
On Tue 04 Aug 2015 12:22:13 PM CEST, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [PATCH 1/2] throttle: refuse bps_max/iops_max without bps/iops

2015-08-04 Thread Alberto Garcia
On Tue 04 Aug 2015 12:22:12 PM CEST, Stefan Hajnoczi wrote: > The bps_max/iops_max values are meaningless without corresponding > bps/iops values. Reported an error if bps_max/iops_max is given without > bps/iops. > > Signed-off-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [PATCH v7 29/42] Postcopy end in migration_thread

2015-08-04 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" wrote: > > From: "Dr. David Alan Gilbert" > > > > The end of migration in postcopy is a bit different since some of > > the things normally done at the end of migration have already been > > done on the transition to po

[Qemu-devel] [PULL 1/2] target-mips: fix semihosting for microMIPS R6

2015-08-04 Thread Leon Alrae
In semihosting mode the SDBBP 1 instructions should trigger UHI syscall, but in QEMU this does not happen for recently added microMIPS R6. Consequently bare metal microMIPS R6 programs supporting UHI will not run. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c

[Qemu-devel] [PULL 2/2] target-mips: Copy restrictions from ext/ins to dext/dins

2015-08-04 Thread Leon Alrae
From: Richard Henderson The checks in dins is required to avoid triggering an assertion in tcg_gen_deposit_tl. The check in dext is just for completeness. Fold the other D cases in via fallthru. In this case the errant dins appears to be data, not code, as translation failed to stop after a bre

[Qemu-devel] [PULL 0/2] target-mips queue for 2.4

2015-08-04 Thread Leon Alrae
x27; into staging (2015-08-03 17:33:35 +0100) are available in the git repository at: git://github.com/lalrae/qemu.git tags/mips-20150804 for you to fetch changes up to b7f26e523914b982a1c1bfa8295f77ff9787c33c: target-mips: Copy restrictions from ext/ins to dext/dins (2015-08-04 11:53

Re: [Qemu-devel] [Qemu-stable] Recent patches for 2.4

2015-08-04 Thread Paolo Bonzini
On 04/08/2015 11:22, Peter Lieven wrote: > edec47c main-loop: fix qemu_notify_event for aio_notify optimization Part of the above AioContext series. >>> So either the whole series or none of them I guess? >> It's a separate bug, and theoretically it's there in 2.3.1 as well, but >> no on

Re: [Qemu-devel] [Qemu-stable] Recent patches for 2.4

2015-08-04 Thread Peter Lieven
Am 04.08.2015 um 13:53 schrieb Paolo Bonzini: On 04/08/2015 11:22, Peter Lieven wrote: edec47c main-loop: fix qemu_notify_event for aio_notify optimization Part of the above AioContext series. So either the whole series or none of them I guess? It's a separate bug, and theoretically it's the

Re: [Qemu-devel] [PATCH v4 01/11] tcg: add ability to dump /tmp/perf-.map files

2015-08-04 Thread Aurelien Jarno
On 2015-08-04 08:39, Alex Bennée wrote: > > Paolo Bonzini writes: > > > On 03/08/2015 11:14, Alex Bennée wrote: > >> This allows the perf tool to map samples to each individual translation > >> block. This could be expanded for user space but currently it gives > >> enough information to find an

Re: [Qemu-devel] [Qemu-stable] Recent patches for 2.4

2015-08-04 Thread Paolo Bonzini
On 04/08/2015 13:57, Peter Lieven wrote: > > Okay, what I found out is that in aio_poll I get revents = POLLIN for > the nfs file descriptor. But there is no data available on the socket. Does read return 0 or EAGAIN? If it returns EAGAIN, the bug is in the QEMU main loop or the kernel. It sho

[Qemu-devel] [PATCH v7 0/4] Clean unused entries in the qcow2 L2/refcount cache

2015-08-04 Thread Alberto Garcia
v7: - Rebase against the current master. - Update version number in the 'since' field of the 'cache-clean-interval' option. v6: https://lists.gnu.org/archive/html/qemu-devel/2015-06/msg01929.html - Update documentation to clarify what "unused entries" mean. v5: https://lists.gnu.org/archive/htm

[Qemu-devel] [PATCH v7 1/4] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-08-04 Thread Alberto Garcia
After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. The effect of this can be seen in the HMP commit operation: it moves data from the top to the base image (and

[Qemu-devel] [PATCH v7 3/4] docs: document how to configure the qcow2 L2/refcount caches

2015-08-04 Thread Alberto Garcia
QEMU has options to configure the size of the L2 and refcount caches for the qcow2 format. However, choosing the right sizes for a particular disk image is not a straightforward operation since the ratio between the cache size and the allocated disk space is not obvious and depends on the size of t

[Qemu-devel] [PATCH v7 2/4] qcow2: add option to clean unused cache entries after some time

2015-08-04 Thread Alberto Garcia
This adds a new 'cache-clean-interval' option that cleans all qcow2 cache entries that haven't been used in a certain interval, given in seconds. This allows setting a large L2 cache size so it can handle scenarios with lots of I/O and at the same time use little memory during periods of inactivit

Re: [Qemu-devel] [PATCH v4 06/11] qemu-log: support simple pid substitution in logfile

2015-08-04 Thread Aurelien Jarno
On 2015-08-03 10:14, Alex Bennée wrote: > When debugging stuff that occurs over several forks it would be useful > not to keep overwriting the one logfile you've set-up. This allows a > simple %d to be included once in the logfile parameter which is > substituted with getpid(). > > Signed-off-by:

  1   2   3   >