[Qemu-devel] [PATCH] kvm: don't register smram_listener when smm is off

2017-05-26 Thread Gonglei
If the user set disable smm by '-machine smm=off', we should not register smram_listener so that we can avoid waster memory in kvm since the added sencond address space. Meanwhile we should assign value of the global kvm_state before invoking the kvm_arch_init(), because pc_machine_is_smm_enabled(

[Qemu-devel] [PATCH v3] pci: Set err to errp directly rather than through error_propagate()

2017-05-26 Thread Mao Zhongyi
ioh3420_interrupts_init() and its callers rp_realize() fill error message to local_err, then propagate it to errp by error_propagate(), which is not necessary. So eliminate it and pass errp directly instead of local_err. Of course, error_propagate() also has been removed. Signed-off-by: Mao Zhongy

Re: [Qemu-devel] [PATCH v2] pci: Set err to errp directly rather than through error_porpagate()

2017-05-26 Thread Mao Zhongyi
On 05/26/2017 09:33 PM, Eric Blake wrote: On 05/26/2017 06:58 AM, Mao Zhongyi wrote: In the subject: s/porpagate/propagate/ ioh3420_interrupts_init() and its callers rp_realize() fill error message to local_err, then propagate it to errp by error_porpagate(), and again OK, I see. Thanks

[Qemu-devel] [PATCH] nbd: Fully initialize client in case of failed negotiation

2017-05-26 Thread Eric Blake
If a non-NBD client connects to qemu-nbd, we would end up with a SIGSEGV in nbd_cilent_put() because we were trying to unregister the client's association to the export, even though we skipped inserting the client into that list. Easy trigger in two terminals: $ qemu-nbd -p 30001 --format=raw fil

Re: [Qemu-devel] [PATCH] qtest: add rtc periodic timer test

2017-05-26 Thread Xiao Guangrong
On 05/26/2017 07:03 PM, Paolo Bonzini wrote: Can you send v2 that integrates this in rtc-test.c? Really smart, have posted the v2 out, please review. Thank you, Paolo!

[Qemu-devel] [PATCH v2] [PATCH] qtest: add rtc periodic timer test

2017-05-26 Thread guangrong . xiao
From: Xiao Guangrong It tests the accuracy of rtc periodic timer which is recently improved & fixed by: mc146818rtc: precisely count the clock for periodic timer (commit id has not been decided yet) Changelog in v2: integrate it with rtc-test by using clock_step_next() to inquire the t

Re: [Qemu-devel] [PATCH 0/3] arm/virt: refine virt.c code and implement hot_add_cpu interface

2017-05-26 Thread Li Zhang
On Fri, May 26, 2017 at 7:21 PM, Igor Mammedov wrote: > On Fri, 26 May 2017 17:21:05 +0800 > Li Zhang wrote: > >> From: Li Zhang >> >> virt machine doesn't support hot_add_cpu interface. This patchset is to >> implement >> hot_add_cpu interface. A CPU can be added by QMP command with QEMU monit

Re: [Qemu-devel] [RESEND PATCH 1/2] nvdimm: warn if the backend is not a DAX device

2017-05-26 Thread Haozhong Zhang
On 05/26/17 08:25 -0700, Dan Williams wrote: > On Fri, May 26, 2017 at 7:38 AM, Daniel P. Berrange > wrote: > > On Thu, May 25, 2017 at 08:34:23PM -0700, Dan Williams wrote: > >> On Thu, May 25, 2017 at 7:32 PM, Haozhong Zhang > >> wrote: > >> > Applications in Linux guest that use device-dax ne

Re: [Qemu-devel] [RESEND PATCH 2/2] hostmem-file: add an attribute 'align' to set its alignment

2017-05-26 Thread Haozhong Zhang
On 05/26/17 15:55 -0300, Eduardo Habkost wrote: > On Fri, May 26, 2017 at 07:24:26AM -0700, Dan Williams wrote: > > On Fri, May 26, 2017 at 12:16 AM, Haozhong Zhang > > wrote: > > > On 05/26/17 07:05 +, Marc-André Lureau wrote: > > >> Hi > > >> > > >> On Fri, May 26, 2017 at 10:51 AM Haozhong

Re: [Qemu-devel] [Qemu devel v5 PATCH 5/5] msf2: Add Emcraft's Smartfusion2 SOM kit.

2017-05-26 Thread Alistair Francis
On Tue, May 16, 2017 at 8:38 AM, Subbaraya Sundeep wrote: > Emulated Emcraft's Smartfusion2 System On Module starter > kit. > > Signed-off-by: Subbaraya Sundeep > --- > hw/arm/Makefile.objs | 1 + > hw/arm/msf2-som.c| 89 > > 2 files cha

Re: [Qemu-devel] [Qemu devel v5 PATCH 4/5] msf2: Add Smartfusion2 SoC.

2017-05-26 Thread Alistair Francis
On Tue, May 16, 2017 at 8:38 AM, Subbaraya Sundeep wrote: > Smartfusion2 SoC has hardened Microcontroller subsystem > and flash based FPGA fabric. This patch adds support for > Microcontroller subsystem in the SoC. > > Signed-off-by: Subbaraya Sundeep > --- > default-configs/arm-softmmu.mak |

Re: [Qemu-devel] [PATCH 1/1] Improve Cocoa modifier key handling

2017-05-26 Thread Ian McKellar via Qemu-devel
Sent another patch that does a better job of toggling caps-lock. I couldn't make it fail with the old patch but I think the new patch is somewhat better. Ian On Tue, May 23, 2017 at 11:17 PM Gerd Hoffmann wrote: > Hi, > > > After a little more experimentation I think that the approach in this

[Qemu-devel] [PATCH] Improve Cocoa modifier key handling

2017-05-26 Thread Ian McKellar via Qemu-devel
I had two problems with QEMU on macOS: 1) Sometimes when alt-tabbing to QEMU it would act as if the 'a' key was pressed so I'd get 'a'. 2) Using Sikuli to programatically send keys to the QEMU window text like "foo_bar" would come out as "fooa-bar". They looked similar and af

