[Qemu-devel] [PATCH v4 1/8] target/ppc: implement complete set of Vsr* macros

2019-01-29 Thread Mark Cave-Ayland
This prepares us for eliminating the use of direct array access within the VMX instruction implementations. Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson --- target/ppc/internal.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/ppc/internal.h

[Qemu-devel] [PATCH v4 4/8] target/ppc: eliminate use of HI_IDX and LO_IDX macros from int_helper.c

2019-01-29 Thread Mark Cave-Ayland
The original purpose of these macros was to correctly reference the high and low parts of the VSRs regardless of the host endianness. Replace these direct references to high and low parts with the relevant VsrD macro instead, and completely remove the now-unused HI_IDX and LO_IDX macros. Signed-o

[Qemu-devel] [PATCH v4 0/8] target/ppc: remove various endian hacks from int_helper.c

2019-01-29 Thread Mark Cave-Ayland
>From working on the TCG vector operations patchset, it is apparent that there are a large number of endian-based hacks in int_helper.c which can be removed by making use of the various Vsr* macros. Patch 1 is simple enough, and implements the complete set of Vsr* macros for both big endian and li

[Qemu-devel] [PATCH v4 2/8] target/ppc: rework vmrg{l, h}{b, h, w} instructions to use Vsr* macros

2019-01-29 Thread Mark Cave-Ayland
The current implementations make use of the endian-specific macros MRGLO/MRGHI and also reference HI_IDX and LO_IDX directly to calculate array offsets. Rework the implementation to use the Vsr* macros so that these per-endian references can be removed. Signed-off-by: Mark Cave-Ayland --- targe

[Qemu-devel] [PATCH v4 5/8] target/ppc: eliminate use of EL_IDX macros from int_helper.c

2019-01-29 Thread Mark Cave-Ayland
These macros can be eliminated by instead using the relavant Vsr* macros in the few locations where they appear. Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson --- target/ppc/int_helper.c | 66 - 1 file changed, 27 insertions(+), 3

[Qemu-devel] [PATCH v4 6/8] target/ppc: simplify VEXT_SIGNED macro in int_helper.c

2019-01-29 Thread Mark Cave-Ayland
As pointed out by Richard: it does not need the mask argument, nor does it need the recast argument. The masking is implied by the cast argument, and the recast is implied by the assignment. Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson --- target/ppc/int_helper.c | 14 +++-

[Qemu-devel] [PATCH v4 3/8] target/ppc: rework vmul{e, o}{s, u}{b, h, w} instructions to use Vsr* macros

2019-01-29 Thread Mark Cave-Ayland
The current implementations make use of the endian-specific macros HI_IDX and LO_IDX directly to calculate array offsets. Rework the implementation to use the Vsr* macros so that these per-endian references can be removed. Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson --- targ

[Qemu-devel] [PATCH v4 8/8] target/ppc: remove various HOST_WORDS_BIGENDIAN hacks in int_helper.c

2019-01-29 Thread Mark Cave-Ayland
Following on from the previous work, there are numerous endian-related hacks in int_helper.c that can now be replaced with Vsr* macros. There are also a few places where the VECTOR_FOR_INORDER_I macro can be replaced with a normal iterator since the processing order is irrelevant. Signed-off-by:

[Qemu-devel] [PATCH v4 7/8] target/ppc: remove ROTRu32 and ROTRu64 macros from int_helper.c

2019-01-29 Thread Mark Cave-Ayland
Richard points out that these macros suffer from a -fsanitize=shift bug in that they improperly handle n == 0 turning it into a shift by 32/64 respectively. Replace them with QEMU's existing ror32() and ror64() functions instead. Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson ---

Re: [Qemu-devel] [PATCH v5 00/35] target/riscv: Convert to decodetree

2019-01-29 Thread Palmer Dabbelt
On Sat, 26 Jan 2019 00:51:23 PST (-0800), Bastian Koppelmann wrote: On 1/26/19 12:54 AM, Palmer Dabbelt wrote: On Tue, 22 Jan 2019 13:38:52 PST (-0800), richard.hender...@linaro.org wrote: On 1/22/19 1:28 AM, Bastian Koppelmann wrote: Hi, this patchset converts the RISC-V decoder to decodetre

Re: [Qemu-devel] [PATCH] tests/tcg/multiarch/linux-test: Fix error check for shmat

