Re: [Qemu-devel] [PATCH v1 27/30] elf: Add RISC-V PSABI ELF header defines

2018-05-25 Thread Michael Clark
On Wed, May 23, 2018 at 6:44 PM, Laurent Vivier wrote: > Le 23/05/2018 à 02:15, Michael Clark a écrit : > > Refer to the RISC-V PSABI specification for details: > > > > - https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md > > > > Cc: Michael Tokarev > > Cc: Laurent Vivier > >

[Qemu-devel] [PATCH v2] elf: Add RISC-V PSABI ELF header defines

2018-05-25 Thread Michael Clark
Refer to the RISC-V PSABI specification for details: - https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md Cc: Michael Tokarev Cc: Laurent Vivier Cc: Richard Henderson Cc: Alistair Francis Signed-off-by: Michael Clark --- include/elf.h | 8 1 file changed, 8 inser

Re: [Qemu-devel] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-25 Thread Markus Armbruster
Fam Zheng writes: > On Fri, 05/25 07:47, Markus Armbruster wrote: >> Fam Zheng writes: >> >> > On Thu, 05/24 19:16, Paolo Bonzini wrote: >> >> On 21/05/2018 08:35, Fam Zheng wrote: >> >> > Coverity doesn't like the tests under fail label (report CID 1385847). >> >> > Reset the fields so the cle

Re: [Qemu-devel] [PATCH v2] elf: Add RISC-V PSABI ELF header defines

2018-05-25 Thread Laurent Vivier
Le 25/05/2018 à 09:22, Michael Clark a écrit : > Refer to the RISC-V PSABI specification for details: > > - https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md > > Cc: Michael Tokarev > Cc: Laurent Vivier > Cc: Richard Henderson > Cc: Alistair Francis > Signed-off-by: Michae

Re: [Qemu-devel] [PATCH v2 21/40] job: Convert block_job_cancel_async() to Job

2018-05-25 Thread Kevin Wolf
Am 24.05.2018 um 19:42 hat John Snow geschrieben: > > > On 05/24/2018 04:24 AM, Kevin Wolf wrote: > > Am 24.05.2018 um 01:18 hat John Snow geschrieben: > >>> diff --git a/include/qemu/job.h b/include/qemu/job.h > >>> index 3e817beee9..2648c74281 100644 > >>> --- a/include/qemu/job.h > >>> +++ b/i

Re: [Qemu-devel] [PATCH v2 31/40] job: Add job_is_ready()