Re: [Qemu-devel] [PATCH v3 02/24] docker: add --include-files argument to 'build' command

2017-05-26 Thread Philippe Mathieu-Daudé
On 05/24/2017 02:34 AM, Fam Zheng wrote: On Wed, 05/24 13:21, Fam Zheng wrote: diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 6ddc6e4c2a..68cca25f89 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -237,6 +237,11 @@ class BuildCommand(SubCommand):

Re: [Qemu-devel] [PATCH v3 03/24] docker: rebuild image if 'extra files' checksum does not match

2017-05-26 Thread Philippe Mathieu-Daudé
On 05/24/2017 02:24 AM, Fam Zheng wrote: On Sun, 05/21 00:29, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- tests/docker/docker.py | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py inde

Re: [Qemu-devel] [PATCH v2] target-ppc: Enable open-pic timers to count and generate interrupts

2017-05-26 Thread alarson
David Gibson wrote on 05/13/2017 02:59:16 AM: > From: David Gibson > On Fri, May 12, 2017 at 09:34:33AM -0500, alar...@ddci.com wrote: > > David Gibson wrote on 05/12/2017 01:52:04 Sorry for the long delay getting back to you. I was out of town for a while. > > > > +} > > > > +uin

Re: [Qemu-devel] [PATCH 09/29] qed: Make qed_write_header() synchronous

2017-05-26 Thread Eric Blake
On 05/26/2017 03:21 PM, Kevin Wolf wrote: > Note that this code is generally not running in coroutine context, so > this is an actual blocking synchronous operation. We'll fix this in a > moment. > > Signed-off-by: Kevin Wolf > --- > block/qed.c | 76 > +++---

Re: [Qemu-devel] [PATCH 08/29] qed: Remove callback from qed_copy_from_backing_file()

