Re: [Qemu-devel] [RFC PATCH] ati-vga: Implement dummy VBlank IRQ

2019-08-14 Thread Gerd Hoffmann
On Thu, Aug 15, 2019 at 02:25:07AM +0200, BALATON Zoltan wrote: > The MacOS driver exits if the card does not have an interrupt. If we > set PCI_INTERRUPT_PIN to 1 then it enables VBlank interrupts and it > boots but the mouse poniter can not be moved. This patch implements a > dummy VBlank interru

Re: [Qemu-devel] [PATCH 0/3] colo: Add support for continious replication

2019-08-14 Thread Zhang, Chen
Hi Lukas, Please fix this issue and add more comments in the commit log. Thanks Zhang Chen > -Original Message- > From: no-re...@patchew.org [mailto:no-re...@patchew.org] > Sent: Thursday, August 15, 2019 11:20 AM > To: lukasstra...@web.de > Cc: Zhang, Chen ; qemu-devel@nongnu.org > Subj

Re: [Qemu-devel] [PATCH] usb: reword -usb command-line option and mention xHCI

2019-08-14 Thread Gerd Hoffmann
Hi, > > > -Enable the USB driver (if it is not used by default yet). > > > +Enable USB emulation on machine types with an on-board USB host > > > controller (if > > > +not enabled by default). Note that on-board USB host controllers may not > > > +support USB 3.0. In this case -device nec-usb

Re: [Qemu-devel] [PATCH 0/3] colo: Add support for continious replication

2019-08-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1565814686.git.lukasstra...@web.de/ Hi, This series failed build test on s390x host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that ha

Re: [Qemu-devel] [PATCH v2] target/riscv: Hardwire mcounter.TM and upper bits of [m|s]counteren

2019-08-14 Thread Jonathan Behrens
Ping! What is the status of this patch? On Wed, Jul 3, 2019 at 2:02 PM Jonathan Behrens wrote: > Bin, that proposal proved to be somewhat more controversial than I was > expecting, since it was different than how currently available hardware > worked. This option seemed much more likely to be ac

Re: [Qemu-devel] [RFC PATCH v3 00/46] rewrite MMX/SSE/SSE2/SSE3 instruction translation

2019-08-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190815020928.9679-1-jan.bo...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [RFC PATCH v3 00/46] rewrite MMX/SSE/SSE2/SSE3 instruction translation Message-id: 2019081502

Re: [Qemu-devel] [PULL 5/7] file-posix: Support BDRV_REQ_NO_FALLBACK for zero writes

2019-08-14 Thread Eric Blake
On 3/26/19 10:51 AM, Kevin Wolf wrote: > We know that the kernel implements a slow fallback code path for > BLKZEROOUT, so if BDRV_REQ_NO_FALLBACK is given, we shouldn't call it. > The other operations we call in the context of .bdrv_co_pwrite_zeroes > should usually be quick, so no modification sh

[Qemu-devel] [PATCH v1 1/2] accel/tcg: adding integration with linux perf

2019-08-14 Thread vandersonmr
This commit adds support to Linux Perf in order to be able to analyze qemu jitted code and also to able to see the TBs PC in it. Signed-off-by: Vanderson M. do Rosario --- accel/tcg/Makefile.objs | 1 + accel/tcg/perf/Makefile.objs | 1 + accel/tcg/perf/jitdump.c | 180 +

[Qemu-devel] [PATCH v1 0/2] Integrating qemu to Linux Perf

2019-08-14 Thread vandersonmr
This patch is part of Google Summer of Code (GSoC) 2019. More about the project can be found in: https://wiki.qemu.org/Internships/ProjectIdeas/TCGCodeQuality This adds --perf command-line option to dump Linux Perf jitdump files. These files are used to enhant Perf report and to be able to analyz

Re: [Qemu-devel] [PATCH v9 05/11] numa: Extend CLI to provide initiator information for numa nodes

2019-08-14 Thread Dan Williams
On Wed, Aug 14, 2019 at 6:57 PM Tao Xu wrote: > > On 8/15/2019 5:29 AM, Dan Williams wrote: > > On Tue, Aug 13, 2019 at 10:14 PM Tao Xu wrote: > >> > >> On 8/14/2019 10:39 AM, Dan Williams wrote: > >>> On Tue, Aug 13, 2019 at 8:00 AM Igor Mammedov wrote: > > On Fri, 9 Aug 2019 14:57:2

[Qemu-devel] [PATCH v5 09/10] monitor: adding new info cfg command

2019-08-14 Thread vandersonmr
Adding "info cfg id depth" commands to HMP. This command allow the exploration a TB neighbors by dumping [and opening] a .dot file with the TB CFG neighbors colorized by their hotness. The goal of this command is to allow the dynamic exploration of TCG behavior and code quality. Therefore, for now

[Qemu-devel] [PATCH v5 08/10] Adding info [tbs|tb|coverset] commands to HMP. These commands allow the exploration of TBs generated by the TCG. Understand which one hotter, with more guest/host instruc

