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

2017-06-15 Thread Gerd Hoffmann
Hi, > To be specific, what I meant is a bit that tells guest that a > config space register is available, and lets host find out > that guest is going to use it. > > This to ensure full forward and backward compatibility. > > I agree a fw cfg file for a single bit seems like an overkill, that'

Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] block: Fix gcc 7 warnings

2017-06-15 Thread Stefan Hajnoczi
On Tue, Jun 13, 2017 at 07:20:04PM +0200, Max Reitz wrote: > blkdebug and blkverify use snprintf() to generate a filename; however, > that may not fit into the target buffer (BDS.exact_filename). If so, > they generate a truncated and thus pretty much unusable filename. In > this case it's better t

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

2017-06-15 Thread Aurelien Jarno
On 2017-06-14 22:53, Richard Henderson wrote: > 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

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

2017-06-15 Thread David Gibson
On Thu, Jun 15, 2017 at 11:14:24AM +0530, Bharata B Rao wrote: > 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

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

2017-06-15 Thread Juan Quintela
Jeff Cody wrote: > 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: serie

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

2017-06-15 Thread Greg Kurz
On Thu, 15 Jun 2017 08:22:44 +0530 Bharata B Rao wrote: > 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 fi

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

2017-06-15 Thread Juan Quintela
Mao Zhongyi wrote: > 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

Re: [Qemu-devel] [PATCH v1 2/2] migration: add bitmap for copied page

2017-06-15 Thread Alexey
On Wed, Jun 14, 2017 at 05:29:39PM +0200, Juan Quintela wrote: > Alexey Perevalov wrote: > > On 06/13/2017 02:42 PM, Juan Quintela wrote: > >> Alexey Perevalov wrote: > >> > >> Hi > >> > >> I think that it would make things clearer if we do a s/copied/received/ > >> As what we are tracking here a

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

2017-06-15 Thread Mao Zhongyi
On 06/15/2017 03:34 PM, Juan Quintela wrote: Mao Zhongyi wrote: 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

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

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

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

2017-06-15 Thread Paolo Bonzini
On 15/06/2017 02:36, Emilio G. Cota wrote: > 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 the

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

2017-06-15 Thread Paolo Bonzini
On 14/06/2017 21:21, Thomas Huth wrote: > 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_q3

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS

2017-06-15 Thread Wei Wang
On 06/14/2017 01:56 AM, Michael S. Tsirkin wrote: On Fri, Jun 09, 2017 at 06:41:38PM +0800, Wei Wang wrote: Add a new feature, VIRTIO_BALLOON_F_PAGE_CHUNKS, which enables the transfer of the ballooned (i.e. inflated/deflated) pages in chunks to the host. so now these chunks are just s/g list en

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

