Re: [Qemu-devel] [PATCH v5 22/42] block: Use CAFs in bdrv_get_allocated_file_size()

2019-06-14 Thread Max Reitz
On 14.06.19 17:41, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >> block.c | 26 -- >> 1 file changed, 24 insertions(+), 2 deletions(-) >> >> diff --git a/block.c b/block.c >> index 11b7ba8cf6..856d9b58be 1006

[Qemu-devel] [PATCH v5 7/8] hmat acpi: Build System Locality Latency and Bandwidth Information Structure(s) in ACPI HMAT

2019-06-14 Thread Tao Xu
From: Liu Jingqi This structure describes the memory access latency and bandwidth information from various memory access initiator proximity domains. The latency and bandwidth numbers represented in this structure correspond to rated latency and bandwidth for the platform. The software could use

[Qemu-devel] [PATCH] migration: Improve accuracy of vCPU throttling with per-vCPU timers

2019-06-14 Thread Cosmin Marin
During auto-convergence live migration, the configured throttling rate is not matched in practice. Experimental measurements of throughput for a memory-write intensive workload indicate disparities between expected and measured throttle rate - when set to 99%, the actual throttle rate was 95%. The

Re: [Qemu-devel] [PATCH v5 15/42] block: Re-evaluate backing file handling in reopen

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 18:52, Max Reitz wrote: > On 14.06.19 15:42, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 1:09, Max Reitz wrote: >>> Reopening a node's backing child needs a bit of special handling because >>> the "backing" child has different defaults than all other children >>> (among other thing

Re: [Qemu-devel] [PATCH v5 23/42] blockdev: Use CAF in external_snapshot_prepare()

2019-06-14 Thread Max Reitz
On 14.06.19 17:46, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> This allows us to differentiate between filters and nodes with COW >> backing files: Filters cannot be used as overlays at all (for this >> function). >> >> Signed-off-by: Max Reitz > > Overlay created i

Re: [Qemu-devel] [PATCH v5 20/42] block/snapshot: Fall back to storage child

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 19:10, Max Reitz wrote: > On 14.06.19 17:22, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 1:09, Max Reitz wrote: >>> If the top node's driver does not provide snapshot functionality and we >>> want to go down the chain, we should go towards the child which stores >>> the data, i.e.

Re: [Qemu-devel] [PATCH] migration: Add error_desc for file channel errors

