[Qemu-devel] [PATCH] fix: avoid an infinite loop or a dangling pointer problem in img_commit

2017-06-14 Thread sochin.jiang
From: "sochin.jiang" img_commit could fall into an infinite loop calling run_block_job() if its blockjob fails on any I/O error, fix this already known problem. Signed-off-by: sochin.jiang --- blockjob.c | 4 ++-- include/block/blockjob.h | 18 ++ qemu-img.c

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [virtio-dev] Re: [PATCH v1] virtio-net: enable configurable tx queue size

2017-06-14 Thread Wei Wang
On 06/15/2017 12:16 PM, Jason Wang wrote: On 2017年06月14日 23:22, Michael S. Tsirkin wrote: On Wed, Jun 14, 2017 at 07:26:54PM +0800, Jason Wang wrote: On 2017年06月13日 18:46, Jason Wang wrote: On 2017年06月13日 17:50, Wei Wang wrote: On 06/13/2017 05:04 PM, Jason Wang wrote: On 2017年06月13日 15

Re: [Qemu-devel] [PATCH v5 0/3] spapr/xics: fix migration of older machine types

2017-06-14 Thread Cédric Le Goater
On 06/14/2017 03:28 PM, Greg Kurz wrote: > Cc'ing Laurent because I needed to incorporate the "spapr: manage hotplugged > devices while the VM is not started" patch in this series to be able to > verify that the "CPU core unplug" part of patch 3 behaves as expected. > > With this series, I could s

[Qemu-devel] [PATCH 3/5] target/s390x: change PSW_SHIFT_KEY

2017-06-14 Thread Richard Henderson
From: David Hildenbrand Such shifts are usually used to easily extract the PSW KEY from the PSW mask, so let's avoid the confusing offset of 4. Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand Message-Id: <20170614133819.18480-2-da...@redhat.com> Signed-off-by: Richard Henderson ---

[Qemu-devel] [PATCH 1/5] target/s390x: Map existing FAC_* names to S390_FEAT_* names

2017-06-14 Thread Richard Henderson
The FAC_ names were placeholders prior to the introduction of the current facility modeling. Signed-off-by: Richard Henderson --- target/s390x/translate.c | 59 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/target/s390x/translate

[Qemu-devel] [PATCH 2/5] target/s390x: Enforce instruction features

2017-06-14 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/translate.c | 8 1 file changed, 8 insertions(+) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index af18ffb..48cee25 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -55,6 +55,7 @@ typedef struc

[Qemu-devel] [PATCH 4/5] target/s390x: implement mvcos instruction