2019-08-14 Thread vandersonmr
The goal of this command is to allow the dynamic exploration of TCG behavior and code quality. Therefore, for now, a corresponding QMP command is not worthwhile. Signed-off-by: Vanderson M. do Rosario --- accel/tcg/tb-stats.c | 398 ++- accel/tcg/translate

[Qemu-devel] [PATCH v5 00/10] Measure Tiny Code Generation Quality

2019-08-14 Thread vandersonmr
This patch is part of Google Summer of Code (GSoC) 2019. More about the project can be found in: https://wiki.qemu.org/Internships/ProjectIdeas/TCGCodeQuality The goal of this patch is to add infrastructure to collect execution and JIT statistics during the emulation with accel/TCG. The statistics

[Qemu-devel] [PATCH v5 04/10] accel: replacing part of CONFIG_PROFILER with TBStats

2019-08-14 Thread vandersonmr
We add some of the statistics collected in the TCGProfiler into the TBStats, having the statistics not only for the whole emulation but for each TB. Then, we removed these stats from TCGProfiler and reconstruct the information for the "info jit" using the sum of all TBStats statistics. The goal is

[Qemu-devel] [RFC PATCH v3 43/46] target/i386: introduce SSE2 instructions to sse-opcode.inc.h

2019-08-14 Thread Jan Bobek
Add all the SSE2 instruction entries to sse-opcode.inc.h. Signed-off-by: Jan Bobek --- target/i386/sse-opcode.inc.h | 323 ++- 1 file changed, 322 insertions(+), 1 deletion(-) diff --git a/target/i386/sse-opcode.inc.h b/target/i386/sse-opcode.inc.h index 39947aeb

[Qemu-devel] [PATCH v5 02/10] accel: collecting TB execution count

2019-08-14 Thread vandersonmr
If a TB has a TBS (TBStatistics) with the TB_EXEC_STATS enabled, then we instrument the start code of this TB to atomically count the number of times it is executed. We count both the number of "normal" executions and atomic executions of a TB. The execution count of the TB is stored in its respec

[Qemu-devel] [RFC PATCH v3 42/46] target/i386: introduce SSE2 code generators

2019-08-14 Thread Jan Bobek
Introduce code generators required by SSE2 instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 444 +++- 1 file changed, 442 insertions(+), 2 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index 177bedd0ef..7ec082

[Qemu-devel] [RFC PATCH v3 44/46] target/i386: introduce SSE3 translators

2019-08-14 Thread Jan Bobek
Use the translator macros to define translators required by SSE3 instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index 7ec082e79d..c72138014a 100644 --- a/target/i386/translat

[Qemu-devel] [RFC PATCH v3 38/46] target/i386: introduce SSE translators

2019-08-14 Thread Jan Bobek
Use the translator macros to define translators required by SSE instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 29 + 1 file changed, 29 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index a02e9cd0d2..ef64fe606f 100

[Qemu-devel] [RFC PATCH v3 40/46] target/i386: introduce SSE instructions to sse-opcode.inc.h

2019-08-14 Thread Jan Bobek
Add all the SSE instruction entries to sse-opcode.inc.h. Signed-off-by: Jan Bobek --- target/i386/sse-opcode.inc.h | 158 +++ 1 file changed, 158 insertions(+) diff --git a/target/i386/sse-opcode.inc.h b/target/i386/sse-opcode.inc.h index 36963e5a7c..39947aeb51 1

[Qemu-devel] [RFC PATCH v3 41/46] target/i386: introduce SSE2 translators

2019-08-14 Thread Jan Bobek
Use the translator macros to define translators required by SSE2 instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 33 + 1 file changed, 33 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index 3d526ee470..177bedd0e

[Qemu-devel] [RFC PATCH v3 37/46] target/i386: introduce MMX instructions to sse-opcode.inc.h

2019-08-14 Thread Jan Bobek
Add all MMX instruction entries to sse-opcode.inc.h. Signed-off-by: Jan Bobek --- target/i386/sse-opcode.inc.h | 131 +++ 1 file changed, 131 insertions(+) diff --git a/target/i386/sse-opcode.inc.h b/target/i386/sse-opcode.inc.h index c5e81a6a80..36963e5a7c 10064

[Qemu-devel] [PATCH v5 06/10] log: adding -d tb_stats to control tbstats

2019-08-14 Thread vandersonmr
Adding -d tb_stats to control TBStatistics collection: -d tb_stats[[,level=(+all+jit+exec+time)][,dump_limit=]] "dump_limit" is used to limit the number of dumped TBStats in linux-user mode. [all+jit+exec+time] control the profilling level used by the TBStats. Can be used as follow: -d tb_stat

[Qemu-devel] [RFC PATCH v3 39/46] target/i386: introduce SSE code generators

2019-08-14 Thread Jan Bobek
Introduce code generators required by SSE instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 319 1 file changed, 319 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index ef64fe606f..3d526ee470 100644 --- a