2019-06-14 Thread Dr. David Alan Gilbert
* Yury Kotov (yury-ko...@yandex-team.ru) wrote: > Currently, there is no information about error if outgoing migration was > failed > because of file channel errors. > Example (QMP session): > -> { "execute": "migrate", "arguments": { "uri": "exec:head -c 1" }} > <- { "return": {} } > ... > -> { "

Re: [Qemu-devel] [PATCH v5 20/42] block/snapshot: Fall back to storage child

2019-06-14 Thread Max Reitz
On 14.06.19 17:22, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> If the top node's driver does not provide snapshot functionality and we >> want to go down the chain, we should go towards the child which stores >> the data, i.e. the storage child. >> >> bdrv_snapshot_go

Re: [Qemu-devel] [PATCH] MAINTAINERS: Change maintership of Xen code under hw/9pfs

2019-06-14 Thread Greg Kurz
On Fri, 14 Jun 2019 08:44:26 -0700 (PDT) Stefano Stabellini wrote: > On Fri, 14 Jun 2019, Paul Durrant wrote: > > > -Original Message- > > > From: Greg Kurz [mailto:gr...@kaod.org] > > > Sent: 14 June 2019 09:16 > > > To: Paul Durrant > > > Cc: Anthony Perard ; qemu-devel@nongnu.org; >

Re: [Qemu-devel] [PATCH v5 21/42] block: Use CAFs for debug breakpoints

2019-06-14 Thread Max Reitz
On 14.06.19 17:29, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> When looking for a blkdebug node (which implements debug breakpoints), >> use bdrv_primary_bs() to iterate through the graph, because that is >> where a blkdebug node would be. >> >> Signed-off-by: Max Rei

Re: [Qemu-devel] [PATCH v5 14/42] block: Use CAFs when working with backing chains

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 19:02, Max Reitz wrote: > On 14.06.19 16:31, Vladimir Sementsov-Ogievskiy wrote: >> 14.06.2019 16:50, Max Reitz wrote: >>> On 14.06.19 15:26, Vladimir Sementsov-Ogievskiy wrote: 13.06.2019 1:09, Max Reitz wrote: > Use child access functions when iterating through backing chains

[Qemu-devel] [PATCH 1/2] spapr/xive: rework the mapping the KVM memory regions

2019-06-14 Thread Cédric Le Goater
Today, the interrupt device is fully initialized at reset when the CAS negotiation process has completed. Depending on the KVM capabilities, the SpaprXive memory regions (ESB, TIMA) are initialized with a host MMIO backend or a QEMU emulated backend. This results in a complex initialization sequenc

[Qemu-devel] [PATCH 0/2] spapr/xive: rework the mapping the KVM memory regions

2019-06-14 Thread Cédric Le Goater
Hello, Here is a small series simplifying the initialization sequence of the interrupt device by using memory regions specific for KVM. These are mapped as overlaps on top of the emulated device. Thanks, C. Cédric Le Goater (2): spapr/xive: rework the mapping the KVM memory regions spapr/xi

[Qemu-devel] [PATCH v3 03/50] cpu: introduce cpu_in_exclusive_work_context()

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Suggested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- cpus-common.c | 2 ++ include/qom/cpu.h | 13 + 2 files changed, 15 insertions(+) diff --git a/cpus-common.c b/cpus-common.c index 3ca58c64e8..960058457a 100644 --- a/

[Qemu-devel] [PATCH v3 02/50] tcg/README: fix typo s/afterwise/afterwards/

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Afterwise is "wise after the fact", as in "hindsight". Here we meant "afterwards" (as in "subsequently"). Fix it. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- tcg/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/README b/tcg/R

[Qemu-devel] [PATCH v3 14/50] tcg: add tcg_gen_st_ptr

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Will gain a user soon. Signed-off-by: Emilio G. Cota --- tcg/tcg-op.h | 5 + 1 file changed, 5 insertions(+) diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h index e997346c97..edf12de1f3 100644 --- a/tcg/tcg-op.h +++ b/tcg/tcg-op.h @@ -1260,6 +1260,11 @@ static inline void

[Qemu-devel] [PATCH 2/2] spapr/xive: simplify spapr_irq_init_device() to remove the emulated init

2019-06-14 Thread Cédric Le Goater
The init_emu() handles are now empty. Remove them and rename spapr_irq_init_device() to spapr_irq_init_kvm(). Signed-off-by: Cédric Le Goater --- include/hw/ppc/spapr_irq.h | 1 - hw/ppc/spapr_irq.c | 20 +++- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git

[Qemu-devel] [PATCH v3 05/50] docs/devel: add plugins.rst design document

2019-06-14 Thread Alex Bennée
This is mostly extracted from Emilio's more verbose commit comments with some additional verbiage from me. Signed-off-by: Alex Bennée --- docs/devel/index.rst | 1 + docs/devel/plugins.rst | 99 ++ 2 files changed, 100 insertions(+) create mode 100644

[Qemu-devel] [PATCH v3 00/50] tcg plugin support

2019-06-14 Thread Alex Bennée
Hi, This is v3 of the proposed plugins API for QEMU. As Emilio is busy having finished his time at Columbia I have volunteered to take the patch series forward. Emilio's RFC v2 was posted last year: Subject: [RFC v2 00/38] Plugin support Date: Sun, 9 Dec 2018 14:37:11 -0500 Message-Id: <20

[Qemu-devel] [PATCH v3 09/50] plugin: add implementation of the api

2019-06-14 Thread Alex Bennée
[AJB: split from the core code commit] Signed-off-by: Alex Bennée --- plugins/Makefile.objs | 1 + plugins/api.c | 267 ++ 2 files changed, 268 insertions(+) create mode 100644 plugins/api.c diff --git a/plugins/Makefile.objs b/plugins/Makefile.

Re: [Qemu-devel] [PATCH v5 23/42] blockdev: Use CAF in external_snapshot_prepare()

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 19:20, Max Reitz wrote: > On 14.06.19 17:46, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 1:09, Max Reitz wrote: >>> This allows us to differentiate between filters and nodes with COW >>> backing files: Filters cannot be used as overlays at all (for this >>> function). >>> >>> Signe

[Qemu-devel] [PATCH v3 07/50] plugin: add user-facing API

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Add the API first to ease review. Signed-off-by: Emilio G. Cota Signed-off-by: Alex Bennée --- v3 - merge in changes to plugin install/reset/uninstall - split api file --- include/qemu/qemu-plugin.h | 339 + 1 file changed, 339 i

[Qemu-devel] [PATCH v3 40/50] linux-user: support -plugin option

2019-06-14 Thread Alex Bennée
From: Lluís Vilanova Signed-off-by: Lluís Vilanova [ cota: s/instrument/plugin ] Signed-off-by: Emilio G. Cota --- linux-user/main.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index a59ae9439d..1009eab92d 100644 --- a/linux-use

[Qemu-devel] [PATCH v3 12/50] cputlb: introduce get_page_addr_code_hostp

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" This will be used by plugins to get the host address of instructions. Signed-off-by: Emilio G. Cota --- accel/tcg/cputlb.c | 14 +- include/exec/exec-all.h | 38 ++ 2 files changed, 51 insertions(+), 1 deletion(-) dif

[Qemu-devel] [PATCH v3 08/50] plugin: add core code

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota [AJB: moved directory and merged various fixes] Signed-off-by: Alex Bennée --- v3 - moved to plugins/ - merged plugin: remove uninstall_cb_t and just use simple_cb_t plugin: handle uninstall when !current_cpu plugin: introduc

[Qemu-devel] [PATCH v3 10/50] queue: add QTAILQ_REMOVE_SEVERAL

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" This is faster than removing elements one by one. Will gain a user soon. Signed-off-by: Emilio G. Cota --- include/qemu/queue.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/qemu/queue.h b/include/qemu/queue.h index 0379bd8fdb..66e834dad1 10064

[Qemu-devel] [PATCH v3 21/50] *-user: notify plugin of exit

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- bsd-user/syscall.c | 3 +++ linux-user/exit.c | 1 + 2 files changed, 4 insertions(+) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 1ee6195d9f..84a983a9a1 100644 --- a/bsd-user/syscall.c +++ b/bsd-

[Qemu-devel] [Bug 1832877] [NEW] qemu-bridge-helper undocumented and broken

2019-06-14 Thread Michal Suchanek
Public bug reported: qemu output: access denied by acl file qemu-system-ppc64: bridge helper failed Option description: -netdev bridge,id=id[,br=bridge][,helper=helper] Connect a host TAP network interface to a host bridge device. Use the network helper helper to co

[Qemu-devel] [PATCH v3 01/50] trace: expand mem_info:size_shift to 3 bits

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" This will allow us to trace 16B-long memory accesses. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace-events b/trace-events index 844ee58dd9..037169aab3 100644 --- a/trace-

[Qemu-devel] [PATCH v3 46/50] tests/plugin: add hotpages plugin to breakdown memory access patterns

2019-06-14 Thread Alex Bennée
This plugin gives a break down of access patterns grouped into pages. Signed-off-by: Alex Bennée --- tests/plugin/Makefile | 1 + tests/plugin/hotpages.c | 152 2 files changed, 153 insertions(+) create mode 100644 tests/plugin/hotpages.c diff --git

[Qemu-devel] [PATCH v3 44/50] plugin: add qemu_plugin_insn_disas helper

2019-06-14 Thread Alex Bennée
Give the plugins access to the QEMU dissasembler so they don't have to re-invent the wheel. Signed-off-by: Alex Bennée --- disas.c | 103 +++ include/disas/disas.h| 2 + include/qemu/qemu-plugin.h | 9 +++ plugins/api.c

[Qemu-devel] [PATCH v3 23/50] cpu: hook plugin vcpu events

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- cpus.c| 10 ++ exec.c| 2 ++ qom/cpu.c | 2 ++ 3 files changed, 14 insertions(+) diff --git a/cpus.c b/cpus.c index dde3b7b981..2f86af9a87 100644 --- a/cpus.c +++ b/cpus.c @@ -46,6 +46,7 @@ #include "exec/exec-all.h"

[Qemu-devel] [PATCH v3 28/50] target/sh4: fetch code with translator_ld

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" There is a small wrinkle with the gUSA instruction. The translator effectively treats a (known) gUSA sequence as a single instruction. For the purposes of the plugin we end up with a long multi-instruction qemu_plugin_insn. If the known sequence isn't detected we shall nev

[Qemu-devel] [PATCH v3 04/50] translate-all: use cpu_in_exclusive_work_context() in tb_flush

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" tb_flush will be called by the plugin module from a safe work environment. Prepare for that. Suggested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) d

[Qemu-devel] [PATCH v3 42/50] tests/tcg: enable plugin testing

2019-06-14 Thread Alex Bennée
If CONFIG_PLUGINS is enabled then lets enable testing for all our TCG targets. This is a simple smoke test that ensure we don't crash or otherwise barf out by running each plugin against each test. There is a minor knock on effect for additional runners which need specialised QEMU_OPTS which will

[Qemu-devel] [PATCH v3 18/50] cpu_ldst_useronly_template: remove redundant #ifndef CODE_ACCESS

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" This function is already under #ifndef CODE_ACCESS. Signed-off-by: Emilio G. Cota --- include/exec/cpu_ldst_useronly_template.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/cpu_ldst_useronly_template.h b/include/exec/cpu_ldst_useronly_template.h ind

[Qemu-devel] [PATCH v3 06/50] configure: add --enable-plugins (MOVE TO END)

2019-06-14 Thread Alex Bennée
This adds the basic boilerplate feature enable option for the build. We shall expand it later. XXX: currently this patch is included at the start of development to aid with incremental building. It should be moved to the end once the plugins are feature complete. [AJB: split from larger patch] Si

[Qemu-devel] [PATCH v3 38/50] plugin: add API symbols to qemu-plugins.symbols

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota [AJB: moved into plugins] Signed-off-by: Alex Bennée --- v3 - moved to plugins/ - include qemu_plugin_reset --- Makefile | 1 + configure| 69 plugins/.gitign

[Qemu-devel] [PATCH v3 35/50] target/xtensa: fetch code with translator_ld

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- target/xtensa/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 6f1da87875..cb849ae2d9 100644 --- a/target/xtensa/translate.c +++ b/target/xtens

[Qemu-devel] [PATCH v3 33/50] target/riscv: fetch code with translator_ld

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- target/riscv/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 313c27b700..899abf41fa 100644 --- a/target/riscv/translate.c +++ b/target/riscv/transla

[Qemu-devel] [PATCH v3 11/50] cputlb: document get_page_addr_code

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Suggested-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/cputlb.c | 5 - include/exec/exec-all.h | 24 +--- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index bb9897b25a

[Qemu-devel] [PATCH v3 29/50] target/i386: fetch code with translator_ld

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index 03150a86e2..bf4cd875ab 100644 --- a/target/i386/translate.c +++ b/target/i386/t

[Qemu-devel] [PATCH v3 20/50] translate-all: notify plugin code of tb_flush

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Plugins might allocate per-TB data that then they get passed each time a TB is executed (via the *userdata pointer). Notify plugin code every time a code cache flush occurs, so that plugins can then reclaim the memory of the per-TB data. Reviewed-by: Alex Bennée Signed-o

[Qemu-devel] [PATCH v3 26/50] target/arm: call qemu_plugin_insn_append

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" I considered using translator_ld* from arm_ldl_code et al. However, note that there's a helper that also calls arm_ldl_code, so we'd have to change that caller. In thumb's case I'm also calling plugin_insn_append directly, since we can't assume that all instructions are 16

[Qemu-devel] [PATCH v3 43/50] tests/plugin: add a hotblocks plugin

2019-06-14 Thread Alex Bennée
This is a simple plugin to track which translation blocks are call most often. As we don't have a view of the internals of TCG we can only work by the address of the start of the block so we also need to tracks how often the address is translated. As there will be multiple blocks starting at the s

[Qemu-devel] [Bug 1832877] Re: qemu-bridge-helper undocumented and broken

2019-06-14 Thread Michal Suchanek
Also this is what bridge.conf contains: # Access control file for qemu bridge helper # Syntax consists of: # # comment (ignored) # allow all # allow # deny all # deny # include /path/to/additional/ACL/file # Users are blacklisted by default and 'deny' takes precedence over 'allow'. #

Re: [Qemu-devel] [PATCH v2] qapi: InitSocketAddress: add keepalive option

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
11.06.2019 16:48, Markus Armbruster wrote: > You misspelled InetSocketAddress and keep-alive in the subject. Suggest > > qapi: Add InetSocketAddress member keep-alive Ohh, I feel stupid > > Vladimir Sementsov-Ogievskiy writes: > >> It's needed to provide keepalive for nbd client to trac

Re: [Qemu-devel] [PATCH 2/2] target/arm: Only implement doubles if the FPU supports them

2019-06-14 Thread Richard Henderson
On 6/14/19 3:44 AM, Peter Maydell wrote: > @@ -173,6 +173,11 @@ static bool trans_VSEL(DisasContext *s, arg_VSEL *a) > ((a->vm | a->vn | a->vd) & 0x10)) { > return false; > } > + > +if (dp && !dc_isar_feature(aa32_fpdp, s)) { > +return false; > +} Would it be

