[Qemu-devel] [PATCH v11 29/31] block/null: Generate filename even with latency-ns

2018-10-05 Thread Max Reitz
While we cannot represent the latency-ns option in a filename, it is not a strong option so not being able to should not stop us from generating a filename nonetheless. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block/null.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[Qemu-devel] [PATCH v11 24/31] block: Purify .bdrv_refresh_filename()

2018-10-05 Thread Max Reitz
Currently, BlockDriver.bdrv_refresh_filename() is supposed to both refresh the filename (BDS.exact_filename) and set BDS.full_open_options. Now that we have generic code in the central bdrv_refresh_filename() for creating BDS.full_open_options, we can drop the latter part from all

[Qemu-devel] [PATCH v11 23/31] block: Generically refresh runtime options

2018-10-05 Thread Max Reitz
Instead of having every block driver which implements bdrv_refresh_filename() copy all of the strong runtime options over to bs->full_open_options, implement this process generically in bdrv_refresh_filename(). This patch only adds this new generic implementation, it does not remove the old

[Qemu-devel] [PATCH v11 03/31] block: Skip implicit nodes for filename info

2018-10-05 Thread Max Reitz
bdrv_refresh_filename() should simply skip all implicit nodes. They are supposed to be invisible to the user, so they should not appear in filename information. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block.c | 14 ++ 1 file changed, 14

[Qemu-devel] [PATCH v11 22/31] block: Add BlockDriver.bdrv_gather_child_options

2018-10-05 Thread Max Reitz
Some follow-up patches will rework the way bs->full_open_options is refreshed in bdrv_refresh_filename(). The new implementation will remove the need for the block drivers' bdrv_refresh_filename() implementations to set bs->full_open_options; instead, it will be generic and use static information

[Qemu-devel] [PATCH v11 26/31] block/nvme: Fix bdrv_refresh_filename()

2018-10-05 Thread Max Reitz
Currently, nvme's bdrv_refresh_filename() is an exact copy of null's implementation. However, for null, "null-co://" and "null-aio://" are indeed valid filenames -- for nvme, they are not, as a device address is still required. The correct implementation should generate a filename of the form

[Qemu-devel] [PATCH v11 31/31] iotests: Test json:{} filenames of internal BDSs

2018-10-05 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/224 | 139 + tests/qemu-iotests/224.out | 18 + tests/qemu-iotests/group | 1 + 3 files changed, 158 insertions(+) create mode 100755 tests/qemu-iotests/224 create mode 100644

[Qemu-devel] [PATCH v11 20/31] iotests: Add quorum case to test 110