2017-05-26 Thread Eric Blake
On 05/26/2017 03:21 PM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/qed.c | 57 +++-- > 1 file changed, 23 insertions(+), 34 deletions(-) > > /** > - * Populate back untouched region of new data cluster > + * Populate untouche

Re: [Qemu-devel] [PATCH 07/29] qed: Make qed_copy_from_backing_file() synchronous

2017-05-26 Thread Eric Blake
On 05/26/2017 03:21 PM, Kevin Wolf wrote: > Note that this code is generally not running in coroutine context, so > this is an actual blocking synchronous operation. We'll fix this in a > moment. > > Signed-off-by: Kevin Wolf > --- > block/qed.c | 78 > +++---

[Qemu-devel] [PATCH v7 25/26] target/alpha: Implement WTINT inline

2017-05-26 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index df5d695..4523c4c 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -1

Re: [Qemu-devel] [PATCH 05/29] qed: Remove callback from qed_find_cluster()

2017-05-26 Thread Eric Blake
On 05/26/2017 03:21 PM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/qed-cluster.c | 39 ++- > block/qed.c | 20 +++- > block/qed.h | 4 ++-- > 3 files changed, 35 insertions(+), 28 deletions(-) > This diffstat

Re: [Qemu-devel] [PATCH 06/29] qed: Make qed_read_backing_file() synchronous

2017-05-26 Thread Eric Blake
On 05/26/2017 03:21 PM, Kevin Wolf wrote: > Note that this code is generally not running in coroutine context, so > this is an actual blocking synchronous operation. We'll fix this in a > moment. > > Signed-off-by: Kevin Wolf > --- > block/qed.c | 32 ++-- > 1 file ch

[Qemu-devel] [PATCH v7 23/26] target/mips: optimize cross-page direct jumps in softmmu

2017-05-26 Thread Richard Henderson
From: Aurelien Jarno Cc: Yongbok Kim Signed-off-by: Aurelien Jarno Message-Id: <20170430145254.25616-3-aurel...@aurel32.net> Signed-off-by: Richard Henderson --- target/mips/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/translate.c b/target/mips/t

[Qemu-devel] [PATCH v7 24/26] target/mips: optimize indirect branches

2017-05-26 Thread Richard Henderson
From: Aurelien Jarno Cc: Yongbok Kim Signed-off-by: Aurelien Jarno Message-Id: <20170430145254.25616-4-aurel...@aurel32.net> Signed-off-by: Richard Henderson --- target/mips/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/translate.c b/target/mips/t

[Qemu-devel] [PATCH v7 21/26] target/aarch64: optimize cross-page direct jumps in softmmu

2017-05-26 Thread Richard Henderson
From: "Emilio G. Cota" Perf numbers in next commit's log. Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 24de30d..1e

[Qemu-devel] [PATCH v7 20/26] target/hppa: Use tcg_gen_lookup_and_goto_ptr

2017-05-26 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 9e8c233..e10abc5 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -517,7 +517,7 @@

[Qemu-devel] [PATCH v7 12/26] tcg/ppc: Implement goto_ptr

2017-05-26 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.h | 2 +- tcg/ppc/tcg-target.inc.c | 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h index a9aa974..5f4a40a 100644 --- a/tcg/ppc/tcg-target.h +++ b/tcg/ppc/tcg-target.h

[Qemu-devel] [PATCH v7 17/26] tcg/arm: Implement goto_ptr

2017-05-26 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.h | 2 +- tcg/arm/tcg-target.inc.c | 25 + 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h index c114df7..5ef1086 100644 --- a/tcg/arm/tcg-target.h +++

[Qemu-devel] [PATCH v7 19/26] target/s390: Use tcg_gen_lookup_and_goto_ptr

2017-05-26 Thread Richard Henderson
Tested-by: Aurelien Jarno Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/translate.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 4c48c59..628fb86 100644 --- a/targ

[Qemu-devel] [PATCH v7 08/26] target/i386: introduce gen_jr helper to generate lookup_and_goto_ptr

2017-05-26 Thread Richard Henderson
From: "Emilio G. Cota" This helper will be used by subsequent changes. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Message-Id: <1493263764-18657-9-git-send-email-c...@braap.org> Signed-off-by: Richard Henderson --- target/i386/translate.c | 25 - 1 file cha

[Qemu-devel] [PATCH v7 16/26] tcg/arm: Clarify tcg_out_bx for arm4 host

2017-05-26 Thread Richard Henderson
In theory this would re-enable usage of QEMU on an armv4 host. Whether this is worthwhile is debatable -- we've been unconditionally issuing the armv5t BX instruction in the prologue since 2011 without complaint. Possibly we should simply require an armv6 host. Signed-off-by: Richard Henderson -

[Qemu-devel] [PATCH v7 15/26] tcg/s390: Implement goto_ptr

2017-05-26 Thread Richard Henderson
Tested-by: Aurelien Jarno Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/s390/tcg-target.h | 2 +- tcg/s390/tcg-target.inc.c | 24 +--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/tcg/s390/tcg-target.h b/tcg/s390/tcg-target.h in

[Qemu-devel] [PATCH v7 26/26] target/alpha: Use goto_tb for fallthru between TBs

2017-05-26 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 4523c4c..7c45ae3 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -89,

[Qemu-devel] [PATCH v7 10/26] target/i386: optimize indirect branches

2017-05-26 Thread Richard Henderson
From: "Emilio G. Cota" Speed up indirect branches by jumping to the target if it is valid. Softmmu measurements (see later commit for user-mode numbers): Note: baseline (i.e. speedup == 1x) is QEMU v2.9.0. - SPECint06 (test set), x86_64-softmmu (Ubuntu 16.04 guest). Host: Int

[Qemu-devel] [PATCH v7 07/26] target/arm: optimize indirect branches

2017-05-26 Thread Richard Henderson
From: "Emilio G. Cota" Speed up indirect branches by jumping to the target if it is valid. Softmmu measurements (see later commit for user-mode results): Note: baseline (i.e. speedup == 1x) is QEMU v2.9.0. - Impact on Boot time | setup | ARM debian jessie boot+shutdown time | stddev | |-

[Qemu-devel] [PATCH v7 14/26] tcg/sparc: Implement goto_ptr

2017-05-26 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.h | 2 +- tcg/sparc/tcg-target.inc.c | 11 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h index 9348ddd..854a0af 100644 --- a/tcg/sparc/tcg-target.h +++ b/tc

[Qemu-devel] [PATCH v7 09/26] target/i386: optimize cross-page direct jumps in softmmu

2017-05-26 Thread Richard Henderson
From: "Emilio G. Cota" Instead of unconditionally exiting to the exec loop, use the gen_jr helper to jump to the target if it is valid. Perf impact: see next commit's log. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Message-Id: <1493263764-18657-10-git-send-email-c...@braap.o

[Qemu-devel] [PATCH v7 22/26] target/aarch64: optimize indirect branches

2017-05-26 Thread Richard Henderson
From: "Emilio G. Cota" Measurements: [Baseline performance is that before applying this and the previous commit] -NBench, aarch64-softmmu. Host: Intel i7-4790K @ 4.00GHz 1.7x +-+-

[Qemu-devel] [PATCH v7 06/26] target/arm: optimize cross-page direct jumps in softmmu

2017-05-26 Thread Richard Henderson
From: "Emilio G. Cota" Instead of unconditionally exiting to the exec loop, use the lookup_and_goto_ptr helper to jump to the target if it is valid. Perf impact: see next commit's log. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Message-Id: <14932637

[Qemu-devel] [PATCH v7 11/26] tb-hash: improve tb_jmp_cache hash function in user mode

2017-05-26 Thread Richard Henderson
From: "Emilio G. Cota" Optimizations to cross-page chaining and indirect branches make performance more sensitive to the hit rate of tb_jmp_cache. The constraint of reserving some bits for the page number lowers the achievable quality of the hashing function. However, user-mode does not have thi

[Qemu-devel] [PATCH v7 13/26] tcg/aarch64: Implement goto_ptr

2017-05-26 Thread Richard Henderson
Measurements: SPECint06 (test set), x86_64-linux-user. Host: APM 64-bit ARMv8 (Atlas/A57) @ 2.4 GHz 1.45x +-+-+-+ |

[Qemu-devel] [PATCH v7 05/26] tcg/i386: implement goto_ptr

2017-05-26 Thread Richard Henderson
From: "Emilio G. Cota" Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Message-Id: <1493263764-18657-6-git-send-email-c...@braap.org> [rth: Reuse goto_ptr epilogue for exit_tb 0.] Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.h | 2

[Qemu-devel] [PATCH v7 00/26] tcg cross-tb optimizations

2017-05-26 Thread Richard Henderson
Changes since v7: * I've dropped the alpha patch to use goto_ptr until I can figure out why this is causing minute-long hangs while booting a kernel. It's an odd one, perhaps timing related, since the hangs do not (usually) occur when logging is enabled. * Added r-b and patches fro

[Qemu-devel] [PATCH v7 04/26] tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr

2017-05-26 Thread Richard Henderson
From: "Emilio G. Cota" Instead of exporting goto_ptr directly to TCG frontends, export tcg_gen_lookup_and_goto_ptr(), which calls goto_ptr with the pointer returned by the lookup_tb_ptr() helper. This is the only use case we have for goto_ptr and lookup_tb_ptr, so having this function is very con

[Qemu-devel] [PATCH v7 02/26] tcg/sparc: Use the proper compilation flags for 32-bit

2017-05-26 Thread Richard Henderson
We have required a v9 cpu since 9b9c37c36439ee0452632253dac7a31897f27f70. However, the flags we were using did not reliably enable v8plus, which meant that the compiler didn't know it could inline 64-bit atomics. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- configure | 6 +++---

[Qemu-devel] [PATCH v7 01/26] target/nios2: Fix 64-bit ilp32 compilation

2017-05-26 Thread Richard Henderson
Avoid a "cast from pointer to integer of different size" warning by using the proper host type. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/nios2/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/

[Qemu-devel] [PATCH v7 03/26] qemu/atomic: Loosen restrictions for 64-bit ILP32 hosts

2017-05-26 Thread Richard Henderson
We need to coordinate with the TCG_OVERSIZED_GUEST test in cputlb.c, and allow 64-bit atomics even though sizeof(void *) == 4. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/qemu/atomic.h | 34 ++ 1 file changed, 26 insertions(+), 8 deletio

Re: [Qemu-devel] [PATCH 04/29] qed: Remove callback from qed_read_l2_table()

2017-05-26 Thread Eric Blake
On 05/26/2017 03:21 PM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/qed-cluster.c | 94 > ++--- > block/qed-table.c | 15 +++-- > block/qed.h | 3 +- > 3 files changed, 36 insertions(+), 76 deletions(-) The diffstats

Re: [Qemu-devel] [PATCH 03/29] qed: Remove callback from qed_read_table()

2017-05-26 Thread Eric Blake
On 05/26/2017 03:21 PM, Kevin Wolf wrote: > Instead of passing the return value to a callback, return it to the > caller so that the callback can be inlined there. > > Signed-off-by: Kevin Wolf > --- > block/qed-table.c | 79 > ++- > 1 file ch

Re: [Qemu-devel] [PATCH 4/4] target/s390x: Re-implement a few EXECUTE target insns directly

2017-05-26 Thread Richard Henderson
On 05/25/2017 04:12 PM, Aurelien Jarno wrote: On 2017-05-24 15:08, Richard Henderson wrote: While the previous patch is required for proper conformance, the vast majority of target insns are MVC and XC for implementing memmove and memset respectively. The next most common are CLC, TR, and SVC.

Re: [Qemu-devel] [PATCH v2 2/3] qmp: Include 'abstract' field on 'qom-list-types' output

2017-05-26 Thread Eduardo Habkost
On Fri, May 26, 2017 at 03:51:53PM -0500, Eric Blake wrote: > On 05/26/2017 03:23 PM, Eduardo Habkost wrote: > > A client may be interested in getting the list of both abstract and > > non-abstract types. Instead of requiring them to make multiple queries > > with different filter arguments, just

Re: [Qemu-devel] [PATCH 02/29] qed: Make qed_read_table() synchronous

2017-05-26 Thread Eric Blake
On 05/26/2017 03:21 PM, Kevin Wolf wrote: > Note that this code is generally not running in coroutine context, so > this is an actual blocking synchronous operation. We'll fix this in a > moment. > > Signed-off-by: Kevin Wolf > --- > block/qed-table.c | 56 > ++--

Re: [Qemu-devel] [PATCH v2 3/3] qmp: Include parent type on 'qom-list-types' output

2017-05-26 Thread Eric Blake
On 05/26/2017 03:23 PM, Eduardo Habkost wrote: > Include name of parent type of each type on 'qom-list-types' output. > > Without this, there's no way to figure out the parents of a given type > without making additional 'qom-list-types' queries. > > In addition to the test case for the new featu

Re: [Qemu-devel] [PATCH v2 2/3] qmp: Include 'abstract' field on 'qom-list-types' output

2017-05-26 Thread Eric Blake
On 05/26/2017 03:23 PM, Eduardo Habkost wrote: > A client may be interested in getting the list of both abstract and > non-abstract types. Instead of requiring them to make multiple queries > with different filter arguments, just return an 'abstract' field in > 'qom-list-types'. > > In addition t

Re: [Qemu-devel] [PATCH 01/29] qed: Use bottom half to resume waiting requests

2017-05-26 Thread Eric Blake
On 05/26/2017 03:21 PM, Kevin Wolf wrote: > The qed driver serialises allocating write requests. When the active > allocation is finished, the AIO callback is called, but after this, the > next allocating request is immediately processed instead of leaving the > coroutine. Resuming another allocati

Re: [Qemu-devel] [RESEND PATCH 2/2] hostmem-file: add an attribute 'align' to set its alignment

2017-05-26 Thread Dan Williams
On Fri, May 26, 2017 at 11:55 AM, Eduardo Habkost wrote: > On Fri, May 26, 2017 at 07:24:26AM -0700, Dan Williams wrote: >> On Fri, May 26, 2017 at 12:16 AM, Haozhong Zhang >> wrote: >> > On 05/26/17 07:05 +, Marc-André Lureau wrote: >> >> Hi >> >> >> >> On Fri, May 26, 2017 at 10:51 AM Haozh

Re: [Qemu-devel] [PATCH v2 1/3] tests: Simplify abstract-interfaces check with a helper

2017-05-26 Thread Eric Blake
On 05/26/2017 03:23 PM, Eduardo Habkost wrote: > Add a new type_list_find() helper to device-introspect-test.c, to > simplify the code at test_abstract_interfaces(). > > Signed-off-by: Eduardo Habkost > --- > tests/device-introspect-test.c | 43 > -- > 1

[Qemu-devel] [PATCH 29/29] block: Remove bdrv_aio_readv/writev_flush()

2017-05-26 Thread Kevin Wolf
These functions are unused now. Signed-off-by: Kevin Wolf --- block/io.c| 171 -- include/block/block.h | 8 --- 2 files changed, 179 deletions(-) diff --git a/block/io.c b/block/io.c index fdd7485..1fec424 100644 --- a/block/io.c ++

[Qemu-devel] [PATCH 22/29] qed: Add return value to qed_aio_read/write_data()

2017-05-26 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf --- block/qed.c | 72 ++--- block/qed.h | 21 -- 2 files changed, 31 ins

[Qemu-devel] [PATCH 20/29] qed: Add return value to qed_aio_write_cow()

2017-05-26 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. While refactoring qed_aio_write_alloc() to accomodate the change, qed_aio_write_zero_cluster() ended up with a single line, so I chose to inline that line and remove the fu

[Qemu-devel] [PATCH 27/29] qed: Simplify request handling

2017-05-26 Thread Kevin Wolf
Now that we process a request in the same coroutine from beginning to end and don't drop out of it any more, we can look like a proper coroutine-based driver and simply call qed_aio_next_io() and get a return value from it instead of spawning an additional coroutine that reenters the parent when it

[Qemu-devel] [PATCH 25/29] qed: Implement .bdrv_co_readv/writev

2017-05-26 Thread Kevin Wolf
Most of the qed code is now synchronous and matches the coroutine model. One notable exception is the serialisation between requests which can still schedule a callback. Before we can replace this with coroutine locks, let's convert the driver's external interfaces to the coroutine versions. We ne

[Qemu-devel] [PATCH 19/29] qed: Add return value to qed_aio_write_main()

2017-05-26 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf --- block/qed.c | 55 ++- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/bl

[Qemu-devel] [PATCH 21/29] qed: Add return value to qed_aio_write_inplace/alloc()

2017-05-26 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf --- block/qed.c | 43 --- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/block/qed.c b/

[Qemu-devel] [PATCH 28/29] qed: Use a coroutine for need_check_timer

2017-05-26 Thread Kevin Wolf
This fixes the last place where we degraded from AIO to actual blocking synchronous I/O requests. Putting it into a coroutine means that instead of blocking, the coroutine simply yields while doing I/O. Signed-off-by: Kevin Wolf --- block/qed.c | 33 + 1 file chan

[Qemu-devel] [PATCH v2 0/3] qmp: Return extra information on qom-list-types

2017-05-26 Thread Eduardo Habkost
This series adds 'abstract' and 'parent' fields to the output of qom-list-types. For reference, below are the sizes of the output of "qom-list-types abstract=true" on qemu-system-x86_64, before and after applying the patches: * before: 11724 bytes * with 'abstract' field: 13146 bytes * with 'abst

[Qemu-devel] [PATCH 15/29] qed: Make qed_aio_write_main() synchronous

2017-05-26 Thread Kevin Wolf
Note that this code is generally not running in coroutine context, so this is an actual blocking synchronous operation. We'll fix this in a moment. Signed-off-by: Kevin Wolf --- block/qed.c | 61 +++-- 1 file changed, 19 insertions(+), 42 d

[Qemu-devel] [PATCH 18/29] qed: Add return value to qed_aio_write_l2_update()

2017-05-26 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf --- block/qed.c | 43 ++- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/block/qed.c b/

[Qemu-devel] [PATCH 26/29] qed: Use CoQueue for serialising allocations

2017-05-26 Thread Kevin Wolf
Now that we're running in coroutine context, the ad-hoc serialisation code (which drops a request that has to wait out of coroutine context) can be replaced by a CoQueue. This means that when we resume a serialised request, it is running in coroutine context again and its I/O isn't blocking any mo

[Qemu-devel] [PATCH 11/29] qed: Make qed_write_table() synchronous

2017-05-26 Thread Kevin Wolf
Note that this code is generally not running in coroutine context, so this is an actual blocking synchronous operation. We'll fix this in a moment. Signed-off-by: Kevin Wolf --- block/qed-table.c | 84 --- 1 file changed, 30 insertions(+), 54 d

[Qemu-devel] [PATCH 16/29] qed: Inline qed_commit_l2_update()

2017-05-26 Thread Kevin Wolf
qed_commit_l2_update() is unconditionally called at the end of qed_aio_write_l1_update(). Inline it. Signed-off-by: Kevin Wolf --- block/qed.c | 36 ++-- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/block/qed.c b/block/qed.c index a596c4d..3b1cc

[Qemu-devel] [PATCH 24/29] qed: Remove recursion in qed_aio_next_io()

2017-05-26 Thread Kevin Wolf
Instead of calling itself recursively as the last thing, just convert qed_aio_next_io() into a loop. This patch is best reviewed with 'git show -w' because most of it is just whitespace changes. Signed-off-by: Kevin Wolf --- block/qed.c | 63 +++--

[Qemu-devel] [PATCH 14/29] qed: Make qed_aio_read_data() synchronous

2017-05-26 Thread Kevin Wolf
Note that this code is generally not running in coroutine context, so this is an actual blocking synchronous operation. We'll fix this in a moment. Signed-off-by: Kevin Wolf --- block/qed.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/block/qed.c b/block/qed.c inde

[Qemu-devel] [PATCH 12/29] qed: Remove GenericCB

2017-05-26 Thread Kevin Wolf
The GenericCB infrastructure isn't used any more. Remove it. Signed-off-by: Kevin Wolf --- block/Makefile.objs | 2 +- block/qed-gencb.c | 33 - block/qed.h | 11 --- 3 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 block/qed

[Qemu-devel] [PATCH v2 3/3] qmp: Include parent type on 'qom-list-types' output

2017-05-26 Thread Eduardo Habkost
Include name of parent type of each type on 'qom-list-types' output. Without this, there's no way to figure out the parents of a given type without making additional 'qom-list-types' queries. In addition to the test case for the new feature, update the abstract-interface test case to use the new

[Qemu-devel] [PATCH 23/29] qed: Remove ret argument from qed_aio_next_io()

2017-05-26 Thread Kevin Wolf
All callers pass ret = 0, so we can just remove it. Signed-off-by: Kevin Wolf --- block/qed.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/block/qed.c b/block/qed.c index 3a26fdf..078591b 100644 --- a/block/qed.c +++ b/block/qed.c @@ -253,11 +253,11 @@ s

[Qemu-devel] [PATCH 08/29] qed: Remove callback from qed_copy_from_backing_file()

2017-05-26 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qed.c | 57 +++-- 1 file changed, 23 insertions(+), 34 deletions(-) diff --git a/block/qed.c b/block/qed.c index 584a5ba..61ef732 100644 --- a/block/qed.c +++ b/block/qed.c @@ -861,13 +861,9 @@ static int qed

[Qemu-devel] [PATCH 09/29] qed: Make qed_write_header() synchronous

2017-05-26 Thread Kevin Wolf
Note that this code is generally not running in coroutine context, so this is an actual blocking synchronous operation. We'll fix this in a moment. Signed-off-by: Kevin Wolf --- block/qed.c | 76 +++-- 1 file changed, 29 insertions(+), 47 d

[Qemu-devel] [PATCH v2 2/3] qmp: Include 'abstract' field on 'qom-list-types' output

2017-05-26 Thread Eduardo Habkost
A client may be interested in getting the list of both abstract and non-abstract types. Instead of requiring them to make multiple queries with different filter arguments, just return an 'abstract' field in 'qom-list-types'. In addition to the new test code for validating this field, update the a

[Qemu-devel] [PATCH v2 1/3] tests: Simplify abstract-interfaces check with a helper

2017-05-26 Thread Eduardo Habkost
Add a new type_list_find() helper to device-introspect-test.c, to simplify the code at test_abstract_interfaces(). Signed-off-by: Eduardo Habkost --- tests/device-introspect-test.c | 43 -- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/te

[Qemu-devel] [PATCH 17/29] qed: Add return value to qed_aio_write_l1_update()

2017-05-26 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf --- block/qed.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/block/qed.c b/block/qed.c index 3b1cce4

[Qemu-devel] [PATCH 02/29] qed: Make qed_read_table() synchronous

2017-05-26 Thread Kevin Wolf
Note that this code is generally not running in coroutine context, so this is an actual blocking synchronous operation. We'll fix this in a moment. Signed-off-by: Kevin Wolf --- block/qed-table.c | 56 ++- 1 file changed, 18 insertions(+), 38 d

[Qemu-devel] [PATCH 07/29] qed: Make qed_copy_from_backing_file() synchronous

2017-05-26 Thread Kevin Wolf
Note that this code is generally not running in coroutine context, so this is an actual blocking synchronous operation. We'll fix this in a moment. Signed-off-by: Kevin Wolf --- block/qed.c | 78 +++-- 1 file changed, 29 insertions(+), 49 d

[Qemu-devel] [PATCH 13/29] qed: Remove callback from qed_write_table()

2017-05-26 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qed-table.c | 47 --- block/qed.c | 12 +++- block/qed.h | 8 +++- 3 files changed, 22 insertions(+), 45 deletions(-) diff --git a/block/qed-table.c b/block/qed-table.c index 0cc93a7..ebee2c5

[Qemu-devel] [PATCH 06/29] qed: Make qed_read_backing_file() synchronous

2017-05-26 Thread Kevin Wolf
Note that this code is generally not running in coroutine context, so this is an actual blocking synchronous operation. We'll fix this in a moment. Signed-off-by: Kevin Wolf --- block/qed.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/blo

[Qemu-devel] [PATCH 05/29] qed: Remove callback from qed_find_cluster()

2017-05-26 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qed-cluster.c | 39 ++- block/qed.c | 20 +++- block/qed.h | 4 ++-- 3 files changed, 35 insertions(+), 28 deletions(-) diff --git a/block/qed-cluster.c b/block/qed-cluster.c index d279944..8

[Qemu-devel] [PATCH 01/29] qed: Use bottom half to resume waiting requests

2017-05-26 Thread Kevin Wolf
The qed driver serialises allocating write requests. When the active allocation is finished, the AIO callback is called, but after this, the next allocating request is immediately processed instead of leaving the coroutine. Resuming another allocation request in the same request coroutine means tha

[Qemu-devel] [PATCH 03/29] qed: Remove callback from qed_read_table()

2017-05-26 Thread Kevin Wolf
Instead of passing the return value to a callback, return it to the caller so that the callback can be inlined there. Signed-off-by: Kevin Wolf --- block/qed-table.c | 79 ++- 1 file changed, 25 insertions(+), 54 deletions(-) diff --git a/bloc

[Qemu-devel] [PATCH 00/29] qed: Convert to coroutines

2017-05-26 Thread Kevin Wolf
The qed block driver is one of the last remaining block drivers that use the AIO callback style interfaces. This series converts it to the coroutine model that other drivers are using and removes some AIO functions from the block layer API afterwards. If this isn't compelling enough, the diffstat

[Qemu-devel] [PATCH 10/29] qed: Remove callback from qed_write_header()

2017-05-26 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qed.c | 36 ++-- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/block/qed.c b/block/qed.c index 5548475..134c98a 100644 --- a/block/qed.c +++ b/block/qed.c @@ -98,8 +98,7 @@ int qed_write_header_sync(BDRVQEDState

[Qemu-devel] [PATCH 04/29] qed: Remove callback from qed_read_l2_table()

2017-05-26 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qed-cluster.c | 94 ++--- block/qed-table.c | 15 +++-- block/qed.h | 3 +- 3 files changed, 36 insertions(+), 76 deletions(-) diff --git a/block/qed-cluster.c b/block/qed-cluster.c index 8f5da74..

Re: [Qemu-devel] [PATCH v2] target/s390x/cpu_models: Allow some additional feature bits for the "qemu" CPU

2017-05-26 Thread Thomas Huth
On 26.05.2017 14:14, David Hildenbrand wrote: > On 25.05.2017 11:22, Thomas Huth wrote: >> Currently we only present the plain z900 feature bits to the guest, >> but QEMU already emulates some additional features (but not all of >> the next CPU generation, so we can not use the next CPU level as >>

Re: [Qemu-devel] [Qemu-block] Behavior of QMP "query-block"

2017-05-26 Thread Konrad Rzeszutek Wilk
On Fri, May 26, 2017 at 10:02:32PM +0200, Kevin Wolf wrote: > Am 26.05.2017 um 18:55 hat John Snow geschrieben: > > On 05/26/2017 07:40 AM, Kevin Wolf wrote: > > > There is one completely crazy thing that Xen does with respect to disks. > > > Instead of having support for their PV disks (i.e. virti

Re: [Qemu-devel] [Qemu-block] Behavior of QMP "query-block"

2017-05-26 Thread Kevin Wolf
Am 26.05.2017 um 18:55 hat John Snow geschrieben: > On 05/26/2017 07:40 AM, Kevin Wolf wrote: > > There is one completely crazy thing that Xen does with respect to disks. > > Instead of having support for their PV disks (i.e. virtio-blk, just > > different) in the BIOS, they add _both_ an IDE disk

Re: [Qemu-devel] [Qemu-trivial] [PATCH] qemu-ga: remove useless allocation

2017-05-26 Thread Philippe Mathieu-Daudé
On 05/26/2017 07:13 AM, Marc-André Lureau wrote: There is no need to duplicate a fixed string. CC: qemu-triv...@nongnu.org Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- qga/commands-posix.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/q

[Qemu-devel] [PULL 11/12] blockjob: use deferred_to_main_loop to indicate the coroutine has ended

2017-05-26 Thread Jeff Cody
From: Paolo Bonzini All block jobs are using block_job_defer_to_main_loop as the final step just before the coroutine terminates. At this point, block_job_enter should do nothing, but currently it restarts the freed coroutine. Now, the job->co states should probably be changed to an enum (e.g.

[Qemu-devel] [PULL 05/12] blockjob: separate monitor and blockjob APIs

2017-05-26 Thread Jeff Cody
From: Paolo Bonzini We have two different headers for block job operations, blockjob.h and blockjob_int.h. The former contains APIs called by the monitor, the latter contains APIs called by the block job drivers and the block layer itself. Keep the two APIs separate in the blockjob.c file too.

[Qemu-devel] [PULL 06/12] blockjob: move iostatus reset inside block_job_user_resume

2017-05-26 Thread Jeff Cody
From: Paolo Bonzini Outside blockjob.c, the block_job_iostatus_reset function is used once in the monitor and once in BlockBackend. When we introduce the block job mutex, block_job_iostatus_reset's client is going to be the block layer (for which blockjob.c will take the block job mutex) rather

[Qemu-devel] [PULL 09/12] blockjob: strengthen a bit test-blockjob-txn

2017-05-26 Thread Jeff Cody
From: Paolo Bonzini Unlike test-blockjob-txn, QMP releases the reference to the transaction before the jobs finish. Thus, qemu-iotest 124 showed a failure while working on the next patch that the unit tests did not have. Make the test a little nastier. Reviewed-by: Stefan Hajnoczi Reviewed-by

[Qemu-devel] [PULL 10/12] blockjob: reorganize block_job_completed_txn_abort

2017-05-26 Thread Jeff Cody
From: Paolo Bonzini This splits the part that touches job states from the part that invokes callbacks. It will make the code simpler to understand once job states will be protected by a different mutex than the AioContext lock. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message

  1   2   3   >