2019-01-29 Thread Emilio G. Cota
On Sun, Jul 08, 2018 at 18:49:53 -0700, Richard Henderson wrote: > The error indicator for this syscall is -1, not 0. > > Signed-off-by: Richard Henderson Reviewed-by: Emilio G. Cota E.

Re: [Qemu-devel] [PATCH v2 2/5] vfio-ccw: concurrent I/O handling

2019-01-29 Thread Halil Pasic
On Tue, 29 Jan 2019 10:58:40 +0100 Cornelia Huck wrote: > > > > The problem I see with the let the hardware sort it out is that, for > > > > that to work, we need to juggle multiple translations simultaneously > > > > (or am I wrong?). Doing that does not appear particularly simple to > > > > me.

Re: [Qemu-devel] [PATCH] target/riscv: fix counter-enable checks in ctr()

2019-01-29 Thread Palmer Dabbelt
On Sat, 26 Jan 2019 15:02:56 PST (-0800), xi.w...@gmail.com wrote: Access to a counter in U-mode is permitted only if the corresponding bit is set in both mcounteren and scounteren. The current code ignores mcounteren and checks scounteren only for U-mode access. Signed-off-by: Xi Wang --- ta

Re: [Qemu-devel] [PATCH v8 07/16] gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo

2019-01-29 Thread Max Filippov
On Tue, Jan 29, 2019 at 2:05 AM Peter Maydell wrote: > > Starting with this commit it is no longer possible to kill QEMU > > with the 'kill' command from the gdb. This was a nice feature, > > was this removal intentional, or is it just an implementation > > bug? > > That sounds like a bug. I think

Re: [Qemu-devel] [PATCH v3 1/2] s390x/pci: Introduce unplug requests and split unplug handler

2019-01-29 Thread David Hildenbrand
On 29.01.19 17:54, Pierre Morel wrote: > On 29/01/2019 16:14, David Hildenbrand wrote: >> On 29.01.19 14:31, Pierre Morel wrote: >>> On 21/01/2019 14:42, David Hildenbrand wrote: PCI on s390x is really weird and how it was modeled in QEMU might not have been the right choice. Anyhow, righ

[Qemu-devel] [PATCH] gdbstub: allow killing QEMU via vKill command

2019-01-29 Thread Max Filippov
With multiprocess extensions gdb uses 'vKill' packet instead of 'k' to kill the inferior. Handle 'vKill' the same way 'k' was handled in the presence of single process. Fixes: 7cf48f6752e5 ("gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo") Cc: Luc Michel Signed-off-by:

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

2019-01-29 Thread John Snow
On 12/17/18 5:43 PM, Max Reitz wrote: > Once more, I’ll spare both me and you another iteration of the cover > letter, so I direct you to the previous version’s cover letter (which > will direct you further): > > http://lists.nongnu.org/archive/html/qemu-block/2018-10/msg00229.html > > There a

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-29 Thread Eric Blake
On 1/29/19 4:56 AM, Kevin Wolf wrote: >> gluster copies heavily from file-posix's implementation; should it also >> copy this cache of known-data? Should NBD also cache known-data when >> NBD_CMD_BLOCK_STATUS is available? > > This almost suggests that we should do the caching in generic block >

Re: [Qemu-devel] [PATCH 1/5] nsis: don't install files into /tmp

2019-01-29 Thread Eric Blake
On 1/29/19 5:39 AM, Daniel P. Berrangé wrote: > The nsis installer target has to run 'make install' to populate a > directory tree with content for the package. Replace the current > usage of '/tmp/qemu-nsis' with a location underneath the build > directory. This ensures that when a developer clean

Re: [Qemu-devel] [PATCH 2/5] make: don't insert a '/' after $(DESTDIR)

2019-01-29 Thread Eric Blake
On 1/29/19 5:39 AM, Daniel P. Berrangé wrote: > This breaks when $(prefix) is a relative directory, as it turns it > into an absolute path. > > Signed-off-by: Daniel P. Berrangé > --- > Makefile | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) Yes, it is long-standing pr

Re: [Qemu-devel] [PATCH v5 00/35] target/riscv: Convert to decodetree

