Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3

2019-08-10 Thread piaojun
On 2019/8/9 16:21, Stefan Hajnoczi wrote: > On Thu, Aug 08, 2019 at 10:53:16AM +0100, Dr. David Alan Gilbert wrote: >> * Stefan Hajnoczi (stefa...@redhat.com) wrote: >>> On Wed, Aug 07, 2019 at 04:57:15PM -0400, Vivek Goyal wrote: >>> 2. Can MAP/UNMAP be performed directly in QEMU via a

Re: [Qemu-devel] [RFC PATCH v2 00/39] rewrite MMX/SSE instruction translation

2019-08-10 Thread Richard Henderson
On 8/9/19 9:12 PM, Jan Bobek wrote: > This is a v2 of the patch series posted in [1]. Patches 1-9 are just > cleanups; patches 10-39 are something actually interesting. Compared > to v1, I started using preprocessor more extensively to generate > repetitive boilerplate code; opinions/alternatives

Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3

2019-08-10 Thread Liu Bo
On Thu, Aug 08, 2019 at 08:53:20AM -0400, Vivek Goyal wrote: > On Thu, Aug 08, 2019 at 10:53:16AM +0100, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > On Wed, Aug 07, 2019 at 04:57:15PM -0400, Vivek Goyal wrote: > > > > Kernel also serializes MAP/UNMAP on

Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3

2019-08-10 Thread Liu Bo
On Fri, Aug 09, 2019 at 09:21:02AM +0100, Stefan Hajnoczi wrote: > On Thu, Aug 08, 2019 at 10:53:16AM +0100, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > On Wed, Aug 07, 2019 at 04:57:15PM -0400, Vivek Goyal wrote: > > > 2. Can MAP/UNMAP be performed

Re: [Qemu-devel] [PATCH v3 20/29] Include qemu/main-loop.h less