2018-05-25 Thread Kevin Wolf
Am 24.05.2018 um 19:25 hat John Snow geschrieben: > >>> diff --git a/job.c b/job.c > >>> index af31de4669..66ee26f2a0 100644 > >>> --- a/job.c > >>> +++ b/job.c > >>> @@ -199,6 +199,28 @@ bool job_is_cancelled(Job *job) > >>> return job->cancelled; > >>> } > >>> > >>> +bool job_is_ready(Job

[Qemu-devel] [PULL 10/13] linux-user: update ARCH_HAS_SOCKET_TYPES use

2018-05-25 Thread Laurent Vivier
to be like in the kernel and rename it TARGET_ARCH_HAS_SOCKET_TYPES Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Message-Id: <20180519092956.15134-7-laur...@vivier.eu> --- linux-user/alpha/sockbits.h | 36 +++--- linux-user/hppa/sockbits.h | 33 +++--

[Qemu-devel] [PULL 09/13] linux-user: move ppc socket.h definitions to ppc/sockbits.h

2018-05-25 Thread Laurent Vivier
Change conditional #ifdef part by #undef of the symbols redefined for PPC relative to generic/socket.h Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Message-Id: <20180519092956.15134-6-laur...@vivier.eu> --- linux-user/generic/sockbits.h | 9 - linux-user/ppc/sockbits.h

[Qemu-devel] [PULL 13/13] gdbstub: Clarify what gdb_handlesig() is doing

2018-05-25 Thread Laurent Vivier
From: Peter Maydell gdb_handlesig()'s behaviour is not entirely obvious at first glance. Add a doc comment for it, and also add a comment explaining why it's ok for gdb_do_syscallv() to ignore gdb_handlesig()'s return value. (Coverity complains about this: CID 1390850.) Signed-off-by: Peter Mayd

[Qemu-devel] [PULL 04/13] linux-user: Fix payload size logic in host_to_target_cmsg()

2018-05-25 Thread Laurent Vivier
From: Peter Maydell Coverity points out that there's a missing break in the switch in host_to_target_cmsg() where we update tgt_len for cmsg_level/cmsg_type combinations which require a different length for host and target (CID 1385425). To avoid duplicating the default case (target length same

[Qemu-devel] [PULL 06/13] linux-user: move alpha socket.h definitions to alpha/sockbits.h

2018-05-25 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20180519092956.15134-3-laur...@vivier.eu> --- linux-user/alpha/sockbits.h | 113 linux-user/socket.h | 106 +---

[Qemu-devel] [PULL 01/13] linux-user: Assert on bad type in thunk_type_align() and thunk_type_size()

2018-05-25 Thread Laurent Vivier
From: Peter Maydell In thunk_type_align() and thunk_type_size() we currently return -1 if the value at the type_ptr isn't one of the TYPE_* values we understand. However, this should never happen, and if it does then the calling code will go confusingly wrong because none of the callsites try to

[Qemu-devel] [PULL 00/13] Linux user for 2.13 patches

2018-05-25 Thread Laurent Vivier
The following changes since commit 62b9b076d9d37117696ec64f0b3544c1205ff7f9: Merge remote-tracking branch 'remotes/kraxel/tags/vga-20180524-pull-request' into staging (2018-05-24 17:48:01 +0100) are available in the Git repository at: git://github.com/vivier/qemu.git tags/linux-user-for-2.1

[Qemu-devel] [PULL 07/13] linux-user: move sparc/sparc64 socket.h definitions to sparc/sockbits.h

2018-05-25 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20180519092956.15134-4-laur...@vivier.eu> --- linux-user/socket.h | 44 +--- linux-user/sparc/sockbits.h | 94 ++

[Qemu-devel] [PULL 12/13] linux-user: define TARGET_SO_REUSEPORT

2018-05-25 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20180519092956.15134-9-laur...@vivier.eu> --- linux-user/alpha/sockbits.h | 2 +- linux-user/generic/sockbits.h | 2 +- linux-user/mips/sockbits.h| 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff -

[Qemu-devel] [PULL 02/13] linux-user: update netlink emulation

2018-05-25 Thread Laurent Vivier
Update enums with entries from linux 4.17 Translate entries that generate logs with iproute2 4.9.0 and host kernel 4.15: # ip address show Unknown host QEMU_IFLA type: 43 Unknown host QEMU_IFLA type: 43 Unknown host QEMU_IFLA type: 43 Unknown QEMU_IFLA_BR type 41 Unknown QEMU_IFLA_BR

[Qemu-devel] [PULL 03/13] linux-user: update comments to point to tcg_exec_init()

2018-05-25 Thread Laurent Vivier
From: Igor Mammedov cpu_init() was replaced by cpu_create() since 2.12 but comments weren't updated. So update stale comments to point that page sizes arei actually initialized by tcg_exec_init(). Also move another qemu_host_page_size related comment before tcg_exec_init() where it belongs. Sign

[Qemu-devel] [PULL 05/13] linux-user: move mips socket.h definitions to mips/sockbits.h

2018-05-25 Thread Laurent Vivier
No code change. Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20180519092956.15134-2-laur...@vivier.eu> --- linux-user/mips/sockbits.h | 110 +++ linux-user/mips64/sockbits.h | 1 + linux-us

[Qemu-devel] [PULL 08/13] linux-user: move socket.h generic definitions to generic/sockbits.h

2018-05-25 Thread Laurent Vivier
and include the file from architectures without specific definitions Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Message-Id: <20180519092956.15134-5-laur...@vivier.eu> --- linux-user/aarch64/sockbits.h| 1 + linux-user/arm/sockbits.h| 1 + linux-user/cris/sockbits.h

[Qemu-devel] [PULL 11/13] linux-user: copy sparc/sockbits.h definitions from linux

2018-05-25 Thread Laurent Vivier
Values defined for sparc are not correct. Copy the content of "arch/sparc/include/uapi/asm/socket.h" to fix them. Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Message-Id: <20180519092956.15134-8-laur...@vivier.eu> --- linux-user/sparc/sockbits.h | 131 +++

Re: [Qemu-devel] [PULL 00/13] Linux user for 2.13 patches

2018-05-25 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180525081754.29506-1-laur...@vivier.eu Subject: [Qemu-devel] [PULL 00/13] Linux user for 2.13 patches === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log -

Re: [Qemu-devel] [PATCH v3] block: fix QEMU crash with scsi-hd and drive_del

2018-05-25 Thread Kevin Wolf
Am 25.05.2018 um 00:53 hat Greg Kurz geschrieben: > Removing a drive with drive_del while it is being used to run an I/O > intensive workload can cause QEMU to crash. > > An AIO flush can yield at some point: > > blk_aio_flush_entry() > blk_co_flush(blk) > bdrv_co_flush(blk->root->bs) >...

Re: [Qemu-devel] [PATCH V3 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-05-25 Thread Shannon Zhao
On 2018/5/24 22:56, Peter Maydell wrote: > On 24 May 2018 at 15:40, Auger Eric wrote: >> > Hi Peter, >> > >> > On 05/24/2018 04:16 PM, Peter Maydell wrote: >>> >> Only for KVM, not for TCG, and it's the other way round: we >>> >> end up with two lots of PPI/SGI space in the data structure >>> >>

Re: [Qemu-devel] [PATCH 17/27] exec.c: Handle IOMMUs in address_space_translate_for_iotlb()

2018-05-25 Thread Peter Maydell
On 24 May 2018 at 20:54, Auger Eric wrote: > Hi Peter, > > On 05/23/2018 11:51 AM, Alex Bennée wrote: >> >> Peter Maydell writes: >> >>> Currently we don't support board configurations that put an IOMMU >>> in the path of the CPU's memory transactions, and instead just >>> assert() if the memory

Re: [Qemu-devel] [RISC-V] Coverity 1390849, Logically dead code

2018-05-25 Thread Peter Maydell
On 25 May 2018 at 07:18, Michael Clark wrote: > On Fri, May 25, 2018 at 9:54 AM, Richard Henderson wrote: > >> In the latest Coverity scan, it reports >> I believe the condition at op_helper.c:409 should be testing >> CSR_MHPMCOUNTER3H >> and CSR_MHPMCOUNTER31H. Must run now, otherwise I'd also

Re: [Qemu-devel] [PATCH V3 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-05-25 Thread Peter Maydell
On 25 May 2018 at 09:42, Shannon Zhao wrote: > On 2018/5/24 22:56, Peter Maydell wrote: >> We can fix the gicd_ipriority[] case simply by adding >>bmp = GIC_INTERNAL; >> before the assignment to 'field' in both kvm_dist_get_priority() >> and kvm_dist_put_priority(). This doesn't affect migrati

Re: [Qemu-devel] [PATCH v7 4/4] monitor: add lock to protect mon_fdsets

2018-05-25 Thread Stefan Hajnoczi
On Fri, May 25, 2018 at 11:30:22AM +0800, Peter Xu wrote: > On Thu, May 24, 2018 at 10:28:37AM +0100, Stefan Hajnoczi wrote: > > On Thu, May 24, 2018 at 12:39:52PM +0800, Peter Xu wrote: > > > int monitor_fdset_get_fd(int64_t fdset_id, int flags) > > > { > > > -#ifndef _WIN32 > > > +#ifdef _WIN32

Re: [Qemu-devel] [PULL v3 0/4] Merge tpm 2018/05/23

2018-05-25 Thread Peter Maydell
On 24 May 2018 at 17:48, Stefan Berger wrote: > This series of patches adds TPM emulator state migration support and a > test case for testing (local) migration. > >Stefan > > > The following changes since commit 4f50c1673a89b07f376ce5c42d22d79a79cd466d: > > Merge remote-tracking branch 'rem

Re: [Qemu-devel] [PATCH V3 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-05-25 Thread Shannon Zhao
On 2018/5/24 21:11, Peter Maydell wrote: > On 23 May 2018 at 04:53, Shannon Zhao wrote: >> While we skip the GIC_INTERNAL irqs, we don't change the register offset >> accordingly. This will overlap the GICR registers value and leave the >> last GIC_INTERNAL irq's registers out of update. >> >> F

Re: [Qemu-devel] [PATCH] migration: use g_free for ram load bitmap

2018-05-25 Thread Juan Quintela
Peter Xu wrote: > Buffers allocated with bitmap_new() should be freed with g_free(). > > Both reported by Coverity: > > *** CID 1391300: API usage errors (ALLOC_FREE_MISMATCH) > /migration/ram.c: 3517 in ram_dirty_bitmap_reload() > 3511 * the last one to sync, we need to notify the main

Re: [Qemu-devel] [RFC PATCH 2/2] tests/Makefile: comment out flakey tests

2018-05-25 Thread Stefan Hajnoczi
On Fri, May 18, 2018 at 04:08:47PM +0100, Alex Bennée wrote: > > Stefan Hajnoczi writes: > > > On Fri, May 18, 2018 at 10:14:40AM +0100, Alex Bennée wrote: > >> The following tests keep showing up in failed Travis runs: > >> > >> - test-aio > > > > What is the issue? > > GTESTER tests/test-th

[Qemu-devel] [PATCH] usb: update docs

2018-05-25 Thread Gerd Hoffmann
xhci is rock solid meanwhile. So move it up in the docs and feature it as prefered usb host adapter, instead of the old shy version saying "you might want try ...". Also a minor text update for the companion controller setup. Signed-off-by: Gerd Hoffmann --- docs/usb2.txt | 44

Re: [Qemu-devel] [PATCH v2] elf: Add RISC-V PSABI ELF header defines

2018-05-25 Thread Michael Clark
On Fri, May 25, 2018 at 7:53 PM, Laurent Vivier wrote: > Le 25/05/2018 à 09:22, Michael Clark a écrit : > > Refer to the RISC-V PSABI specification for details: > > > > - https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md > > > > Cc: Michael Tokarev > > Cc: Laurent Vivier > >

Re: [Qemu-devel] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API

2018-05-25 Thread Auger Eric
Hi Peter, On 05/24/2018 12:54 PM, Peter Maydell wrote: > On 24 May 2018 at 07:23, Peter Xu wrote: >> On Wed, May 23, 2018 at 12:47:16PM +0100, Peter Maydell wrote: >>> On 23 May 2018 at 02:06, Peter Xu wrote: Could you elaborate a bit more on why IOMMU notifier failed to corporate when

Re: [Qemu-devel] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API

2018-05-25 Thread Peter Maydell
On 25 May 2018 at 10:27, Auger Eric wrote: > I fail to understand the PRIV attribute usage in SMMUv3. > My understanding is the STRW (ie. stream world, kind of indication of > the exception level the SID is used along) in the STE is used to > determine the correct TTB*. Isn't PRIV checked against

Re: [Qemu-devel] [PATCH v2 1/1] sandbox: disable -sandbox if CONFIG_SECCOMP undefined

2018-05-25 Thread Eduardo Otubo
On 05/25/2018 06:23 AM, Yi Min Zhao wrote: 在 2018/5/24 下午9:40, Paolo Bonzini 写道: On 24/05/2018 09:53, Eduardo Otubo wrote: Thanks! But I have not got response from Paolo.  I have added him to CC list.   I'll just wait one more ACK and will send a pull request on the seccomp queue. Thanks fo

Re: [Qemu-devel] [PATCH v3 1/2] vfio-ccw: add force unlimited prefetch property

2018-05-25 Thread Cornelia Huck
On Thu, 24 May 2018 19:58:27 +0200 Halil Pasic wrote: > There is at least one guest (OS) such that although it does not rely on > the guarantees provided by ORB 1 word 9 bit (aka unlimited prefetch, aka > P bit) not being set, it fails to tell this to the machine. > > Usually this ain't a big de

Re: [Qemu-devel] [PATCH 17/27] exec.c: Handle IOMMUs in address_space_translate_for_iotlb()

2018-05-25 Thread Auger Eric
Hi Peter, On 05/25/2018 10:52 AM, Peter Maydell wrote: > On 24 May 2018 at 20:54, Auger Eric wrote: >> Hi Peter, >> >> On 05/23/2018 11:51 AM, Alex Bennée wrote: >>> >>> Peter Maydell writes: >>> Currently we don't support board configurations that put an IOMMU in the path of the CPU's

Re: [Qemu-devel] [PULL 00/13] Linux user for 2.13 patches

2018-05-25 Thread Peter Maydell
On 25 May 2018 at 09:17, Laurent Vivier wrote: > The following changes since commit 62b9b076d9d37117696ec64f0b3544c1205ff7f9: > > Merge remote-tracking branch > 'remotes/kraxel/tags/vga-20180524-pull-request' into staging (2018-05-24 > 17:48:01 +0100) > > are available in the Git repository at

Re: [Qemu-devel] [PATCH 17/27] exec.c: Handle IOMMUs in address_space_translate_for_iotlb()

2018-05-25 Thread Peter Maydell
On 25 May 2018 at 10:50, Auger Eric wrote: > On 05/25/2018 10:52 AM, Peter Maydell wrote: >> Once we've flushed the TLB it is empty and will have no cached >> information from the IOMMU. So there's no point in flushing the >> TLB again (which is expensive) until the next time a transaction >> goes

Re: [Qemu-devel] [PATCH] vhost-blk: turn on pre-defined RO feature bit

2018-05-25 Thread Stefan Hajnoczi
On Tue, May 22, 2018 at 02:39:28PM +, Liu, Changpeng wrote: > > > > -Original Message- > > From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > > Sent: Tuesday, May 22, 2018 6:11 AM > > To: Liu, Changpeng > > Cc: qemu-devel@nongnu.org; m...@redhat.com > > Subject: Re: [PATCH] vhost-b

Re: [Qemu-devel] [PATCH v1 10/24] tests/tcg/multiarch: Build fix for linux-test

2018-05-25 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 04/15/2018 09:07 PM, Philippe Mathieu-Daudé wrote: >> Hi Fam, Alex, >> >> On 04/10/2018 04:39 PM, Alex Bennée wrote: >>> From: Fam Zheng >>> >>> To keep the compiler happy, and to fit in our buildsys flags: >>> >>> - Make local functions "static" >>> - #ifdef

[Qemu-devel] [PATCH] ui/cocoa: Suppress NSFileHandlingPanelOKButton deprecation warning

2018-05-25 Thread Peter Maydell
OSX 10.13 deprecates the NSFileHandlingPanelOKButton constant, and would rather you use NSModalResponseOK, which was introduced in OS 10.9. Use the recommended new constant name, with a backward compatibility define if we're building on an older OSX. Signed-off-by: Peter Maydell --- Tested on 10.

[Qemu-devel] [PATCH v2 4/5] libvhost-user: support host notifier

2018-05-25 Thread Tiwei Bie
This patch introduces the host notifier support in libvhost-user. A new API is added to support setting host notifier for each queue. Signed-off-by: Tiwei Bie --- contrib/libvhost-user/libvhost-user.c | 80 --- contrib/libvhost-user/libvhost-user.h | 31 +++ 2 fil

[Qemu-devel] [PATCH v2 5/5] vhost-user-bridge: support host notifier

2018-05-25 Thread Tiwei Bie
This patch introduces the host notifier support in vhost-user-bridge. A new option (-H) is added to use the host notifier. This is mainly used to test the host notifier implementation in vhost user. Signed-off-by: Tiwei Bie --- tests/vhost-user-bridge.c | 98 +

[Qemu-devel] [PATCH v2 0/5] Support host notifiers in vhost-user

2018-05-25 Thread Tiwei Bie
More details about this patch set can be found from: http://lists.gnu.org/archive/html/qemu-devel/2018-04/msg01779.html http://lists.gnu.org/archive/html/qemu-devel/2018-04/msg04626.html v1 -> v2: - Drop the VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD patch; (MST) - In PATCH 2/5, for net/vhost-user, only

[Qemu-devel] [PATCH v2 2/5] vhost-user: introduce shared vhost-user state

2018-05-25 Thread Tiwei Bie
When multi queue is enabled e.g. for a virtio-net device, each queue pair will have a vhost_dev, and the only thing shared between vhost devs currently is the chardev. This patch introduces a vhost-user state structure which will be shared by all vhost devs of the same virtio device. Signed-off-by

[Qemu-devel] [PATCH v2 3/5] vhost-user: support registering external host notifiers

2018-05-25 Thread Tiwei Bie
This patch introduces VHOST_USER_PROTOCOL_F_HOST_NOTIFIER. With this feature negotiated, vhost-user backend can register memory region based host notifiers. And it will allow the guest driver in the VM to notify the hardware accelerator at the vhost-user backend directly. Signed-off-by: Tiwei Bie

Re: [Qemu-devel] [PULL 07/28] x86/cpu: use standard-headers/asm-x86.kvm_para.h

2018-05-25 Thread Peter Maydell
On 23 May 2018 at 15:43, Michael S. Tsirkin wrote: > Switch to the header we imported from Linux, > this allows us to drop a hack in kvm_i386.h. > More code will be dropped in the next patch. > > Signed-off-by: Michael S. Tsirkin > --- a/target/i386/cpu.h > +++ b/target/i386/cpu.h > @@ -688,8 +6

[Qemu-devel] [PATCH v2 1/5] vhost: allow backends to filter memory sections

2018-05-25 Thread Tiwei Bie
This patch introduces a vhost op for vhost backends to allow them to filter the memory sections that they can handle. Signed-off-by: Tiwei Bie --- hw/virtio/vhost-user.c| 11 +++ hw/virtio/vhost.c | 9 +++-- include/hw/virtio/vhost-backend.h | 4 3

[Qemu-devel] [PATCH] scripts/update-linux-headers: Handle __aligned_u64

2018-05-25 Thread Peter Maydell
We'll currently replace any 'u64' with a 'uint64_t' including when it's embedded in an '__aligned_u64', creating a '__aligned_uint64_t' which doesn't exist. We need to instead expand out the kernel's definition of __aligned_u64: #define __aligned_u64 __u64 __attribute__((aligned(8))) before we c

Re: [Qemu-devel] [PATCH] usb: update docs

2018-05-25 Thread Markus Armbruster
Gerd Hoffmann writes: > xhci is rock solid meanwhile. So move it up in the docs and feature it > as prefered usb host adapter, instead of the old shy version saying "you > might want try ...". > > Also a minor text update for the companion controller setup. > > Signed-off-by: Gerd Hoffmann > --

Re: [Qemu-devel] [PATCH v4 2/3] libqtest: fail if child coredumps

2018-05-25 Thread Thomas Huth
On 25.05.2018 08:10, Thomas Huth wrote: > On 24.05.2018 20:25, Michael S. Tsirkin wrote: >> Right now tests report OK status if QEMU crashes during cleanup. >> Let's catch that case and fail the test. >> >> Signed-off-by: Michael S. Tsirkin >> --- >> tests/libqtest.c | 9 - >> 1 file chan

[Qemu-devel] [PATCH v4 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-05-25 Thread Shannon Zhao
While we skip the GIC_INTERNAL irqs, we don't change the register offset accordingly. This will overlap the GICR registers value and leave the last GIC_INTERNAL irq's registers out of update. Fix this by skipping the registers banked by GICR. Also for migration compatibility if the migration sour

[Qemu-devel] [PATCH v4 1/2] arm_gicv3_kvm: kvm_dist_get/put_priority: skip the registers banked by GICR_IPRIORITYR

2018-05-25 Thread Shannon Zhao
While for_each_dist_irq_reg loop starts from GIC_INTERNAL, it forgot to offset the date array and index. This will overlap the GICR registers value and leave the last GIC_INTERNAL irq's registers out of update. Fixes: 367b9f527becdd20ddf116e17a3c0c2bbc486920 Cc: qemu-sta...@nongnu.org Signed-off-b

[Qemu-devel] [PATCH v4 0/2] Fix ARM KVM GICv3 get/put data shift bug

2018-05-25 Thread Shannon Zhao
These two patches fix ARM KVM GICv3 get/put data shift bug and add compatibility fro migration from old qemu to new one. Major Changes in V4: * Fix the kvm_dist_get/put_priority in a separate patch since it doesn't need migration compatibility. * Fix the data within post-load function Shannon Zh

Re: [Qemu-devel] [PATCH v2 3/5] vhost-user: support registering external host notifiers

2018-05-25 Thread Jason Wang
On 2018年05月25日 19:04, Tiwei Bie wrote: This patch introduces VHOST_USER_PROTOCOL_F_HOST_NOTIFIER. With this feature negotiated, vhost-user backend can register memory region based host notifiers. And it will allow the guest driver in the VM to notify the hardware accelerator at the vhost-user b

Re: [Qemu-devel] [PATCH v2 3/5] vhost-user: support registering external host notifiers

2018-05-25 Thread Tiwei Bie
On Fri, May 25, 2018 at 07:26:05PM +0800, Jason Wang wrote: > On 2018年05月25日 19:04, Tiwei Bie wrote: [...] > > +static int vhost_user_slave_handle_vring_host_notifier(struct vhost_dev > > *dev, > > + VhostUserVringArea > > *area, > > +

[Qemu-devel] [PATCH v1 1/7] s390x/tod: factor out TOD into separate device

2018-05-25 Thread David Hildenbrand
Let's treat this like a separate device. TCG will have to store the actual state/time later on. Include cpu-qom.h in kvm_s390x.h (due to S390CPU) to compile tod-kvm.c. Signed-off-by: David Hildenbrand --- hw/s390x/Makefile.objs | 3 + hw/s390x/s390-virtio-ccw.c | 57 +- h

[Qemu-devel] [PATCH v1 0/7] s390x: TOD refactoring + TCG CPU hotplug support

2018-05-25 Thread David Hildenbrand
The TOD in TCG is not handled correctly: - each CPU has its own TOD based on CPU creation time vs. a system TOD - TOD is not migrated - TOD timer is not restarted during migration - CKC interrupts/TOD timer is not cleared when resetting the CKC This (and a cpu creation problem for single threaded

[Qemu-devel] [PATCH v1 2/7] s390x/tcg: drop tod_basetime

2018-05-25 Thread David Hildenbrand
Never set to anything but 0. Signed-off-by: David Hildenbrand --- target/s390x/cpu.c | 1 - target/s390x/cpu.h | 1 - target/s390x/misc_helper.c | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 167d089722..5570

[Qemu-devel] [PATCH v1 4/7] s390x/tcg: SET CLOCK COMPARATOR can clear CKC interrupts

2018-05-25 Thread David Hildenbrand
Let's stop the timer and delete any pending CKC IRQ before doing anything else. Signed-off-by: David Hildenbrand --- target/s390x/misc_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c index 418326e551..2ef9de1cca 100644 --

[Qemu-devel] [PATCH v1 7/7] s390x/tcg: fix CPU hotplug with single-threaded TCG

2018-05-25 Thread David Hildenbrand
run_on_cpu() doesn't seem to work reliably until the CPU has been fully created if the single-threaded TCG main loop is already running. Therefore, let's use run_on_cpu() for KVM only - KVM requires it due to the initial CPU reset ioctl. Signed-off-by: David Hildenbrand --- target/s390x/cpu.c |

[Qemu-devel] [PATCH v1 3/7] s390x/tcg: properly implement the TOD

2018-05-25 Thread David Hildenbrand
Right now, each CPU has its own TOD. Especially, the TOD will differ based on creation time of a CPU - e.g. when hotplugging a CPU the times will differ quite a lot, resulting in stall warnings in the guest. Let's use a single TOD by implementing our new TOD device. Prepare it for TOD-clock epoch

[Qemu-devel] [PATCH v1 6/7] s390x/tcg: rearm the CKC timer during migration

2018-05-25 Thread David Hildenbrand
If the CPU data is migrated after the TOD clock, the CKC timer of a CPU is not rearmed. Let's rearm it when loading the CPU state. Signed-off-by: David Hildenbrand --- target/s390x/machine.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/s390x/machine.c b/target/s390x/machine.

[Qemu-devel] [PATCH v1 5/7] s390x/tcg: implement SET CLOCK

2018-05-25 Thread David Hildenbrand
This allows a guest to change its TOD. We already take care of updating all CKC timers from within S390TODClass. Use MO_ALIGN to load the operand manually - this will properly trigger a SPECIFICATION exception. Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 1 + target/s390x

Re: [Qemu-devel] [PATCH v3] block: fix QEMU crash with scsi-hd and drive_del

2018-05-25 Thread Greg Kurz
On Fri, 25 May 2018 10:37:15 +0200 Kevin Wolf wrote: > Am 25.05.2018 um 00:53 hat Greg Kurz geschrieben: > > Removing a drive with drive_del while it is being used to run an I/O > > intensive workload can cause QEMU to crash. > > > > An AIO flush can yield at some point: > > > > blk_aio_flush_e

Re: [Qemu-devel] [PULL 07/28] x86/cpu: use standard-headers/asm-x86.kvm_para.h

2018-05-25 Thread Peter Maydell
On 25 May 2018 at 12:06, Peter Maydell wrote: > On 23 May 2018 at 15:43, Michael S. Tsirkin wrote: >> Switch to the header we imported from Linux, >> this allows us to drop a hack in kvm_i386.h. >> More code will be dropped in the next patch. >> >> Signed-off-by: Michael S. Tsirkin > >> --- a/ta

Re: [Qemu-devel] [PATCH v4 2/3] libqtest: fail if child coredumps

2018-05-25 Thread Michael S. Tsirkin
On Fri, May 25, 2018 at 08:10:48AM +0200, Thomas Huth wrote: > On 24.05.2018 20:25, Michael S. Tsirkin wrote: > > Right now tests report OK status if QEMU crashes during cleanup. > > Let's catch that case and fail the test. > > > > Signed-off-by: Michael S. Tsirkin > > --- > > tests/libqtest.c |

Re: [Qemu-devel] [PULL 07/28] x86/cpu: use standard-headers/asm-x86.kvm_para.h

2018-05-25 Thread Michael S. Tsirkin
On Fri, May 25, 2018 at 12:53:44PM +0100, Peter Maydell wrote: > On 25 May 2018 at 12:06, Peter Maydell wrote: > > On 23 May 2018 at 15:43, Michael S. Tsirkin wrote: > >> Switch to the header we imported from Linux, > >> this allows us to drop a hack in kvm_i386.h. > >> More code will be dropped

Re: [Qemu-devel] [PULL 07/28] x86/cpu: use standard-headers/asm-x86.kvm_para.h

2018-05-25 Thread Michael S. Tsirkin
On Fri, May 25, 2018 at 12:06:17PM +0100, Peter Maydell wrote: > On 23 May 2018 at 15:43, Michael S. Tsirkin wrote: > > Switch to the header we imported from Linux, > > this allows us to drop a hack in kvm_i386.h. > > More code will be dropped in the next patch. > > > > Signed-off-by: Michael S. T

Re: [Qemu-devel] [PULL 07/28] x86/cpu: use standard-headers/asm-x86.kvm_para.h

2018-05-25 Thread Peter Maydell
On 25 May 2018 at 13:18, Michael S. Tsirkin wrote: > On Fri, May 25, 2018 at 12:53:44PM +0100, Peter Maydell wrote: >> For the moment I'm using this workaround (I wanted to do a header >> update for something else I'm working on): >> >> --- a/target/i386/kvm.c >> +++ b/target/i386/kvm.c >> @@ -48,

Re: [Qemu-devel] [PATCH v4 0/2] Fix ARM KVM GICv3 get/put data shift bug

2018-05-25 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Type: series Message-id: 1527247371-10592-1-git-send-email-zhaoshengl...@huawei.com Subject: [Qemu-devel] [PATCH v4 0/2] Fix ARM KVM GICv3 get/put data shift bug === TEST SCRIPT BEGIN === #!/bin/bash # Testing script

Re: [Qemu-devel] [PULL 07/28] x86/cpu: use standard-headers/asm-x86.kvm_para.h

2018-05-25 Thread Michael S. Tsirkin
On Fri, May 25, 2018 at 01:21:24PM +0100, Peter Maydell wrote: > On 25 May 2018 at 13:18, Michael S. Tsirkin wrote: > > On Fri, May 25, 2018 at 12:53:44PM +0100, Peter Maydell wrote: > >> For the moment I'm using this workaround (I wanted to do a header > >> update for something else I'm working o

Re: [Qemu-devel] [PULL 07/28] x86/cpu: use standard-headers/asm-x86.kvm_para.h

2018-05-25 Thread Peter Maydell
On 25 May 2018 at 13:27, Michael S. Tsirkin wrote: > I see. I guess you did all the work already, do you still need help > or will you just go ahead and post it? Or even commit directly, > it's a trivial enough patch. I'll send a series later this afternoon that does an update to 4.17-rc6; it ha

Re: [Qemu-devel] [PULL 07/28] x86/cpu: use standard-headers/asm-x86.kvm_para.h

2018-05-25 Thread Michael S. Tsirkin
On Fri, May 25, 2018 at 01:30:00PM +0100, Peter Maydell wrote: > On 25 May 2018 at 13:27, Michael S. Tsirkin wrote: > > I see. I guess you did all the work already, do you still need help > > or will you just go ahead and post it? Or even commit directly, > > it's a trivial enough patch. > > I'l

Re: [Qemu-devel] [PULL 07/28] x86/cpu: use standard-headers/asm-x86.kvm_para.h

2018-05-25 Thread Peter Maydell
On 25 May 2018 at 13:35, Michael S. Tsirkin wrote: > On Fri, May 25, 2018 at 01:30:00PM +0100, Peter Maydell wrote: >> On 25 May 2018 at 13:27, Michael S. Tsirkin wrote: >> > I see. I guess you did all the work already, do you still need help >> > or will you just go ahead and post it? Or even c

Re: [Qemu-devel] [qemu-s390x] [PATCH v4 00/14] MemoryDevice: use multi stage hotplug handlers

2018-05-25 Thread David Hildenbrand
On 17.05.2018 10:15, David Hildenbrand wrote: > We can have devices that need certain other resources that are e.g. > system resources managed by the machine. We need a clean way to assign > these resources (without violating layers as brought up by Igor). > > One example is virtio-mem/virtio-pmem

[Qemu-devel] [PATCH] spapr: don't call KVM_PPC_CONFIGURE_V3_MMU if HPT is in userspace

2018-05-25 Thread Greg Kurz
Since the kernel commit "dbfcf3cb9c68 powerpc/64: Call H_REGISTER_PROC_TBL when running as a HPT guest on POWER9", a nested guest running with PR KVM hangs at boot: Preparing to boot Linux version 4.16.0-kvm-pr-hang-gku+ (greg@qemu.boston16) (gcc version 8.1.1 20180502 (Red Hat 8.1.1-1) (GCC)

Re: [Qemu-devel] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-25 Thread Eric Blake
On 05/25/2018 01:25 AM, Fam Zheng wrote: And that makes five labels in total, I'm not sure I like it: fail_handler: aio_set_event_notifier(bdrv_get_aio_context(bs), &s->irq_notifier, false, NULL, NULL); fail_queue: nvme_free_queue_pair(bs, s->queues[0]); fa

[Qemu-devel] [Bug 1769189] Re: Issue with qemu 2.12.0 + SATA

2018-05-25 Thread Bruce Rogers
I can confirm that for me commit d759c951 does cause / expose the issue. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1769189 Title: Issue with qemu 2.12.0 + SATA Status in QEMU: New Bug descr

[Qemu-devel] [PATCH] vga: cleanup surface handling

2018-05-25 Thread Gerd Hoffmann
Just set the full_update flag if we need a new DisplaySurface. Create a new surface when the flag is set instead of having two places where qemu_create_displaysurface_from() is called. Signed-off-by: Gerd Hoffmann --- hw/display/vga.c | 36 +++- 1 file changed, 1

Re: [Qemu-devel] [PATCH] RISC-V: Correct typo in RV32 perf counters

2018-05-25 Thread Richard Henderson
On 05/24/2018 11:24 PM, Michael Clark wrote: > This patch enables mhpmcounter3h through mhpmcounter31h on RV32. > Previously the RV32 h versions (high 32-bits of 64-bit counters) > of these counters would trap with an illegal instruction instead > of returning 0 as intended. > > Reported-by: Richa

[Qemu-devel] [PATCH 0/6] Update Linux headers to 4.17-rc6

2018-05-25 Thread Peter Maydell
This series updates our copy of the Linux kernel headers to 4.17-rc6. To do that we have to fix up some issues: * we had a hand-hacked definition of VIRTIO_GPU_CAPSET_VIRGL2 in our old header copy that needs to be moved to a header that isn't auto-updated * we need to turn __aligned_u64 int

[Qemu-devel] [PATCH 2/6] scripts/update-linux-headers: Handle __aligned_u64

2018-05-25 Thread Peter Maydell
We'll currently replace any 'u64' with a 'uint64_t' including when it's embedded in an '__aligned_u64', creating a '__aligned_uint64_t' which doesn't exist. We need to instead expand out the kernel's definition of __aligned_u64: #define __aligned_u64 __u64 __attribute__((aligned(8))) before we c

[Qemu-devel] [PATCH 1/6] virtio-gpu-3d: Define VIRTIO_GPU_CAPSET_VIRGL2 elsewhere

2018-05-25 Thread Peter Maydell
From: Alex Williamson Commit 5643cc94ac1c ("virtio-gpu-3d: add support for second capability set (v4)") updated virtio_gpu.h with a define that does not yet(?) exist upstream resulting in build breakage every time Linux headers are updated via the standard update script. Conditionally define thi

[Qemu-devel] [PATCH 4/6] target/i386/kvm.c: Handle renaming of KVM_HINTS_DEDICATED

2018-05-25 Thread Peter Maydell
In kernel header commit 633711e8287, the define KVM_HINTS_DEDICATED was renamed to KVM_HINTS_REALTIME. Work around this compatibility break by (a) using the new constant name, and (b) defining it if the headers don't. Part (b) can be removed once we've updated our copy of the kernel headers to a v

[Qemu-devel] [PATCH 3/6] scripts/update-linux-headers: Handle kernel license no longer being one file

2018-05-25 Thread Peter Maydell
The kernel has changed its license documentation, so instead of COPYING being a stand-alone file that defines the license, it refers to various other files under LICENSES/. This means we need to copy not just COPYING but also these other files to our copy of the kernel headers. Signed-off-by: Pete

[Qemu-devel] [PATCH 6/6] target/i386/kvm.c: Remove compatibility shim for KVM_HINTS_REALTIME

2018-05-25 Thread Peter Maydell
Now we've updated our copy of the kernel headers we can remove the compatibility shim that handled KVM_HINTS_REALTIME not being defined. Signed-off-by: Peter Maydell --- target/i386/kvm.c | 5 - 1 file changed, 5 deletions(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index c2699f2f

[Qemu-devel] [PATCH 5/6] Update Linux headers to 4.17-rc6

2018-05-25 Thread Peter Maydell
Update our copy of the Linux headers to upstream 4.17-rc6 (kernel commit 771c577c23bac90597c68). Signed-off-by: Peter Maydell --- include/standard-headers/asm-x86/hyperv.h | 1 - include/standard-headers/asm-x86/kvm_para.h | 2 +- include/standard-headers/linux/ethtool.h | 36 +-

[Qemu-devel] [PULL 2/2] migration: use g_free for ram load bitmap

2018-05-25 Thread Juan Quintela
From: Peter Xu Buffers allocated with bitmap_new() should be freed with g_free(). Both reported by Coverity: *** CID 1391300: API usage errors (ALLOC_FREE_MISMATCH) /migration/ram.c: 3517 in ram_dirty_bitmap_reload() 3511 * the last one to sync, we need to notify the main send thread

[Qemu-devel] [PULL 1/2] migration: fix exec/fd migrations

2018-05-25 Thread Juan Quintela
Commit: commit 36c2f8be2c4eb0003ac77a14910842b7ddd7337e Author: Juan Quintela Date: Wed Mar 7 08:40:52 2018 +0100 migration: Delay start of migration main routines Missed tcp and fd transports. This fix its. Reported-by: Kevin Wolf Signed-off-by: Juan Quintela Tested-by: Kevin Wolf M

[Qemu-devel] [PULL 0/2] Migration pull

2018-05-25 Thread Juan Quintela
0100) are available in the Git repository at: git://github.com/juanquintela/qemu.git tags/migration/20180525 for you to fetch changes up to bf269906f5b225a04825b2bce4364bfe1d50: migration: use g_free for ram load bitmap (2018-05-25 15:2

[Qemu-devel] [PATCH v5 05/49] configure: allow user to specify --cross-cc-cflags-foo=

2018-05-25 Thread Alex Bennée
As an individual compiler may be able to support several targets with the appropriate flags we need to expose this to the user as well. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v3 - fix up the cross-cc v4 - add --help text - sort cross_cc_foo lines --- configure | 10

[Qemu-devel] [PATCH v5 06/49] configure: set cross_cc_FOO for host compiler

2018-05-25 Thread Alex Bennée
We can build tests for the host system with the compiler that we have selected. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- configure | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 48a3675a6b..cc375abe15 100755 --

[Qemu-devel] [PATCH v5 01/49] docker: add "probe" command for configure

2018-05-25 Thread Alex Bennée
This is a helper function for the configure script. It replies yes, sudo or no to inform the user if non-interactive docker support is available. We trap the Exception to fail gracefully. Signed-off-by: Alex Bennée Reviewed-by: Fam Zheng --- tests/docker/docker.py | 18 ++ 1 fil

[Qemu-devel] [PATCH v5 03/49] configure: add support for --cross-cc-FOO

2018-05-25 Thread Alex Bennée
This allows us to specify cross compilers for our guests. This is useful for building test images/programs. Currently we re-run the compile test for each target. I couldn't think of a way to cache the value for a given arch without getting messier configure code. The cross compiler for the guest i

[Qemu-devel] [PATCH v5 04/49] configure: move i386_cc to cross_cc_i386

2018-05-25 Thread Alex Bennée
Also dont assume x86_64 compiler can build i386 binaries. Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- v2 - drop using system x86_64 compiler for i386 compiles v3 - fix cross_cc_i386 when on i386 v4 - fix merge conflicts - sort cross_cc

[Qemu-devel] [PATCH v5 02/49] configure: add test for docker availability

2018-05-25 Thread Alex Bennée
This tests for a working docker installation without sudo and sets up config-host.mak accordingly. This will be useful from cross compiling things in the future. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- configure | 17 + 1 file changed, 17 insertions(+) dif

[Qemu-devel] [PATCH v5 11/49] docker: Makefile.include introduce DOCKER_SCRIPT

2018-05-25 Thread Alex Bennée
Define this in one place to make it easy to re-use. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index

  1   2   3   4   >