2019-01-29 Thread Alistair Francis
On Tue, Jan 29, 2019 at 11:31 AM Palmer Dabbelt wrote: > > On Sat, 26 Jan 2019 00:51:23 PST (-0800), Bastian Koppelmann wrote: > > On 1/26/19 12:54 AM, Palmer Dabbelt wrote: > >> On Tue, 22 Jan 2019 13:38:52 PST (-0800), richard.hender...@linaro.org > >> wrote: > >>> On 1/22/19 1:28 AM, Bastian K

Re: [Qemu-devel] [PATCH 5/9] iotests: Fix 237 for Python 2.x

2019-01-29 Thread John Snow
On 1/23/19 9:46 AM, Max Reitz wrote: > It is not quite clear whether we want to support Python 2.x for any > prolonged time, but this may as well be fixed along with the other > issues some iotests have right now. > I'd have shuffled this above patch 01 (or immediately below) with a note in eit

Re: [Qemu-devel] [PATCH 1/9] iotests: Re-add filename filters

2019-01-29 Thread John Snow
On 1/23/19 9:46 AM, Max Reitz wrote: > A previous commit removed the default filters for qmp_log with the > intention to make them explicit; but this happened only for test 206. > There are more tests (for more exotic image formats than qcow2) which > require the filename filter, though. > > Fi

Re: [Qemu-devel] [PATCH 2/9] iotests: Remove superfluous rm from 232