2018-10-05 Thread Max Reitz
Test 110 tests relative backing filenames for complex BDS trees. Now that the originally supposedly failing test passes, let us add a new failing test: Quorum can never work automatically (without detecting whether all child nodes have the same base directory, but that would be rather

[Qemu-devel] [PATCH v11 30/31] block: BDS options may lack the "driver" option

2018-10-05 Thread Max Reitz
When BDSs are created by qemu itself (e.g. as filters in block jobs), they may not have a "driver" option in their options QDict. When generating a json:{} filename, however, it must always be present. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block.c | 6 ++ 1 file

[Qemu-devel] [PATCH v11 21/31] block: Add strong_runtime_opts to BlockDriver

2018-10-05 Thread Max Reitz
This new field can be set by block drivers to list the runtime options they accept that may influence the contents of the respective BDS. As of a follow-up patch, this list will be used by the common bdrv_refresh_filename() implementation to decide which options to put into BDS.full_open_options

[Qemu-devel] [PATCH v11 27/31] block/curl: Harmonize option defaults

2018-10-05 Thread Max Reitz
Both of the defaults we currently have in the curl driver are named based on a slightly different schema, let's unify that and call both CURL_BLOCK_OPT_${NAME}_DEFAULT. While at it, we can add a macro for the third option for which a default exists, namely "sslverify". Signed-off-by: Max Reitz

[Qemu-devel] [PATCH v11 18/31] block/nfs: Implement bdrv_dirname()

2018-10-05 Thread Max Reitz
While the basic idea is obvious and could be handled by the default bdrv_dirname() implementation, we cannot generate a directory name if the gid or uid are set, so we have to explicitly return NULL in those cases. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block/nfs.c | 15

[Qemu-devel] [PATCH v11 25/31] block: Do not copy exact_filename from format file

2018-10-05 Thread Max Reitz
If a format BDS's file BDS is in turn a format BDS, we cannot simply use the same filename, because when opening a BDS tree based on a filename alone, qemu will create only one format node on top of one protocol node (disregarding a potential backing file). Signed-off-by: Max Reitz Reviewed-by:

[Qemu-devel] [PATCH v11 28/31] block/curl: Implement bdrv_refresh_filename()

2018-10-05 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block/curl.c | 21 + 1 file changed, 21 insertions(+) diff --git a/block/curl.c b/block/curl.c index 96790fdc70..a5d3e64b84 100644 --- a/block/curl.c +++ b/block/curl.c @@ -963,6 +963,23 @@ static int64_t

[Qemu-devel] [PATCH v11 17/31] block/nbd: Make bdrv_dirname() return NULL

2018-10-05 Thread Max Reitz
The generic bdrv_dirname() implementation would be able to generate some form of directory name for many NBD nodes, but it would be always wrong. Therefore, we have to explicitly make it an error (until NBD has some form of specification for export paths, if it ever will). Signed-off-by: Max

[Qemu-devel] [PATCH v11 16/31] quorum: Make bdrv_dirname() return NULL

2018-10-05 Thread Max Reitz
While the common implementation for bdrv_dirname() should return NULL for quorum BDSs already (because they do not have a file node and their exact_filename field should be empty), there is no reason not to make that explicit. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by:

[Qemu-devel] [PATCH v11 14/31] block: Add bdrv_dirname()

2018-10-05 Thread Max Reitz
This function may be implemented by block drivers to derive a directory name from a BDS. Concatenating this g_free()-able string with a relative filename must result in a valid (not necessarily existing) filename, so this is a function that should generally be not implemented by format drivers,

[Qemu-devel] [PATCH v11 19/31] block: Use bdrv_dirname() for relative filenames

2018-10-05 Thread Max Reitz
bdrv_get_full_backing_filename_from_filename() breaks down when it comes to JSON filenames. Using bdrv_dirname() as the basis is better because since we have BDS, we can descend through the BDS tree to the protocol layer, which gives us a greater probability of finding a non-JSON name; also,

[Qemu-devel] [PATCH v11 15/31] blkverify: Make bdrv_dirname() return NULL

2018-10-05 Thread Max Reitz
blkverify's BDSs have a file BDS, but we do not want this to be preferred over the raw node. There is no way to decide between the two (and not really a reason to, either), so just return NULL in blkverify's implementation of bdrv_dirname(). Signed-off-by: Max Reitz Reviewed-by: Eric Blake

[Qemu-devel] [PATCH v11 06/31] iotests.py: Add filter_imgfmt()

2018-10-05 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- tests/qemu-iotests/iotests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 4e67fbbe96..5c45788dac 100644 ---

[Qemu-devel] [PATCH v11 11/31] block: bdrv_get_full_backing_filename's ret. val.

2018-10-05 Thread Max Reitz
Make bdrv_get_full_backing_filename() return an allocated string instead of placing the result in a caller-provided buffer. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- include/block/block.h | 3 +-- block.c | 48 +++

[Qemu-devel] [PATCH v11 13/31] block: Fix bdrv_find_backing_image()

2018-10-05 Thread Max Reitz
bdrv_find_backing_image() should use bdrv_get_full_backing_filename() or bdrv_make_absolute_filename() instead of trying to do what those functions do by itself. path_combine_deprecated() can now be dropped, so let's do that. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block.c |

[Qemu-devel] [PATCH v11 10/31] block: bdrv_get_full_backing_filename_from_...'s ret. val.

2018-10-05 Thread Max Reitz
Make bdrv_get_full_backing_filename_from_filename() return an allocated string instead of placing the result in a caller-provided buffer. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- include/block/block.h | 7 +++--- block.c | 53

[Qemu-devel] [PATCH v11 04/31] block: Add BDS.auto_backing_file

2018-10-05 Thread Max Reitz
If the backing file is overridden, this most probably does change the guest-visible data of a BDS. Therefore, we will need to consider this in bdrv_refresh_filename(). To see whether it has been overridden, we might want to compare bs->backing_file and bs->backing->bs->filename. However,

[Qemu-devel] [PATCH v11 09/31] block: Make path_combine() return the path

2018-10-05 Thread Max Reitz
Besides being safe for arbitrary path lengths, after some follow-up patches all callers will want a freshly allocated buffer anyway. In the meantime, path_combine_deprecated() is added which has the same interface as path_combine() had before this patch. All callers to that function will be

[Qemu-devel] [PATCH v11 12/31] block: Add bdrv_make_absolute_filename()

2018-10-05 Thread Max Reitz
This is a general function for making a filename that is relative to a certain BDS absolute. It calls bdrv_get_full_backing_filename_from_filename() for now, but that will be changed in a follow-up patch. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block.c | 27

[Qemu-devel] [PATCH v11 05/31] block: Respect backing bs in bdrv_refresh_filename

2018-10-05 Thread Max Reitz
Basically, bdrv_refresh_filename() should respect all children of a BlockDriverState. However, generally those children are driver-specific, so this function cannot handle the general case. On the other hand, there are only few drivers which use other children than @file and @backing (that being

[Qemu-devel] [PATCH v11 00/31] block: Fix some filename generation issues

2018-10-05 Thread Max Reitz
Once more, I’ll spare both me and you another iteration of the cover letter, so see here: http://lists.nongnu.org/archive/html/qemu-block/2017-09/msg01030.html (Although this series no longer includes a @base-directory option.) In regards to the last version, the biggest change is that I

[Qemu-devel] [PATCH v11 07/31] iotests.py: Add node_info()

2018-10-05 Thread Max Reitz
This function queries a node; since we cannot do that right now, it executes query-named-block-nodes and returns the matching node's object. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/qemu-iotests/iotests.py

[Qemu-devel] [PATCH v11 01/31] block: Use bdrv_refresh_filename() to pull

2018-10-05 Thread Max Reitz
Before this patch, bdrv_refresh_filename() is used in a pushing manner: Whenever the BDS graph is modified, the parents of the modified edges are supposed to be updated (recursively upwards). However, that is nonviable, considering that we want child changes not to concern parents. Also, in the

[Qemu-devel] [PATCH v11 02/31] block: Use children list in bdrv_refresh_filename

2018-10-05 Thread Max Reitz
bdrv_refresh_filename() should invoke itself recursively on all children, not just on file. With that change, we can remove the manual invocations in blkverify, quorum, commit, mirror, and blklogwrites. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block.c

[Qemu-devel] [PATCH v11 08/31] iotests: Add test for backing file overrides

2018-10-05 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- tests/qemu-iotests/228 | 235 + tests/qemu-iotests/228.out | 84 + tests/qemu-iotests/group | 1 + 3 files changed, 320 insertions(+) create mode 100755 tests/qemu-iotests/228

Re: [Qemu-devel] [PATCH] hw/display/bcm2835_fb: Silence Coverity warning about multiply overflow

2018-10-05 Thread Paolo Bonzini
On 05/10/2018 15:30, Peter Maydell wrote: > Coverity complains (CID 1395628) that the multiply in the calculation > of the framebuffer base is performed as 32x32 but then used in a > context that takes a 64-bit hwaddr. This can't actually ever > overflow the 32-bit result, because of the

Re: [Qemu-devel] [PATCH v1 11/12] hw/arm: versal: Add a model of Xilinx Versal SoC

2018-10-05 Thread Philippe Mathieu-Daudé
On 03/10/2018 17:07, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add a model of Xilinx Versal SoC. > > Signed-off-by: Edgar E. Iglesias > --- > default-configs/aarch64-softmmu.mak | 1 + > hw/arm/Makefile.objs| 1 + > hw/arm/xlnx-versal.c| 339

Re: [Qemu-devel] [PATCH v1 06/12] net: cadence_gem: Add support for selecting the DMA MemoryRegion

2018-10-05 Thread Philippe Mathieu-Daudé
Hi Edgar, On 03/10/2018 17:07, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add support for selecting the Memory Region that the GEM > will do DMA to. > > Signed-off-by: Edgar E. Iglesias > --- > hw/net/cadence_gem.c | 63 > >

Re: [Qemu-devel] [PATCH v1 07/12] net: cadence_gem: Implement support for 64bit descriptor addresses

2018-10-05 Thread Alistair
On 10/03/2018 08:07 AM, Edgar E. Iglesias wrote: From: "Edgar E. Iglesias" Implement support for 64bit descriptor addresses. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis Alistair --- hw/net/cadence_gem.c | 47 +++ 1 file

Re: [Qemu-devel] [PATCH v1 03/12] net: cadence_gem: Use uint32_t for 32bit descriptor words

2018-10-05 Thread Philippe Mathieu-Daudé
On 03/10/2018 17:07, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Use uint32_t instead of unsigned to describe 32bit descriptor words. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Philippe Mathieu-Daudé > --- > hw/net/cadence_gem.c | 42

Re: [Qemu-devel] [PATCH v1 04/12] net: cadence_gem: Add macro with max number of descriptor words

2018-10-05 Thread Philippe Mathieu-Daudé
On 03/10/2018 17:07, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add macro with max number of DMA descriptor words. > No functional change. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Philippe Mathieu-Daudé > --- > hw/net/cadence_gem.c | 4 ++-- >

Re: [Qemu-devel] [PATCH v1 06/12] net: cadence_gem: Add support for selecting the DMA MemoryRegion

2018-10-05 Thread Alistair
On 10/03/2018 08:07 AM, Edgar E. Iglesias wrote: From: "Edgar E. Iglesias" Add support for selecting the Memory Region that the GEM will do DMA to. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis Alistair --- hw/net/cadence_gem.c | 63

Re: [Qemu-devel] [PATCH v2] vhost-user: define conventions for vhost-user backends

2018-10-05 Thread Marc-André Lureau
Hi On Fri, Oct 5, 2018 at 7:59 PM Hoffmann, Gerd wrote: > > Hi, > > > For example, "virgl" support may not be implemented. This > > --print-capabilities is a simple way to check what the backend > > implements. > > What is the expected behavior in case virgl is implemented by the > backend,

[Qemu-devel] [PATCH v3 0/4] per-TLB lock

2018-10-05 Thread Emilio G. Cota
v2: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg00617.html Changes since v2: - Add R-b's - Include "qemu/thread.h" from cpu-defs.h to fix the build error reported by Alex. - Eliminate (on average) the performance slowdown. This is achieved by: + Switching from a mutex to a

[Qemu-devel] [PATCH v3 4/4] cputlb: read CPUTLBEntry.addr_write atomically

2018-10-05 Thread Emilio G. Cota
Updates can come from other threads, so readers that do not take tlb_lock must use atomic_read to avoid undefined behaviour (UB). This and the previous commit result on average in no performance loss, as the following experiments (run on an Intel i7-6700K CPU @ 4.00GHz) show. 1. aarch64

[Qemu-devel] [PATCH v3 1/4] exec: introduce tlb_init

2018-10-05 Thread Emilio G. Cota
Paves the way for the addition of a per-TLB lock. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/exec/exec-all.h | 8 accel/tcg/cputlb.c | 4 exec.c | 1 + 3 files changed, 13 insertions(+) diff --git a/include/exec/exec-all.h

[Qemu-devel] [PATCH v3 2/4] cputlb: fix assert_cpu_is_self macro

2018-10-05 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/cputlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 502eea2850..f6b388c961 100644 --- a/accel/tcg/cputlb.c +++

[Qemu-devel] [PATCH v3 3/4] cputlb: serialize tlb updates with env->tlb_lock

2018-10-05 Thread Emilio G. Cota
Currently we rely on atomic operations for cross-CPU invalidations. There are two cases that these atomics miss: cross-CPU invalidations can race with either (1) vCPU threads flushing their TLB, which happens via memset, or (2) vCPUs calling tlb_reset_dirty on their TLB, which updates .addr_write

Re: [Qemu-devel] [PATCH] scripts/device-crash-test: Remove devices that are not user_creatable anymore

2018-10-05 Thread Eduardo Habkost
On Fri, Oct 05, 2018 at 10:44:27AM +0200, Thomas Huth wrote: > Devices that are derived from TYPE_SYS_BUS_DEVICE are not user_creatable > anymore by default, and some others have been marked as non-user_creatable > manually, so we can remove these devices from the "ignore"-list in the >

Re: [Qemu-devel] [PATCH] accel: Improve selection of the default accelerator

2018-10-05 Thread Paolo Bonzini
On 05/10/2018 16:22, Peter Maydell wrote: > On 5 October 2018 at 15:13, Thomas Huth wrote: >> When compiling with "--disable-tcg", we currently still use "tcg" >> as default accelerator. "kvm" should be used in this case instead. > > This part is non-controversial and makes good sense. Though

Re: [Qemu-devel] [PATCH] accel: Improve selection of the default accelerator

2018-10-05 Thread Paolo Bonzini
On 05/10/2018 16:30, Cornelia Huck wrote: >> +} >> } >> >> accel_list = g_strsplit(accel, ":", 0); > ISTR that we had a suggestion last time that we should provide > qemu-kvm, qemu-tcg, etc. binaries... Not qemu-tcg, as that would be qemu-system-*, but yes that was my