[Qemu-devel] [PATCH v5 01/10] accel: introducing TBStatistics structure

2019-08-14 Thread vandersonmr
To store statistics for each TB, we created a TBStatistics structure which is linked with the TBs. TBStatistics can stay alive after tb_flush and be relinked to a regenerated TB. So the statistics can be accumulated even through flushes. The goal is to have all present and future qemu/tcg statisti

[Qemu-devel] [RFC PATCH v3 32/46] target/i386: introduce gvec-based code generator macros

2019-08-14 Thread Jan Bobek
Code generators defined using these macros rely on a gvec operation (i.e. tcg_gen_gvec_*). Signed-off-by: Jan Bobek --- target/i386/translate.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index b28d651b82..75652afb45 100644

[Qemu-devel] [PATCH v1 2/2] tb-stats: adding TBStatistics info into perf dump

2019-08-14 Thread vandersonmr
Adding TBStatistics information to linux perf TB's symbol names. This commit depends on the following PATCH: [PATCH v5 00/10] Measure Tiny Code Generation Quality Signed-off-by: Vanderson M. do Rosario --- accel/tcg/perf/jitdump.c | 15 ++- 1 file changed, 14 insertions(+), 1 deleti

[Qemu-devel] [RFC PATCH v3 36/46] target/i386: introduce MMX code generators

2019-08-14 Thread Jan Bobek
Define code generators required for MMX instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 111 1 file changed, 111 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index 4fecb0d240..a02e9cd0d2 100644 --- a/t

Re: [Qemu-devel] [PATCH v2 0/3] Fix MemoryRegionSection alignment and comparison

2019-08-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190814175535.2023-1-dgilb...@redhat.com/ Hi, This series failed build test on s390x host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that h

[Qemu-devel] [RFC PATCH v3 31/46] target/i386: introduce helper-based code generator macros

2019-08-14 Thread Jan Bobek
Code generators defined using these macros rely on a helper function (as emitted by gen_helper_*). Signed-off-by: Jan Bobek --- target/i386/translate.c | 106 1 file changed, 106 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.

[Qemu-devel] [RFC PATCH v3 28/46] target/i386: introduce P*, N*, Q* (MMX) operands

2019-08-14 Thread Jan Bobek
These address the MMX-technology register file; the corresponding cpu_env offset is passed as the operand value. Notably, offset of the entire register is pased at all times, regardless of the operand-size suffix. Signed-off-by: Jan Bobek --- target/i386/translate.c | 79

[Qemu-devel] [PATCH v5 10/10] linux-user: dumping hot TBs at the end of the execution

2019-08-14 Thread vandersonmr
dumps, in linux-user mode, the hottest TBs if -d tb_stats is used. Signed-off-by: Vanderson M. do Rosario --- linux-user/exit.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/exit.c b/linux-user/exit.c index bdda720553..7226104959 100644 --- a/linux-user/exit.c +++ b/linux-us

[Qemu-devel] [RFC PATCH v3 33/46] target/i386: introduce sse-opcode.inc.h

2019-08-14 Thread Jan Bobek
This header is intended to eventually list all supported instructions along with some useful details (e.g. mnemonics, opcode, operands etc.) It shall be used (along with some preprocessor magic) anytime we need to automatically generate code for every instruction. Signed-off-by: Jan Bobek --- ta

[Qemu-devel] [RFC PATCH v3 34/46] target/i386: introduce instruction translator macros

2019-08-14 Thread Jan Bobek
Instruction "translators" are responsible for decoding and loading instruction operands, calling the passed-in code generator, and storing the operands back (if applicable). Once a translator returns, the instruction has been translated to TCG ops, hence the name. Signed-off-by: Jan Bobek --- ta

[Qemu-devel] [PATCH v5 07/10] monitor: adding tb_stats hmp command

2019-08-14 Thread vandersonmr
Adding tb_stats [start|pause|stop|filter] command to hmp. This allows controlling the collection of statistics. It is also possible to set the level of collection: all, jit, or exec. tb_stats filter allow to only collect statistics for the TB in the last_search list. The goal of this command is t

[Qemu-devel] [RFC PATCH v3 29/46] target/i386: introduce H*, V*, U*, W* (SSE/AVX) operands