2017-06-15 Thread Zhang Chen
On 06/15/2017 12:31 PM, Jason Wang wrote: 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) { +

[Qemu-devel] [PULL 4/4] target-m68k: define ext_opsize

2017-06-15 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20170611231633.32582-4-laur...@vivier.eu> --- target/m68k/translate.c | 43 --- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/

[Qemu-devel] [PULL 1/4] target/m68k: fix V flag for CC_OP_SUBx

2017-06-15 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

[Qemu-devel] [PULL 3/4] target-m68k: move FPU helpers to fpu_helper.c

2017-06-15 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20170611231633.32582-3-laur...@vivier.eu> --- target/m68k/Makefile.objs | 2 +- target/m68k/fpu_helper.c | 112 ++ target/m68k/helper.c | 88

[Qemu-devel] [PULL 0/4] M68k for 2.10 patches

2017-06-15 Thread Laurent Vivier
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/vivier/qemu-m68k.git tags/m68k-for-2.1

[Qemu-devel] [PULL 2/4] softfloat: define 680x0 specific values

2017-06-15 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20170611231633.32582-2-laur...@vivier.eu> --- fpu/softfloat-specialize.h | 34 +++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-sp

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

2017-06-15 Thread Paolo Bonzini
On 14/06/2017 20:59, Eduardo Habkost wrote: > On Wed, Jun 14, 2017 at 09:40:37PM +0300, Roman Kagan wrote: >> One more data point is that until now there was no use for vp_index in >> QEMU, so it didn't care how KVM managed it. In KVM the only >> vp_index-aware path that the guests could trigger

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

2017-06-15 Thread Alex Bennée
Richard Henderson writes: > Exit to cpu loop so we reevaluate cpu_arm_hw_interrupts. > > Cc: qemu-...@nongnu.org > Cc: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée Tested-by: Alex Bennée > --- > target/arm/translate-a64.c | 7 ++- > 1 file changed, 6 inser

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

2017-06-15 Thread Thomas Huth
On 14.06.2017 22:59, Paolo Bonzini wrote: > > - 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 s

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

2017-06-15 Thread Alex Bennée
Richard Henderson writes: > 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 Reviewed-by: Alex Bennée > --- > tcg-runtime.c | 34 ++

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

2017-06-15 Thread Alex Bennée
Richard Henderson writes: > 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

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

2017-06-15 Thread Daniel P. Berrange
On Thu, Jun 15, 2017 at 11:08:01AM +0800, Mao Zhongyi wrote: > 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,

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

2017-06-15 Thread Alex Bennée
Richard Henderson writes: > 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 --

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

2017-06-15 Thread Alex Bennée
Richard Henderson writes: > 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(-) Aside from the stray alpha

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

2017-06-15 Thread Thomas Huth
On 15.06.2017 07:53, Richard Henderson wrote: > 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 >

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

2017-06-15 Thread Alex Bennée
Nikunj A Dadhania writes: > 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: h

[Qemu-devel] [PATCH build fix] migration: do not doubly-define LoadStateHandler

2017-06-15 Thread Paolo Bonzini
As the simplest fix to un-confuse patchew, inline the type in struct VMStateDescription. As there are no users of LoadStateHandler anymore in e.g. function declarations, there isn't much advantage in defining it as a type. Signed-off-by: Paolo Bonzini --- include/migration/vmstate.h | 3 +-- 1

Re: [Qemu-devel] [PATCH build fix] migration: do not doubly-define LoadStateHandler

2017-06-15 Thread Peter Maydell
On 15 June 2017 at 10:49, Paolo Bonzini wrote: > As the simplest fix to un-confuse patchew, inline the type > in struct VMStateDescription. As there are no users of > LoadStateHandler anymore in e.g. function declarations, > there isn't much advantage in defining it as a type. > > Signed-off-by:

Re: [Qemu-devel] [PATCH] RFC: vmcoreinfo device

2017-06-15 Thread Igor Mammedov
On Wed, 14 Jun 2017 10:46:08 + Marc-André Lureau wrote: > Hi > > On Mon, May 29, 2017 at 4:44 PM Igor Mammedov wrote: > > > On Fri, 26 May 2017 13:59:09 + > > Marc-André Lureau wrote: > > > > > Hi > > > > > > On Thu, May 4, 2017 at 5:41 PM Igor Mammedov > > wrote: > > > > > >

Re: [Qemu-devel] DragonFly BSD support

2017-06-15 Thread Peter Maydell
On 14 June 2017 at 11:55, Antonio Huete Jiménez wrote: > 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 keep DragonFl

Re: [Qemu-devel] [Qemu-block] [PATCH v2] block: Do not strcmp() with NULL uri->scheme

2017-06-15 Thread Stefan Hajnoczi
On Tue, Jun 13, 2017 at 10:57:26PM +0200, Max Reitz wrote: > uri_parse(...)->scheme may be NULL. In fact, probably every field may be > NULL, and the callers do test this for all of the other fields but not > for scheme (except for block/gluster.c; block/vxhs.c does not access > that field at all).

Re: [Qemu-devel] [Qemu-block] [PATCH] throttle: Update throttle-groups.c documentation

2017-06-15 Thread Stefan Hajnoczi
On Wed, Jun 14, 2017 at 12:16:12AM +0300, Alberto Garcia wrote: > There used to be throttle_timers_{detach,attach}_aio_context() calls > in bdrv_set_aio_context(), but since 7ca7f0f6db1fedd28d490795d778cf239 > they are now in blk_set_aio_context(). > > Signed-off-by: Alberto Garcia > --- > block

[Qemu-devel] [PULL 03/41] exec: split qemu_ram_alloc_from_file()

2017-06-15 Thread Paolo Bonzini
From: Marc-André Lureau Add qemu_ram_alloc_from_fd(), which can be use to allocate ramblock from fd only. Signed-off-by: Marc-André Lureau Message-Id: <20170602141229.15326-4-marcandre.lur...@redhat.com> Signed-off-by: Paolo Bonzini --- exec.c | 45 +++

[Qemu-devel] [PULL 01/41] exec: check kvm mmu notifiers earlier

2017-06-15 Thread Paolo Bonzini
From: Marc-André Lureau Move kvm mmu notifiers check before calling file_ram_alloc(), with the other xen precondition. (file_ram_alloc() will be reused in other cases than -mem-path). Signed-off-by: Marc-André Lureau Message-Id: <20170602141229.15326-2-marcandre.lur...@redhat.com> Signed-off-by

[Qemu-devel] [PULL 00/41] Misc patches for 2017-06-15

2017-06-15 Thread Paolo Bonzini
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/bonzini/qemu.git tags/for-upstream f

[Qemu-devel] [PULL 02/41] exec: split file_ram_alloc()

2017-06-15 Thread Paolo Bonzini
From: Marc-André Lureau Move file opening part in a seperate function, file_ram_open(). This allows for reuse of file_ram_alloc() with a given fd. Signed-off-by: Marc-André Lureau Message-Id: <20170602141229.15326-3-marcandre.lur...@redhat.com> Signed-off-by: Paolo Bonzini --- exec.c | 83 +++

[Qemu-devel] [PULL 08/41] megasas: do not read sense length more than once from frame

2017-06-15 Thread Paolo Bonzini
Avoid TOC-TOU bugs depending on how the compiler behaves. Signed-off-by: Paolo Bonzini --- hw/scsi/megasas.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 804122a..1888118 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas

[Qemu-devel] [PULL 04/41] Add memory_region_init_ram_from_fd()

2017-06-15 Thread Paolo Bonzini
From: Marc-André Lureau Add a new function to initialize a RAM memory region with a file descriptor to be mmap-ed. Signed-off-by: Marc-André Lureau Message-Id: <20170602141229.15326-5-marcandre.lur...@redhat.com> Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 20

[Qemu-devel] [PULL 12/41] megasas: do not read SCSI req parameters more than once from frame

2017-06-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi/megasas.c | 60 --- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 38e0a2f..135662d 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -

[Qemu-devel] [PULL 16/41] kvm-all: make async_safe_run_on_cpu safe on kvm too

2017-06-15 Thread Paolo Bonzini
From: Roman Kagan Wrap the bulk of kvm_cpu_exec with cpu_exec_start/end, so that kvm version can also enjoy performing certain operations while all vCPUs are quiescent. Signed-off-by: Roman Kagan Message-Id: <20170606181948.16238-15-rka...@virtuozzo.com> Signed-off-by: Paolo Bonzini --- kvm-a

[Qemu-devel] [PULL 15/41] vl: Fix broken thread=xxx option of the --accel parameter

2017-06-15 Thread Paolo Bonzini
From: Thomas Huth Commit bde4d9205 ("Fix the -accel parameter and the documentation for 'hax'") introduced a regression by adding a new local accel_opts variable which shadows the variable with the same name that is declared at the beginning of the main() scope. This causes the qemu_tcg_configure

[Qemu-devel] [PULL 06/41] memory: remove memory_region_set_fd

2017-06-15 Thread Paolo Bonzini
From: Marc-André Lureau Now unnecessary since ivshmem uses memory_region_init_ram_from_fd. Signed-off-by: Marc-André Lureau Message-Id: <20170602141229.15326-7-marcandre.lur...@redhat.com> Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 11 --- memory.c | 10

[Qemu-devel] [PULL 14/41] Makefile: Do not generate files if "configure" has not been run yet

2017-06-15 Thread Paolo Bonzini
From: Thomas Huth When doing a "make -j10" in the vanilla QEMU source tree (without running "configure" first), the Makefile currently generates two files already, qemu-version.h and qemu-options.def. This should not happen, so let's only build the generated files if config-host.mak is available

[Qemu-devel] [PULL 10/41] megasas: do not read DCMD opcode more than once from frame

2017-06-15 Thread Paolo Bonzini
Avoid TOC-TOU bugs by storing the DCMD opcode in the MegasasCmd Signed-off-by: Paolo Bonzini --- hw/scsi/megasas.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index c353118..a3f75c1 100644 --- a/hw/scsi/meg

[Qemu-devel] [PULL 17/41] hax-all: make async_safe_run_on_cpu safe on HAX too

2017-06-15 Thread Paolo Bonzini
While at it, drop the current_cpu assignment since this is a per-thread variable on modern QEMU. Cc: Vincent Palatin Signed-off-by: Paolo Bonzini --- target/i386/hax-all.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c index 0

[Qemu-devel] [PULL 13/41] megasas: always store SCSIRequest* into MegasasCmd

2017-06-15 Thread Paolo Bonzini
This ensures that the request is unref'ed properly, and avoids a segmentation fault in the new qtest testcase that is added. This is CVE-2017-9503. Reported-by: Zhangyanyu Signed-off-by: Paolo Bonzini --- hw/scsi/megasas.c| 31 --- tests/megasas-test.c | 35 +

[Qemu-devel] [PULL 19/41] qemu-nbd: Ignore SIGPIPE

2017-06-15 Thread Paolo Bonzini
From: Max Reitz qemu proper has done so for 13 years (8a7ddc38a60648257dc0645ab4a05b33d6040063), qemu-img and qemu-io have done so for four years (526eda14a68d5b3596be715505289b541288ef2a). Ignoring this signal is especially important in qemu-nbd because otherwise a client can easily take down th

[Qemu-devel] [PULL 24/41] nbd: rename read_sync and friends

2017-06-15 Thread Paolo Bonzini
From: Vladimir Sementsov-Ogievskiy Rename nbd_wr_syncv -> nbd_rwv read_sync -> nbd_read read_sync_eof -> nbd_read_eof write_sync -> nbd_write drop_sync -> nbd_drop 1. nbd_ prefix read_sync and write_sync are already shared, so it is good to have a namespace prefix. drop_sync will

[Qemu-devel] [PULL 26/41] nbd/server: get rid of nbd_negotiate_read and friends

2017-06-15 Thread Paolo Bonzini
From: Vladimir Sementsov-Ogievskiy Functions nbd_negotiate_{read,write,drop_sync} were introduced in 1a6245a5b, when nbd_rwv (was nbd_wr_sync) was working through qemu_co_sendv_recvv (the path is nbd_wr_sync -> qemu_co_{recv/send} -> qemu_co_send_recv -> qemu_co_sendv_recvv), which just yields, w

[Qemu-devel] [PULL 11/41] megasas: do not read command more than once from frame

2017-06-15 Thread Paolo Bonzini
Avoid TOC-TOU bugs by passing the frame_cmd down, and checking cmd->dcmd_opcode instead of cmd->frame->header.frame_cmd. Signed-off-by: Paolo Bonzini --- hw/scsi/megasas.c | 60 +++ 1 file changed, 25 insertions(+), 35 deletions(-) diff --git

[Qemu-devel] [PULL 20/41] accel: split the tcg accelerator from accel.c file

2017-06-15 Thread Paolo Bonzini
From: Yang Zhong there are some types of accelerators in qemu, and all accelerators have their own file except tcg. tcg accelerator is also defined in accel.c file. tcg accelerator file will be splited from accel.c and re-name to tcg-all.c. accel/ directory will be created to include kvm and tcg

[Qemu-devel] [PULL 05/41] ivshmem: use ram_from_fd()

2017-06-15 Thread Paolo Bonzini
From: Marc-André Lureau Instead of having its own mmap handling code, reuse the code from exec.c. Note: memory_region_init_ram_from_fd() adds some restrictions (check for xen, kvm sync-mmu, etc) and changes (such as size alignment). This may actually be more correct. Signed-off-by: Marc-André L

[Qemu-devel] [PULL 28/41] nbd/server: refactor nbd_co_send_reply

2017-06-15 Thread Paolo Bonzini
From: Vladimir Sementsov-Ogievskiy As nbd_write never returns value > 0, we can get rid of extra ret. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20170602150150.258222-6-vsement...@virtuozzo.com> Signed-off-by: Paolo Bonzini --- nbd/server.c | 8

[Qemu-devel] [PULL 09/41] megasas: do not read iovec count more than once from frame

2017-06-15 Thread Paolo Bonzini
Avoid TOC-TOU bugs depending on how the compiler behaves. Signed-off-by: Paolo Bonzini --- hw/scsi/megasas.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 1888118..c353118 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/mega

[Qemu-devel] [PULL 22/41] tcg: move tcg backend files into accel/tcg/

2017-06-15 Thread Paolo Bonzini
From: Yang Zhong move tcg-runtime.c, translate-all.(ch) and translate-common.c into accel/tcg/ subdirectory and updated related trace-events file. Signed-off-by: Yang Zhong Message-Id: <1496383606-18060-4-git-send-email-yang.zh...@intel.com> Signed-off-by: Paolo Bonzini --- Makefile.target

[Qemu-devel] [PULL 18/41] nbd: Fix regression on resiliency to port scan

2017-06-15 Thread Paolo Bonzini
From: Eric Blake Back in qemu 2.5, qemu-nbd was immune to port probes (a transient server would not quit, regardless of how many probe connections came and went, until a connection actually negotiated). But we broke that in commit ee7d7aa when removing the return value to nbd_client_new(), altho

[Qemu-devel] [PULL 31/41] nbd/server: remove NBDClientNewData

2017-06-15 Thread Paolo Bonzini
From: Vladimir Sementsov-Ogievskiy "co" field of NBDClientNewData has never been used, all the way back to its declaration in commit 1a6245a5. So let's just use client pointer instead of extra structure. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <201706021

[Qemu-devel] [PULL 21/41] tcg: move tcg related files into accel/tcg/ subdirectory

2017-06-15 Thread Paolo Bonzini
From: Yang Zhong move cputlb.c, cpu-exec-common.c and cpu-exec.c related tcg exec file into accel/tcg/ subdirectory. Signed-off-by: Yang Zhong Message-Id: <1496383606-18060-3-git-send-email-yang.zh...@intel.com> Signed-off-by: Paolo Bonzini --- Makefile.objs

[Qemu-devel] [PULL 07/41] megasas: add qtest

2017-06-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 3 +++ tests/megasas-test.c | 51 ++ 2 files changed, 54 insertions(+) create mode 100644 tests/megasas-test.c diff --git a/tests/Makefile.include b/tests/Makefile.include index f42f3df.

[Qemu-devel] [PULL 25/41] nbd: make nbd_drop public

2017-06-15 Thread Paolo Bonzini
From: Vladimir Sementsov-Ogievskiy Following commit will reuse it for nbd server too. Reviewed-by: Eric Blake Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20170602150150.258222-3-vsement...@virtuozzo.com> Signed-off-by: Paolo Bonzini --- nbd/client.c | 26 --

[Qemu-devel] [PULL 29/41] nbd/server: get rid of EAGAIN dead code

2017-06-15 Thread Paolo Bonzini
From: Vladimir Sementsov-Ogievskiy For now nbd_read never returns EAGAIN. So, don't handle it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20170602150150.258222-7-vsement...@virtuozzo.com> Signed-off-by: Paolo Bonzini --- nbd/server.c | 18 +++

[Qemu-devel] [PULL 35/41] nbd/server: refactor nbd_trip

2017-06-15 Thread Paolo Bonzini
From: Vladimir Sementsov-Ogievskiy - do not use 'goto error_reply' outside a switch to jump into the middle of the switch's default case label - reduce code duplication Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20170602150150.258222-13-vsement...@virtuo

[Qemu-devel] [PULL 23/41] accel: move kvm related accelerator files into accel/

2017-06-15 Thread Paolo Bonzini
From: Yang Zhong move kvm related accelerator files into accel/ subdirectory, also create one stub subdirectory, which will include accelerator's stub files. Signed-off-by: Yang Zhong Message-Id: <1496383606-18060-5-git-send-email-yang.zh...@intel.com> Signed-off-by: Paolo Bonzini --- Makefil

[Qemu-devel] [PULL 34/41] nbd/server: rename rc to ret

2017-06-15 Thread Paolo Bonzini
From: Vladimir Sementsov-Ogievskiy For consistency use 'ret' name for saving return code everywhere in the file. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20170602150150.258222-12-vsement...@virtuozzo.com> Signed-off-by: Paolo Bonzini --- nbd/server.c |

[Qemu-devel] [PULL 32/41] nbd/server: nbd_negotiate: fix error path

2017-06-15 Thread Paolo Bonzini
From: Vladimir Sementsov-Ogievskiy Current code will return 0 on this nbd_write fail, as rc is 0 after successful nbd_negotiate_options. Fix this. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20170602150150.258222-10-vsement...@virtuozzo.com> Signed-off-by:

[Qemu-devel] [PULL 33/41] nbd/server: get rid of fail: return rc

2017-06-15 Thread Paolo Bonzini
From: Vladimir Sementsov-Ogievskiy "goto fail" error handling scheme is not needed for just returning error code. Better is return it immediately. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20170602150150.258222-11-vsement...@virtuozzo.com> Signed-off-by:

[Qemu-devel] [PULL 27/41] nbd/server: get rid of ssize_t

2017-06-15 Thread Paolo Bonzini
From: Vladimir Sementsov-Ogievskiy Now nbd_read and friends return int, so get rid of ssize_t. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20170602150150.258222-5-vsement...@virtuozzo.com> Signed-off-by: Paolo Bonzini --- nbd/server.c | 18 ---

[Qemu-devel] [PULL 38/41] docs: create interop/ subdirectory

2017-06-15 Thread Paolo Bonzini
This is for the future interoperability & management guide. It includes the QAPI docs, including the automatically generated ones, other socket protocols (vhost-user, VNC), and the qcow2 file format. Signed-off-by: Paolo Bonzini --- .gitignore | 16 ++---

[Qemu-devel] [PULL 36/41] include/exec/poison: Add missing TARGET defines

2017-06-15 Thread Paolo Bonzini
From: 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 Message-Id: <1497468113-2874-2-git-send-email-th...@redhat.com> Signed-off-by

[Qemu-devel] [PULL 30/41] nbd/server: refactor nbd_co_receive_request

2017-06-15 Thread Paolo Bonzini
From: Vladimir Sementsov-Ogievskiy Move function tail, about receiving next request out of the function. Error path is simplified and nbd_co_receive_request becomes more corresponding to its name. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20170602150150.2

[Qemu-devel] [PULL 41/41] vhost-user-scsi: Introduce a vhost-user-scsi sample application

2017-06-15 Thread Paolo Bonzini
From: Felipe Franciosi This commit introduces a vhost-user-scsi backend sample application. It must be linked with libiscsi and libvhost-user. To use it, compile with: $ make vhost-user-scsi And run as follows: $ ./vhost-user-scsi -u vus.sock -i iscsi://uri_to_target/ $ qemu-system-x86_64

[Qemu-devel] [PULL 37/41] include/exec/poison: Mark some CONFIG defines as poisoned, too

2017-06-15 Thread Paolo Bonzini
From: Thomas Huth These are defined in config-target.h and thus should never be used in common code. Signed-off-by: Thomas Huth Message-Id: <1497468113-2874-3-git-send-email-th...@redhat.com> Signed-off-by: Paolo Bonzini --- include/exec/poison.h | 20 1 file changed, 20

[Qemu-devel] [PULL 40/41] vhost-user-scsi: Introduce vhost-user-scsi host device

2017-06-15 Thread Paolo Bonzini
From: Felipe Franciosi This commit introduces a vhost-user device for SCSI. This is based on the existing vhost-scsi implementation, but done over vhost-user instead. It also uses a chardev to connect to the backend. Unlike vhost-scsi (today), VMs using vhost-user-scsi can be live migrated. To u

[Qemu-devel] [PULL 39/41] qemu-doc: include version number

2017-06-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- Makefile | 17 + qemu-doc.texi | 5 +++-- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index c27389a..b017e3a 100644 --- a/Makefile +++ b/Makefile @@ -669,33 +669,26 @@ ui/console-gl.o: $(SRC_PATH)/ui/co

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

2017-06-15 Thread David Hildenbrand
On 15.06.2017 09:01, Aurelien Jarno wrote: > On 2017-06-14 22:53, Richard Henderson wrote: >> 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 af18ff

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

2017-06-15 Thread David Hildenbrand
>> >> +#ifndef CONFIG_USER_ONLY >> +static void fast_memmove_idx(CPUS390XState *env, uint64_t dest, uint64_t >> src, >> + uint32_t len, int dest_idx, int src_idx, >> + uintptr_t ra) >> +{ >> +TCGMemOpIdx oi_dest = make_memop_idx(MO_UB,

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

2017-06-15 Thread Roman Kagan
On Thu, Jun 15, 2017 at 10:26:58AM +0200, Paolo Bonzini wrote: > On 14/06/2017 20:59, Eduardo Habkost wrote: > > On Wed, Jun 14, 2017 at 09:40:37PM +0300, Roman Kagan wrote: > >> One more data point is that until now there was no use for vp_index in > >> QEMU, so it didn't care how KVM managed it.

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

2017-06-15 Thread Paolo Bonzini
On 15/06/2017 13:40, Roman Kagan wrote: > On Thu, Jun 15, 2017 at 10:26:58AM +0200, Paolo Bonzini wrote: >> On 14/06/2017 20:59, Eduardo Habkost wrote: >>> On Wed, Jun 14, 2017 at 09:40:37PM +0300, Roman Kagan wrote: One more data point is that until now there was no use for vp_index in

Re: [Qemu-devel] [PULL 0/5] Migration PULL request

2017-06-15 Thread Peter Maydell
On 14 June 2017 at 12:51, Juan Quintela wrote: > Hi > > In this pull requset: > - I included the v1 of peter return path, fix it > - fix the compliation with older compilers (new compliers don't >complain about a repeated typedef, so I didn't noticed) > - Add test for disabled features > - Las

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

2017-06-15 Thread Roman Kagan
On Thu, Jun 15, 2017 at 01:42:56PM +0200, Paolo Bonzini wrote: > > > On 15/06/2017 13:40, Roman Kagan wrote: > > On Thu, Jun 15, 2017 at 10:26:58AM +0200, Paolo Bonzini wrote: > >> On 14/06/2017 20:59, Eduardo Habkost wrote: > >>> On Wed, Jun 14, 2017 at 09:40:37PM +0300, Roman Kagan wrote: > >>>

Re: [Qemu-devel] [PULL 0/7] ui patch queue

2017-06-15 Thread Peter Maydell
On 13 June 2017 at 11:41, Gerd Hoffmann wrote: > Which systems are failing? Any chance this is just gtk3-devel missing? > gtk 3.0 was released more than five years ago, pretty much every distro > should have packages meanwhile ... I've gone through and checked, and yes, it generally was just mis

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

2017-06-15 Thread Roman Kagan
On Wed, Jun 14, 2017 at 03:00:27PM +0200, Igor Mammedov wrote: > On Wed, 14 Jun 2017 13:26:44 +0200 > Paolo Bonzini wrote: > > > On 14/06/2017 13:25, Roman Kagan wrote: > > >> The problem with that is that it will break as soon as we create > > >> VCPUs in a different order. Unsolvable on hosts

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

2017-06-15 Thread Aurelien Jarno
On 2017-06-15 13:28, David Hildenbrand wrote: > On 15.06.2017 09:01, Aurelien Jarno wrote: > > On 2017-06-14 22:53, Richard Henderson wrote: > >> Signed-off-by: Richard Henderson > >> --- > >> target/s390x/translate.c | 8 > >> 1 file changed, 8 insertions(+) > >> > >> diff --git a/targe

Re: [Qemu-devel] [PATCH qemu v8 1/2] memory/iommu: QOM'fy IOMMU MemoryRegion

2017-06-15 Thread David Gibson
On Wed, Jun 14, 2017 at 04:36:06PM +1000, Alexey Kardashevskiy wrote: > This defines new QOM object - IOMMUMemoryRegion - with MemoryRegion > as a parent. > > This moves IOMMU-related fields from MR to IOMMU MR. However to avoid > dymanic QOM casting in fast path (address_space_translate, etc), >

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

2017-06-15 Thread David Hildenbrand
>> A "sane" guest (e.g. Linux) will only use an instruction if the >> corresponding stfl(e) bit is set. So in my opinion, this should be just >> fine. If the bit is not set currently, the guest will not use it == dead >> code. > > Not necessarily. Depending on the distribution, gcc and hence bina

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

2017-06-15 Thread Paolo Bonzini
On 15/06/2017 14:41, Roman Kagan wrote: > On Wed, Jun 14, 2017 at 03:00:27PM +0200, Igor Mammedov wrote: >> On Wed, 14 Jun 2017 13:26:44 +0200 >> Paolo Bonzini wrote: >> >>> On 14/06/2017 13:25, Roman Kagan wrote: > The problem with that is that it will break as soon as we create > VCPUs

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

2017-06-15 Thread Igor Mammedov
On Thu, 15 Jun 2017 15:41:08 +0300 Roman Kagan wrote: > On Wed, Jun 14, 2017 at 03:00:27PM +0200, Igor Mammedov wrote: > > On Wed, 14 Jun 2017 13:26:44 +0200 > > Paolo Bonzini wrote: > > > > > On 14/06/2017 13:25, Roman Kagan wrote: > > > >> The problem with that is that it will break as so

[Qemu-devel] spapr guests warn "System page size 0x2000 is not enabled in page_size_mask (0x11000). Performance may be slow" on SPARC hosts

2017-06-15 Thread Peter Maydell
I've just noticed that on a SPARC host, some of the PPC guests warn during make check: /ppc64/prom-env/pseries: qemu-system-ppc64: System page size 0x2000 is not enabled in page_size_mask (0x11000). Performance may be slow Is this really a performance problem on a TCG guest? It makes the 'make

Re: [Qemu-devel] [PATCH v3 3/4] migration: avoid recursive AioContext locking in save_vmstate()

2017-06-15 Thread Pavel Butsykin
On 14.06.2017 17:43, Kevin Wolf wrote: Am 14.06.2017 um 15:15 hat Pavel Butsykin geschrieben: On 14.06.2017 13:10, Pavel Butsykin wrote: On 22.05.2017 16:57, Stefan Hajnoczi wrote: AioContext was designed to allow nested acquire/release calls. It uses a recursive mutex so callers don't need

Re: [Qemu-devel] [PATCH v3 03/13] char: chardevice hotswap

2017-06-15 Thread Anton Nefedov
On 06/13/2017 03:32 PM, Marc-André Lureau wrote: Hi On Tue, Jun 13, 2017 at 3:53 PM Anton Nefedov mailto:anton.nefe...@virtuozzo.com>> wrote: > The existing chr_write_lock belongs to Chardev. > For the hotswap case, we need to ensure that be->chr won't change and

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

2017-06-15 Thread Paolo Bonzini
On 15/06/2017 10:57, Alex Bennée wrote: >> +/* BS_STOP isn't good enough here; >> + reevaluate cpu_mips_hw_interrupts_enabled. */ > nit: technically we want to ensure mips_cpu_exec_interrupt is run (which > calls cpu_mips_hw_interrupts_enabled) Right, that's why

Re: [Qemu-devel] [PATCH v3 00/10] Clock framework API.

2017-06-15 Thread Peter Maydell
On 14 June 2017 at 12:54, Paolo Bonzini wrote: > I think the various bindings and rates could be refreshed as devices are > migrated. This assumes that the device migration order is okay > according to the clock tree, that is if you have three devices X/Y/Z and > five clocks a/b/c/d/e/f: > > fi

Re: [Qemu-devel] [PATCH v3 00/10] Clock framework API.

2017-06-15 Thread Paolo Bonzini
On 15/06/2017 16:40, Peter Maydell wrote: > On 14 June 2017 at 12:54, Paolo Bonzini wrote: >> I think the various bindings and rates could be refreshed as devices are >> migrated. This assumes that the device migration order is okay >> according to the clock tree > > Unfortunately we make no g

Re: [Qemu-devel] [PATCH v3 00/10] Clock framework API.

2017-06-15 Thread Edgar E. Iglesias
On Thu, Jun 15, 2017 at 03:40:40PM +0100, Peter Maydell wrote: > On 14 June 2017 at 12:54, Paolo Bonzini wrote: > > I think the various bindings and rates could be refreshed as devices are > > migrated. This assumes that the device migration order is okay > > according to the clock tree, that is

Re: [Qemu-devel] [PATCH v3 00/10] Clock framework API.

2017-06-15 Thread Peter Maydell
On 15 June 2017 at 15:57, Edgar E. Iglesias wrote: > On Thu, Jun 15, 2017 at 03:40:40PM +0100, Peter Maydell wrote: >> Unfortunately we make no guarantees at all about migration order >> for devices as far as I'm aware, so devices have to cope regardless. > > > How does this work for interrupts/gp

[Qemu-devel] Guest unresponsive after Virtqueue size exceeded error

2017-06-15 Thread Fernando Casas Schössow
Hi there, I recently migrated a Hyper-V host to qemu/kvm runing on Alpine Linux 3.6.1 (kernel 4.9.30 -with grsec patches- and qemu 2.8.1). Almost on daily basis at least one of the guests is showing the following error in the log and the it needs to be terminated and restarted to recover it: q

[Qemu-devel] [PATCH] target/mips: fix msa copy_[s|u]_df rd = 0 corner case

2017-06-15 Thread Miodrag Dinic
From: Miodrag Dinic This patch fixes the msa copy_[s|u]_df instruction emulation when the destination register rd is zero. Without this patch the zero register would get clobbered, which should never happen because it is supposed to be hardwired to 0. Fix this corner case by explicitly checking

  1   2   >