Re: [Qemu-devel] [PATCH v3 1/3] qapi: add x-debug-query-block-graph

2018-10-05 Thread Max Reitz
On 02.10.18 15:01, Vladimir Sementsov-Ogievskiy wrote: > 28.09.2018 19:31, Max Reitz wrote: >> On 23.08.18 17:46, Vladimir Sementsov-Ogievskiy wrote: >>> Add a new command, returning block nodes (and their users) graph. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievskiy >>> --- >>>  

Re: [Qemu-devel] [PATCH v2 15/15] arm/xlnx-zynqmp: put APUs and RPUs in separate GDB groups

2018-10-05 Thread Eduardo Habkost
On Fri, Oct 05, 2018 at 03:50:01PM +0200, Philippe Mathieu-Daudé wrote: > On 04/10/2018 23:53, Eduardo Habkost wrote: > > On Thu, Oct 04, 2018 at 09:01:09PM +0100, Peter Maydell wrote: > >> On 4 October 2018 at 20:52, Eduardo Habkost wrote: > >>> Changing the object hierarchy based on GDB groups

Re: [Qemu-devel] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook

2018-10-05 Thread Vladimir Sementsov-Ogievskiy
Thank you, hope that's fixed now) On 10/05/2018 07:47 PM, Eric Blake wrote: > On 10/5/18 11:40 AM, Vladimir Sementsov-Ogievskiy wrote: >> 05.10.2018 18:52, Kevin Wolf wrote: >>> Hi Vladimir, >>> >>> can you please check your mailer settings? The plain text version of the >>> emails is hardly