2017-06-14 Thread Richard Henderson
From: David Hildenbrand This adds support for the MOVE WITH OPTIONAL SPECIFICATIONS (MVCOS) instruction. Allow to enable it for the qemu cpu model using qemu-system-s390x ... -cpu qemu,mvcos=on ... This allows to boot linux kernel that uses it for uacccess. We are missing (as for most other pa

[Qemu-devel] [PATCH 0/5] More s390x improvements

2017-06-14 Thread Richard Henderson
David, in his first mvcos patch, points out that we're not enforcing the facilties on translation. This takes care of that. I also went through and see that we fully implement 3 other facilities bits. r~ David Hildenbrand (2): target/s390x: change PSW_SHIFT_KEY target/s390x: implement mvc

[Qemu-devel] [PATCH 5/5] target/s390x: mark CSST, CSST2, FPSEH facilities as available

2017-06-14 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/cpu_models.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index c3a4ce6..703feca 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -683,8 +683,11 @@ static voi

[Qemu-devel] [FIX PATCH] target/ppc: Proper cleanup when ppc_cpu_realizefn fails

2017-06-14 Thread Bharata B Rao
If ppc_cpu_realizefn() fails after cpu_exec_realizefn() has been called, we will have to undo whatever cpu_exec_realizefn() did by explicitly calling cpu_exec_unrealizeffn() which is currently missing. Failure to do this proper cleanup will result in CPU which was never fully realized to linger on

Re: [Qemu-devel] [PATCH] target/aarch64: exit to main loop after 'msr daifclr'

2017-06-14 Thread Emilio G. Cota
On Wed, Jun 14, 2017 at 18:20:29 -0700, Richard Henderson wrote: > On 06/14/2017 01:33 PM, Emilio G. Cota wrote: > >On Wed, Jun 14, 2017 at 12:48:21 -0700, Richard Henderson wrote: > >>Exit to cpu loop so we reevaluate cpu_arm_hw_interrupts. > >> > >>Cc: qemu-...@nongnu.org > >>Cc: Peter Maydell >

[Qemu-devel] [PATCH v2] vhost-user: support cross-endianess negatiation

2017-06-14 Thread Felipe Franciosi
Currently, vhost-user does not implement any means for notifying the backend about guest endianess. This commit introduces a new message called VHOST_USER_SET_VRING_ENDIAN which is analogous to the ioctl() called VHOST_SET_VRING_ENDIAN used for kernel vhost backends. Such message is necessary for b

Re: [Qemu-devel] [PATCH V6 02/10] net/filter-mirror.c: Make filter mirror support vnet support.

2017-06-14 Thread Jason Wang
On 2017年06月14日 16:04, Zhang Chen wrote: On 06/13/2017 05:14 PM, Jason Wang wrote: On 2017年06月12日 17:27, Zhang Chen wrote: +if (nf->direction == NET_FILTER_DIRECTION_RX || +nf->direction == NET_FILTER_DIRECTION_ALL) { +vnet_hdr_len = nf->netdev->vnet_hdr_l

Re: [Qemu-devel] [PULL 0/2] Block patches

2017-06-14 Thread Jeff Cody
On Wed, Jun 14, 2017 at 03:26:52PM -0700, no-re...@patchew.org wrote: > Hi, > > This series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. > > Type: series > Subject: [Qemu-devel] [P

Re: [Qemu-devel] 答复: Re: 答复: Re: [PATCHv2 02/04] colo-compare: Process pactkets in the IOThread ofthe primary

2017-06-14 Thread Jason Wang
On 2017年06月13日 19:24, wang.yong...@zte.com.cn wrote: >>Char-fe.c for sure which means frontend of chardev. >>> These API can only watch events in the qemu main thread, not in the >>> IOThread. >>> >>> I had to use the qio_channel_socket_set_aio_fd_handler function to >>> >>> monitor the

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [PATCH v1] virtio-net: enable configurable tx queue size

2017-06-14 Thread Jason Wang
On 2017年06月14日 23:22, Michael S. Tsirkin wrote: On Wed, Jun 14, 2017 at 07:26:54PM +0800, Jason Wang wrote: On 2017年06月13日 18:46, Jason Wang wrote: On 2017年06月13日 17:50, Wei Wang wrote: On 06/13/2017 05:04 PM, Jason Wang wrote: On 2017年06月13日 15:17, Wei Wang wrote: On 06/13/2017 02:29 P

Re: [Qemu-devel] [PATCH] fix: avoid infinite loop when blockjob encountering failure

2017-06-14 Thread sochin.jiang
I realized blockjob is freed after completed unless we call block_job_ref() before run_block_job is called. On 2017/6/15 10:38, sochin.jiang wrote: > Thanks for your kindly reply. > > I do have made a mistake that ignoring the AIOContext lock. > > About the patch, firstly, if job->ret comes to b

Re: [Qemu-devel] [PATCH] util: remove the obsolete non-blocking connect

2017-06-14 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Subject: [Qemu-devel] [PATCH] util: remove the obsolete non-blocking connect Message-id: 20170615030801.6260-1-ma

[Qemu-devel] [PATCH] util: remove the obsolete non-blocking connect

2017-06-14 Thread Mao Zhongyi
From: Cao jin The non-blocking connect mechanism is obsolete, and it doesn't work well in inet connection, because it will call getaddrinfo first and getaddrinfo will blocks on DNS lookups. Since commit e65c67e4 & d984464e, the non-blocking connect of migration goes through QIOChannel in a differ

Re: [Qemu-devel] [PATCH 2/3] exec: simplify address_space_get_iotlb_entry

2017-06-14 Thread Peter Xu
On Thu, Jun 15, 2017 at 10:31:11AM +0800, Peter Xu wrote: > On Wed, Jun 14, 2017 at 09:34:52PM +0300, Michael S. Tsirkin wrote: > > On Mon, Jun 12, 2017 at 12:04:58PM +0800, Peter Xu wrote: > > > On Mon, Jun 12, 2017 at 06:07:04AM +0300, Michael S. Tsirkin wrote: > > > > On Mon, Jun 12, 2017 at 10:

[Qemu-devel] [FIX PATCH] spapr: prevent QEMU crash when CPU realization fails

2017-06-14 Thread Bharata B Rao
ICPState objects were being allocated before CPU thread realization. However commit 9ed656631d73 (xics: setup cpu at realize time) reversed it by allocating ICPState objects after CPU thread is realized. But it didn't take care to fix the error path because of which we observe a SIGSEGV when CPU th

Re: [Qemu-devel] [PATCH] fix: avoid infinite loop when blockjob encountering failure

2017-06-14 Thread sochin.jiang
Thanks for your kindly reply. I do have made a mistake that ignoring the AIOContext lock. About the patch, firstly, if job->ret comes to be non-zero(also means job->completed to be true) , blockjob 'callback'(common_block_job_cb) will be called, blockjob error will be put into errp. It won't re

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/excp_helper: Take BQL before calling cpu_interrupt()

2017-06-14 Thread Nikunj A Dadhania
Alex Bennée writes: > Thomas Huth writes: > >> Since the introduction of MTTCG, using the msgsnd instruction >> abort()s if being called without holding the BQL. So let's protect >> that part of the code now with qemu_mutex_lock_iothread(). >> >> Buglink: https://bugs.launchpad.net/qemu/+bug/169

Re: [Qemu-devel] [PATCH 2/3] exec: simplify address_space_get_iotlb_entry

2017-06-14 Thread Peter Xu
On Wed, Jun 14, 2017 at 09:34:52PM +0300, Michael S. Tsirkin wrote: > On Mon, Jun 12, 2017 at 12:04:58PM +0800, Peter Xu wrote: > > On Mon, Jun 12, 2017 at 06:07:04AM +0300, Michael S. Tsirkin wrote: > > > On Mon, Jun 12, 2017 at 10:34:43AM +0800, Peter Xu wrote: > > > > On Sun, Jun 11, 2017 at 08:

Re: [Qemu-devel] [PATCH] tcg-runtime: increase hit rate of lookup_tb_ptr

2017-06-14 Thread Richard Henderson
On 06/14/2017 01:27 PM, Emilio G. Cota wrote: On Wed, Jun 14, 2017 at 12:48:17 -0700, Richard Henderson wrote: We can call tb_htable_lookup even when the tb_jmp_cache is completely empty. Therefore, un-nest most of the code dependent on tb != NULL from the read from the cache. Signed-off-by: R

Re: [Qemu-devel] [PATCH v2 2/5] target/alpha: Use tcg_gen_lookup_and_goto_ptr

2017-06-14 Thread Richard Henderson
On 06/14/2017 01:37 PM, Emilio G. Cota wrote: On Wed, Jun 14, 2017 at 12:48:18 -0700, Richard Henderson wrote: Signed-off-by: Richard Henderson (snip) @@ -1198,7 +1205,10 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int palcode) tcg_gen_andi_i64(tmp, ctx->ir[IR_A0], PS_

Re: [Qemu-devel] [PATCH] target/aarch64: exit to main loop after 'msr daifclr'

2017-06-14 Thread Richard Henderson
On 06/14/2017 01:33 PM, Emilio G. Cota wrote: On Wed, Jun 14, 2017 at 12:48:21 -0700, Richard Henderson wrote: Exit to cpu loop so we reevaluate cpu_arm_hw_interrupts. Cc: qemu-...@nongnu.org Cc: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 7 ++- 1 f

Re: [Qemu-devel] [PATCH] target/m68k: fix V flag for CC_OP_SUBx

2017-06-14 Thread Richard Henderson
On 06/14/2017 01:39 PM, Laurent Vivier wrote: V flag for subtraction is: v = (res ^ src1) & (src1 ^ src2) (see COMPUTE_CCR() in target/m68k/helper.c) But gen_flush_flags() uses: v = (res ^ src2) & (src1 ^ src2) The problem has been found with the following program: .global

[Qemu-devel] [Bug 823733] Re: Soloaris can't be poweroff

2017-06-14 Thread Thomas Huth
Triaging old bug tickets ... can you still reproduce this problem with the latest version of QEMU (currently version 2.9.0)? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https:/

[Qemu-devel] [PATCH] tcg: consistently access cpu->tb_jmp_cache atomically

2017-06-14 Thread Emilio G. Cota
Some code paths can lead to atomic accesses racing with memset() on cpu->tb_jmp_cache, which can result in torn reads/writes and is undefined behaviour in C11. These torn accesses are unlikely to show up as bugs, but from code inspection they seem possible. For example, tb_phys_invalidate does:

Re: [Qemu-devel] [PATCH] spapr: manage hotplugged devices while the VM is not started

2017-06-14 Thread Michael Roth
Quoting Igor Mammedov (2017-06-14 04:00:01) > On Tue, 13 Jun 2017 16:42:45 -0500 > Michael Roth wrote: > > > Quoting Igor Mammedov (2017-06-09 03:27:33) > > > On Thu, 08 Jun 2017 15:00:53 -0500 > > > Michael Roth wrote: > > > > > > > Quoting David Gibson (2017-05-30 23:35:57) > > > > > On T

[Qemu-devel] [PATCH 1/2] powerpc: Fix emulation of mcrf in emulate_step()

2017-06-14 Thread Anton Blanchard
From: Anton Blanchard The mcrf emulation code was looking at the CR fields in the reverse order. It also relied on reserved fields being zero which is somewhat fragile, so fix that too. Cc: sta...@vger.kernel.org Signed-off-by: Anton Blanchard --- arch/powerpc/lib/sstep.c | 6 -- 1 file ch

Re: [Qemu-devel] [PATCH v1 2/3] target/s390x: implement mvcos instruction

2017-06-14 Thread Richard Henderson
On 06/14/2017 01:00 PM, Thomas Huth wrote: On 14.06.2017 09:56, David Hildenbrand wrote: [...] I think you should also mask the length with 0x if the PSW was not in 64-bit mode? Or is this done automagically by the generated TCG code already? I was asking myself the same question, but

Re: [Qemu-devel] [PATCH v6 1/6] Pass generic CPUState to gen_intermediate_code()

2017-06-14 Thread Laurent Vivier
Le 12/06/2017 à 16:53, Lluís Vilanova a écrit : > Needed to implement a target-agnostic gen_intermediate_code() in the > future. > > Signed-off-by: Lluís Vilanova > Reviewed-by: David Gibson > Reviewed-by: Richard Henderson > --- > include/exec/exec-all.h |2 +- > target/alpha/transl

[Qemu-devel] [Bug 1093691] Re: QEMU build fails on OpenBSD/mips64

2017-06-14 Thread Thomas Huth
Triaging old bug tickets ... does this problem still persist with the latest version of QEMU (currently version 2.9.0)? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs

[Qemu-devel] [PULL 2/2] block/iscsi: enable filename option and parsing

2017-06-14 Thread Jeff Cody
When enabling option parsing and blockdev-add for iscsi, we removed the 'filename' option. Unfortunately, this was a bit optimistic, as previous versions of QEMU allowed the use of the option in backing filenames via json. This means that without parsing this option, we cannot open existing image

[Qemu-devel] [PULL 0/2] Block patches

2017-06-14 Thread Jeff Cody
The following changes since commit 3f0602927b120a480b35dcf58cf6f95435b3ae91: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170613' into staging (2017-06-13 15:49:07 +0100) are available in the git repository at: git://github.com/codyprime/qemu-kvm-jtc.git tags/block-

[Qemu-devel] [PULL 1/2] block/rbd: enable filename option and parsing

2017-06-14 Thread Jeff Cody
When enabling option parsing and blockdev-add for rbd, we removed the 'filename' option. Unfortunately, this was a bit optimistic, as previous versions of QEMU allowed the use of the option in backing filenames via json. This means that without parsing this option, we cannot open existing images

Re: [Qemu-devel] [PATCH v2 0/2] Parse 'filename' option for RBD/iSCSI

2017-06-14 Thread Jeff Cody
On Wed, Jun 14, 2017 at 08:53:18AM -0400, Jeff Cody wrote: > Change from v2: > Add warning message that this is an unsupported option that may > be deprecated in the future. > > We need to be able to parse the 'filename' option for rbd and iscsi, because > there may exist images in the wild that h

Re: [Qemu-devel] [PATCH v6 1/6] Pass generic CPUState to gen_intermediate_code()

2017-06-14 Thread Eduardo Habkost
On Mon, Jun 12, 2017 at 05:53:55PM +0300, Lluís Vilanova wrote: > Needed to implement a target-agnostic gen_intermediate_code() in the > future. > > Signed-off-by: Lluís Vilanova > Reviewed-by: David Gibson > Reviewed-by: Richard Henderson Acked-by: Eduardo Habkost For i386 parts: Reviewed-

[Qemu-devel] [Bug 1096713] Re: qemu 1.3.0: Windows XP crashes when reconizing the USB keyboard

2017-06-14 Thread Thomas Huth
Triaging old bug tickets ... can you still reproduce this problem with the latest version of QEMU (currently version 2.9.0)? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https:/

Re: [Qemu-devel] [PATCH 4/4] include/exec/poison: Mark CONFIG_KVM as poisoned, too

2017-06-14 Thread Paolo Bonzini
- Original Message - > From: "Thomas Huth" > To: qemu-devel@nongnu.org, "Paolo Bonzini" > Sent: Wednesday, June 14, 2017 9:21:53 PM > Subject: [PATCH 4/4] include/exec/poison: Mark CONFIG_KVM as poisoned, too > > We unfortunately need some additional "#ifndef NEED_CPU_H" fuzz in > incl

[Qemu-devel] [PATCH] target/m68k: fix V flag for CC_OP_SUBx

2017-06-14 Thread Laurent Vivier
V flag for subtraction is: v = (res ^ src1) & (src1 ^ src2) (see COMPUTE_CCR() in target/m68k/helper.c) But gen_flush_flags() uses: v = (res ^ src2) & (src1 ^ src2) The problem has been found with the following program: .global _start _start: move.l #-2147483648,%d0

Re: [Qemu-devel] [PATCH v2 2/5] target/alpha: Use tcg_gen_lookup_and_goto_ptr

2017-06-14 Thread Emilio G. Cota
On Wed, Jun 14, 2017 at 12:48:18 -0700, Richard Henderson wrote: > Signed-off-by: Richard Henderson (snip) > @@ -1198,7 +1205,10 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int > palcode) > tcg_gen_andi_i64(tmp, ctx->ir[IR_A0], PS_INT_MASK); > tcg_gen_st8_i64(tm

[Qemu-devel] [PATCH 5/5] hostmem-file: Add "persistent" option

2017-06-14 Thread Eduardo Habkost
The new option can be used to indicate that the memory block contents can be safely discarded and don't need to be flushed to the filesystem when the memory backend is destroyed (including when QEMU exits). Internally, it will trigger a madvise(MADV_REMOVE) or fallocate(FALLOC_FL_PUNCH_HOLE) call

[Qemu-devel] [PATCH] target/aarch64: exit to main loop after 'msr daifclr'

2017-06-14 Thread Emilio G. Cota
On Wed, Jun 14, 2017 at 12:48:21 -0700, Richard Henderson wrote: > Exit to cpu loop so we reevaluate cpu_arm_hw_interrupts. > > Cc: qemu-...@nongnu.org > Cc: Peter Maydell > Signed-off-by: Richard Henderson > --- > target/arm/translate-a64.c | 7 ++- > 1 file changed, 6 insertions(+), 1 del

[Qemu-devel] [PATCH 1/5] vl: Clean up user-creatable objects when exiting

2017-06-14 Thread Eduardo Habkost
Delete all user-creatable objects in /objects when exiting QEMU, so they can perform cleanup actions. Signed-off-by: Eduardo Habkost --- include/qom/object_interfaces.h | 8 qom/object_interfaces.c | 5 + vl.c| 1 + 3 files changed, 14 insertions(

[Qemu-devel] [PATCH 4/5] memory: Add 'persistent' parameter to memory_region_init_ram_from_file()

2017-06-14 Thread Eduardo Habkost
Make it possible to set the RAM_NONPERSISTENT flag on the RAMBlock when mapping a file. Signed-off-by: Eduardo Habkost --- include/exec/memory.h | 4 include/exec/ram_addr.h | 4 ++-- backends/hostmem-file.c | 2 +- exec.c | 7 +-- memory.c| 4 +++- nu

[Qemu-devel] [PATCH 0/5] hostmem-file: Add "persistent" option

2017-06-14 Thread Eduardo Habkost
This series adds a new "persistent" option to memory-backend-file. The new option it will be useful if somebody is sharing RAM contents on a file using share=on, but don't need it to be flushed to disk when QEMU exits. Internally, it will trigger a madvise(MADV_REMOVE) or fallocate(FALLOC_FL_PUNC

[Qemu-devel] [PATCH 3/5] memory: Add RAM_NONPERSISTENT flag

2017-06-14 Thread Eduardo Habkost
The new flag will make qemu_ram_free() discard the contents of the block. It will be used to let QEMU be configured to avoid flushing file contents to disk when exiting. As MADV_REMOVE is not always supported, the new code will try MADV_NOTNEEDED in case MADV_REMOVE fails. The new flag will also

[Qemu-devel] [PATCH 2/5] memory: Allow RAM up to block->max_length to be discarded

2017-06-14 Thread Eduardo Habkost
Currently ram_block_discard_range() is called only by the postcopy code, using length=block->used_length. However, new code will use ram_block_discard_range() to discard the contents of the entire RAMBlock, so change the limit check to use max_length instead of used_length. Signed-off-by: Eduardo

[Qemu-devel] [PATCH] tcg-runtime: increase hit rate of lookup_tb_ptr

2017-06-14 Thread Emilio G. Cota
On Wed, Jun 14, 2017 at 12:48:17 -0700, Richard Henderson wrote: > We can call tb_htable_lookup even when the tb_jmp_cache > is completely empty. Therefore, un-nest most of the code > dependent on tb != NULL from the read from the cache. > > Signed-off-by: Richard Henderson I just wrote this al

Re: [Qemu-devel] [PATCH v2 0/5] Fixes for TCG hangs

2017-06-14 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20170614194821.8754-1-...@twiddle.net Subject: [Qemu-devel] [PATCH v2 0/5] Fixes for TCG hangs Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log --oneline

Re: [Qemu-devel] [PATCH v2 2/2] target/s390x: implement mvcos instruction

2017-06-14 Thread Thomas Huth
On 14.06.2017 15:38, David Hildenbrand wrote: > This adds support for the MOVE WITH OPTIONAL SPECIFICATIONS (MVCOS) > instruction. Allow to enable it for the qemu cpu model using > > qemu-system-s390x ... -cpu qemu,mvcos=on ... > > This allows to boot linux kernel that uses it for uacccess. > >

Re: [Qemu-devel] [PATCH v1 2/3] target/s390x: implement mvcos instruction

2017-06-14 Thread Thomas Huth
On 14.06.2017 09:56, David Hildenbrand wrote: [...] >> I think you should also mask the length with 0x if the PSW was >> not in 64-bit mode? Or is this done automagically by the generated TCG >> code already? > > I was asking myself the same question, but it shouldn't really matter as > wa

[Qemu-devel] [PATCH v2 5/5] target/arm: Exit after clearing interrupt mask

2017-06-14 Thread Richard Henderson
Exit to cpu loop so we reevaluate cpu_arm_hw_interrupts. Cc: qemu-...@nongnu.org Cc: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c in

[Qemu-devel] [PATCH v2 4/5] target/s390x: Exit after changing PSW mask

2017-06-14 Thread Richard Henderson
Exit to cpu loop so we reevaluate cpu_s390x_hw_interrupts. Signed-off-by: Richard Henderson --- target/alpha/translate.c | 2 +- target/s390x/translate.c | 14 ++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c inde

[Qemu-devel] [PATCH v2 3/5] target/mips: Exit after enabling interrupts

2017-06-14 Thread Richard Henderson
From: Paolo Bonzini Exit to cpu loop so we reevaluate cpu_mips_hw_interrupts. Cc: Aurelien Jarno Cc: Yongbok Kim Signed-off-by: Richard Henderson --- target/mips/translate.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/mips/translate.c b/target/mips/transl

[Qemu-devel] [PATCH v2 0/5] Fixes for TCG hangs

2017-06-14 Thread Richard Henderson
Some good detective work by all involved. This is attemping to get all of the feedback from this morning. r~ Paolo Bonzini (1): target/mips: Exit after enabling interrupts Richard Henderson (4): tcg: Refactor helper_lookup_tb_ptr target/alpha: Use tcg_gen_lookup_and_goto_ptr target/s3

[Qemu-devel] [PATCH v2 1/5] tcg: Refactor helper_lookup_tb_ptr

2017-06-14 Thread Richard Henderson
We can call tb_htable_lookup even when the tb_jmp_cache is completely empty. Therefore, un-nest most of the code dependent on tb != NULL from the read from the cache. Signed-off-by: Richard Henderson --- tcg-runtime.c | 34 ++ 1 file changed, 18 insertions(+), 16

[Qemu-devel] [PATCH v2 2/5] target/alpha: Use tcg_gen_lookup_and_goto_ptr

2017-06-14 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 7c45ae3..a48e451 100644 --- a/target/alpha/translate.c +++ b/target/alpha/transl

Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs

2017-06-14 Thread Richard Henderson
On 06/14/2017 12:07 PM, Alex Bennée wrote: Richard Henderson writes: On 06/14/2017 10:08 AM, Paolo Bonzini wrote: And MIPS: diff --git a/target/mips/translate.c b/target/mips/translate.c index 559f8fed89..244f3cb9ab 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -1340

[Qemu-devel] [PATCH 3/4] include/hw/i386/pc.h: Move CONFIG_KVM related definitions to kvm_i386.h

2017-06-14 Thread Thomas Huth
pc.h is included from common code (where is CONFIG_KVM is not available), so the #defines that depend on CONFIG_KVM should not be declared here to avoid that anybody is using them in a wrong way. Signed-off-by: Thomas Huth --- hw/i386/pc_q35.c | 1 + include/hw/i386/pc.h | 13 --

[Qemu-devel] [PATCH 1/4] include/exec/poison: Add missing TARGET defines

2017-06-14 Thread Thomas Huth
Since we've got some new CPU targets in QEMU during the last months and years, we've got some new TARGET_xxx defines now which should be marked as poisoned for common code. Signed-off-by: Thomas Huth --- include/exec/poison.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/inclu

[Qemu-devel] [PATCH 4/4] include/exec/poison: Mark CONFIG_KVM as poisoned, too

2017-06-14 Thread Thomas Huth
We unfortunately need some additional "#ifndef NEED_CPU_H" fuzz in include/sysemu/kvm.h for this, so that the header can still be included from common code (which is done all over the place), but now we can finally be sure that nobody uses this define in a wrong place anymore. Signed-off-by: Thoma

[Qemu-devel] [PATCH 2/4] include/exec/poison: Mark some CONFIG defines as poisoned, too

2017-06-14 Thread Thomas Huth
These are defined in config-target.h and thus should never be used in common code. Signed-off-by: Thomas Huth --- include/exec/poison.h | 20 1 file changed, 20 insertions(+) diff --git a/include/exec/poison.h b/include/exec/poison.h index 9356d5f..5ffed4d 100644 --- a/incl

[Qemu-devel] [PATCH 0/4] Poison some more target-specific defines

2017-06-14 Thread Thomas Huth
This series marks some more #defines as poisoned, which are target-specific (declared in config-target.h) and thus must not be used in common code. Note that these are just the easy cases - we should later also add CONFIG_SOFTMMU and CONFIG_USER_ONLY, but they require some other additional clean-u

Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs

2017-06-14 Thread Richard Henderson
On 06/14/2017 12:11 PM, Peter Maydell wrote: On 14 June 2017 at 18:49, Alex Bennée wrote: diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c index 2a85666579..7e67bb3db2 100644 --- a/target/arm/op_helper.c +++ b/target/arm/op_helper.c @@ -835,6 +835,9 @@ void HELPER(msr_i_pstate)(CPUA

Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs

2017-06-14 Thread Peter Maydell
On 14 June 2017 at 18:49, Alex Bennée wrote: > diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c > index 2a85666579..7e67bb3db2 100644 > --- a/target/arm/op_helper.c > +++ b/target/arm/op_helper.c > @@ -835,6 +835,9 @@ void HELPER(msr_i_pstate)(CPUARMState *env, uint32_t op, > uint32_t

Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs

2017-06-14 Thread Alex Bennée
Richard Henderson writes: > On 06/14/2017 10:08 AM, Paolo Bonzini wrote: >> And MIPS: >> >> diff --git a/target/mips/translate.c b/target/mips/translate.c >> index 559f8fed89..244f3cb9ab 100644 >> --- a/target/mips/translate.c >> +++ b/target/mips/translate.c >> @@ -13403,8 +13403,9 @@ static vo

Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index

2017-06-14 Thread Eduardo Habkost
On Wed, Jun 14, 2017 at 09:40:37PM +0300, Roman Kagan wrote: > On Wed, Jun 14, 2017 at 10:45:23AM -0300, Eduardo Habkost wrote: > > On Wed, Jun 14, 2017 at 03:38:59PM +0200, Igor Mammedov wrote: > > > On Wed, 14 Jun 2017 10:22:16 -0300 > > > Eduardo Habkost wrote: > > > > > > > On Wed, Jun 14, 20

Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index

2017-06-14 Thread Roman Kagan
On Wed, Jun 14, 2017 at 10:45:23AM -0300, Eduardo Habkost wrote: > On Wed, Jun 14, 2017 at 03:38:59PM +0200, Igor Mammedov wrote: > > On Wed, 14 Jun 2017 10:22:16 -0300 > > Eduardo Habkost wrote: > > > > > On Wed, Jun 14, 2017 at 03:17:54PM +0200, Paolo Bonzini wrote: > > > > > > > > > > > > On

Re: [Qemu-devel] [PATCH 2/3] exec: simplify address_space_get_iotlb_entry

2017-06-14 Thread Michael S. Tsirkin
On Mon, Jun 12, 2017 at 12:04:58PM +0800, Peter Xu wrote: > On Mon, Jun 12, 2017 at 06:07:04AM +0300, Michael S. Tsirkin wrote: > > On Mon, Jun 12, 2017 at 10:34:43AM +0800, Peter Xu wrote: > > > On Sun, Jun 11, 2017 at 08:10:15PM +0800, David Gibson wrote: > > > > On Sun, Jun 11, 2017 at 01:09:26P

Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs

2017-06-14 Thread Richard Henderson
On 06/14/2017 10:08 AM, Paolo Bonzini wrote: And MIPS: diff --git a/target/mips/translate.c b/target/mips/translate.c index 559f8fed89..244f3cb9ab 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -13403,8 +13403,9 @@ static void gen_pool32axf (CPUMIPSState *env, DisasContex

Re: [Qemu-devel] [PATCH] q35/mch: implement extended TSEG sizes

2017-06-14 Thread Michael S. Tsirkin
On Fri, Jun 09, 2017 at 10:01:18PM +0200, Gerd Hoffmann wrote: > On Fri, 2017-06-09 at 13:40 +0200, Paolo Bonzini wrote: > > > > On 08/06/2017 21:55, Michael S. Tsirkin wrote: > > > We don't have room anywhere in PCI config space. Laszlo makes > > > argument > > > why it's safe for this device bas

[Qemu-devel] tlb_flush() in qom/cpu.c

2017-06-14 Thread Thomas Huth
Hi Alex, I'm currently trying to poison some more target-specific defines and noticed something fishy: In commit 1f5c00cfdb8114c ("move tlb_flush to cpu_common_reset") you moved the call to tlb_flush() to qom/cpu.c and guarded it with a #ifdef CONFIG_SOFTMMU. However, qom/cpu.c is common code (

Re: [Qemu-devel] DragonFly BSD support

2017-06-14 Thread Kamil Rytarowski
On 14.06.2017 12:55, Antonio Huete Jiménez wrote: > > Hi all, > > According to 2.9 changelog page, DragonFly BSD will be listed as > unsupported with the possibility of dropping support completely in the > future: > > http://wiki.qemu.org/ChangeLog/2.9 > > I'd like to volunteer so that qemu can

Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs

2017-06-14 Thread Richard Henderson
On 06/14/2017 10:49 AM, Alex Bennée wrote: I think this is a band-aid, and would rather fix the front-ends as in Emilio's patch. It seems a shame to cause all msr accesses to trigger and exit when we only care about the unmasking case. How about: Author: Alex Bennée Date: Wed Jun 14 18:46:

Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs

2017-06-14 Thread Alex Bennée
Paolo Bonzini writes: > On 14/06/2017 17:45, Richard Henderson wrote: >> While the next TB would detect the exit flag has been set there is no >> point if we can exit sooner. We also check cpu->interrupt_request as >> some front-ends can set it rather than using the cpu_interrupt() API >> call a

[Qemu-devel] [PULL v1 6/7] exec: allow to get a pointer for some mmio memory region

2017-06-14 Thread Edgar E. Iglesias
From: KONRAD Frederic This introduces a special callback which allows to run code from some MMIO devices. SysBusDevice with a MemoryRegion which implements the request_ptr callback will be notified when the guest try to execute code from their offset. Then it will be able to eg: pre-load some co

[Qemu-devel] [PULL v1 5/7] introduce mmio_interface

2017-06-14 Thread Edgar E. Iglesias
From: KONRAD Frederic This introduces mmio_interface object which contains a MemoryRegion and can be hotplugged/hotunplugged. Reviewed-by: Edgar E. Iglesias Signed-off-by: KONRAD Frederic V1 -> V2: * Fix the qemu_log format. --- hw/misc/Makefile.objs| 1 + hw/misc/mmio_interf

[Qemu-devel] [PULL v1 7/7] xilinx_spips: allow mmio execution

2017-06-14 Thread Edgar E. Iglesias
From: KONRAD Frederic This allows to execute from the lqspi area. When the request_ptr is called the device loads 1024bytes from the SPI device. Then this code can be executed by the guest. Tested-by: Edgar E. Iglesias Reviewed-by: Edgar E. Iglesias Signed-off-by: KONRAD Frederic --- hw/ssi

[Qemu-devel] [PULL v1 4/7] qdev: add MemoryRegion property

2017-06-14 Thread Edgar E. Iglesias
From: KONRAD Frederic We need to pass a pointer to a MemoryRegion for mmio_interface. So this just adds that. Reviewed-by: Edgar E. Iglesias Signed-off-by: KONRAD Frederic --- include/hw/qdev-properties.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/qdev-properties.h b/inc

[Qemu-devel] [PULL v1 3/7] cputlb: fix the way get_page_addr_code fills the tlb

2017-06-14 Thread Edgar E. Iglesias
From: KONRAD Frederic get_page_addr_code(..) does a cpu_ldub_code to fill the tlb: This can lead to some side effects if a device is mapped at this address. So this patch replaces the cpu_memory_ld by a tlb_fill. Reviewed-by: Richard Henderson Reviewed-by: Edgar E. Iglesias Signed-off-by: KON

[Qemu-devel] [PULL v1 2/7] cputlb: move get_page_addr_code

2017-06-14 Thread Edgar E. Iglesias
From: KONRAD Frederic This just moves the code before VICTIM_TLB_HIT macro definition so we can use it. Reviewed-by: Richard Henderson Reviewed-by: Edgar E. Iglesias Signed-off-by: KONRAD Frederic V2 -> V3: * Rebase against cpu_unaligned access recent change. --- cputlb.c | 70 +++

[Qemu-devel] [PULL v1 0/7] MMIO Exec pull request

2017-06-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Hi, Paolo suggested offline that we send a pull request for this series. Here it is, I've run it through my testsuite + tested the LQSPI testcase on Zynq. Cheers, Edgar The following changes since commit 3f0602927b120a480b35dcf58cf6f95435b3ae91: Merge remote-tracki

[Qemu-devel] [PULL v1 1/7] cputlb: cleanup get_page_addr_code to use VICTIM_TLB_HIT

2017-06-14 Thread Edgar E. Iglesias
From: KONRAD Frederic This replaces env1 and page_index variables by env and index so we can use VICTIM_TLB_HIT macro later. Reviewed-by: Richard Henderson Reviewed-by: Edgar E. Iglesias Signed-off-by: KONRAD Frederic --- cputlb.c | 18 +- 1 file changed, 9 insertions(+), 9 d

Re: [Qemu-devel] [PATCH] vhost-user: support cross-endianess negatiation

2017-06-14 Thread Felipe Franciosi
Hello! On 14 Jun 2017, at 18:17, Marc-André Lureau mailto:marcandre.lur...@gmail.com>> wrote: H On Wed, Jun 14, 2017 at 8:42 PM Felipe Franciosi mailto:fel...@nutanix.com>> wrote: ... @@ -580,6 +581,19 @@ Master message types This request should be send only when VIRTIO_F_IOMMU_PLATFOR

Re: [Qemu-devel] [PATCH] vhost-user: support cross-endianess negatiation

2017-06-14 Thread Juan Quintela
Paolo Bonzini wrote: > On 14/06/2017 19:02, Felipe Franciosi wrote: >> >>> On 14 Jun 2017, at 17:59, no-re...@patchew.org wrote: >>> >>> Hi, >>> >>> This series failed automatic build test. Please find the testing commands >>> and >>> their output below. If you have docker installed, you can pro

Re: [Qemu-devel] [PATCH 1/3] travis: install more library dependencies

2017-06-14 Thread Paolo Bonzini
On 14/06/2017 19:04, Peter Maydell wrote: > On 14 June 2017 at 17:49, Paolo Bonzini wrote: >> Well, trusty is 3 years old by now... I wouldn't call that bleeding >> edge, and it seems like Travis is suggesting using Docker images for >> those who want to use a newer distro. This patch and patch

Re: [Qemu-devel] [PATCH] vhost-user: support cross-endianess negatiation

2017-06-14 Thread Marc-André Lureau
H On Wed, Jun 14, 2017 at 8:42 PM Felipe Franciosi wrote: > Currently, vhost-user does not implement any means for notifying the > backend about guest endianess. This commit introduces a new message > called VHOST_USER_SET_VRING_ENDIAN which is analogous to the ioctl() > called VHOST_SET_VRING_E

Re: [Qemu-devel] [PATCH] vhost-user: support cross-endianess negatiation

2017-06-14 Thread Paolo Bonzini
On 14/06/2017 19:02, Felipe Franciosi wrote: > >> On 14 Jun 2017, at 17:59, no-re...@patchew.org wrote: >> >> Hi, >> >> This series failed automatic build test. Please find the testing commands and >> their output below. If you have docker installed, you can probably reproduce >> it >> locally.

Re: [Qemu-devel] [PATCH v1 2/3] tcg-runtime: light re-factor of lookup_tb_ptr

2017-06-14 Thread Pranith Kumar
Hi Alex, On Wed, Jun 14, 2017 at 10:02 AM, Alex Bennée wrote: > Just a little precursor re-factoring before I was going to add a trace > point: > > - single return point, defaulting to tcg_ctx.code_gen_epilogue > - move cs_base, pc and flags inside the jump cache hit scope > - calculate the

Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs

2017-06-14 Thread Paolo Bonzini
On 14/06/2017 18:51, Richard Henderson wrote: > On 06/14/2017 09:08 AM, Paolo Bonzini wrote: >> I think this is a band-aid, and would rather fix the front-ends as in >> Emilio's patch. For Alpha my guess would be: >> >> diff --git a/target/alpha/translate.c b/target/alpha/translate.c >> index 7c45

Re: [Qemu-devel] [PATCH v7 6/9] qcow2: add bdrv_measure() support

2017-06-14 Thread Stefan Hajnoczi
On Tue, Jun 13, 2017 at 05:07:13PM +0200, Alberto Garcia wrote: > On Tue 13 Jun 2017 03:33:26 PM CEST, Stefan Hajnoczi > wrote: > > Use qcow2_calc_prealloc_size() to get the required file size. > > > > Signed-off-by: Stefan Hajnoczi > > Reviewed-by: Alberto Garcia > > You kept my R-b here but

Re: [Qemu-devel] [PATCH v1 2/3] target/s390x: implement mvcos instruction

2017-06-14 Thread David Hildenbrand
>> Would it makes sense to >> >> a) move cpu_restore_state() into program_interrupt() >> b) make all callers forward ra from GETPC() (problem with kvm code that >> share handlers?) >> c) fixup callers that already do the cpu_restore_state() >> d) drop potential_page_fault() completely > > Yes, th

Re: [Qemu-devel] [PATCH 1/3] travis: install more library dependencies

2017-06-14 Thread Peter Maydell
On 14 June 2017 at 17:49, Paolo Bonzini wrote: > Well, trusty is 3 years old by now... I wouldn't call that bleeding > edge, and it seems like Travis is suggesting using Docker images for > those who want to use a newer distro. This patch and patch 2 are > useful, but I think I'd rather get full

Re: [Qemu-devel] [PATCH] vhost-user: support cross-endianess negatiation

2017-06-14 Thread Felipe Franciosi
> On 14 Jun 2017, at 17:59, no-re...@patchew.org wrote: > > Hi, > > This series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. > > Message-id: 1497458486-15673-1-git-send-email-fel

Re: [Qemu-devel] [PATCH v3] block: change variable names in BlockDriverState

2017-06-14 Thread Max Reitz
On 2017-06-09 12:18, Manos Pitsidianakis wrote: > Change the 'int count' parameter in *pwrite_zeros, *pdiscard related > functions (and some others) to 'int bytes', as they both refer to bytes. > This helps with code legibility. > > Signed-off-by: Manos Pitsidianakis > --- > block/blkdebug.c

[Qemu-devel] [PATCH v3 1/2] tests: Add test-listen - a stress test for QEMU socket listen

2017-06-14 Thread Knut Omang
There's a potential race condition between multiple bind()'s attempting to bind to the same port, which occasionally allows more than one bind to succeed against the same port. When a subsequent listen() call is made with the same socket only one will succeed. The current QEMU code does however n

  1   2   3   4   >