[Qemu-devel] [PATCH v3 49/50] include/exec/cpu-defs.h: fix typo

2019-06-14 Thread Alex Bennée
Signed-off-by: Alex Bennée --- include/exec/cpu-defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index 354788385b..b529c2013e 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -241,7 +241,7 @@ typedef

[Qemu-devel] [PATCH v3 30/50] target/hppa: fetch code with translator_ld

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 188fe688cb..36a784e293 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c

[Qemu-devel] [PATCH v3 48/50] include/exec: wrap cpu_ldst.h in CONFIG_TCG

2019-06-14 Thread Alex Bennée
This gets around a build problem with --disable-tcg. Signed-off-by: Alex Bennée --- include/exec/exec-all.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 90045e77c1..fa4d5b9533 100644 --- a/include/exec/exec-all.h +++ b/include/exec

[Qemu-devel] [PATCH v3 37/50] translator: inject instrumentation from plugins

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- accel/tcg/translator.c | 16 1 file changed, 16 insertions(+) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 9226a348a3..161b494a54 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@

[Qemu-devel] [PATCH v3 32/50] target/alpha: fetch code with translator_ld

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- target/alpha/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 2c9cccf6c1..daf1e05cba 100644 --- a/target/alpha/translate.c +++ b/target/alpha/transla