Re: [Qemu-devel] [PATCH 03/10] qemu-iotests: make 218 executable

2018-10-05 Thread Eric Blake
On 10/5/18 1:02 PM, Eric Blake wrote: On 10/5/18 12:49 PM, Cleber Rosa wrote: We could add a git pre-commit hook grep'ing for "^#!\ *(/usr/bin/env|/bin/(b?a)?sh)" in the 1st line and then checking the file perms. Good idea.  Probably better to send that as a different patch, right? Yes,

[Qemu-devel] [PULL 7/8] softfloat: Specialize udiv_qrnnd for s390x

2018-10-05 Thread Richard Henderson
The ISA has a 128/64-bit division instruction. Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- include/fpu/softfloat-macros.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/fpu/softfloat-macros.h b/include/fpu/softfloat-macros.h index

[Qemu-devel] [PULL 4/8] softfloat: Replace countLeadingZeros32/64 with clz32/64

2018-10-05 Thread Richard Henderson
From: Thomas Huth Our minimum required compiler for compiling QEMU is GCC 4.1 these days, so we can drop the support for compilers which do not provide the __builtin_clz*() functions yet. Since the countLeadingZeros32/64 are then identical to the clz32/64 functions, and we do not have to sync

[Qemu-devel] [PATCH v3 13/15] target/arm: Rewrite vector gather stores

