[Qemu-devel] [PATCH] vnc: Set default kbd delay to 10ms

2017-07-04 Thread Alexander Graf
The default keyboard delay time in the input layer is 10ms. I don't know how that number came to be, but empirical tests on some OpenQA driven ARM systems show that 10ms really is a reasonable default number for the delay. With the current 1ms we're constantly typing faster than the guest

Re: [Qemu-devel] Managing architectural restrictions with -device and libvirt

2017-07-04 Thread Markus Armbruster
Copying Marcel for PCI expertise. Mark Cave-Ayland writes: > Hi all, > > I've been working on a patchset that brings the sun4u machine on > qemu-system-sparc64 much closer to a real Ultra 5, however due to > various design restrictions I need to be able to

Re: [Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-07-04 Thread Tian, Kevin
> From: Liu, Yi L [mailto:yi.l@linux.intel.com] > Sent: Sunday, May 14, 2017 6:55 PM > > On Fri, May 12, 2017 at 03:58:43PM -0600, Alex Williamson wrote: > > On Wed, 26 Apr 2017 18:12:04 +0800 > > "Liu, Yi L" wrote: > > > > > From: "Liu, Yi L" >

Re: [Qemu-devel] [PATCH 00/35] RFC: coroutine annotations & clang check

2017-07-04 Thread Markus Armbruster
Marc-André Lureau writes: > Hi, > > After investigating a bit using clang-tidy to do some coroutine checks > (and hitting a wall as there are no pre-processor info in the AST), it > was suggested to me on the clang mailing list to try to use > -Wthread-safety. I had

Re: [Qemu-devel] [PATCH v7 4/4] net/socket: Improve -net socket error reporting

2017-07-04 Thread Mao Zhongyi
On 07/05/2017 12:24 AM, Markus Armbruster wrote: Mao Zhongyi writes: When -net socket fails, it first reports a specific error, then a generic one, like this: $ qemu-system-x86_64 -net socket, qemu-system-x86_64: -net socket: exactly one of fd=, listen=,

Re: [Qemu-devel] [PATCH v7 2/4] net/socket: Convert several helper functions to Error

2017-07-04 Thread Mao Zhongyi
Hi, Markus On 07/04/2017 10:54 PM, Markus Armbruster wrote: Mao Zhongyi writes: Currently, net_socket_mcast_create(), net_socket_fd_init_dgram() and net_socket_fd_init() use the function such as fprintf(), perror() to report an error message. Now, convert these

Re: [Qemu-devel] [PATCH] virtio-scsi: finalize IOMMU support

2017-07-04 Thread Wei Xu
On Tue, Jul 04, 2017 at 08:21:06PM +0800, Jason Wang wrote: > After converting to use DMA api for virtio devices, we should use > dma_as instead of address_space_memory. Otherwise it won't work if > IOMMU is enabled. > > Fixes: commit 8607f5c3072c ("virtio: convert to use DMA api") > Cc:

Re: [Qemu-devel] [PATCH v4 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-04 Thread QingFeng Hao
在 2017/7/4 22:04, Christian Borntraeger 写道: On 07/04/2017 03:23 PM, QingFeng Hao wrote: This patch is based on a similar patch from Stefan Hajnoczi - commit c324fd0a39c ("virtio-pci: use ioeventfd even when KVM is disabled") Do not check kvm_eventfds_enabled() when KVM is disabled since it

Re: [Qemu-devel] [PATCH 7/7] MAINTAINERS: add Dump maintainers

2017-07-04 Thread Laszlo Ersek
On 06/29/17 15:23, Marc-André Lureau wrote: > Proposing myself, since I have some familiarity with the code now. > > Signed-off-by: Marc-André Lureau > --- > MAINTAINERS | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS >

Re: [Qemu-devel] [PATCH 6/7] scripts/dump-guest-memory.py: add vmcoreinfo

2017-07-04 Thread Laszlo Ersek
On 06/29/17 15:23, Marc-André Lureau wrote: > Add vmcoreinfo ELF note if vmcoreinfo device is ready. > > To help the python script, add a little global vmcoreinfo_gdb > structure, that is populated with vmcoreinfo_gdb_update(). > > Signed-off-by: Marc-André Lureau >

Re: [Qemu-devel] [PATCH 5/7] kdump: add vmcoreinfo ELF note

2017-07-04 Thread Laszlo Ersek
On 06/29/17 15:23, Marc-André Lureau wrote: > kdump header provides offset and size of the vmcoreinfo ELF note, > append it if available. > > Signed-off-by: Marc-André Lureau > --- > dump.c | 48 > 1 file changed, 44

Re: [Qemu-devel] [PATCH] virtio-scsi: finalize IOMMU support

2017-07-04 Thread Fam Zheng
On Tue, 07/04 20:21, Jason Wang wrote: > After converting to use DMA api for virtio devices, we should use > dma_as instead of address_space_memory. Otherwise it won't work if > IOMMU is enabled. > > Fixes: commit 8607f5c3072c ("virtio: convert to use DMA api") > Cc: qemu-sta...@nongnu.org >

Re: [Qemu-devel] [PATCH 4/7] dump: add vmcoreinfo ELF note

2017-07-04 Thread Laszlo Ersek
On 06/29/17 15:23, Marc-André Lureau wrote: > Read the vmcoreinfo ELF PT_NOTE from guest memory when vmcoreinfo > device provides the location, and write it as an ELF note in the dump. > > There are now 2 possible sources of phys_base information. > > (1) arch guessed value from

Re: [Qemu-devel] [Bug 1701971] [NEW] multithreading not working right under qemu user mode for sh4

2017-07-04 Thread Richard Henderson
On 07/02/2017 12:53 PM, Bruno Haible wrote: In a multithreaded program running under qemu-sh4 (version 2.9.0), thread termination and/or pthread_join is not working right. QEMU does not support the roll-back atomic sequences used by linux on most uniprocessor SH. Nor do we support the ll/sc

Re: [Qemu-devel] [PATCH RFC v19 00/13] QEMU AVR 8 bit cores

2017-07-04 Thread Richard Henderson
On 06/21/2017 09:15 PM, Michael Rolnik wrote: Hi all, are there any action items for me? What kind of testing are you doing for this? I just briefly browsed through the code again and happened to see that ROR has a critical typo. Considering that ROR must be used for multi-byte shifts, I'm

Re: [Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-07-04 Thread Peter Maydell
On 4 July 2017 at 23:31, Richard Henderson wrote: > On 07/04/2017 09:14 AM, Peter Maydell wrote: >> I kind of like not having CPUState* in DisasContext, because >> it enforces the rule that you can't read from fields of >> it inside the target translate.c code without jumping

Re: [Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-07-04 Thread Richard Henderson
On 07/04/2017 09:14 AM, Peter Maydell wrote: On 4 July 2017 at 19:59, Lluís Vilanova wrote: Richard Henderson writes: Any reason not to stuff the cpu pointer into the DisasContextBase instead of passing it around separately? None, really. I'll move it from DisasContext

Re: [Qemu-devel] [PATCH 2/7] acpi: add vmcoreinfo device

2017-07-04 Thread Laszlo Ersek
comments below On 06/29/17 15:23, Marc-André Lureau wrote: > The VM coreinfo (vmcoreinfo) device is an emulated device which > exposes a 4k memory range to the guest to store various informations > useful to debug the guest OS. (it is greatly inspired by the VMGENID > device implementation) > >

[Qemu-devel] [PATCH 31/35] parallels: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/parallels.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index 8be46a7d48..213e42b9d2 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -472,7 +472,8 @@

[Qemu-devel] [PATCH 35/35] vpc: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/vpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/vpc.c b/block/vpc.c index 4240ba9d1c..1b4aba20bd 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -872,7 +872,8 @@ static int

[Qemu-devel] [PATCH 28/35] 9p: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- hw/9pfs/9p.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h index d1cfeaf10e..935a6c9a3c 100644 --- a/hw/9pfs/9p.h +++ b/hw/9pfs/9p.h @@ -312,21 +312,24 @@ typedef struct

[Qemu-devel] [PATCH 33/35] vdi: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/vdi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/vdi.c b/block/vdi.c index 79af47763b..53cd7f64d8 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -716,7 +716,8 @@

[Qemu-devel] [PATCH 26/35] iscsi: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/iscsi.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 54067e2620..e16311cb4a 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1005,7 +1005,8 @@ static void

[Qemu-devel] [PATCH 30/35] block-backend: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/sysemu/block-backend.h | 4 ++-- block/block-backend.c | 36 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/include/sysemu/block-backend.h

[Qemu-devel] [PATCH 25/35] mirror: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/mirror.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 68744a17e8..2f0a9946d9 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -224,7 +224,8 @@

Re: [Qemu-devel] [PATCH] vhost: fix a memory leak

2017-07-04 Thread Michael S. Tsirkin
On Tue, Jul 04, 2017 at 11:59:54PM +0200, Marc-André Lureau wrote: > Hi > > On Wed, Jul 5, 2017 at 12:33 AM, Peng Hao wrote: > > vhost exists a call for g_file_get_contents, but not call g_free. > > > > Signed-off-by: Peng Hao > > Reviewed-by:

[Qemu-devel] [PATCH 23/35] ssh: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/ssh.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index 52964416da..03a8ebe6f7 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -813,7 +813,8 @@ static QemuOptsList

[Qemu-devel] [PATCH 34/35] vhdx: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/vhdx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/vhdx.c b/block/vhdx.c index 8b270b57c9..56b54f3ed7 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1787,7 +1787,8 @@ exit: *. ~

[Qemu-devel] [PATCH 17/35] curl: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/curl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.c index 2a244e2439..d3719dc086 100644 --- a/block/curl.c +++ b/block/curl.c @@ -855,7 +855,8 @@ out_noclean: return

[Qemu-devel] [PATCH 27/35] file-posix: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/file-posix.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 3927fabf06..adafbbb6a0 100644 --- a/block/file-posix.c +++ b/block/file-posix.c

[Qemu-devel] [PATCH 20/35] quorum: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/quorum.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index 55ba916655..b086d70daa 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -264,7

[Qemu-devel] [PATCH 32/35] qed: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/qed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/qed.c b/block/qed.c index 385381a78a..dd2859a1c9 100644 --- a/block/qed.c +++ b/block/qed.c @@ -622,7 +622,8 @@ out: return ret; }

[Qemu-devel] [PATCH 16/35] crypto: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/crypto.c b/block/crypto.c index 10e5ddccaa..0e30a4ea06 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -568,7 +568,8 @@ static int

[Qemu-devel] [PATCH 22/35] sheepdog: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/sheepdog.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 83bc43dde4..64ff275db9 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@

[Qemu-devel] [PATCH 18/35] gluster: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/gluster.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/gluster.c b/block/gluster.c index addceed6eb..dea8ab43a5 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -965,7 +965,8 @@ static

[Qemu-devel] [PATCH 15/35] backup: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/block/block_backup.h | 4 ++-- block/backup.c | 9 ++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/block/block_backup.h b/include/block/block_backup.h index

[Qemu-devel] [PATCH 29/35] block: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/blkdebug.c | 15 ++- block/blkverify.c | 3 ++- block/io.c| 9 ++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index a1b24b9b0d..d55e2e69c8

[Qemu-devel] [PATCH 19/35] nfs: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/nfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/nfs.c b/block/nfs.c index c3c5de0113..3f393a95a4 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -679,7 +679,8 @@ static QemuOptsList

[Qemu-devel] [PATCH 13/35] nbd: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/nbd-client.h | 10 +- block/nbd-client.c | 24 block/nbd.c| 3 ++- nbd/server.c | 3 ++- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/block/nbd-client.h

[Qemu-devel] [PATCH 14/35] migration: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- migration/migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 51ccd1a4c5..3370482637 100644 --- a/migration/migration.c +++ b/migration/migration.c

[Qemu-devel] [PATCH 24/35] null: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/null.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/block/null.c b/block/null.c index 876f90965b..4c8afe16d7 100644 --- a/block/null.c +++ b/block/null.c @@ -167,7 +167,8 @@ static inline

[Qemu-devel] [PATCH 05/35] coroutine: remove coroutine_fn from qemu_co_queue_run_restart()

2017-07-04 Thread Marc-André Lureau
The function can be invoked from non-coroutine context. Signed-off-by: Marc-André Lureau --- include/qemu/coroutine_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/coroutine_int.h b/include/qemu/coroutine_int.h index

[Qemu-devel] [PATCH 10/35] vmdk: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/vmdk.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 55581b03fe..f8422e8971 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1334,7 +1334,8 @@ static

[Qemu-devel] [PATCH 21/35] rbd: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/rbd.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index 9da02cdceb..7b4d548cd2 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -348,7 +348,8 @@ static

[Qemu-devel] [PATCH 12/35] raw: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/raw-format.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/raw-format.c b/block/raw-format.c index 0d185fe41b..402d3b9fba 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -361,7

[Qemu-devel] [PATCH 04/35] coroutine: remove coroutine_fn from qemu_coroutine_self()

2017-07-04 Thread Marc-André Lureau
The function may be safely called from non-coroutine context. Signed-off-by: Marc-André Lureau --- include/qemu/coroutine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index

[Qemu-devel] [PATCH 08/35] block: all bdrv_aio callbacks are coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/block/block_int.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 15fa602150..93eb2a9528 100644 --- a/include/block/block_int.h +++

[Qemu-devel] [PATCH 11/35] qcow2: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/qcow2.h | 6 -- block/qcow.c | 4 +++- block/qcow2-cluster.c | 11 +++ block/qcow2.c | 15 ++- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/block/qcow2.h

[Qemu-devel] [PATCH 07/35] blockjob: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
/home/elmarco/src/qemu/blockjob.c:820:9: error: calling function 'qemu_coroutine_yield' requires holding role '_coroutine_fn' exclusively [-Werror,-Wthread-safety-analysis] qemu_coroutine_yield(); ^ /home/elmarco/src/qemu/blockjob.c:824:5: error: calling function

[Qemu-devel] [PATCH 01/35] WIP: coroutine: annotate coroutine with clang thread safety attributes

2017-07-04 Thread Marc-André Lureau
It is possible to use clang -Wthread-safety to do some basic coroutine checks: http://lists.llvm.org/pipermail/cfe-dev/2017-June/054372.html https://clang.llvm.org/docs/ThreadSafetyAnalysis.html This will basically check that you don't call accidentally a coroutine function from a non-coroutine,

[Qemu-devel] [PATCH 03/35] test-coroutine: fix coroutine attribute

2017-07-04 Thread Marc-André Lureau
CC tests/test-coroutine.o qemu/tests/test-coroutine.c:390:5: warning: calling function 'qemu_coroutine_yield' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] qemu_coroutine_yield(); ^ qemu/tests/test-coroutine.c:403:14: warning: Unmached attributes

[Qemu-devel] [PATCH 09/35] block: bdrv_create() and bdrv_debug_event() are coroutine_fn

2017-07-04 Thread Marc-André Lureau
Called from coroutine. Signed-off-by: Marc-André Lureau --- include/block/block_int.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 93eb2a9528..a183c72b7c 100644 ---

[Qemu-devel] [PATCH 06/35] coroutine: mark CoRwLock coroutine_fn

2017-07-04 Thread Marc-André Lureau
CC util/qemu-coroutine-lock.o /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:371:5: warning: calling function 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] qemu_co_mutex_lock(>mutex); ^

[Qemu-devel] [PATCH 02/35] WIP: coroutine: manually tag the fast-paths

2017-07-04 Thread Marc-André Lureau
Some functions are both regular and coroutine. They may call coroutine functions in some cases, if it is known to be running in a coroutine. Signed-off-by: Marc-André Lureau --- block.c | 2 ++ block/block-backend.c | 2 ++ block/io.c

[Qemu-devel] [PATCH 00/35] RFC: coroutine annotations & clang check

2017-07-04 Thread Marc-André Lureau
Hi, After investigating a bit using clang-tidy to do some coroutine checks (and hitting a wall as there are no pre-processor info in the AST), it was suggested to me on the clang mailing list to try to use -Wthread-safety. I had to modify clang a bit to make it work on qemu code base (annotations

Re: [Qemu-devel] [PATCH] vhost: fix a memory leak

2017-07-04 Thread Marc-André Lureau
Hi On Wed, Jul 5, 2017 at 12:33 AM, Peng Hao wrote: > vhost exists a call for g_file_get_contents, but not call g_free. > > Signed-off-by: Peng Hao Reviewed-by: Marc-André Lureau mst: is this better? > --- >

Re: [Qemu-devel] [RFC 25/29] vhu: enable = false on get_vring_base

2017-07-04 Thread Michael S. Tsirkin
On Wed, Jun 28, 2017 at 08:00:43PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > When we receive a GET_VRING_BASE message set enable = false > to stop any new received packets modifying the ring. > > Signed-off-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH] vhost: fix a memory leak

2017-07-04 Thread Michael S. Tsirkin
On Tue, Jul 04, 2017 at 02:21:08PM +, Marc-André Lureau wrote: > Hi > > On Tue, Jul 4, 2017 at 4:16 PM Peng Hao wrote: > > vhost exists a call for g_file_get_contents, but not call g_free. > > Signed-off-by: Peng Hao > > >  Reviewed-by:

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/5] spapr: DRC cleanups (part VI)