2019-08-14 Thread Jan Bobek
These address the SSE/AVX-technology register file. Offset of the entire corresponding register is passed as the operand value, regardless of operand-size suffix. Signed-off-by: Jan Bobek --- target/i386/translate.c | 117 1 file changed, 117 insertions(+

[Qemu-devel] [RFC PATCH v3 27/46] target/i386: introduce G*, R*, E* (general register) operands

2019-08-14 Thread Jan Bobek
These address the general-purpose register file. The corresponding 32-bit or 64-bit register is passed as the operand value. Signed-off-by: Jan Bobek --- target/i386/translate.c | 78 + 1 file changed, 78 insertions(+) diff --git a/target/i386/translate.c

[Qemu-devel] [RFC PATCH v3 26/46] target/i386: introduce M* (memptr) operands

2019-08-14 Thread Jan Bobek
The memory-pointer operand decodes the indirect form of ModR/M byte, loads the effective address into a register and passes that register as the operand. Signed-off-by: Jan Bobek --- target/i386/translate.c | 36 1 file changed, 36 insertions(+) diff --git a

[Qemu-devel] [PATCH v5 05/10] accel: adding TB_JIT_TIME and full replacing CONFIG_PROFILER

2019-08-14 Thread vandersonmr
Replace all others CONFIG_PROFILER statistics and migrate it to TBStatistics system. However, TCGProfiler still exists and can be use to store global statistics and times. All TB related statistics goes to TBStatistics. Signed-off-by: Vanderson M. do Rosario --- accel/tcg/tb-stats.c | 95 +

[Qemu-devel] [RFC PATCH v3 30/46] target/i386: introduce code generators

2019-08-14 Thread Jan Bobek
In this context, "code generators" are functions that receive decoded instruction operands and emit TCG ops implementing the correct instruction functionality. Introduce the naming macros first, actual generator macros will be added later. Signed-off-by: Jan Bobek --- target/i386/translate.c | 3

[Qemu-devel] [RFC PATCH v3 25/46] target/i386: introduce Ib (immediate) operand

2019-08-14 Thread Jan Bobek
Introduce the immediate-byte operand, which loads a byte from the instruction stream and passes its value as the operand. Signed-off-by: Jan Bobek --- target/i386/translate.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c

[Qemu-devel] [RFC PATCH v3 19/46] target/i386: introduce generic load-store operand

2019-08-14 Thread Jan Bobek
This operand attempts to capture the "indirect" or "memory" operand in a generic way. It significatly reduces the amount code that needs to be written in order to read operands from memory to temporary storage and write them back. Signed-off-by: Jan Bobek --- target/i386/translate.c | 54 +++

[Qemu-devel] [RFC PATCH v3 24/46] target/i386: introduce operand vex_v

2019-08-14 Thread Jan Bobek
This operand yields value of the VEX. field. Signed-off-by: Jan Bobek --- target/i386/translate.c | 20 1 file changed, 20 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index c918065b96..4562a097fa 100644 --- a/target/i386/translate.c +++

[Qemu-devel] [PATCH v5 03/10] accel: collecting JIT statistics

2019-08-14 Thread vandersonmr
If a TB has a TBS (TBStatistics) with the TB_JIT_STATS enabled then we collect statistics of its translation processes and code translation. Collecting the number of host instructions seems to be not simple as it would imply in having to modify several target source files. So, for now, we are only

[Qemu-devel] [RFC PATCH v3 23/46] target/i386: introduce operand for direct-only r/m field

2019-08-14 Thread Jan Bobek
Many operands can only decode successfully if the ModR/M byte has the direct form (i.e. MOD=3). Capture this common aspect by introducing a special direct-only r/m field operand. Signed-off-by: Jan Bobek --- target/i386/translate.c | 37 + 1 file changed, 37 i

[Qemu-devel] [RFC PATCH v3 16/46] target/i386: introduce instruction operand infrastructure

2019-08-14 Thread Jan Bobek
insnop_arg_t, insnop_ctxt_t and init, prepare and finalize functions form the basis of instruction operand decoding. Introduce macros for defining a generic instruction operand; use cases for operand decoding will be introduced later. Signed-off-by: Jan Bobek --- target/i386/translate.c | 28 +++

[Qemu-devel] [RFC PATCH v3 18/46] target/i386: introduce generic either-or operand

2019-08-14 Thread Jan Bobek
The either-or operand attempts to decode one operand, and if it fails, it falls back to a second operand. It is unifying, meaning that insnop_arg_t of the second operand must be implicitly castable to insnop_arg_t of the first operand. Signed-off-by: Jan Bobek --- target/i386/translate.c | 46 ++

[Qemu-devel] [RFC PATCH v3 21/46] target/i386: introduce modrm operand

2019-08-14 Thread Jan Bobek
This permits the ModR/M byte to be passed raw into the code generator, effectively allowing to short-circuit the operand decoding mechanism and do the decoding work manually in the code generator. Signed-off-by: Jan Bobek --- target/i386/translate.c | 20 1 file changed, 20

[Qemu-devel] [RFC PATCH v3 46/46] target/i386: introduce SSE3 instructions to sse-opcode.inc.h

2019-08-14 Thread Jan Bobek
Add all the SSE3 instruction entries to sse-opcode.inc.h. Signed-off-by: Jan Bobek --- target/i386/sse-opcode.inc.h | 20 1 file changed, 20 insertions(+) diff --git a/target/i386/sse-opcode.inc.h b/target/i386/sse-opcode.inc.h index efa67b7ce2..0cfe6fbe31 100644 --- a/targ

[Qemu-devel] [RFC PATCH v3 06/46] target/i386: Simplify gen_exception arguments

2019-08-14 Thread Jan Bobek
From: Richard Henderson We can compute cur_eip from values present within DisasContext. Signed-off-by: Richard Henderson --- target/i386/translate.c | 89 - 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/target/i386/translate.c b/target/

[Qemu-devel] [RFC PATCH v3 15/46] target/i386: introduce function ck_cpuid

2019-08-14 Thread Jan Bobek
Introduce a helper function to take care of instruction CPUID checks. Signed-off-by: Jan Bobek --- target/i386/translate.c | 48 + 1 file changed, 48 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index 6296a02991..0cffa2226b

[Qemu-devel] [RFC PATCH v3 45/46] target/i386: introduce SSE3 code generators

2019-08-14 Thread Jan Bobek
Introduce code generators required by SSE3 instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 64 + 1 file changed, 64 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index c72138014a..9da3fbb611 100644 --- a

[Qemu-devel] [RFC PATCH v3 20/46] target/i386: introduce tcg_temp operands

2019-08-14 Thread Jan Bobek
TCG temporary operands allocate a 32-bit or 64-bit TCG temporary, and later automatically free it. Signed-off-by: Jan Bobek --- target/i386/translate.c | 44 + 1 file changed, 44 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c

[Qemu-devel] [RFC PATCH v3 05/46] target/i386: use prefix from DisasContext

2019-08-14 Thread Jan Bobek
Reduce scope of the local variable prefixes to enforce use of prefix from DisasContext instead. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 113 1 file changed, 57 insertions(+),

[Qemu-devel] [RFC PATCH v3 17/46] target/i386: introduce generic operand alias

2019-08-14 Thread Jan Bobek
It turns out it is useful to be able to declare operand name aliases. Introduce a macro to capture this functionality. Signed-off-by: Jan Bobek --- target/i386/translate.c | 20 1 file changed, 20 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c

[Qemu-devel] [RFC PATCH v3 35/46] target/i386: introduce MMX translators

2019-08-14 Thread Jan Bobek
Use the translator macros to define instruction translators required by MMX instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 16 1 file changed, 16 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index 76c27d0380..4fecb0d240 1006

[Qemu-devel] [RFC PATCH v3 09/46] target/i386: make variable is_xmm const

2019-08-14 Thread Jan Bobek
The variable is_xmm does not change value after assignment, so make this fact explicit by marking it const. Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/target/i386/tran

[Qemu-devel] [RFC PATCH v3 11/46] target/i386: introduce gen_(ld, st)d_env_A0

2019-08-14 Thread Jan Bobek
Similar in spirit to the already present gen_(ld,st)(q,o)_env_A0, it will prove useful in later commits for smaller-sized vector loads. Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 12 1 file changed, 12 insertions(+) diff --git a/target/i3

[Qemu-devel] [RFC PATCH v3 14/46] target/i386: introduce mnemonic aliases for several gvec operations

2019-08-14 Thread Jan Bobek
It is helpful to introduce aliases for some general gvec operations as it makes a couple of instruction code generators simpler (added later). Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/i3

[Qemu-devel] [RFC PATCH v3 22/46] target/i386: introduce operands for decoding modrm fields

2019-08-14 Thread Jan Bobek
The old code uses bitshifts and bitwise-and all over the place for decoding ModR/M fields. Avoid doing that by introducing proper decoding operands. Signed-off-by: Jan Bobek --- target/i386/translate.c | 62 + 1 file changed, 62 insertions(+) diff --git a

[Qemu-devel] [RFC PATCH v3 07/46] target/i386: use pc_start from DisasContext

2019-08-14 Thread Jan Bobek
The variable pc_start is already a member of DisasContext. Remove the superfluous local variable. Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 131 1 file changed, 65 insertions(+), 66 deletions(-) diff --git a/t

[Qemu-devel] [RFC PATCH v3 08/46] target/i386: make variable b1 const

2019-08-14 Thread Jan Bobek
The variable b1 does not change value once assigned. Make this fact explicit by marking it const. Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/target/i386/translate.c b/tar

[Qemu-devel] [RFC PATCH v3 12/46] target/i386: introduce gen_sse_ng

2019-08-14 Thread Jan Bobek
This function serves as the point-of-intercept for all newly implemented instructions. If no new implementation exists, fall back to gen_sse. Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 29 - 1 file changed, 28 insertions(+),

[Qemu-devel] [RFC PATCH v3 04/46] target/i386: use dflag from DisasContext

2019-08-14 Thread Jan Bobek
There already is a variable dflag in DisasContext, so reduce the scope of the local variable dflag to enforce use of the one in DisasContext. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 184 --

[Qemu-devel] [RFC PATCH v3 13/46] target/i386: disable unused function warning temporarily

2019-08-14 Thread Jan Bobek
Some functions added later are generated by preprocessor macros and end up being unused (e.g. not all operands can serve as a destination operand). Disable unused function warnings for the new code until I figure out how I want to solve this particular issue. Note: This changeset is intended for d

[Qemu-devel] [RFC PATCH v3 02/46] target/i386: Push rex_w into DisasContext

2019-08-14 Thread Jan Bobek
From: Richard Henderson Treat this the same as we already do for other rex bits. Signed-off-by: Richard Henderson --- target/i386/translate.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index d74dbfd

[Qemu-devel] [RFC PATCH v3 01/46] target/i386: Push rex_r into DisasContext

2019-08-14 Thread Jan Bobek
From: Richard Henderson Treat this value the same as we do for rex_b and rex_x. Signed-off-by: Richard Henderson --- target/i386/translate.c | 85 + 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/target/i386/translate.c b/target/i386/tra

[Qemu-devel] [RFC PATCH v3 03/46] target/i386: reduce scope of variable aflag

2019-08-14 Thread Jan Bobek
The variable aflag is not used in most of disas_insn; make this clear by explicitly reducing its scope to the block where it is used. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 6 +- 1 file changed, 5 insertions(+),

[Qemu-devel] [RFC PATCH v3 10/46] target/i386: add vector register file alignment constraints

2019-08-14 Thread Jan Bobek
gvec operations require that all vectors be aligned on 16-byte boundary; make sure the MM/XMM/YMM/ZMM register file is aligned as neccessary. Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/cpu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t

[Qemu-devel] [RFC PATCH v3 00/46] rewrite MMX/SSE/SSE2/SSE3 instruction translation

2019-08-14 Thread Jan Bobek
The previous version can be found at [1]. Changes compared to v2: - Expanded the instruction operand infrastructure a bit; I am now fairly confident that it is powerful enough to accommodate for all the use cases I will need. It's still a bit clunky to work with at times, but I am ha

Re: [Qemu-devel] [PATCH v9 05/11] numa: Extend CLI to provide initiator information for numa nodes

2019-08-14 Thread Tao Xu
On 8/15/2019 5:29 AM, Dan Williams wrote: On Tue, Aug 13, 2019 at 10:14 PM Tao Xu wrote: On 8/14/2019 10:39 AM, Dan Williams wrote: On Tue, Aug 13, 2019 at 8:00 AM Igor Mammedov wrote: On Fri, 9 Aug 2019 14:57:25 +0800 Tao wrote: From: Tao Xu [...] +for (i = 0; i < machine->num

Re: [Qemu-devel] [PATCH 1/3] riscv: sifive_u: Add support for loading initrd

2019-08-14 Thread Palmer Dabbelt
On Wed, 14 Aug 2019 18:30:59 PDT (-0700), bmeng...@gmail.com wrote: Hi Palmer, On Thu, Aug 15, 2019 at 1:06 AM Palmer Dabbelt wrote: On Mon, 12 Aug 2019 16:48:00 PDT (-0700), bmeng...@gmail.com wrote: > Hi Palmer, > > On Tue, Aug 13, 2019 at 6:45 AM Palmer Dabbelt wrote: >> >> On Fri, 19 Jul

Re: [Qemu-devel] [PATCH 1/3] riscv: sifive_u: Add support for loading initrd

2019-08-14 Thread Bin Meng
Hi Palmer, On Thu, Aug 15, 2019 at 1:06 AM Palmer Dabbelt wrote: > > On Mon, 12 Aug 2019 16:48:00 PDT (-0700), bmeng...@gmail.com wrote: > > Hi Palmer, > > > > On Tue, Aug 13, 2019 at 6:45 AM Palmer Dabbelt wrote: > >> > >> On Fri, 19 Jul 2019 06:40:43 PDT (-0700), li...@roeck-us.net wrote: > >>

Re: [Qemu-devel] [RFC PATCH v2 21/39] target/i386: introduce insn.h

2019-08-14 Thread Jan Bobek
On 8/13/19 2:00 AM, Richard Henderson wrote: > On 8/10/19 5:12 AM, Jan Bobek wrote: >> This header is intended to eventually list all supported instructions >> along with some useful details (e.g. mnemonics, opcode, operands etc.) >> It shall be used (along with some preprocessor magic) anytime we

Re: [Qemu-devel] [PATCH v9 00/11] Build ACPI Heterogeneous Memory Attribute Table (HMAT)

2019-08-14 Thread Tao Xu
On 8/15/2019 4:57 AM, Eduardo Habkost wrote: On Tue, Aug 13, 2019 at 04:53:33PM +0800, Tao Xu wrote: Hi Igor and Eduardo, I am wondering if there are more comments about patch 1/11~4/11? Because these 4 patch are independent and the patch series are big and pushing for a long time. Could the pa

[Qemu-devel] current QEMU can't start pc-q35-2.12 SEV guest

2019-08-14 Thread Bruce Rogers
Hi, I ran into a case where a guest on a SEV capable host, which was enabled to use SEV and using an older machine type was no longer able to run when the QEMU version had been updated. Specifically, when the guest was installed and running under a v2.12 QEMU, set up for SEV (ok it was v2.11 with

Re: [Qemu-devel] [RFC PATCH v2 23/39] target/i386: introduce instruction translator macros

2019-08-14 Thread Jan Bobek
On 8/13/19 2:30 AM, Richard Henderson wrote: > On 8/10/19 5:12 AM, Jan Bobek wrote: >> +#define CASES_LEG_NP_0F_W0(opcode) \ >> +case opcode | M_0F | W_0: >> +#define CASES_LEG_NP_0F_W1(opcode) \ >> +case opcode | M_0F | W_1: >> +#define CASES_LEG_F3_0F_W0(opcode)

[Qemu-devel] [RFC PATCH] ati-vga: Implement dummy VBlank IRQ

2019-08-14 Thread BALATON Zoltan
The MacOS driver exits if the card does not have an interrupt. If we set PCI_INTERRUPT_PIN to 1 then it enables VBlank interrupts and it boots but the mouse poniter can not be moved. This patch implements a dummy VBlank interrupt by a timer triggered at 60 Hz to test if it helps. Unfortunately it d

Re: [Qemu-devel] [PATCH 0/6] Fix multifd with big number of channels

2019-08-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190814020218.1868-1-quint...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash make

Re: [Qemu-devel] [RFC PATCH v2 16/39] target/i386: introduce instruction operand infrastructure

2019-08-14 Thread Jan Bobek
On 8/13/19 2:07 AM, Richard Henderson wrote: > On 8/10/19 5:12 AM, Jan Bobek wrote: >> +#define INSNOP_INIT(opT, init_stmt)\ >> +static int insnop_init(opT)(CPUX86State *env, DisasContext *s, \ >> +int modrm, insnop_t(opT) *op)

Re: [Qemu-devel] [PATCH v3] ppc: Add support for 'mffsl' instruction

2019-08-14 Thread David Gibson
On Wed, Aug 14, 2019 at 11:34:13AM -0500, Paul Clarke wrote: > Should these 'checkpatch' ERRORs be addressed, even if it will diverge the > code style from the existing, surrounding code? > > On 8/14/19 11:30 AM, no-re...@patchew.org wrote: > > This series seems to have some coding style problems

Re: [Qemu-devel] [PATCH v9 05/11] numa: Extend CLI to provide initiator information for numa nodes

2019-08-14 Thread Dan Williams
On Tue, Aug 13, 2019 at 10:14 PM Tao Xu wrote: > > On 8/14/2019 10:39 AM, Dan Williams wrote: > > On Tue, Aug 13, 2019 at 8:00 AM Igor Mammedov wrote: > >> > >> On Fri, 9 Aug 2019 14:57:25 +0800 > >> Tao wrote: > >> > >>> From: Tao Xu > >>> > >>> In ACPI 6.3 chapter 5.2.27 Heterogeneous Memory

Re: [Qemu-devel] [PATCH 00/13] RFC: luks/encrypted qcow2 key management

2019-08-14 Thread Eric Blake
On 8/14/19 3:22 PM, Maxim Levitsky wrote: > This is an issue that was raised today on IRC with Kevin Wolf. Really thanks > for the idea! > > We agreed that this new qmp interface should take the same options as > blockdev-create does, however since we want to be able to edit the encryption > slot

Re: [Qemu-devel] [PATCH v9 00/11] Build ACPI Heterogeneous Memory Attribute Table (HMAT)

2019-08-14 Thread Eduardo Habkost
On Tue, Aug 13, 2019 at 04:53:33PM +0800, Tao Xu wrote: > Hi Igor and Eduardo, > > I am wondering if there are more comments about patch 1/11~4/11? Because > these 4 patch are independent and the patch series are big and pushing for a > long time. Could the patch 1/11~4/11 be ready for queuing fir

[Qemu-devel] [PATCH 3/3] Document the qmp commands for continious replication

2019-08-14 Thread Lukas Straub
Signed-off-by: Lukas Straub --- docs/COLO-FT.txt | 185 +++ 1 file changed, 138 insertions(+), 47 deletions(-) diff --git a/docs/COLO-FT.txt b/docs/COLO-FT.txt index ad24680d13..c08bfbd3a8 100644 --- a/docs/COLO-FT.txt +++ b/docs/COLO-FT.txt @@ -145,35

[Qemu-devel] [PATCH 0/3] colo: Add support for continious replication

2019-08-14 Thread Lukas Straub
Hello Everyone, These Patches add support for continious replication to colo. Please review. Regards, Lukas Straub Lukas Straub (3): Replication: Ignore requests after failover net/filter.c: Add Options to insert filters anywhere in the filter list Document the qmp commands for continious r

[Qemu-devel] [PATCH 2/3] net/filter.c: Add Options to insert filters anywhere in the filter list

2019-08-14 Thread Lukas Straub
To switch the Secondary to Primary, we need to insert new filters before the filter-rewriter. Add the necessary options to insert filters anywhere in the filter list. Signed-off-by: Lukas Straub --- include/net/filter.h | 2 ++ net/filter.c | 73

[Qemu-devel] [PATCH 1/3] Replication: Ignore requests after failover

2019-08-14 Thread Lukas Straub
After failover, the Secondary side of replication shouldn't change state. Add the necessary checks to ignore requests after failover. Signed-off-by: Lukas Straub --- block/replication.c | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/block/rep

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] qapi: deprecate implicit filters

2019-08-14 Thread Maxim Levitsky
On Wed, 2019-08-14 at 15:27 -0400, John Snow wrote: > > On 8/14/19 6:07 AM, Vladimir Sementsov-Ogievskiy wrote: > > To get rid of implicit filters related workarounds in future let's > > deprecate them now. > > > > Signed-off-by: Vladimir Sementsov-Ogievskiy > > --- > > qemu-deprecated.texi

[Qemu-devel] [RFC v2] hw/sd/aspeed_sdhci: New device

2019-08-14 Thread Eddie James
The Aspeed SOCs have two SD/MMC controllers. Add a device that encapsulates both of these controllers and models the Aspeed-specific registers and behavior. Tested by reading from mmcblk0 in Linux: qemu-system-arm -machine romulus-bmc -nographic -serial mon:stdio \ -drive file=_tmp/flash-romulus,

[Qemu-devel] [PATCH 13/13] iotests : add tests for encryption key management

2019-08-14 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- tests/qemu-iotests/257 | 197 ++ tests/qemu-iotests/257.out | 96 +++ tests/qemu-iotests/258 | 95 +++ tests/qemu-iotests/258.out | 30 + tests/qemu-iotests/259 |

[Qemu-devel] [PATCH 12/13] qemu-img: implement key management

2019-08-14 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- block/crypto.c | 16 ++ block/crypto.h | 3 + qemu-img-cmds.hx | 13 + qemu-img.c | 140 +++ 4 files changed, 172 insertions(+) diff --git a/block/crypto.c b/block/crypto.c index 415b6db041..2fcdf

[Qemu-devel] [PATCH 05/13] qcrypto-luks: clear the masterkey and password before freeing them always

2019-08-14 Thread Maxim Levitsky
While there are other places where these are still stored in memory, this is still one less key material area that can be sniffed with various side channel attacks Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 52 ++--- 1 file changed, 44 inser

[Qemu-devel] [PATCH 09/13] qcrypto-luks: implement the encryption key management

2019-08-14 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 374 +++- 1 file changed, 373 insertions(+), 1 deletion(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index 1997e92fe1..2c33643b52 100644 --- a/crypto/block-luks.c +++ b/crypto/block-luks.

[Qemu-devel] [PATCH 10/13] block/crypto: implement the encryption key management

2019-08-14 Thread Maxim Levitsky
This implements the encryption key management using the generic code in qcrypto layer This code adds another 'write_func' because the initialization write_func works directly on the underlying file, because during the creation, there is no open instance of the luks driver, but during regular use,

[Qemu-devel] [PATCH 11/13] block/qcow2: implement the encryption key managment

2019-08-14 Thread Maxim Levitsky
This is the main purpose of the patchset, to enaable us to manage luks like header, embedded in the qcow2 image, which standard cryptosetup tools don't support. Signed-off-by: Maxim Levitsky --- block/qcow2.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/block/

[Qemu-devel] [PATCH 08/13] qcrypto: add the plumbing for encryption management

2019-08-14 Thread Maxim Levitsky
This adds qcrypto_block_manage_encryption, which is thin wrapper around manage_encryption of the crypto driver which is also added Signed-off-by: Maxim Levitsky --- crypto/block.c | 29 + crypto/blockpriv.h | 9 + include/crypto/block.h | 27 +++

[Qemu-devel] [PATCH 03/13] qcrypto-luks: refactoring: extract load/store/check/parse header functions

2019-08-14 Thread Maxim Levitsky
With upcoming key management, the header will need to be stored after the image is created. Extracting load header isn't strictly needed, but do this anyway for the symmetry. Also I extracted a function that does basic sanity checks on the just read header, and a function which parses all the cry

[Qemu-devel] [PATCH 04/13] qcrypto-luks: refactoring: simplify the math used for keyslot locations

2019-08-14 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 64 +++-- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index 6bb369f3b4..e1a4df94b7 100644 --- a/crypto/block-luks.c +++ b/crypto/block-luks

[Qemu-devel] [PATCH 02/13] qcrypto-luks: misc refactoring

2019-08-14 Thread Maxim Levitsky
This is also a preparation for key read/write/erase functions * use master key len from the header * prefer to use crypto params in the QCryptoBlockLUKS over passing them as function arguments * define QCRYPTO_BLOCK_LUKS_DEFAULT_ITER_TIME * Add comments to various crypto parameters in the QCrypt

  1   2   3   >