[Qemu-devel] [PATCH v3 24/50] plugin-gen: add plugin_insn_append

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" By adding it to plugin-gen's header file, we can export is as an inline, since tcg.h is included in the header (we need tcg_ctx). Signed-off-by: Emilio G. Cota --- v3 - use g_byte_array --- accel/tcg/plugin-gen.c| 10 +- include/exec/plugin-gen.h | 23

[Qemu-devel] [PATCH v3 19/50] tcg: let plugins instrument memory accesses

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" XXX: store hostaddr from non-i386 TCG backends (do it in a helper?) XXX: what hostaddr to return for I/O accesses? XXX: what hostaddr to return for cross-page accesses? Here the trickiest feature is passing the host address to memory callbacks that request it. Perhaps it w

[Qemu-devel] [PATCH v3 17/50] atomic_template: add inline trace/plugin helpers

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" In preparation for plugin support. Signed-off-by: Emilio G. Cota --- accel/tcg/atomic_template.h | 110 1 file changed, 75 insertions(+), 35 deletions(-) diff --git a/accel/tcg/atomic_template.h b/accel/tcg/atomic_template.h index df

[Qemu-devel] [PATCH v3 13/50] plugin-gen: add module for TCG-related code

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" We first inject empty instrumentation from translator_loop. After translation, we go through the plugins to see what they want to register for, filling in the empty instrumentation. If if turns out that some instrumentation remains unused, we remove it. This approach suppo