2017-07-04 Thread Daniel Henrique Barboza
I just tested this patch set on top of current ppc-for-2.10 branch (which contains the patches from part V). It applied cleanly but required a couple of trivial fixes to build probably because it was made on top of an older code base. The trivial migration test worked fine. The libvirt

Re: [Qemu-devel] [PATCH] specs: Describe the TPM support in QEMU

2017-07-04 Thread Laszlo Ersek
On 06/29/17 20:00, Stefan Berger wrote: > This patch adds a description of the current TPM support in QEMU > to the specs. > > Several public specs are referenced via their landing page on the > trustedcomputinggroup.org website. > > Signed-off-by: Stefan Berger >

Re: [Qemu-devel] Managing architectural restrictions with -device and libvirt

2017-07-04 Thread Daniel P. Berrange
On Tue, Jul 04, 2017 at 07:25:41PM +0100, Mark Cave-Ayland wrote: > Hi all, > > I've been working on a patchset that brings the sun4u machine on > qemu-system-sparc64 much closer to a real Ultra 5, however due to > various design restrictions I need to be able to restrict how devices > are added

Re: [Qemu-devel] [RFC 25/29] vhu: enable = false on get_vring_base

2017-07-04 Thread Maxime Coquelin
On 06/28/2017 09:00 PM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" When we receive a GET_VRING_BASE message set enable = false to stop any new received packets modifying the ring. Signed-off-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [RFC 24/29] vhost+postcopy: Lock around set_mem_table