2018-10-05 Thread Richard Henderson
This fixes the endianness problem for softmmu, and moves the main loop out of a macro and into an inlined function. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 52 ++ target/arm/sve_helper.c| 139

Re: [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-10-05 Thread Kevin Wolf
Am 05.10.2018 um 18:54 hat Peter Maydell geschrieben: > On 5 October 2018 at 17:17, Kevin Wolf wrote: > > Am 05.10.2018 um 16:41 hat Peter Maydell geschrieben: > >> On 5 October 2018 at 15:38, Peter Maydell wrote: > >> > The test-bdrv-drain test fails at least 50% of the time > >> > on my OS

[Qemu-devel] [PATCH v3 12/15] target/arm: Rewrite vector gather loads

2018-10-05 Thread Richard Henderson
This fixes the endianness problem for softmmu, and moves the main loop out of a macro and into an inlined function. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 84 + target/arm/sve_helper.c| 225

[Qemu-devel] [PULL 5/8] softfloat: Fix division

2018-10-05 Thread Richard Henderson
The __udiv_qrnnd primitive that we nicked from gmp requires its inputs to be normalized. We were not doing that. Because the inputs are nearly normalized already, finishing that is trivial. Replace div128to64 with a "proper" udiv_qrnnd, so that this remains a reusable primitive. Fixes:

Re: [Qemu-devel] [PATCH 03/10] qemu-iotests: make 218 executable

2018-10-05 Thread Eric Blake
On 10/5/18 12:49 PM, Cleber Rosa wrote: We could add a git pre-commit hook grep'ing for "^#!\ *(/usr/bin/env|/bin/(b?a)?sh)" in the 1st line and then checking the file perms. Good idea. Probably better to send that as a different patch, right? Yes, separate patch. For that matter, "^#!/"

[Qemu-devel] [PATCH v3 11/15] target/arm: Split contiguous stores for endianness

2018-10-05 Thread Richard Henderson
We can choose the endianness at translation time, rather than re-computing it at execution time. Tested-by: Laurent Desnogues Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 48 + target/arm/sve_helper.c| 11

[Qemu-devel] [PATCH v3 15/15] target/arm: Pass TCGMemOpIdx to sve memory helpers

2018-10-05 Thread Richard Henderson
There is quite a lot of code required to compute cpu_mem_index, or even put together the full TCGMemOpIdx. This can easily be done at translation time. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/internals.h | 5 ++

[Qemu-devel] [PULL 6/8] softfloat: Specialize udiv_qrnnd for x86_64

2018-10-05 Thread Richard Henderson
The ISA has a 128/64-bit division instruction. Tested-by: Emilio G. Cota Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/fpu/softfloat-macros.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/fpu/softfloat-macros.h

[Qemu-devel] [PATCH v3 10/15] target/arm: Split contiguous loads for endianness

2018-10-05 Thread Richard Henderson
We can choose the endianness at translation time, rather than re-computing it at execution time. Tested-by: Laurent Desnogues Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 117 +++--- target/arm/sve_helper.c| 70

[Qemu-devel] [PULL 3/8] tests/fp/fp-test: add floating point tests

2018-10-05 Thread Richard Henderson
From: "Emilio G. Cota" By leveraging berkeley's softfloat and testfloat. With this we get decent coverage of softfloat.c: $ ./fp-test -r even:67.22% coverage $ ./fp-test -r all: 73.11% coverage Note that we do not yet test parts of softfloat.c that aren't in the original softfloat

[Qemu-devel] [PULL 1/8] softfloat: remove float64_trunc_to_int

2018-10-05 Thread Richard Henderson
From: "Emilio G. Cota" It has not had users since f83311e476 ("target-m68k: use floatx80 internally", 2017-06-21). Note that no other bit-width has floatX_trunc_to_int. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/fpu/softfloat.h | 1 -

[Qemu-devel] [PATCH v3 07/15] target/arm: Rewrite helper_sve_ld1*_r using pages

2018-10-05 Thread Richard Henderson
Uses tlb_vaddr_to_host for correct operation with softmmu. Optimize for accesses within a single page or pair of pages. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sve_helper.c | 731 +++- 1 file changed, 569 insertions(+), 162

[Qemu-devel] [PULL 8/8] softfloat: Specialize udiv_qrnnd for ppc64

2018-10-05 Thread Richard Henderson
The ISA has a 128/64-bit division instruction, though it assumes the low 64-bits of the numerator are 0, and so requires a bit more fixup than a full 128-bit division insn. Reviewed-by: David Gibson Signed-off-by: Richard Henderson --- include/fpu/softfloat-macros.h | 16 1

[Qemu-devel] [PULL 0/8] softfloat queue

2018-10-05 Thread Richard Henderson
The following changes since commit ae7a4c0a4604bcfed40170db6cca576c44d872a2: Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20181004' into staging (2018-10-05 16:05:06 +0100) are available in the Git repository at: https://github.com/rth7680/qemu.git tags/pull-fpu-20181005

[Qemu-devel] [PATCH v3 05/15] target/arm: Adjust aarch64_cpu_dump_state for system mode SVE

2018-10-05 Thread Richard Henderson
Use the existing helpers to determine if (1) the fpu is enabled, (2) sve state is enabled, and (3) the current sve vector length. Tested-by: Laurent Desnogues Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 4 target/arm/helper.c| 6

[Qemu-devel] [PATCH v3 08/15] target/arm: Rewrite helper_sve_ld[234]*_r

2018-10-05 Thread Richard Henderson
Use the same *_tlb primitives as we use for ld1. For linux-user, this hoists the set of helper_retaddr. For softmmu, hoists the computation of the current mmu_idx outside the loop, fixes the endianness problem, and moves the main loop out of a macro and into an inlined function. Reviewed-by:

[Qemu-devel] [PULL 2/8] gitmodules: add berkeley's softfloat + testfloat version 3

2018-10-05 Thread Richard Henderson
From: "Emilio G. Cota" These are BSD-licensed so we can add them as submodules. Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- .gitmodules | 6 ++ tests/fp/berkeley-softfloat-3 | 1 + tests/fp/berkeley-testfloat-3 | 1 + 3 files changed, 8

[Qemu-devel] [PATCH v3 14/15] target/arm: Rewrite vector gather first-fault loads

2018-10-05 Thread Richard Henderson
This implements the feature for softmmu, and moves the main loop out of a macro and into a function. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 84 --- target/arm/sve_helper.c| 290

[Qemu-devel] [PATCH v3 04/15] target/arm: Handle SVE vector length changes in system mode

2018-10-05 Thread Richard Henderson
SVE vector length can change when changing EL, or when writing to one of the ZCR_ELn registers. For correctness, our implementation requires that predicate bits that are inaccessible are never set. Which means noticing length changes and zeroing the appropriate register bits. Tested-by: Laurent

Re: [Qemu-devel] [PATCH 03/10] qemu-iotests: make 218 executable

2018-10-05 Thread Cleber Rosa
On 10/5/18 9:36 AM, Philippe Mathieu-Daudé wrote: > On 04/10/2018 18:18, Cleber Rosa wrote: >> Commit 990dc39c made all tests executable at the time, but 218 came in >> later, and missing those permissions. >> >> Signed-off-by: Cleber Rosa >> --- >> tests/qemu-iotests/218 | 0 >> 1 file

[Qemu-devel] [PATCH v3 09/15] target/arm: Rewrite helper_sve_st[1234]*_r

2018-10-05 Thread Richard Henderson
This fixes the endianness problem for softmmu, and moves the main loop out of a macro and into an inlined function. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/sve_helper.c | 351 1 file

[Qemu-devel] [PATCH v3 03/15] target/arm: Pass in current_el to fp and sve_exception_el

2018-10-05 Thread Richard Henderson
We are going to want to determine whether sve is enabled for EL other than current. Tested-by: Laurent Desnogues Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git

[Qemu-devel] [PATCH v3 00/15] target/arm: sve system mode patches

2018-10-05 Thread Richard Henderson
For v3, the only change is to patch 4, which is also the only patch without a reviewed-by tag. I now check for aa64 state before checking for sve length, and added a comment about why it is important to play with sve when transitioning into aa32 state. r~ Richard Henderson (15): target/arm:

[Qemu-devel] [PATCH v3 06/15] target/arm: Clear unused predicate bits for LD1RQ

2018-10-05 Thread Richard Henderson
The 16-byte load only uses 16 predicate bits. But while reusing the other load infrastructure, we find other bits that are set and trigger an assert. To avoid this and retain the assert, zero-extend the predicate that we pass to the LD1 helper. Tested-by: Laurent Desnogues Reported-by: Laurent

[Qemu-devel] [PATCH v3 01/15] target/arm: Define ID_AA64ZFR0_EL1

2018-10-05 Thread Richard Henderson
Given that the only field defined for this new register may only be 0, we don't actually need to change anything except the name. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/helper.c | 3 ++- 1 file changed, 2 insertions(+), 1

[Qemu-devel] [PATCH v3 02/15] target/arm: Adjust sve_exception_el

2018-10-05 Thread Richard Henderson
Check for EL3 before testing CPTR_EL3.EZ. Return 0 when the exception should be routed via AdvSIMDFPAccessTrap. Mirror the structure of CheckSVEEnabled more closely. Fixes: 5be5e8eda78 Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson ---

Re: [Qemu-devel] [PULL 0/1] qemu-openbios.for-upstream queue 20181005

2018-10-05 Thread Peter Maydell
the git repository at: > > git://github.com/mcayland/qemu.git tags/qemu-openbios.for-upstream-20181005 > > for you to fetch changes up to 422d33b8c847fe1264099f93ec8ddb2e56772d4d: > > Update OpenBIOS images to 441a84d3 built from subm

Re: [Qemu-devel] [PATCH 6/7] Acceptance Tests: add variants definition for architectures

2018-10-05 Thread Cleber Rosa
On 10/5/18 1:30 PM, Philippe Mathieu-Daudé wrote: > On 05/10/2018 19:07, Cleber Rosa wrote: >> On 10/5/18 12:32 PM, Eric Blake wrote: >>> On 10/5/18 11:24 AM, Philippe Mathieu-Daudé wrote: Hi Cleber, On 04/10/2018 17:14, Cleber Rosa wrote: > One of the Avocado features

Re: [Qemu-devel] [PATCH 6/7] Acceptance Tests: add variants definition for architectures

2018-10-05 Thread Philippe Mathieu-Daudé
On 05/10/2018 19:07, Cleber Rosa wrote: > On 10/5/18 12:32 PM, Eric Blake wrote: >> On 10/5/18 11:24 AM, Philippe Mathieu-Daudé wrote: >>> Hi Cleber, >>> >>> On 04/10/2018 17:14, Cleber Rosa wrote: One of the Avocado features relevant to virtualization testing is the ability to reuse

Re: [Qemu-devel] [PATCH v2 6/7] target/mips: Add opcodes for nanoMIPS EVA instructions

2018-10-05 Thread Philippe Mathieu-Daudé
On 05/10/2018 17:19, Aleksandar Markovic wrote: > From: Dimitrije Nikolic > > Add opcodes for nanoMIPS EVA instructions: CACHEE, LBE, LBUE, LHE, > LHUE, LLE, LLWPE, LWE, PREFE, SBE, SCE, SCWPE, SHE, SWE. B.44 of "nanoMIPS32 Instruction Set Technical Reference Manual" > Signed-off-by:

Re: [Qemu-devel] [PATCH v2 7/7] target/mips: Implement emulation of nanoMIPS EVA instructions

2018-10-05 Thread Philippe Mathieu-Daudé
Hi Aleksandar, On 05/10/2018 17:19, Aleksandar Markovic wrote: > From: Dimitrije Nikolic > > Implement emulation of nanoMIPS EVA instructions. They are all > part of P.LS.E0 instruction pool, or one of its subpools. > Shouldn't this be signed off by Dimitrije Nikolic too? > Signed-off-by:

Re: [Qemu-devel] [PATCH 6/7] Acceptance Tests: add variants definition for architectures

2018-10-05 Thread Cleber Rosa
On 10/5/18 12:32 PM, Eric Blake wrote: > On 10/5/18 11:24 AM, Philippe Mathieu-Daudé wrote: >> Hi Cleber, >> >> On 04/10/2018 17:14, Cleber Rosa wrote: >>> One of the Avocado features relevant to virtualization testing is the >>> ability to reuse tests in different scenarios, known as variants.

Re: [Qemu-devel] [PATCH 1/2] display: add separate config option for bochs-display

2018-10-05 Thread Alistair
On 10/05/2018 09:48 AM, Gerd Hoffmann wrote: On Fri, Oct 05, 2018 at 09:22:29AM -0700, Alistair Francis wrote: On Fri, Oct 5, 2018 at 9:13 AM Gerd Hoffmann wrote: This allows modern architectures which don't care about vga compatibility (risc-v for example) build bochs-display without

Re: [Qemu-devel] [PATCH 1/2] display: add separate config option for bochs-display

2018-10-05 Thread Gerd Hoffmann
On Fri, Oct 05, 2018 at 09:22:29AM -0700, Alistair Francis wrote: > On Fri, Oct 5, 2018 at 9:13 AM Gerd Hoffmann wrote: > > > > This allows modern architectures which don't care about vga > > compatibility (risc-v for example) build bochs-display without > > including all vga emulation too. > >

Re: [Qemu-devel] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook

2018-10-05 Thread Eric Blake
On 10/5/18 11:40 AM, Vladimir Sementsov-Ogievskiy wrote: 05.10.2018 18:52, Kevin Wolf wrote: Hi Vladimir, can you please check your mailer settings? The plain text version of the emails is hardly legible because it mixes quotes text and replies. I had to manually open the HTML part to figure

Re: [Qemu-devel] [PULL 00/15] s390x updates

2018-10-05 Thread Peter Maydell
On 4 October 2018 at 16:28, Cornelia Huck wrote: > The following changes since commit dafd95053611aa14dda40266857608d12ddce658: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2018-10-02 18:27:18 +0100) > > are available in the Git repository at: > >