2019-08-10 Thread Markus Armbruster
Alex Bennée writes: > Markus Armbruster writes: > >> Philippe Mathieu-Daudé writes: >> >>> On 8/9/19 8:46 AM, Markus Armbruster wrote: In my "build everything" tree, changing qemu/main-loop.h triggers a recompile of some 5600 out of 6600 objects (not counting tests and objects

[Qemu-devel] [PATCH v3 4/7] block/backup: drop handling of max_transfer for copy_range

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
Since previous commit, copy_range supports max_transfer, so we don't need to handle it by hand. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/backup.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/block/backup.c b/block/backup.c

[Qemu-devel] [PATCH v3 7/7] block/backup: merge duplicated logic into backup_do_cow

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
backup_cow_with_offload and backup_cow_with_bounce_buffer contains a lot of duplicated logic. Move it into backup_do_cow. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/backup.c | 97 -- 1 file changed, 38

[Qemu-devel] [PATCH v3 6/7] block/backup: teach backup_cow_with_bounce_buffer to copy more at once

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
backup_cow_with_offload can transfer more than one cluster. Let backup_cow_with_bounce_buffer behave similarly. It reduces the number of IO requests, since there is no need to copy cluster by cluster. Logic around bounce_buffer allocation changed: we can't just allocate one-cluster-sized buffer

[Qemu-devel] [PATCH v3 3/7] block/io: handle alignment and max_transfer for copy_range

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
copy_range ignores these limitations, let's improve it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 44 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/block/io.c b/block/io.c index 06305c6ea6..45b1e1f76e 100644 ---

[Qemu-devel] [PATCH v3 5/7] block/backup: fix backup_cow_with_offload for last cluster

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
We shouldn't try to copy bytes beyond EOF. Fix it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/backup.c b/block/backup.c index 228ba9423c..d482d93458 100644 --- a/block/backup.c

[Qemu-devel] [PATCH v3 2/7] block/backup: refactor write_flags

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
write flags are constant, let's store it in BackupBlockJob instead of recalculating. It also makes two boolean fields to be unused, so, drop them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Max Reitz --- block/backup.c | 24 1 file

[Qemu-devel] [PATCH v3 0/7] backup improvements

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
Hi all! There are some fixes and refactorings I need on my way to resend my backup-top series. It's obvious now that I need to share copying code between backup and backup-top, as backup copying code becomes smarter and more complicated. So the goal of the series is to make copying code more

[Qemu-devel] [PATCH v3 1/7] block/backup: deal with zero detection

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
We have detect_zeroes option, so at least for blockdev-backup user should define it if zero-detection is needed. For drive-backup leave detection enabled by default but do it through existing option instead of open-coding. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz ---

Re: [Qemu-devel] [PATCH v3 00/29] Tame a few "touch this, recompile the world" headers

2019-08-10 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Markus, > > On 8/9/19 8:46 AM, Markus Armbruster wrote: >> We have quite a few "touch this, recompile the world" headers. My >> "build everything" tree has some 6600 objects (not counting tests and >> objects that don't depend on qemu/osdep.h). Touching any

Re: [Qemu-devel] [PATCH v6 24/42] block: Use child access functions for QAPI queries

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 19:13, Max Reitz wrote: > query-block, query-named-block-nodes, and query-blockstats now return > any filtered child under "backing", not just bs->backing or COW > children. This is so that filters do not interrupt the reported backing > chain. This changes the output for iotest 184,

Re: [Qemu-devel] [PATCH v6 22/42] block: Fix bdrv_get_allocated_file_size's fallback

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 19:13, Max Reitz wrote: > If the driver does not implement bdrv_get_allocated_file_size(), we > should fall back to cumulating the allocated size of all non-COW > children instead of just bs->file. > > Suggested-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Max Reitz > --- >

Re: [Qemu-devel] [PATCH v6 20/42] block/snapshot: Fix fallback

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 19:13, Max Reitz wrote: > If the top node's driver does not provide snapshot functionality and we > want to fall back to a node down the chain, we need to snapshot all > non-COW children. For simplicity's sake, just do not fall back if there > is more than one such child. > >

Re: [Qemu-devel] [PATCH v6 18/42] block: Use CAFs in bdrv_refresh_filename()

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 19:13, Max Reitz wrote: > bdrv_refresh_filename() and the kind of related bdrv_dirname() should > look to the primary child when they wish to copy the underlying file's > filename. > > Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [Qemu-devel] [PATCH v6 15/42] block: Re-evaluate backing file handling in reopen

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 19:13, Max Reitz wrote: > Reopening a node's backing child needs a bit of special handling because > the "backing" child has different defaults than all other children > (among other things). Adding filter support here is a bit more > difficult than just using the child access

Re: [Qemu-devel] [PATCH v6 16/42] block: Flush all children in generic code

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 19:13, Max Reitz wrote: > If the driver does not support .bdrv_co_flush() so bdrv_co_flush() > itself has to flush the children of the given node, it should not flush > just bs->file->bs, but in fact all children. > > In any case, the BLKDBG_EVENT() should be emitted on the primary

Re: [Qemu-devel] [PATCH v6 14/42] block: Use CAFs when working with backing chains

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 19:13, Max Reitz wrote: > Use child access functions when iterating through backing chains so > filters do not break the chain. > > Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [Qemu-devel] RISC-V: Vector && DSP Extension

2019-08-10 Thread LIU ZhiWei
On 8/9/19 6:54 PM, Alistair Francis wrote: On Thu, Aug 8, 2019 at 2:52 AM liuzhiwei wrote: Hi all, My workmate and I have been working on Vector & Dsp extension, and I'd like to share develop status with folks. Cool! The spec references for Vector extension is

Re: [Qemu-devel] [PATCH v6 10/42] block: Drop bdrv_is_encrypted()

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 19:13, Max Reitz wrote: > The original purpose of bdrv_is_encrypted() was to inquire whether a BDS > can be used without the user entering a password or not. It has not > been used for that purpose for quite some time. > > Actually, it is not even fit for that purpose, because to

Re: [Qemu-devel] RISC-V: Vector && DSP Extension

2019-08-10 Thread LIU ZhiWei
On 8/8/19 6:48 AM, Chih-Min Chao wrote: On Thu, Aug 8, 2019 at 7:29 PM Aleksandar Markovic mailto:aleksandar.m.m...@gmail.com>> wrote: On Thu, Aug 8, 2019 at 11:52 AM liuzhiwei mailto:zhiwei_...@c-sky.com>> wrote: > Hi all, > >     My workmate  and I have been working on

Re: [Qemu-devel] [PATCH v6 09/42] block: Include filters when freezing backing chain

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 19:13, Max Reitz wrote: > In order to make filters work in backing chains, the associated > functions must be able to deal with them and freeze all filter links, be > they COW or R/W filter links. > > In the process, rename these functions to reflect that they now act on > generalized

Re: [Qemu-devel] [PATCH v2 6/7] block/backup: teach backup_cow_with_bounce_buffer to copy more at once

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
10.08.2019 15:47, Eric Blake wrote: > On 8/10/19 7:12 AM, Vladimir Sementsov-Ogievskiy wrote: >> 09.08.2019 18:59, Eric Blake wrote: >>> On 8/9/19 10:32 AM, Vladimir Sementsov-Ogievskiy wrote: backup_cow_with_offload can transfer more than on cluster. Let >>> >>> s/on/one/ >>>

Re: [Qemu-devel] [PATCH v2 6/7] block/backup: teach backup_cow_with_bounce_buffer to copy more at once

2019-08-10 Thread Eric Blake
On 8/10/19 7:12 AM, Vladimir Sementsov-Ogievskiy wrote: > 09.08.2019 18:59, Eric Blake wrote: >> On 8/9/19 10:32 AM, Vladimir Sementsov-Ogievskiy wrote: >>> backup_cow_with_offload can transfer more than on cluster. Let >> >> s/on/one/ >> >>> backup_cow_with_bounce_buffer behave similarly. It

Re: [Qemu-devel] [PATCH v2 6/7] block/backup: teach backup_cow_with_bounce_buffer to copy more at once

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 18:59, Eric Blake wrote: > On 8/9/19 10:32 AM, Vladimir Sementsov-Ogievskiy wrote: >> backup_cow_with_offload can transfer more than on cluster. Let > > s/on/one/ > >> backup_cow_with_bounce_buffer behave similarly. It reduces number >> of IO and there are no needs to copy cluster by

Re: [Qemu-devel] [PATCH] iotests: Fix 141 when run with qed

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 21:52, Max Reitz wrote: > 69f47505ee has changed qcow2 in such a way that the commit job run in > test 141 (and 144[1]) returns before it emits the READY event. However, > 141 also runs with qed, where the order is still the other way around. > Just filter out the {"return": {}} so the

Re: [Qemu-devel] backup bug or question

2019-08-10 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 23:13, John Snow wrote: > > > On 8/9/19 9:18 AM, Vladimir Sementsov-Ogievskiy wrote: >> Hi! >> >> Hmm, hacking around backup I have a question: >> >> What prevents guest write request after job_start but before setting >> write notifier? >> >> code path: >> >> qmp_drive_backup or

Re: [Qemu-devel] [PATCH v1 1/7] fpu: move LIT64 helper to softfloat-types

2019-08-10 Thread Alex Bennée
Peter Maydell writes: > On Thu, 8 Aug 2019 at 17:41, Alex Bennée wrote: >> >> This simple pasting helper can be used by those who don't need the >> entire softfloat api. Move it to the smaller types header. >> >> Signed-off-by: Alex Bennée >> --- >> include/fpu/softfloat-types.h | 2 ++ >>