2017-07-04 Thread Maxime Coquelin
On 06/28/2017 09:00 PM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" **HACK - better solution needed ** We have the situation where: qemu bridge send set_mem_table map memory a)

Re: [Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-07-04 Thread Peter Maydell
On 4 July 2017 at 19:59, Lluís Vilanova wrote: > Richard Henderson writes: > >> On 06/28/2017 05:32 AM, Lluís Vilanova wrote: >>> +void (*init_disas_context)(DisasContextBase *db, CPUState *cpu); >>> +void (*init_globals)(DisasContextBase *db, CPUState *cpu); >>> +

[Qemu-devel] [Bug 1545052] Re: RDMA migration will hang forever if target QEMU fails to load vmstate

2017-07-04 Thread Dr. David Alan Gilbert
Fix series posted upstream: 0001-migration-rdma-Fix-race-on-source.patch 0002-migration-Close-file-on-failed-migration-load.patch 0003-migration-rdma-Allow-cancelling-while-waiting-for-wr.patch 0004-migration-rdma-Safely-convert-control-types.patch

Re: [Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-07-04 Thread Lluís Vilanova
Richard Henderson writes: > On 06/28/2017 05:32 AM, Lluís Vilanova wrote: >> +void (*init_disas_context)(DisasContextBase *db, CPUState *cpu); >> +void (*init_globals)(DisasContextBase *db, CPUState *cpu); >> +void (*tb_start)(DisasContextBase *db, CPUState *cpu); >> +void

[Qemu-devel] [PATCH 3/5] migration/rdma: Allow cancelling while waiting for wrid

2017-07-04 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When waiting for a WRID, if the other side dies we end up waiting for ever with no way to cancel the migration. Cure this by poll()ing the fd first with a timeout and checking error flags and migration state. Signed-off-by: Dr. David Alan

[Qemu-devel] [PATCH 5/5] migration/rdma: Send error during cancelling

2017-07-04 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When we issue a cancel and clean up the RDMA channel send a CONTROL_ERROR to get the destination to quit. The rdma_cleanup code waits for the event to come back from the rdma_disconnect; but that wont happen until the destination quits and

[Qemu-devel] [PATCH 0/5] A bunch of RDMA fixes

2017-07-04 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is a bunch of RDMA fixes, the first is a race I spotted a while ago that you don't hit during normal operation; the rest are to do with migration failure and cancellation that I started looking at because of lp1545052 which is a

[Qemu-devel] [PATCH 4/5] migration/rdma: Safely convert control types

2017-07-04 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" control_desc[] is an array of strings that correspond to a series of message types; they're used only for error messages, but if the message type is seriously broken then we could go off the end of the array. Convert the array to a function

[Qemu-devel] [PATCH 2/5] migration: Close file on failed migration load

2017-07-04 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Closing the file before exit on a failure allows the source to cleanup better, especially with RDMA. Partial fix for https://bugs.launchpad.net/qemu/+bug/1545052 Signed-off-by: Dr. David Alan Gilbert ---

[Qemu-devel] [PATCH 1/5] migration/rdma: Fix race on source

2017-07-04 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Fix a race where the destination might try and send the source a WRID_READY before the source has done a post-recv for it. rdma_post_recv has to happen after the qp exists, and we're OK since we've already called qemu_rdma_source_init that

Re: [Qemu-devel] [PATCH 20/22] target/i386: add the tcg_enabled() in target/i386/

2017-07-04 Thread Richard Henderson
On 07/04/2017 01:12 AM, Paolo Bonzini wrote: From: Yang Zhong Add the tcg_enabled() where the x86 target needs to disable TCG-specific code. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- v2: do not touch

Re: [Qemu-devel] [PATCH 18/22] target/i386: split cpu_set_mxcsr() and make cpu_set_fpuc() inline

2017-07-04 Thread Richard Henderson
On 07/04/2017 01:12 AM, Paolo Bonzini wrote: From: Yang Zhong Split the cpu_set_mxcsr() and make cpu_set_fpuc() inline with specific tcg code. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- v2: renamed

Re: [Qemu-devel] [PATCH 16/22] target/i386: move cpu_sync_bndcs_hflags() function

2017-07-04 Thread Richard Henderson
On 07/04/2017 01:12 AM, Paolo Bonzini wrote: From: Yang Zhong Move cpu_sync_bndcs_hflags() function from mpx_helper.c to helper.c because mpx_helper.c need be disabled when tcg is disabled. Signed-off-by: Yang Zhong Signed-off-by: Paolo

Re: [Qemu-devel] [PATCH 14/22] tcg: add CONFIG_TCG guards in headers

2017-07-04 Thread Richard Henderson
On 07/04/2017 01:12 AM, Paolo Bonzini wrote: From: Yang Zhong Add the CONFIG_TCG for exec-all.h. Since function tlb_set_page_with_attrs() is defined in ./accel/tcg/cputlb.c, which will be disabled if tcg is disabled. This function need be implemented in

[Qemu-devel] Managing architectural restrictions with -device and libvirt

2017-07-04 Thread Mark Cave-Ayland
Hi all, I've been working on a patchset that brings the sun4u machine on qemu-system-sparc64 much closer to a real Ultra 5, however due to various design restrictions I need to be able to restrict how devices are added to the machine with -device. On a real Ultra 5, the root PCI bus (sabre) has

Re: [Qemu-devel] [PATCHv7 3/6] fw_cfg: switch fw_cfg_find() to locate the fw_cfg device by type rather than path

2017-07-04 Thread Mark Cave-Ayland
On 03/07/17 10:42, Igor Mammedov wrote: > On Thu, 29 Jun 2017 15:07:17 +0100 > Mark Cave-Ayland wrote: > >> This will enable the fw_cfg device to be placed anywhere within the QOM tree >> regardless of its machine location. >> >> Signed-off-by: Mark Cave-Ayland

Re: [Qemu-devel] [PATCHv7 5/6] fw_cfg: move qdev_init_nofail() from fw_cfg_init1() to callers

2017-07-04 Thread Mark Cave-Ayland
On 03/07/17 10:39, Igor Mammedov wrote: > On Thu, 29 Jun 2017 15:07:19 +0100 > Mark Cave-Ayland wrote: > >> When looking to instantiate a TYPE_FW_CFG_MEM or TYPE_FW_CFG_IO device to be >> able to wire it up differently, it is much more convenient for the caller to

Re: [Qemu-devel] [PATCH 3/7] s390x: fix error propagation in kvm-flic's realize

2017-07-04 Thread Christian Borntraeger
On 07/04/2017 06:59 PM, Cornelia Huck wrote: > On Tue, 4 Jul 2017 17:08:52 +0200 > Halil Pasic wrote: > > cd.type = KVM_DEV_TYPE_FLIC; > ret = kvm_vm_ioctl(kvm_state, KVM_CREATE_DEVICE, ); > if (ret < 0) { > -

[Qemu-devel] [PATCH 3/3] hw: Use new memory_region_allocate_aux_memory() function

2017-07-04 Thread Peter Maydell
Use the new utility function memory_region_allocate_aux_memory() instead of manually calling memory_region_init_ram() and then vmstate_register_ram_global(). Patch automatically created using the included coccinelle script: spatch --in-place -sp_file scripts/coccinelle/allocate_aux_mem.cocci

[Qemu-devel] [PATCH 1/3] include/hw/boards.h: Document memory_region_allocate_system_memory()

2017-07-04 Thread Peter Maydell
Add a documentation comment for memory_region_allocate_system_memory(). In particular, the reason for this function's existence and the requirement on board code to call it exactly once are non-obvious. Signed-off-by: Peter Maydell --- include/hw/boards.h | 28

[Qemu-devel] [PATCH 0/3] Add new utility function memory_region_allocate_aux_memory()

2017-07-04 Thread Peter Maydell
Many board models and several devices need to create auxiliary regions of RAM (in addition to the main lump of 'system' memory), to model static RAMs, video memory, ROMs, etc. Currently they do this with a sequence like: memory_region_init_ram(sram, NULL, "sram", 0x1, _fatal);

[Qemu-devel] [PATCH 2/3] memory.h: Add new utility function memory_region_allocate_aux_memory()

2017-07-04 Thread Peter Maydell
Add a new utility function memory_region_allocate_aux_memory() for board code to use to create auxiliary memory regions (such as display RAM or static RAMs). This parallels the existing memory_region_allocate_system_memory() and wraps up the very common sequence of:

Re: [Qemu-devel] [PATCH 3/7] s390x: fix error propagation in kvm-flic's realize

2017-07-04 Thread Cornelia Huck
On Tue, 4 Jul 2017 17:08:52 +0200 Halil Pasic wrote: > >>> cd.type = KVM_DEV_TYPE_FLIC; > >>> ret = kvm_vm_ioctl(kvm_state, KVM_CREATE_DEVICE, ); > >>> if (ret < 0) { > >>> -trace_flic_create_device(errno); > >>> -return; > >>> +

Re: [Qemu-devel] [PATCH v2 3/4] xen/mapcache: introduce xen_replace_cache_entry()

2017-07-04 Thread Igor Druzhinin
On 04/07/17 17:42, Paul Durrant wrote: >> -Original Message- >> From: Igor Druzhinin >> Sent: 04 July 2017 17:34 >> To: Paul Durrant ; xen-de...@lists.xenproject.org; >> qemu-devel@nongnu.org >> Cc: sstabell...@kernel.org; Anthony Perard

Re: [Qemu-devel] [PATCH v2 3/4] xen/mapcache: introduce xen_replace_cache_entry()

2017-07-04 Thread Paul Durrant
> -Original Message- > From: Igor Druzhinin > Sent: 04 July 2017 17:34 > To: Paul Durrant ; xen-de...@lists.xenproject.org; > qemu-devel@nongnu.org > Cc: sstabell...@kernel.org; Anthony Perard ; > pbonz...@redhat.com > Subject: Re: [PATCH

Re: [Qemu-devel] [PATCH v2 3/4] xen/mapcache: introduce xen_replace_cache_entry()

2017-07-04 Thread Igor Druzhinin
On 04/07/17 17:27, Paul Durrant wrote: >> -Original Message- >> From: Igor Druzhinin >> Sent: 04 July 2017 16:48 >> To: xen-de...@lists.xenproject.org; qemu-devel@nongnu.org >> Cc: Igor Druzhinin ; sstabell...@kernel.org; >> Anthony Perard

Re: [Qemu-devel] [PATCH v2 3/4] xen/mapcache: introduce xen_replace_cache_entry()

2017-07-04 Thread Paul Durrant
> -Original Message- > From: Igor Druzhinin > Sent: 04 July 2017 16:48 > To: xen-de...@lists.xenproject.org; qemu-devel@nongnu.org > Cc: Igor Druzhinin ; sstabell...@kernel.org; > Anthony Perard ; Paul Durrant >

Re: [Qemu-devel] [PATCH v7 4/4] net/socket: Improve -net socket error reporting

2017-07-04 Thread Markus Armbruster
Mao Zhongyi writes: > When -net socket fails, it first reports a specific error, then > a generic one, like this: > > $ qemu-system-x86_64 -net socket, > qemu-system-x86_64: -net socket: exactly one of fd=, listen=, connect=, > mcast= or udp= is required >

Re: [Qemu-devel] [PATCH v2 2/4] xen/mapcache: add an ability to create dummy mappings

2017-07-04 Thread Paul Durrant
> -Original Message- > From: Igor Druzhinin > Sent: 04 July 2017 16:48 > To: xen-de...@lists.xenproject.org; qemu-devel@nongnu.org > Cc: Igor Druzhinin ; sstabell...@kernel.org; > Anthony Perard ; Paul Durrant >

Re: [Qemu-devel] [PATCH v2 1/4] xen: move physmap saving into a separate function

2017-07-04 Thread Paul Durrant
> -Original Message- > From: Igor Druzhinin > Sent: 04 July 2017 16:48 > To: xen-de...@lists.xenproject.org; qemu-devel@nongnu.org > Cc: Igor Druzhinin ; sstabell...@kernel.org; > Anthony Perard ; Paul Durrant >

[Qemu-devel] [PATCH v2 3/4] xen/mapcache: introduce xen_replace_cache_entry()

2017-07-04 Thread Igor Druzhinin
This new call is trying to update a requested map cache entry according to the changes in the physmap. The call is searching for the entry, unmaps it and maps again at the same place using a new guest address. If the mapping is dummy this call will make it real. This function makes use of a new

[Qemu-devel] [PATCH v2 2/4] xen/mapcache: add an ability to create dummy mappings

2017-07-04 Thread Igor Druzhinin
Dummys are simple anonymous mappings that are placed instead of regular foreign mappings in certain situations when we need to postpone the actual mapping but still have to give a memory region to QEMU to play with. This is planned to be used for restore on Xen. Signed-off-by: Igor Druzhinin

[Qemu-devel] [PATCH v2 1/4] xen: move physmap saving into a separate function

2017-07-04 Thread Igor Druzhinin
Non-functional change. Signed-off-by: Igor Druzhinin --- hw/i386/xen/xen-hvm.c | 57 --- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index

[Qemu-devel] [PATCH v2 0/4] xen: don't save/restore the physmap on VM save/restore

2017-07-04 Thread Igor Druzhinin
Saving/restoring the physmap to/from xenstore was introduced to QEMU majorly in order to cover up the VRAM region restore issue. The sequence of restore operations implies that we should know the effective guest VRAM address *before* we have the VRAM region restored (which happens later).

[Qemu-devel] [PATCH v2 4/4] xen: don't use xenstore to save/restore physmap anymore

2017-07-04 Thread Igor Druzhinin
If we have a system with xenforeignmemory_map2() implemented we don't need to save/restore physmap on suspend/restore anymore. In case we resume a VM without physmap - try to recreate the physmap during memory region restore phase and remap map cache entries accordingly. The old code is left for

Re: [Qemu-devel] [Qemu-block] [PATCH v4 1/2] live-block-ops.txt: Rename, rewrite, and improve it

2017-07-04 Thread Kashyap Chamarthy
On Wed, Jun 28, 2017 at 03:33:49PM -0500, Eric Blake wrote: > On 06/28/2017 03:15 PM, Alberto Garcia wrote: > > On Wed 28 Jun 2017 04:58:00 PM CEST, Kashyap Chamarthy wrote: > >> This patch documents (including their QMP invocations) all the four > >> major kinds of live block operations: > >> >

[Qemu-devel] [PATCH v7 0/6] fsdev: qmp interface for io throttling

2017-07-04 Thread Pradeep Jagadeesh
These patches provide the qmp interface, to query the io throttle status of the all fsdev devices that are present in a vm. also, it provides an interface to set the io throttle parameters of a fsdev to a required value. some of the patches also remove the duplicate code that was present in block

[Qemu-devel] [PATCH v7 6/6] fsdev: QMP interface for throttling

2017-07-04 Thread Pradeep Jagadeesh
This patch introduces qmp interfaces for the fsdev devices. This provides two interfaces one for querying info of all the fsdev devices. The second one to set the IO limits for the required fsdev device. Signed-off-by: Pradeep Jagadeesh --- Makefile

  1   2   3   4   >