2019-01-29 Thread John Snow
On 1/23/19 9:46 AM, Max Reitz wrote: > This test creates no such file. > > Signed-off-by: Max Reitz Reviewed-by: John Snow (+1 to Eric's suggestion of reviving Jeff's patches. Maybe I'll take a look once I get my downstream queue under control...) > --- > tests/qemu-iotests/232 | 1 - > 1

Re: [Qemu-devel] [PATCH 3/9] iotests: Fix 232 for LUKS

2019-01-29 Thread John Snow
On 1/23/19 9:46 AM, Max Reitz wrote: > With IMGOPTSSYNTAX, $TEST_IMG is useless for this test (it only tests > the file-posix protocol driver). Therefore, if $TEST_IMG_FILE is set, > use that instead. > > Because this test requires the file protocol, $TEST_IMG_FILE will always > be set if $IMG

Re: [Qemu-devel] [PATCH 4/9] iotests: Fix 207 to use QMP filters for qmp_log

2019-01-29 Thread John Snow
On 1/23/19 9:46 AM, Max Reitz wrote: > Fixes: 08fcd6111e1949f456e1b232ebeeb0cc17019a92 > Signed-off-by: Max Reitz Commit message is a bit barren, feel free to blame me for not realizing that non-qcow2 tests used the feature I was rewriting. I may have chosen to rewrite it differently if I had

Re: [Qemu-devel] [PATCH 1/2] block: enhance QEMUIOVector structure

2019-01-29 Thread Eric Blake
On 1/29/19 8:37 AM, Vladimir Sementsov-Ogievskiy wrote: > Add a possibility of embedded iovec, for cases when we need only one > local iov. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/qemu/iov.h | 41 - > 1 file changed, 40 insertions(+

Re: [Qemu-devel] [PATCH 6/9] iotests.py: Add is_str()

2019-01-29 Thread John Snow
On 1/23/19 9:46 AM, Max Reitz wrote: > Strings can have various representations, this helper function checks > whether a given value is in any of them. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/iotests.py | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/tests/qemu

Re: [Qemu-devel] [PATCH 7/9] iotests.py: Filter filename in any string value

2019-01-29 Thread John Snow
On 1/23/19 9:46 AM, Max Reitz wrote: > filter_qmp_testfiles() currently filters the filename only for specific > keys. However, there are more keys that take filenames (such as > block-commit's @top and @base, or ssh's @path), and it does not make > sense to list them all here. "$TEST_DIR/$PID

Re: [Qemu-devel] [PATCH 8/9] iotests: Filter SSH paths

2019-01-29 Thread John Snow
On 1/23/19 9:46 AM, Max Reitz wrote: > 8908b253c4ad5f8874c8d13abec169c696a5cd32 has implemented filtering of > remote paths for NFS, but forgot SSH. This patch takes care of that. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/common.rc | 1 + > 1 file changed, 1 insertion(+) > > d

Re: [Qemu-devel] [PATCH 2/2] block/io: use qemu_iovec_init_buf

2019-01-29 Thread Eric Blake
On 1/29/19 8:38 AM, Vladimir Sementsov-Ogievskiy wrote: > Use new qemu_iovec_init_buf() instead of > qemu_iovec_init_external( ... , 1), which simplifies the code. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/io.c | 89 -- > 1

Re: [Qemu-devel] [PATCH v2 02/18] configure: Disable W^X on OpenBSD

2019-01-29 Thread Eric Blake
On 1/29/19 11:53 AM, Philippe Mathieu-Daudé wrote: > Since OpenBSD 6.0 [1], W^X is enforced by default [2]. > TCG requires WX access. Disable W^X if it is available. > This fixes: > > configure | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/configure b/configure > index b

Re: [Qemu-devel] [PATCH v2 03/18] tests/vm/openbsd: Disable the W^X protection on the build partition

2019-01-29 Thread Eric Blake
On 1/29/19 11:53 AM, Philippe Mathieu-Daudé wrote: > Since OpenBSD 6.0 [1], W^X is enforced by default [2]. > TCG requires WX access, and QEMU binaries are now built with the WX > flag to disable the protection. However, WX allowed binaries need > to be run on a WX allowed partition. > To be able t

Re: [Qemu-devel] [PATCH v2 05/18] qemu-iotests: Add dependency to qemu-nbd tool

2019-01-29 Thread Eric Blake
On 1/29/19 11:53 AM, Philippe Mathieu-Daudé wrote: > Since a9660664fde, some iotests use qemu-nbd. > Add a dependency to build it before using it. > This fixes: > > $ gmake check-block > CHK version_gen.h > GEN qemu-img-cmds.h > CC qemu-img.o > LINKqemu-img >

Re: [Qemu-devel] [PATCH v2 06/18] qemu-iotests: Improve portability by searching bash in the $PATH

2019-01-29 Thread Eric Blake
On 1/29/19 11:53 AM, Philippe Mathieu-Daudé wrote: > Bash is not always installed as /bin/bash. In particular on OpenBSD, > the package installs it in /usr/local/bin. > Use the 'env' shebang to search bash in the $PATH. > > Patch created mechanically by running: > > $ git grep -lE '#! ?/bin/bas

Re: [Qemu-devel] [PATCH v2 07/18] tests/multiboot: Improve portability by searching bash in the $PATH

2019-01-29 Thread Eric Blake
On 1/29/19 11:53 AM, Philippe Mathieu-Daudé wrote: > Bash is not always installed as /bin/bash. In particular on OpenBSD, > the package installs it in /usr/local/bin. > Use the 'env' shebang to search bash in the $PATH. > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/multiboot/run_test.s

[Qemu-devel] [PATCH] hw/m68k/mcf5208: Support loading of bios images

2019-01-29 Thread Thomas Huth
The MCF5208EVB supports 2 MiB of flash at address 0. Add support for this memory region and some code to load the file that can be specified with the "-bios" command line option. This can be used for example to load U-Boot images for the MCF5208EVB (we still lack some features in the CPU emulation

Re: [Qemu-devel] [RFC PATCH v2 10/18] qemu-iotests: Ensure GNU sed is used

2019-01-29 Thread Eric Blake
On 1/29/19 11:53 AM, Philippe Mathieu-Daudé wrote: > Various sed regexp from common.filter use sed GNU extensions. > Instead of spending time to write these regex to be POSIX compliant, > verify the GNU sed is available and use it. > > Signed-off-by: Philippe Mathieu-Daudé > --- > I think the tes

Re: [Qemu-devel] [PATCH v4 2/8] target/ppc: rework vmrg{l, h}{b, h, w} instructions to use Vsr* macros

2019-01-29 Thread Richard Henderson
On 1/29/19 11:17 AM, Mark Cave-Ayland wrote: > +#define VMRG_DO(name, element, access, ofs) \ > void helper_v##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ > { \ > ppc_avr_t re

Re: [Qemu-devel] [PATCH 5/5 v2] RISC-V: Add hooks to use the gdb xml files.

2019-01-29 Thread Palmer Dabbelt
On Mon, 28 Jan 2019 19:11:58 PST (-0800), Jim Wilson wrote: On Tue, Jan 22, 2019 at 1:52 PM Alistair Francis wrote: You can get env and then check for floating point support: CPURISCVState *env = &cs->env; if (env->misa_mask & RVF) { ... I needed this which wasn't hard to figure out. RIS

Re: [Qemu-devel] [PATCH v2 0/3] Trivial cleanup in hw/acpi

2019-01-29 Thread Wei Yang
On Tue, Jan 29, 2019 at 10:58:50AM -0500, Michael S. Tsirkin wrote: >On Tue, Jan 29, 2019 at 03:32:54PM +, Wei Yang wrote: >> On Tue, Jan 29, 2019 at 09:43:20AM +0100, Laurent Vivier wrote: >> >On 29/01/2019 09:23, Philippe Mathieu-Daudé wrote: >> >> On 1/29/19 9:04 AM, Wei Yang wrote: >> >>> O

[Qemu-devel] [PATCH v3 0/3] Trivial cleanup in hw/acpi

2019-01-29 Thread Wei Yang
There are several functions/variable which are not used anymore. This serials just remove those without functional change. v3: add ack and repost in a new thread v2: change commit log from "is now used in no place" to "in not used anymore" Wei Yang (3): hw/i386/pc.c: remove unused function pc_

[Qemu-devel] [PATCH v3 3/3] hw/acpi: remove unnecessary variable acpi_table_builtin

2019-01-29 Thread Wei Yang
acpi_table_builtin is now always false, it is not necessary to check it again. This patch just removes it. Signed-off-by: Wei Yang Reviewed-by: Philippe Mathieu-Daud茅 Tested-by: Philippe Mathieu-Daud茅 --- hw/acpi/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH v3 1/3] hw/i386/pc.c: remove unused function pc_acpi_init()

2019-01-29 Thread Wei Yang
Function pc_acpi_init() is not used anymore. Remove the definition and declaration. Signed-off-by: Wei Yang Reviewed-by: Philippe Mathieu-Daud茅 Tested-by: Philippe Mathieu-Daud茅 --- hw/i386/pc.c | 27 --- include/hw/i386/pc.h | 1 - 2 files changed, 28 deletio

[Qemu-devel] [PATCH v3 2/3] hw/acpi: remove unused function acpi_table_add_builtin()

2019-01-29 Thread Wei Yang
Function acpi_table_add_builtin() is not used anymore. Remove the definition and declaration. Signed-off-by: Wei Yang Reviewed-by: Philippe Mathieu-Daud茅 Tested-by: Philippe Mathieu-Daud茅 --- hw/acpi/core.c | 6 -- include/hw/acpi/acpi.h | 1 - 2 files changed, 7 deletions(-) dif

[Qemu-devel] [PATCH v6 04/73] cpu: make qemu_work_cond per-cpu

2019-01-29 Thread Emilio G. Cota
This eliminates the need to use the BQL to queue CPU work. While at it, give the per-cpu field a generic name ("cond") since it will soon be used for more than just queueing CPU work. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qom/cpu.h |

[Qemu-devel] [PATCH v6 08/73] tcg-runtime: define helper_cpu_halted_set

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- accel/tcg/tcg-runtime.h | 2 ++ accel/tcg/tcg-runtime.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/accel/tcg/tcg-runtime.h b/accel/tcg/tcg-runtime.h index dfe325625c..46386bb564 100644 --- a/accel/tcg/tcg-runtime.h

[Qemu-devel] [PATCH v6 03/73] cpu: introduce cpu_mutex_lock/unlock

2019-01-29 Thread Emilio G. Cota
The few direct users of &cpu->lock will be converted soon. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 33 +++ cpus.c | 48 +++-- stubs/cpu-lock.c| 28

[Qemu-devel] [PATCH v6 05/73] cpu: move run_on_cpu to cpus-common

2019-01-29 Thread Emilio G. Cota
We don't pass a pointer to qemu_global_mutex anymore. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 10 -- cpus-common.c | 2 +- cpus.c| 5 - 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/include/qom/cpu.h b/i

[Qemu-devel] [PATCH v6 10/73] cris: convert to helper_cpu_halted_set

2019-01-29 Thread Emilio G. Cota
And fix the temp leak along the way. Cc: "Edgar E. Iglesias" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/cris/translate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/cris/translate.c b/target/cris/transla

[Qemu-devel] [PATCH v6 02/73] cpu: rename cpu->work_mutex to cpu->lock

2019-01-29 Thread Emilio G. Cota
This lock will soon protect more fields of the struct. Give it a more appropriate name. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 5 +++-- cpus-common.c | 14 +++--- cpus.c| 4 ++-- qom/cpu.c

[Qemu-devel] [PATCH v6 06/73] cpu: introduce process_queued_cpu_work_locked

2019-01-29 Thread Emilio G. Cota
This completes the conversion to cpu_mutex_lock/unlock in the file. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- cpus-common.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/cpus-common.c b/cpus-common.c index

[Qemu-devel] [PATCH v6 16/73] tcg-runtime: convert to cpu_halted_set

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/tcg-runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c index 4aa038465f..70e3c9de71 100644 --- a/accel/tcg/tcg-runtime

[Qemu-devel] [PATCH v6 01/73] cpu: convert queued work to a QSIMPLEQ

2019-01-29 Thread Emilio G. Cota
Instead of open-coding it. While at it, make sure that all accesses to the list are performed while holding the list's lock. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 6 +++--- cpus-common.c | 25

[Qemu-devel] [PATCH v6 09/73] ppc: convert to helper_cpu_halted_set

2019-01-29 Thread Emilio G. Cota
Cc: David Gibson Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Acked-by: David Gibson Signed-off-by: Emilio G. Cota --- target/ppc/translate.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/transl

[Qemu-devel] [PATCH v6 12/73] m68k: convert to helper_cpu_halted_set

2019-01-29 Thread Emilio G. Cota
Cc: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Laurent Vivier Signed-off-by: Emilio G. Cota --- target/m68k/translate.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index

[Qemu-devel] [PATCH v6 27/73] xtensa: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Max Filippov Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/xtensa/cpu.c| 2 +- target/xtensa/exc_helper.c | 2 +- target/xtensa/helper.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/xtensa/cpu.c

[Qemu-devel] [PATCH v6 11/73] hppa: convert to helper_cpu_halted_set

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/hppa/translate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index ce05d5619d..df9179e70f 100644 --- a/target/hppa/transla

[Qemu-devel] [PATCH v6 24/73] riscv: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Alistair Francis Reviewed-by: Palmer Dabbelt Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/riscv/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/op_helpe

[Qemu-devel] [PATCH v6 13/73] alpha: convert to helper_cpu_halted_set

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/alpha/translate.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 9d8f9b3eea..a75413e9b5 100644 --- a/target/alpha

[Qemu-devel] [PATCH v6 30/73] cpu-exec: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 6c4a33262f..e3d72897e8 100644 --- a/accel/tcg/cpu-exec.c +++ b/ac

[Qemu-devel] [PATCH v6 15/73] cpu: define cpu_halted helpers

2019-01-29 Thread Emilio G. Cota
cpu->halted will soon be protected by cpu->lock. We will use these helpers to ease the transition, since right now cpu->halted has many direct callers. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 24 1 f

[Qemu-devel] [PATCH v6 07/73] cpu: make per-CPU locks an alias of the BQL in TCG rr mode

2019-01-29 Thread Emilio G. Cota
Before we can switch from the BQL to per-CPU locks in the CPU loop, we have to accommodate the fact that TCG rr mode (i.e. !MTTCG) cannot work with separate per-vCPU locks. That would lead to deadlock since we need a single lock/condvar pair on which to wait for events that affect any vCPU, e.g. in

[Qemu-devel] [PATCH v6 20/73] i386: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Eduardo Habkost Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/i386/cpu.h | 2 +- target/i386/cpu.c | 2 +- target/i386/hax-all.c | 4 ++-- target/i386/helper.c | 4 ++-- target/i386/hvf/hvf.c | 8

[Qemu-devel] [PATCH v6 34/73] exec: use cpu_reset_interrupt

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec.c b/exec.c index da3e635f91..21826f0816 100644 --- a/exec.c +++ b/exec.c @@ -777,7 +777,7 @@ static int cpu_common_post_load(

[Qemu-devel] [PATCH v6 14/73] microblaze: convert to helper_cpu_halted_set

2019-01-29 Thread Emilio G. Cota
Cc: "Edgar E. Iglesias" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/microblaze/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 78ca265b04.

[Qemu-devel] [PATCH v6 18/73] ppc: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
In ppce500_spin.c, acquire the lock just once to update both cpu->halted and cpu->stopped. In hw/ppc/spapr_hcall.c, acquire the lock just once to update cpu->halted and call cpu_has_work, since later in the series we'll acquire the BQL (if not already held) from cpu_has_work. Cc: David Gibson Cc

[Qemu-devel] [PATCH v6 25/73] s390x: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Cornelia Huck Cc: Christian Borntraeger Cc: David Hildenbrand Cc: qemu-s3...@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- hw/intc/s390_flic.c| 2 +- target/s390x/cpu.c | 22 +++--- target/s390x/excp_

[Qemu-devel] [PATCH v6 45/73] sh4: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Aurelien Jarno Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/sh4/cpu.c| 2 +- target/sh4/helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index b9f393b7c7..58ea212f53 1

[Qemu-devel] [PATCH v6 22/73] m68k: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/m68k/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index 8d09ed91

[Qemu-devel] [PATCH v6 26/73] sparc: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Fabien Chouteau Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Mark Cave-Ayland Signed-off-by: Emilio G. Cota --- hw/sparc/leon3.c | 2 +- hw/sparc/sun4m.c | 8 hw/sparc64/sparc64.c | 4 ++-- target/spar

[Qemu-devel] [PATCH v6 32/73] cpu: define cpu_interrupt_request helpers

2019-01-29 Thread Emilio G. Cota
Add a comment about how atomic_read works here. The comment refers to a "BQL-less CPU loop", which will materialize toward the end of this series. Note that the modifications to cpu_reset_interrupt are there to avoid deadlock during the CPU lock transition; once that is complete, cpu_interrupt_req

[Qemu-devel] [PATCH v6 46/73] cris: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: "Edgar E. Iglesias" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/cris/cpu.c| 2 +- target/cris/helper.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/cris/cpu.c b/target/cris/cpu.c index a23aba2688.

[Qemu-devel] [PATCH v6 19/73] sh4: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Aurelien Jarno Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/sh4/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index 4f825bae5a..57cc363ccc 100644 --- a/targ

[Qemu-devel] [PATCH v6 21/73] lm32: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Michael Walle Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/lm32/op_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/lm32/op_helper.c b/target/lm32/op_helper.c index 234d55e056..392634441b 100644 ---

[Qemu-devel] [PATCH v6 42/73] i386/whpx-all: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/i386/whpx-all.c | 41 - 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/target/i386/whpx-all.c b/target/i386/whpx-all.c index 9673bdc219..0d8cfa3a19 100644 --- a/target

[Qemu-devel] [PATCH v6 39/73] i386: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/i386/cpu.c| 2 +- target/i386/helper.c | 4 ++-- target/i386/svm_helper.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a37b984b61..35dea8c15

[Qemu-devel] [PATCH v6 23/73] mips: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Aurelien Jarno Cc: Aleksandar Markovic Cc: James Hogan Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- hw/mips/cps.c | 2 +- hw/misc/mips_itu.c | 4 ++-- target/mips/kvm.c | 2 +- target/mips/op_helper.c | 8 target/

[Qemu-devel] [PATCH v6 28/73] gdbstub: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 3129b5c284..91790112a2 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1659,13 +1659,13 @@ static in

[Qemu-devel] [PATCH v6 31/73] cpu: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
This finishes the conversion to cpu_halted. Signed-off-by: Emilio G. Cota --- cpus.c| 8 qom/cpu.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpus.c b/cpus.c index c4fa3cc876..aee129c0b3 100644 --- a/cpus.c +++ b/cpus.c @@ -204,7 +204,7 @@ static bool cpu

[Qemu-devel] [PATCH v6 37/73] openrisc: use cpu_reset_interrupt

2019-01-29 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Stafford Horne Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/openrisc/sys_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[Qemu-devel] [PATCH v6 17/73] arm: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Andrzej Zaborowski Cc: Peter Maydell Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- hw/arm/omap1.c| 4 ++-- hw/arm/pxa2xx_gpio.c | 2 +- hw/arm/pxa2xx_pic.c | 2 +- target/arm/arm-powerctl.c | 4 ++--

[Qemu-devel] [PATCH v6 29/73] openrisc: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Stafford Horne Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/openrisc/sys_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index b66a45c1e0..ab4d8fb520

[Qemu-devel] [PATCH v6 60/73] cpu: convert to interrupt_request

2019-01-29 Thread Emilio G. Cota
This finishes the conversion to interrupt_request. Signed-off-by: Emilio G. Cota --- qom/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qom/cpu.c b/qom/cpu.c index 00add81a7f..f2695be9b2 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -275,7 +275,7 @@ static void cpu_com

[Qemu-devel] [PATCH v6 47/73] hppa: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/hppa/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 00bf444620..1ab4e62850 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu

[Qemu-devel] [PATCH v6 41/73] i386/hax-all: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/i386/hax-all.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c index 518c6ff103..18da1808c6 100644 --- a/target/i386/hax-all.

[Qemu-devel] [PATCH v6 40/73] i386/kvm: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/i386/kvm.c | 54 +++ 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index ca2629f0fe..3f3c670897 100644 --- a/target/i386/kvm

[Qemu-devel] [PATCH v6 49/73] m68k: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier Signed-off-by: Emilio G. Cota --- target/m68k/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 582e3a73b3..99a7eb4340 100644 --- a/target/m68k/cpu.

[Qemu-devel] [PATCH v6 48/73] lm32: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Michael Walle Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/lm32/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/lm32/cpu.c b/target/lm32/cpu.c index b7499cb627..1508bb6199 100644 --- a/target/lm32/cpu.c ++

[Qemu-devel] [PATCH v6 55/73] sparc: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Mark Cave-Ayland Signed-off-by: Emilio G. Cota --- hw/sparc64/sparc64.c | 4 ++-- target/sparc/cpu.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/spar

[Qemu-devel] [PATCH v6 35/73] i386: use cpu_reset_interrupt

2019-01-29 Thread Emilio G. Cota
From: Paolo Bonzini Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/i386/hax-all.c| 4 ++-- target/i386/hvf/x86hvf.c | 8 target/i386/kvm.c| 14 +++--- target/i386/seg_helper.c | 13 +

[Qemu-devel] [PATCH v6 43/73] i386/hvf: convert to cpu_request_interrupt

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/i386/hvf/hvf.c| 8 +--- target/i386/hvf/x86hvf.c | 26 +++--- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index c1ff220985..619a

[Qemu-devel] [PATCH v6 53/73] alpha: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/alpha/cpu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 1fd95d6c0f..cebd459251 100644 --- a/target/alpha/cpu.c +++ b/tar

[Qemu-devel] [PATCH v6 50/73] mips: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Aurelien Jarno Cc: Aleksandar Markovic Cc: James Hogan Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/mips/cpu.c | 7 --- target/mips/kvm.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index e217f

[Qemu-devel] [PATCH v6 59/73] accel/tcg: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 15 --- accel/tcg/tcg-all.c | 12 +--- accel/tcg/translate-all.c | 2 +- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/accel/tcg/cp

[Qemu-devel] [PATCH v6 51/73] nios: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Chris Wulff Cc: Marek Vasut Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/nios2/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c index fbfaa2ce26..49a75414d3 100644 --- a/ta

[Qemu-devel] [PATCH v6 33/73] ppc: use cpu_reset_interrupt

2019-01-29 Thread Emilio G. Cota
From: Paolo Bonzini Cc: David Gibson Cc: qemu-...@nongnu.org Acked-by: David Gibson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/ppc/excp_helper.c | 2 +- 1 file changed, 1

[Qemu-devel] [PATCH v6 56/73] openrisc: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Stafford Horne Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- hw/openrisc/cputimer.c | 2 +- target/openrisc/cpu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/openrisc/cputimer.c b/hw/openrisc/cputimer.c index 850f

[Qemu-devel] [PATCH v6 00/73] per-CPU locks

2019-01-29 Thread Emilio G. Cota
v5: https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg02979.html For context, the goal of this series is to substitute the BQL for the per-CPU locks in many places, notably the execution loop in cpus.c. This leads to better scalability for MTTCG, since CPUs don't have to acquire a contended

[Qemu-devel] [PATCH v6 36/73] s390x: use cpu_reset_interrupt

2019-01-29 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Cornelia Huck Cc: David Hildenbrand Cc: qemu-s3...@nongnu.org Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Reviewed-by: Cornelia Huck Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/s390x/excp_helper.

<    1   2   3   4   >