Re: [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-10-05 Thread Peter Maydell
On 5 October 2018 at 17:17, Kevin Wolf wrote: > Am 05.10.2018 um 16:41 hat Peter Maydell geschrieben: >> On 5 October 2018 at 15:38, Peter Maydell wrote: >> > The test-bdrv-drain test fails at least 50% of the time >> > on my OS build system. Disable the test until we can figure >> >> This is a

Re: [Qemu-devel] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook

2018-10-05 Thread Vladimir Sementsov-Ogievskiy
05.10.2018 18:52, Kevin Wolf wrote: > Hi Vladimir, > > can you please check your mailer settings? The plain text version of the > emails is hardly legible because it mixes quotes text and replies. I > had to manually open the HTML part to figure out what you really wrote. I've sent it from other

Re: [Qemu-devel] [PATCH] tests: remove gcov-files- variables

2018-10-05 Thread Philippe Mathieu-Daudé
On 05/10/2018 18:17, Paolo Bonzini wrote: > Commit 31d2dda ("build-system: remove per-test GCOV reporting", 2018-06-20) > removed users of the variables, since those uses can be replaced by a simple > overall report produced by gcovr. However, the variables were never removed. > Do it now. > >

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Set a category for the generic-loader device

2018-10-05 Thread Peter Maydell
On 5 October 2018 at 10:42, Thomas Huth wrote: > Each device that is instantiatable by the users should be marked with > a category. Presumably we could assert() this somewhere (at which point we'd find that we have dozens of devices that fail to set a category bit, I imagine) ? thanks -- PMM

Re: [Qemu-devel] [PATCH 6/7] Acceptance Tests: add variants definition for architectures

2018-10-05 Thread Eric Blake
On 10/5/18 11:24 AM, Philippe Mathieu-Daudé wrote: Hi Cleber, On 04/10/2018 17:14, Cleber Rosa wrote: One of the Avocado features relevant to virtualization testing is the ability to reuse tests in different scenarios, known as variants. This adds a JSON based variants file, that can be used

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Set a category for the generic-loader device

2018-10-05 Thread Alistair Francis
On Fri, Oct 5, 2018 at 2:52 AM Thomas Huth wrote: > > Each device that is instantiatable by the users should be marked with > a category. Since the generic-loader does not fit anywhere else, put > it into the MISC category. > > Signed-off-by: Thomas Huth Reviewed-by: Alistair Francis Alistair

Re: [Qemu-devel] [PATCH v2 2/2] hw/core/generic-loader: Compile only once, not for each target

2018-10-05 Thread Alistair Francis
On Fri, Oct 5, 2018 at 6:05 AM Thomas Huth wrote: > > The generic-loader is currently compiled target specific due to one > single "#ifdef TARGET_WORDS_BIGENDIAN" in the file. We have already a > function called target_words_bigendian() for this instead, so we can > put the generic-loader into

Re: [Qemu-devel] [PATCH 6/7] Acceptance Tests: add variants definition for architectures

2018-10-05 Thread Philippe Mathieu-Daudé
Hi Cleber, On 04/10/2018 17:14, Cleber Rosa wrote: > One of the Avocado features relevant to virtualization testing is the > ability to reuse tests in different scenarios, known as variants. > This adds a JSON based variants file, that can be used to run most > tests in a number of different

Re: [Qemu-devel] [PATCH 1/2] display: add separate config option for bochs-display

2018-10-05 Thread Alistair Francis
On Fri, Oct 5, 2018 at 9:13 AM Gerd Hoffmann wrote: > > This allows modern architectures which don't care about vga > compatibility (risc-v for example) build bochs-display without > including all vga emulation too. For RISC-V we end up including pci.mak anyway for other things such as NVMe

Re: [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-10-05 Thread Kevin Wolf
Am 05.10.2018 um 16:41 hat Peter Maydell geschrieben: > On 5 October 2018 at 15:38, Peter Maydell wrote: > > The test-bdrv-drain test fails at least 50% of the time > > on my OS build system. Disable the test until we can figure > > This is a typo: I meant "OSX build system". > > > out what's

  1   2   3   >