[Qemu-devel] [PATCH v3 39/50] vl: support -plugin option

2019-06-14 Thread Alex Bennée
From: Lluís Vilanova Signed-off-by: Lluís Vilanova [ cota: s/instrument/plugin ] Signed-off-by: Emilio G. Cota --- qemu-options.hx | 17 + vl.c| 11 +++ 2 files changed, 28 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 0d8beb4afd..47bbf

[Qemu-devel] [PATCH v3 34/50] target/sparc: fetch code with translator_ld

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 091bab53af..c91ff11809 100644 --- a/target/sparc/translate.c +++ b/target/sparc/transla

[Qemu-devel] [PATCH v3 27/50] target/ppc: fetch code with translator_ld

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- target/ppc/translate.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 4a5de28036..a27b5659f4 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate

[Qemu-devel] [PATCH v3 15/50] tcg: add MO_HADDR to TCGMemOp

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" We will use this from plugins to mark mem accesses so that we can later obtain their host address. Signed-off-by: Emilio G. Cota --- tcg/tcg.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tcg/tcg.h b/tcg/tcg.h index 2385e758e5..966e89104d 100644 --- a/tcg/t

Re: [Qemu-devel] [PATCH 1/2] spapr/xive: rework the mapping the KVM memory regions

2019-06-14 Thread Greg Kurz
On Fri, 14 Jun 2019 18:59:19 +0200 Cédric Le Goater wrote: > Today, the interrupt device is fully initialized at reset when the CAS > negotiation process has completed. Depending on the KVM capabilities, > the SpaprXive memory regions (ESB, TIMA) are initialized with a host > MMIO backend or a QE

[Qemu-devel] [PATCH v3 16/50] atomic_template: fix indentation in GEN_ATOMIC_HELPER

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/atomic_template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/atomic_template.h b/accel/tcg/atomic_template.h index 5aaf186253..df9c838817 100644 --- a/accel/tcg/atomic

[Qemu-devel] [PATCH v3 47/50] accel/stubs: reduce headers from tcg-stub

2019-06-14 Thread Alex Bennée
We don't need much for these. However I do wonder why these aren't just null inlines in exec-all.h Signed-off-by: Alex Bennée --- accel/stubs/tcg-stub.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c index 76ae461749..431ec7d7e6 100644 --- a

[Qemu-devel] [PATCH v3 22/50] *-user: plugin syscalls

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- bsd-user/syscall.c | 9 + linux-user/syscall.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 84a983a9a1..50e47d217c 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.

[Qemu-devel] [PATCH v3] qapi: Add InetSocketAddress member keep-alive

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
It's needed to provide keepalive for nbd client to track server availability. Signed-off-by: Vladimir Sementsov-Ogievskiy --- v3: [by Markus's comments] - Fix commit subject - Add comment to qapi and restrict server-side connections - Fix s/"keep-alive="/",keep-alive"/ qapi/sockets.json |

[Qemu-devel] [PATCH v3 25/50] translator: add translator_ld{ub, sw, uw, l, q}

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Suggested-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/exec/translator.h | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/include/exec/translator.h b/include/exec/translator.h index 180c51d509..33fa709b

Re: [Qemu-devel] [PATCH] roms/edk2-build.sh: Allow to run edk2-build.sh from command line

2019-06-14 Thread Laszlo Ersek
On 06/14/19 15:55, Philippe Mathieu-Daudé wrote: > On 6/14/19 3:29 PM, Eric Blake wrote: >> On 6/14/19 5:16 AM, Philippe Mathieu-Daudé wrote: >>> Cc'ing Eric :) >>> >> When running this script out of 'make', we get: $ cd roms $ ./edk2-build.sh aarch64 --arch=AARCH64 --

[Qemu-devel] [PATCH] helpers: build vhost-user-gpu only for softmmu

2019-06-14 Thread Laurent Vivier
with ./configure --enable-user --disable-tools --disable-system it fails with: /usr/bin/ld: contrib/vhost-user-gpu/main.o: in function `vg_resource_destroy': .../contrib/vhost-user-gpu/main.c:382: undefined reference to `pixman_image_unref' /usr/bin/ld: contrib/vhost-user-gpu/main.o: in

[Qemu-devel] [PATCH v3 50/50] TODO: API changes to make?

2019-06-14 Thread Alex Bennée
--- include/qemu/qemu-plugin.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 21f056d4ab..655640fe54 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -169,6 +169,7 @@ enum qemu_plugin_mem_rw { * callbac

Re: [Qemu-devel] [PATCH v3 00/50] tcg plugin support

2019-06-14 Thread Aleksandar Markovic
On Fri, Jun 14, 2019 at 7:22 PM Alex Bennée wrote: > > Hi, > > This is v3 of the proposed plugins API for QEMU. As Emilio is busy > having finished his time at Columbia I have volunteered to take the > patch series forward. Emilio's RFC v2 was posted last year: > > Subject: [RFC v2 00/38] Plugin

[Qemu-devel] [PATCH v3 36/50] target/openrisc: fetch code with translator_ld

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- target/openrisc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 4360ce4045..7df4c68d15 100644 --- a/target/openrisc/translate.c +++ b/target/o

Re: [Qemu-devel] [PATCH v3 00/50] tcg plugin support

2019-06-14 Thread Alex Bennée
Aleksandar Markovic writes: > On Fri, Jun 14, 2019 at 7:22 PM Alex Bennée wrote: >> >> Hi, >> >> This is v3 of the proposed plugins API for QEMU. As Emilio is busy >> having finished his time at Columbia I have volunteered to take the >> patch series forward. Emilio's RFC v2 was posted last ye

[Qemu-devel] [PATCH v3 31/50] target/m68k: fetch code with translator_ld

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- target/m68k/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 2ae537461f..dc05c0d2ad 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c

Re: [Qemu-devel] [PATCH 2/2] spapr/xive: simplify spapr_irq_init_device() to remove the emulated init

2019-06-14 Thread Greg Kurz
On Fri, 14 Jun 2019 18:59:20 +0200 Cédric Le Goater wrote: > The init_emu() handles are now empty. Remove them and rename > spapr_irq_init_device() to spapr_irq_init_kvm(). > > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > include/hw/ppc/spapr_irq.h | 1 - > hw/ppc/spapr_i

[Qemu-devel] [PATCH v3 45/50] tests/plugin: add instruction execution breakdown

2019-06-14 Thread Alex Bennée
This gives a break down of instruction classes and individual instruction types. Signed-off-by: Alex Bennée --- tests/plugin/Makefile | 1 + tests/plugin/howvec.c | 297 ++ 2 files changed, 298 insertions(+) create mode 100644 tests/plugin/howvec.c dif

Re: [Qemu-devel] [PATCH v4 5/6] migration: Make no compression operations into its own structure

2019-06-14 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> It will be used later. >> >> Signed-off-by: Juan Quintela >> + */ >> +static int nocomp_recv_pages(MultiFDRecvParams *p, uint32_t used, Error >> **errp) >> +{ >> +if (p->flags != 0) { >> +error_setg(er

[Qemu-devel] [PATCH v3 41/50] tests/plugin: add sample plugins

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Pass arguments with -plugin=libfoo.so,arg=bar,arg=baz Signed-off-by: Emilio G. Cota --- configure | 4 +- tests/plugin/Makefile | 28 + tests/plugin/bb.c | 66 ++ tests/plugin/empty.c | 30 ++ tests/pl

Re: [Qemu-devel] [PATCH] migration: Improve accuracy of vCPU throttling with per-vCPU timers

2019-06-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190614161106.218854-1-cos...@nutanix.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190614161106.218854-1-cos...@nutanix.com Subject: [Qemu-devel] [PATCH] migration: Improve accuracy o

Re: [Qemu-devel] [PATCH 2/2] target/arm: Only implement doubles if the FPU supports them

2019-06-14 Thread Peter Maydell
On Fri, 14 Jun 2019 at 18:21, Richard Henderson wrote: > > On 6/14/19 3:44 AM, Peter Maydell wrote: > > @@ -173,6 +173,11 @@ static bool trans_VSEL(DisasContext *s, arg_VSEL *a) > > ((a->vm | a->vn | a->vd) & 0x10)) { > > return false; > > } > > + > > +if (dp && !dc_isar

Re: [Qemu-devel] [PATCH 5/5] .travis.yml: Build and install EDK2 roms

2019-06-14 Thread Laszlo Ersek
On 06/13/19 18:59, Philippe Mathieu-Daudé wrote: > Hi Laszlo, > > On 3/12/19 5:29 PM, Laszlo Ersek wrote: >> On 03/11/19 01:30, Philippe Mathieu-Daudé wrote: >>> Add a job to build and install the EDK2 platform firmware binaries. >>> >>> This job is only triggered if the last commit matches the ED

Re: [Qemu-devel] [PATCH 5/5] .travis.yml: Build and install EDK2 roms

2019-06-14 Thread Laszlo Ersek
On 06/13/19 18:59, Philippe Mathieu-Daudé wrote: > Hi Laszlo, > > On 3/12/19 5:29 PM, Laszlo Ersek wrote: >> On 03/11/19 01:30, Philippe Mathieu-Daudé wrote: >>> Add a job to build and install the EDK2 platform firmware binaries. >>> >>> This job is only triggered if the last commit matches the ED

Re: [Qemu-devel] [PATCH 5/5] .travis.yml: Build and install EDK2 roms

2019-06-14 Thread Alex Bennée
Laszlo Ersek writes: > On 06/13/19 18:59, Philippe Mathieu-Daudé wrote: >> Hi Laszlo, >> >> On 3/12/19 5:29 PM, Laszlo Ersek wrote: >>> On 03/11/19 01:30, Philippe Mathieu-Daudé wrote: Add a job to build and install the EDK2 platform firmware binaries. This job is only triggered

Re: [Qemu-devel] [PATCH 0/6] update edk2 submodule & binaries to edk2-stable201905

2019-06-14 Thread Laszlo Ersek
On 06/13/19 19:41, Philippe Mathieu-Daudé wrote: > On 6/13/19 5:12 PM, Laszlo Ersek wrote: >> On 06/06/19 15:31, Laszlo Ersek wrote: >>> Launchpad: https://bugs.launchpad.net/qemu/+bug/1831477 >>> Repo: https://github.com/lersek/qemu.git >>> Branch:edk2-stable201905-lp-1831477 >>> >>> edk2

Re: [Qemu-devel] [PATCH v3 00/50] tcg plugin support

2019-06-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190614171200.21078-1-alex.ben...@linaro.org/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash

Re: [Qemu-devel] [PATCH v3 00/50] tcg plugin support

2019-06-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190614171200.21078-1-alex.ben...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190614171200.21078-1-alex.ben...@linaro.org Type: series Subject: [Qemu-devel] [PATCH v3 00/50]

Re: [Qemu-devel] [PATCH v8 4/7] block: introduce backup-top filter driver

2019-06-14 Thread Max Reitz
On 14.06.19 18:22, Vladimir Sementsov-Ogievskiy wrote: > 14.06.2019 15:57, Max Reitz wrote: >> On 14.06.19 11:04, Vladimir Sementsov-Ogievskiy wrote: >>> 13.06.2019 18:57, Max Reitz wrote: On 29.05.19 17:46, Vladimir Sementsov-Ogievskiy wrote: > Backup-top filter does copy-before-write ope

[Qemu-devel] [PULL 0/6] update edk2 submodule & binaries to edk2-stable201905

2019-06-14 Thread Laszlo Ersek
The following changes since commit f3d0bec9f80e4ed7796fffa834ba0a53f2094f7f: Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-06-14' into staging (2019-06-14 14:46:13 +0100) are available in the Git repository at: https://github.com/lersek/qemu.git tags/edk2-pull-2019-06-

[Qemu-devel] [PULL 1/6] roms/Makefile.edk2: define edk2-stable201905 network feature test macros

2019-06-14 Thread Laszlo Ersek
Due to edk2 commits 631195044ff0 ("OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.", 2019-05-16) and 157a3b1aa50f ("ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file.", 2019-05-16), we'll have to pefix the HTTP_BOOT_ENABLE and TLS_ENABLE build flags with "NETWO

[Qemu-devel] [PULL 3/6] roms/Makefile.edk2: remove edk2-stable201903 network feature test macros

2019-06-14 Thread Laszlo Ersek
At tag "edk2-stable201905", the build flags HTTP_BOOT_ENABLE and TLS_ENABLE have become useless. Their roles have been taken by NETWORK_HTTP_BOOT_ENABLE and NETWORK_TLS_ENABLE, respectively. Remove the old build flags. Cc: Philippe Mathieu-Daudé Ref: https://bugs.launchpad.net/qemu/+bug/1831477 S

[Qemu-devel] [PULL 2/6] roms/edk2: update submodule from edk2-stable201903 to edk2-stable201905

2019-06-14 Thread Laszlo Ersek
Update the edk2 submodule from release edk2-stable201903 to edk2-stable201905. The release notes can be read at https://github.com/tianocore/edk2/releases/tag/edk2-stable201905 Below is a list of commits in the new release: 1 c9e1e28b6195 Maintainers.txt: clarify Reviewer requirements and

[Qemu-devel] [PULL 4/6] roms/Makefile.edk2: update input file list for "pc-bios/edk2-licenses.txt"

2019-06-14 Thread Laszlo Ersek
(1) For TianoCore Bugzilla https://bugzilla.tianocore.org/show_bug.cgi?id=1373 the majority of the edk2 tree was relicensed under the BSD-2-Clause-Patent license: https://spdx.org/licenses/BSD-2-Clause-Patent.html> Edk2 commit f53de8aecb12 ("edk2: Add License-History.txt

[Qemu-devel] [PULL 6/6] pc-bios: update the README file with edk2-stable201905 information

2019-06-14 Thread Laszlo Ersek
Refresh the "pc-bios/README" file with edk2, OpenSSL, and Berkeley SoftFloat release info, matching the edk2-stable201905 firmware images added in the previous patch. Cc: Philippe Mathieu-Daudé Ref: https://bugs.launchpad.net/qemu/+bug/1831477 Signed-off-by: Laszlo Ersek Reviewed-by: Philippe Ma

[Qemu-devel] [PULL 5/6] pc-bios: refresh edk2 build artifacts for edk2-stable201905

2019-06-14 Thread Laszlo Ersek
Rebuild the pc-bios/edk2-*.fd.bz2 binaries, and regenerate pc-bios/edk2-licenses.txt, based on the edk2-stable201905 release. Cc: Philippe Mathieu-Daudé Ref: https://bugs.launchpad.net/qemu/+bug/1831477 Signed-off-by: Laszlo Ersek Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-

Re: [Qemu-devel] [PATCH v5 21/42] block: Use CAFs for debug breakpoints

2019-06-14 Thread Eric Blake
On 6/14/19 11:12 AM, Max Reitz wrote: > On 14.06.19 17:29, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 1:09, Max Reitz wrote: >>> When looking for a blkdebug node (which implements debug breakpoints), >>> use bdrv_primary_bs() to iterate through the graph, because that is >>> where a blkdebug

[Qemu-devel] [Bug 1831477] Re: update edk2 submodule & binaries to edk2-stable201905

2019-06-14 Thread Laszlo Ersek (Red Hat)
[PULL 0/6] update edk2 submodule & binaries to edk2-stable201905 20190614202333.19355-1-lersek@redhat.com">http://mid.mail-archive.com/20190614202333.19355-1-lersek@redhat.com -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bu

Re: [Qemu-devel] [PATCH] nvme: do not advertise support for unsupported arbitration mechanism

2019-06-14 Thread Max Reitz
On 06.06.19 11:25, Klaus Birkelund Jensen wrote: > The device mistakenly reports that the Weighted Round Robin with Urgent > Priority Class arbitration mechanism is supported. > > It is not. I believe you based on the fact that there is no “weight” or “priority” anywhere in nvme.c, and that it do

Re: [Qemu-devel] [PATCH 2/2] target/arm: Only implement doubles if the FPU supports them

2019-06-14 Thread Richard Henderson
On 6/14/19 10:52 AM, Peter Maydell wrote: > On Fri, 14 Jun 2019 at 18:21, Richard Henderson > wrote: >> >> On 6/14/19 3:44 AM, Peter Maydell wrote: >>> @@ -173,6 +173,11 @@ static bool trans_VSEL(DisasContext *s, arg_VSEL *a) >>> ((a->vm | a->vn | a->vd) & 0x10)) { >>> return fal

[Qemu-devel] [Bug 1832916] [NEW] linux-user does not check PROT_EXEC

2019-06-14 Thread Richard Henderson
Public bug reported: At no point do we actually verify that a page is PROT_EXEC before translating. All we end up verifying is that the page is readable. Not the same thing, obviously. The following test case should work for any architecture, though I've only validated it for x86_64 and aarch64

Re: [Qemu-devel] [PATCH] hw: Nuke hw_compat_4_0_1 and pc_compat_4_0_1

2019-06-14 Thread Michael S. Tsirkin
On Fri, Jun 14, 2019 at 03:09:02PM +0200, Greg Kurz wrote: > Commit c87759ce876a fixed a regression affecting pc-q35 machines by > introducing a new pc-q35-4.0.1 machine version to be used instead > of pc-q35-4.0. The only purpose was to revert the default behaviour > of not using split irqchip, bu

<    1   2   3   4   >