[Qemu-devel] [PATCH v5 30/35] target/riscv: Remove decode_RV32_64G()

2019-01-22 Thread Bastian Koppelmann
decodetree handles all instructions now so the fallback is not necessary anymore. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/translate.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/

[Qemu-devel] [PATCH v5 33/35] target/riscv: Splice fsw_sd and flw_ld for riscv32 vs riscv64

2019-01-22 Thread Bastian Koppelmann
this finally removes the old decoder functions that we carried along with it. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann --- target/riscv/Makefile.objs | 1 + target/riscv/insn16-32.decode | 24 target/riscv/insn16-64.decode | 4 +

[Qemu-devel] [PATCH v5 20/35] target/riscv: Remove gen_jalr()

2019-01-22 Thread Bastian Koppelmann
trans_jalr() is the only caller, so move the code into trans_jalr(). Acked-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn_trans/trans_rvi.inc.c | 28 +- target/riscv/translate.c

[Qemu-devel] [PATCH v5 35/35] target/riscv: Remaining rvc insn reuse 32 bit translators

2019-01-22 Thread Bastian Koppelmann
only one translate functions of rvc needs to handle special cases. For the other rvc insns we can remove the extra layer of indirection. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann --- target/riscv/insn16.decode | 37 +-- target/riscv/insn_trans

[Qemu-devel] [PATCH v5 19/35] target/riscv: Convert quadrant 2 of RVXC insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn16.decode | 31 target/riscv/insn_trans/trans_rvc.inc.c | 101 target/riscv/translate.c| 83 +-- 3 files changed, 134 insertions(+), 8

[Qemu-devel] [PATCH v5 15/35] target/riscv: Convert RV64D insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32-64.decode | 8 + target/riscv/insn_trans/trans_rvd.inc.c | 73 target/riscv/translate.c| 487 +--- 3 files changed, 82 inserti

[Qemu-devel] [PATCH v5 22/35] target/riscv: Remove manual decoding from gen_load()

2019-01-22 Thread Bastian Koppelmann
With decodetree we don't need to convert RISC-V opcodes into to MemOps as the old gen_load() did. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn_trans/trans_rvi.inc.c | 35 +++-- target/riscv/translate.c

[Qemu-devel] [PATCH v5 29/35] target/riscv: Remove gen_system()

2019-01-22 Thread Bastian Koppelmann
with all 16 bit insns moved to decodetree no path is falling back to gen_system(), so we can remove it. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/translate.c | 31 --- 1 file changed, 31 deletions(-)

[Qemu-devel] [PATCH v5 21/35] target/riscv: Remove manual decoding from gen_branch()

2019-01-22 Thread Bastian Koppelmann
We now utilizes argument-sets of decodetree such that no manual decoding is necessary. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn_trans/trans_rvi.inc.c | 46 +--- target/riscv/translate.c|

[Qemu-devel] [PATCH v5 13/35] target/riscv: Convert RV64F insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32-64.decode | 6 +++ target/riscv/insn_trans/trans_rvf.inc.c | 54 + 2 files changed, 60 insertions(+) diff --git a/target/riscv/insn32-64.decode

[Qemu-devel] [PATCH v5 25/35] target/riscv: make ADD/SUB/OR/XOR/AND insn use arg lists

2019-01-22 Thread Bastian Koppelmann
manual decoding in gen_arith() is not necessary with decodetree. For now the function is called trans_arith as the original gen_arith still exists. The former will be renamed to gen_arith as soon as the old gen_arith can be removed. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann

[Qemu-devel] [PATCH v5 23/35] target/riscv: Remove manual decoding from gen_store()

2019-01-22 Thread Bastian Koppelmann
With decodetree we don't need to convert RISC-V opcodes into to MemOps as the old gen_store() did. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn_trans/trans_rvi.inc.c | 27 + target/riscv/translate.c

Re: [Qemu-devel] [PATCH] xlnx-zynqmp: Don't create rpu-cluster if there are no RPUs

2019-01-22 Thread Peter Maydell
On Mon, 21 Jan 2019 at 20:12, Philippe Mathieu-Daudé wrote: > > Hi Peter, > > On 1/21/19 7:43 PM, Peter Maydell wrote: > > If we aren't going to create any RPUs, then don't create the > > rpu-cluster unit. This allows us to add an assertion to the > > cluster object that it contains at least one C

[Qemu-devel] [PATCH v5 12/35] target/riscv: Convert RV32F insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 35 +++ target/riscv/insn_trans/trans_rvf.inc.c | 334 target/riscv/translate.c| 1 + 3 files changed, 370 inserti

[Qemu-devel] [PATCH v5 26/35] target/riscv: Remove shift and slt insn manual decoding

2019-01-22 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- v4 -> v5: - removed rs2 == 0 special cases in sraw/srlw target/riscv/insn_trans/trans_rvi.inc.c | 93 + target/riscv/translate.c| 59 +--- 2 fi

[Qemu-devel] [PATCH v5 24/35] target/riscv: Move gen_arith_imm() decoding into trans_* functions

2019-01-22 Thread Bastian Koppelmann
gen_arith_imm() does a lot of decoding manually, which was hard to read in case of the shift instructions and is not necessary anymore with decodetree. Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- v4 -> v5: - moved TARGET_LONG_BITS check of shift instructions before rd ==

[Qemu-devel] [RFC PATCH v3 5/8] kbd-state: use state tracker for gtk

2019-01-22 Thread Gerd Hoffmann
Use the new keyboard state tracked for gtk. Allows to drop the gtk-specific modifier state tracking code. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé --- include/ui/gtk.h | 2 ++ ui/gtk.c | 38 ++ 2 files changed, 8 insertions(+), 3

[Qemu-devel] [PATCH v5 16/35] target/riscv: Convert RV priv insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode| 15 +++ .../riscv/insn_trans/trans_privileged.inc.c | 110 ++ target/riscv/translate.c | 57 + 3 files

[Qemu-devel] [PATCH v5 17/35] target/riscv: Convert quadrant 0 of RVXC insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/Makefile.objs | 9 ++- target/riscv/insn16.decode | 55 ++ target/riscv/insn_trans/trans_rvc.inc.c | 75 + target/riscv/

[Qemu-devel] [PATCH v5 14/35] target/riscv: Convert RV32D insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 28 +++ target/riscv/insn_trans/trans_rvd.inc.c | 315 target/riscv/translate.c| 1 + 3 files changed, 344 inserti

[Qemu-devel] [PATCH v5 08/35] target/riscv: Convert RVXI csr insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Acked-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 8 +++ target/riscv/insn_trans/trans_rvi.inc.c | 79 + target/riscv/translate.c| 43 +

[Qemu-devel] [RFC PATCH v3 4/8] sdl2: use only QKeyCode in sdl2_process_key()

2019-01-22 Thread Gerd Hoffmann
Also: sdl2_process_key is never called with scon == NULL. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé --- ui/sdl2-input.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ui/sdl2-input.c b/ui/sdl2-input.c index 22e3336aab..664364a5e5 100644 --- a/ui/sd

[Qemu-devel] [PATCH v5 11/35] target/riscv: Convert RV64A insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Acked-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32-64.decode | 13 +++ target/riscv/insn_trans/trans_rva.inc.c | 58 ++ target/riscv/translate.c| 140 -

Re: [Qemu-devel] [PATCH v5 4/5] hw/i386/pc: use PVH option rom

2019-01-22 Thread Paolo Bonzini
On 22/01/19 10:22, Stefano Garzarella wrote: > On Mon, Jan 21, 2019 at 07:33:32PM +0100, Paolo Bonzini wrote: >> On 21/01/19 18:36, Stefano Garzarella wrote: | On Tue, Jan 15, 2019 at 01:57:22PM -0500, Michael S. Tsirkin wrote: | > OK but this is guest visible so needs to be guarded

[Qemu-devel] [PATCH v5 07/35] target/riscv: Convert RVXI fence insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Acked-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- v4 -> v5: - fixed rebase error target/riscv/insn32.decode | 2 ++ target/riscv/insn_trans/trans_rvi.inc.c | 19 +++ target/riscv/translat

Re: [Qemu-devel] [PATCH v2 0/2] arm: Stub out NRF51 TWI magnetometer/accelerometer detection

2019-01-22 Thread Stefan Hajnoczi
On Mon, Jan 21, 2019 at 04:21:03PM +, Peter Maydell wrote: > On Thu, 10 Jan 2019 at 09:40, Stefan Hajnoczi wrote: > > > > v2: > > * Move stub code into a separate device [Peter] > > * Instantiate stub from microbit board instead of nRF51 SoC since this is > >microbit-specific. Other boa

[Qemu-devel] [PATCH v5 10/35] target/riscv: Convert RV32A insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 17 +++ target/riscv/insn_trans/trans_rva.inc.c | 149 target/riscv/translate.c| 1 + 3 files changed, 167 inserti

[Qemu-devel] [PATCH v5 06/35] target/riscv: Convert RVXI arithmetic insns to decodetree

2019-01-22 Thread Bastian Koppelmann
we cannot remove the call to gen_arith() in decode_RV32_64G() since it is used to translate multiply instructions. Acked-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32-64.decode | 13 ++ target

[Qemu-devel] [PATCH v5 09/35] target/riscv: Convert RVXM insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Acked-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32-64.decode | 7 ++ target/riscv/insn32.decode | 10 +++ target/riscv/insn_trans/trans_rvm.inc.c | 100

Re: [Qemu-devel] Bug#919921: qemu-user Linux ELF loader fails to handle pure BSS segments

2019-01-22 Thread Philippe Mathieu-Daudé
Hi Ben, On 1/22/19 6:43 AM, Michael Tokarev wrote: > Forwarding to qemu-devel@ > http://bugs.debian.org/919921 > > Thanks! > > 20.01.2019 20:55, Ben Hutchings wrote: >> Package: qemu-user >> Version: 1:3.1+dfsg-2 >> Severity: normal >> Tags: patch >> >> I've been building and testing klibc acros

[Qemu-devel] [PATCH v5 05/35] target/riscv: Convert RV64I load/store insns to decodetree

2019-01-22 Thread Bastian Koppelmann
this splits the 64-bit only instructions into its own decode file such that we generate the decoder for these instructions only for the RISC-V 64 bit target. Acked-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/

[Qemu-devel] [PATCH v5 01/35] target/riscv: Move CPURISCVState pointer to DisasContext

2019-01-22 Thread Bastian Koppelmann
CPURISCVState is rarely used, so there is no need to pass it to every translate function. This paves the way for decodetree which only passes DisasContext to translate functions. Reviewed-by: Palmer Dabbelt Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Signed-off-by: Bastian Kopp

[Qemu-devel] [PATCH v5 04/35] target/riscv: Convert RV32I load/store insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 10 ++ target/riscv/insn_trans/trans_rvi.inc.c | 48 + 2 files changed, 58 insertions(+) diff --git a/target/riscv/insn32.decode

Re: [Qemu-devel] [PATCH v3] .cirrus.yml: basic compile and test for FreeBSD

2019-01-22 Thread Thomas Huth
On 2019-01-21 17:30, Ed Maste wrote: > On Mon, 21 Jan 2019 at 10:16, Ed Maste wrote: >> >> To confirm, I have another build running now with >> echo "Running with hw.ncpu=$(sysctl -n hw.ncpu)" >> added. > > Confirmed - https://cirrus-ci.com/build/5768962257190912: > Running with hw.ncpu=8 > > If

[Qemu-devel] [PATCH v5 02/35] target/riscv: Activate decodetree and implemnt LUI & AUIPC

2019-01-22 Thread Bastian Koppelmann
for now only LUI & AUIPC are decoded and translated. If decodetree fails, we fall back to the old decoder. Reviewed-by: Richard Henderson Acked-by: Alistair Francis Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/Makefile.objs | 10 +++ target/ris

[Qemu-devel] [RFC PATCH v3 3/8] kbd-state: use state tracker for sdl2

2019-01-22 Thread Gerd Hoffmann
Use the new keyboard state tracked for sdl2. We can drop the modifier state tracking from sdl2. Also keyup code is simpler, the state tracker will take care to not send suspious keyup events to the guest. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé --- include/ui/sdl2.h | 2

Re: [Qemu-devel] [PATCH v5 4/5] hw/i386/pc: use PVH option rom

2019-01-22 Thread Stefano Garzarella
On Tue, Jan 22, 2019 at 10:29:30AM +0100, Paolo Bonzini wrote: > On 22/01/19 10:22, Stefano Garzarella wrote: > > > > I tried to migrate from a QEMU with PVH support to a QEMU without PVH, > > (both with the same pc-q35-4.0 machine) and the migration doesn't fail. > > > > The guest, after the mig

Re: [Qemu-devel] [RFC PATCH v2 5/7] kbd-state: use state tracker for vnc

2019-01-22 Thread Daniel P . Berrangé
On Tue, Jan 22, 2019 at 10:00:36AM +0100, Gerd Hoffmann wrote: > > > @@ -1859,30 +1828,25 @@ static void do_key_event(VncState *vs, int down, > > > int keycode, int sym) > > > toggles capslock away from the VNC window. > > > */ > > > int uppercase = !!(sym >= 'A' && s

[Qemu-devel] [PATCH v5 03/35] target/riscv: Convert RVXI branch insns to decodetree

2019-01-22 Thread Bastian Koppelmann
Reviewed-by: Palmer Dabbelt Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 19 ++ target/riscv/insn_trans/trans_rvi.inc.c | 49 + target/riscv/translate.c|

Re: [Qemu-devel] [RFC PATCH v3 6/8] kbd-state: use state tracker for vnc

2019-01-22 Thread Daniel P . Berrangé
On Tue, Jan 22, 2019 at 10:28:12AM +0100, Gerd Hoffmann wrote: > Use the new keyboard state tracked for vnc. Allows to drop the > vnc-specific modifier state tracking code. > > Signed-off-by: Gerd Hoffmann > --- > ui/vnc.h | 5 ++- > ui/vnc.c | 120 > ++---

[Qemu-devel] [RFC PATCH v3 7/8] keymap: pass full keyboard state to keysym2scancode

2019-01-22 Thread Gerd Hoffmann
Pass the keyboard state tracker handle down to keysym2scancode(), so the code can fully inspect the keyboard state as needed. No functional change. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé --- ui/keymaps.h | 3 ++- ui/curses.c | 2 +- ui/keymaps.c | 8 ui/vnc.c

Re: [Qemu-devel] [PATCH] xlnx-zynqmp: Don't create rpu-cluster if there are no RPUs

2019-01-22 Thread Philippe Mathieu-Daudé
On 1/22/19 10:28 AM, Peter Maydell wrote: > On Mon, 21 Jan 2019 at 20:12, Philippe Mathieu-Daudé > wrote: >> >> Hi Peter, >> >> On 1/21/19 7:43 PM, Peter Maydell wrote: >>> If we aren't going to create any RPUs, then don't create the >>> rpu-cluster unit. This allows us to add an assertion to the

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

2019-01-22 Thread Bastian Koppelmann
Hi, this patchset converts the RISC-V decoder to decodetree in four major steps: 1) Convert 32-bit instructions to decodetree [Patch 1-16]: Many of the gen_* functions are called by the decode functions for 16-bit and 32-bit functions. If we move translation code from the gen_* functi

Re: [Qemu-devel] [PATCH 02/18] Acceptance tests: show avocado test execution by default

2019-01-22 Thread Philippe Mathieu-Daudé
On 1/17/19 7:56 PM, Cleber Rosa wrote: > The current version of the "check-acceptance" target will only show > one line for execution of all tests. That's probably OK if the tests > to be run are quick enough and they're always the same. > > But, there's already one test alone that takes on avera

[Qemu-devel] [RFC PATCH v3 0/8] ui: add generic keyboard state tracker, fix keymap

2019-01-22 Thread Gerd Hoffmann
v3: - s/kbd/qkbd/ to avoid collisons. - add api docs. - misc minor fixes. Gerd Hoffmann (8): kbd-state: add keyboard state tracker sdl2: remove sdl2_reset_keys() function kbd-state: use state tracker for sdl2 sdl2: use only QKeyCode in sdl2_process_key() kbd-state: use state tracker f

[Qemu-devel] [RFC PATCH v3 2/8] sdl2: remove sdl2_reset_keys() function

2019-01-22 Thread Gerd Hoffmann
No users left, dead code. Signed-off-by: Gerd Hoffmann --- include/ui/sdl2.h | 1 - ui/sdl2-input.c | 16 2 files changed, 17 deletions(-) diff --git a/include/ui/sdl2.h b/include/ui/sdl2.h index f43eecdbd6..fffbbfaee4 100644 --- a/include/ui/sdl2.h +++ b/include/ui/sdl2.h @

Re: [Qemu-devel] [PATCH 01/18] scripts/qemu.py: log QEMU launch command line

2019-01-22 Thread Philippe Mathieu-Daudé
On 1/17/19 7:56 PM, Cleber Rosa wrote: > Even when the launch of QEMU succeeds, it's useful to have the command > line recorded. > > Signed-off-by: Cleber Rosa > --- > scripts/qemu.py | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/scripts/qemu.py b/scripts/qemu.py > index 6e3b0e6771..

Re: [Qemu-devel] [PATCH 04/18] Acceptance tests: fix doc reference to avocado_qemu directory

2019-01-22 Thread Philippe Mathieu-Daudé
On 1/17/19 7:56 PM, Cleber Rosa wrote: > The "this directory" reference is misleading and confusing, it's a > leftover from when this text was proposed in a README file inside > the "tests/acceptance/avocado_qemu" directory. > > When that text was moved to the top level docs directory, the > refer

[Qemu-devel] [RFC PATCH v3 6/8] kbd-state: use state tracker for vnc

2019-01-22 Thread Gerd Hoffmann
Use the new keyboard state tracked for vnc. Allows to drop the vnc-specific modifier state tracking code. Signed-off-by: Gerd Hoffmann --- ui/vnc.h | 5 ++- ui/vnc.c | 120 ++- 2 files changed, 35 insertions(+), 90 deletions(-) diff

[Qemu-devel] [RFC PATCH v3 8/8] keymap: fix keyup mappings

2019-01-22 Thread Gerd Hoffmann
It is possible that the modifier state on keyup is different from the modifier state on keydown. In that case the keycode lookup can end up with different keys in case multiple keysym -> keycode mappings exist, because it picks the mapping depending on modifier state. To fix that change the looku

Re: [Qemu-devel] [PATCH PULL 00/10] RDMA queue

2019-01-22 Thread Peter Maydell
On Sat, 19 Jan 2019 at 10:03, Marcel Apfelbaum wrote: > > The following changes since commit a8d2b0685681e2f291faaa501efbbd76875f8ec8: > > Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190118' into > staging (2019-01-18 16:56:15 +) > > are available in the Git repository at: > >

Re: [Qemu-devel] [PATCH v5 4/5] hw/i386/pc: use PVH option rom

2019-01-22 Thread Stefano Garzarella
On Mon, Jan 21, 2019 at 07:33:32PM +0100, Paolo Bonzini wrote: > On 21/01/19 18:36, Stefano Garzarella wrote: > >> > >> | On Tue, Jan 15, 2019 at 01:57:22PM -0500, Michael S. Tsirkin wrote: > >> | > OK but this is guest visible so needs to be guarded by the > >> | > new machine type. > >> | > >> |

Re: [Qemu-devel] [PATCH 05/18] Acceptance tests: introduce arch parameter and attribute

2019-01-22 Thread Philippe Mathieu-Daudé
On 1/18/19 3:28 PM, Caio Carrara wrote: > Hi, Cleber. > > On Thu, Jan 17, 2019 at 01:56:15PM -0500, Cleber Rosa wrote: >> It's useful to define the architecture that should be used in >> situations such as: >> * the intended target of the QEMU binary to be used on tests >> * the architecture of

[Qemu-devel] [RFC PATCH v3 1/8] kbd-state: add keyboard state tracker

2019-01-22 Thread Gerd Hoffmann
Now that most user interfaces are using QKeyCodes it is easier to have common keyboard code useable by all user interfaces. This patch adds helper code to track the state of all keyboard keys, using a bitmap indexed by QKeyCode. Modifier state is tracked too, as separate bitmap. That makes check

Re: [Qemu-devel] [PATCH 08/18] Boot Linux Console Test: rename the x86_64 after the arch and machine

2019-01-22 Thread Philippe Mathieu-Daudé
On 1/17/19 7:56 PM, Cleber Rosa wrote: > Given that the test is specific to x86_64 and pc, and new tests are > going to be added to the same class, let's rename it accordingly. > Also, let's make the class documentation not architecture specific. > > Signed-off-by: Cleber Rosa > --- > tests/acce

[Qemu-devel] [PATCH v1] s390x/pci: Warn when adding PCI devices without the 'zpci' feature

2019-01-22 Thread David Hildenbrand
We decided to always create the PCI host bridge, even if 'zpci' is not enabled (due to migration compatibility). This however right now allows to add zPCI/PCI devices to a VM although the guest will never actually see them, confusing people that are using a simple CPU model that has no 'zpci' enabl

Re: [Qemu-devel] [PATCH 10/18] Boot Linux Console Test: refactor the console watcher into utility method

2019-01-22 Thread Philippe Mathieu-Daudé
Hi Cleber, On 1/17/19 7:56 PM, Cleber Rosa wrote: > This introduces a utility method that monitors the console device and > looks for either a message that signals the test success or failure. > > Signed-off-by: Cleber Rosa > --- > tests/acceptance/boot_linux_console.py | 30 ++-

Re: [Qemu-devel] [RFC PATCH v3 1/8] kbd-state: add keyboard state tracker

2019-01-22 Thread Daniel P . Berrangé
On Tue, Jan 22, 2019 at 10:28:07AM +0100, Gerd Hoffmann wrote: > Now that most user interfaces are using QKeyCodes it is easier to have > common keyboard code useable by all user interfaces. > > This patch adds helper code to track the state of all keyboard keys, > using a bitmap indexed by QKeyCo

Re: [Qemu-devel] [PATCH RFC 01/11] TCG translation

2019-01-22 Thread Yoshinori Sato
On Mon, 21 Jan 2019 22:35:43 +0900, Thomas Huth wrote: > > On 2019-01-21 14:15, Yoshinori Sato wrote: > > This part only supported RXv1 instructions. > > Instruction manual. > > https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01us0032ej0120_rxsm.pdf > > > > Signed-off-by: Yoshino

Re: [Qemu-devel] [PATCH v1] s390x/pci: Warn when adding PCI devices without the 'zpci' feature

2019-01-22 Thread Thomas Huth
On 2019-01-22 10:41, David Hildenbrand wrote: > We decided to always create the PCI host bridge, even if 'zpci' is not > enabled (due to migration compatibility). Couldn't we disable the host bridge for newer machine types, and just create it on the old ones for migration compatibility? > This ho

Re: [Qemu-devel] [PATCH 13/18] Boot Linux Console Test: add a test for mips64el + malta

2019-01-22 Thread Philippe Mathieu-Daudé
Hi Cleber, On 1/17/19 7:56 PM, Cleber Rosa wrote: > Similar to the x86_64 + pc test, it boots a Linux kernel on a Malta > board and verify the serial is working. > > If mips64el is a target being built, "make check-acceptance" will > automatically include this test by the use of the "arch:mips" t

Re: [Qemu-devel] [PATCH v1] s390x/pci: Warn when adding PCI devices without the 'zpci' feature

2019-01-22 Thread David Hildenbrand
On 22.01.19 10:50, Thomas Huth wrote: > On 2019-01-22 10:41, David Hildenbrand wrote: >> We decided to always create the PCI host bridge, even if 'zpci' is not >> enabled (due to migration compatibility). > > Couldn't we disable the host bridge for newer machine types, and just > create it on the

Re: [Qemu-devel] [PATCH] input-linux: customizable grab toggle keys v4

2019-01-22 Thread Gerd Hoffmann
On Sat, Jan 19, 2019 at 11:14:27PM -0500, Ryan El Kochta wrote: > This patch adds a new option to the input-linux object: > > grab-toggle=[key-combo] > > The key combination can be one of the following: > > * ctrl-ctrl left ctrl + right ctrl. > * alt-alt Same. > * meta-meta Same. > * ctrl-

Re: [Qemu-devel] [PATCH 12/18] Boot Linux Console Test: add a test for mips + malta

2019-01-22 Thread Philippe Mathieu-Daudé
Hi Cleber, On 1/17/19 7:56 PM, Cleber Rosa wrote: > From: Philippe Mathieu-Daudé > > Similar to the x86_64 + pc test, it boots a Linux kernel on a Malta > board and verify the serial is working. Also, it relies on the serial > device set by the machine itself. > > If mips is a target being bui

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

2019-01-22 Thread Cornelia Huck
On Mon, 21 Jan 2019 21:20:18 +0100 Halil Pasic wrote: > On Mon, 21 Jan 2019 12:03:51 +0100 > Cornelia Huck wrote: > > > Rework handling of multiple I/O requests to return -EAGAIN if > > we are already processing an I/O request. Introduce a mutex > > to disallow concurrent writes to the I/O regi

Re: [Qemu-devel] [PATCH v3 4/9] qcow2-threads: qcow2_co_do_compress: protect queuing by mutex

2019-01-22 Thread Vladimir Sementsov-Ogievskiy
16.01.2019 2:29, Paolo Bonzini wrote: > On 08/01/19 18:06, Vladimir Sementsov-Ogievskiy wrote: >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >> block/qcow2-threads.c | 10 +++--- >> 1 file changed, 7 insertions(+), 3 deletions(-) >> >> diff --git a/block/qcow2-threads.c b/block/qcow

Re: [Qemu-devel] [PATCH v3] .cirrus.yml: basic compile and test for FreeBSD

2019-01-22 Thread Peter Maydell
On Tue, 22 Jan 2019 at 10:11, Thomas Huth wrote: > PS: I also removed the V=1 in my tests since otherwise the log was way > to verbose for my taste ... but that's likely really just a matter of taste. I tend to run the 'make' step without V, and the 'make check' step with V=1 -- the compile part

Re: [Qemu-devel] [PATCH 00/18] Acceptance Tests: target architecture support

2019-01-22 Thread Philippe Mathieu-Daudé
Hi Aleksandar, On 1/21/19 11:15 PM, Aleksandar Markovic wrote: >> From: Cleber Rosa > >> class My(Test): >> def test_nx_cpu_flag(self): >> """ >> :avocado: tags=arch:x86_64 >> """ >> test_code() > >> The value of the "arch" key, in this case, "x86

Re: [Qemu-devel] [PATCH 1/5] roms: add the edk2 project as a git submodule

2019-01-22 Thread Laszlo Ersek
On 01/21/19 20:45, Philippe Mathieu-Daudé wrote: > On 1/21/19 7:41 PM, Laszlo Ersek wrote: >> On 01/21/19 12:25, Philippe Mathieu-Daudé wrote: >>> I suggest the following change, Daniel/Alex what do you think? >>> >>> -- >8 -- >>> diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh >>

Re: [Qemu-devel] [PATCH 18/18] Boot Linux Console Test: add a test for alpha + clipper

2019-01-22 Thread Philippe Mathieu-Daudé
On 1/17/19 7:56 PM, Cleber Rosa wrote: > Similar to the x86_64 + pc test, it boots a Linux kernel on a Malta > board and verify the serial is working. One extra command added to > the QEMU command line is '-vga std', because the kernel used is > known to crash without it. > > If alpha is a target

Re: [Qemu-devel] [PATCH 13/18] Boot Linux Console Test: add a test for mips64el + malta

2019-01-22 Thread Philippe Mathieu-Daudé
On 1/17/19 7:56 PM, Cleber Rosa wrote: > Similar to the x86_64 + pc test, it boots a Linux kernel on a Malta > board and verify the serial is working. > > If mips64el is a target being built, "make check-acceptance" will > automatically include this test by the use of the "arch:mips" tags. > > Al

Re: [Qemu-devel] [PATCH 05/23] hw/arm/iotkit: Refactor into abstract base class and subclass

2019-01-22 Thread Philippe Mathieu-Daudé
On 1/21/19 7:51 PM, Peter Maydell wrote: > The Arm SSE-200 Subsystem for Embedded is a revised and > extended version of the older IoTKit SoC. Prepare for > adding a model of it by refactoring the IoTKit code into > an abstract base class which contains the functionality, > driven by a class data b

Re: [Qemu-devel] [PATCH 06/23] hw/arm/iotkit: Rename 'iotkit' local variables and functions

2019-01-22 Thread Philippe Mathieu-Daudé
On 1/21/19 7:51 PM, Peter Maydell wrote: > Rename various internal uses of 'iotkit' in hw/arm/iotkit.c to > 'armsse', for consistency. The remaining occurences are: > * related to the devices TYPE_IOTKIT_SYSCTL, TYPE_IOTKIT_SYSINFO, >etc, which this refactor is not touching > * references tha

Re: [Qemu-devel] [PATCH 07/23] hw/arm/iotkit: Rename files to hw/arm/armsse.[ch]

2019-01-22 Thread Philippe Mathieu-Daudé
On 1/21/19 7:51 PM, Peter Maydell wrote: > Rename the files that used to be iotkit.[ch] to > armsse.[ch] to reflect the fact they new cover s/new/now/? > multiple Arm subsystems for embedded. > > Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé > --- > hw/arm/Makefile.objs

Re: [Qemu-devel] [PULL v4 00/26] qtests, typedefs and gnu99

2019-01-22 Thread Peter Maydell
On Tue, 22 Jan 2019 at 07:08, Thomas Huth wrote: > > Hi Peter! > > The following changes since commit 166609e6070fab3424510ac7292ecb585f8b80fb: > > Merge remote-tracking branch > 'remotes/amarkovic/tags/mips-queue-january-17-2019-v2' into staging > (2019-01-21 17:53:28 +) > > are availabl

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

2019-01-22 Thread Halil Pasic
On Tue, 22 Jan 2019 11:29:26 +0100 Cornelia Huck wrote: > On Mon, 21 Jan 2019 21:20:18 +0100 > Halil Pasic wrote: > > > On Mon, 21 Jan 2019 12:03:51 +0100 > > Cornelia Huck wrote: > > > > > Rework handling of multiple I/O requests to return -EAGAIN if > > > we are already processing an I/O re

Re: [Qemu-devel] [PATCH 01/18] scripts/qemu.py: log QEMU launch command line

2019-01-22 Thread Alex Bennée
Cleber Rosa writes: > Even when the launch of QEMU succeeds, it's useful to have the command > line recorded. > > Signed-off-by: Cleber Rosa > --- > scripts/qemu.py | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/scripts/qemu.py b/scripts/qemu.py > index 6e3b0e6771..ec3567d4e2 100644

Re: [Qemu-devel] [PATCH 02/18] Acceptance tests: show avocado test execution by default

2019-01-22 Thread Alex Bennée
Cleber Rosa writes: > The current version of the "check-acceptance" target will only show > one line for execution of all tests. That's probably OK if the tests > to be run are quick enough and they're always the same. > > But, there's already one test alone that takes on average ~5 seconds >

Re: [Qemu-devel] [PATCH] json: Fix % handling when not interpolating

2019-01-22 Thread Richard W.M. Jones
On Wed, Jan 02, 2019 at 03:05:35PM +0100, Christophe Fergeau wrote: > commit 8bca4613 added support for %% in json strings when interpolating, > but in doing so, this broke handling of % when not interpolating as the > '%' is skipped in both cases. > This commit ensures we only try to handle %% whe

Re: [Qemu-devel] [PATCH] json: Fix % handling when not interpolating

2019-01-22 Thread Richard W.M. Jones
On Mon, Jan 07, 2019 at 04:47:44PM +0100, Markus Armbruster wrote: > Eric Blake writes: > > > On 1/2/19 12:01 PM, Christophe Fergeau wrote: > >> Adding Markus to cc: list, I forgot to do it when sending the patch. > > > > Also worth backporting via qemu-stable, now in cc. > > > >> > >> Christoph

Re: [Qemu-devel] Bottom halves VS timers

2019-01-22 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 22/01/19 08:15, Pavel Dovgalyuk wrote: > > Scheduling new BH does not create a signal for the vCPU to suspend the > > execution and process the main loop events (in record/replay we > > synchronize these two threads). > > I think the bug is t

Re: [Qemu-devel] [PATCH v1] s390x/pci: Warn when adding PCI devices without the 'zpci' feature

2019-01-22 Thread Christian Borntraeger
On 22.01.2019 13:52, David Hildenbrand wrote: > On 22.01.19 13:44, Cornelia Huck wrote: >> On Tue, 22 Jan 2019 10:41:43 +0100 >> David Hildenbrand wrote: >> >>> We decided to always create the PCI host bridge, even if 'zpci' is not >>> enabled (due to migration compatibility). This however righ

Re: [Qemu-devel] [Bug 1798780] [NEW] hw/usb/dev-mtp.c:1616: bad test ?

2019-01-22 Thread Bandan Das
Peter Maydell writes: > On Fri, 19 Oct 2018 at 10:22, dcb <1798...@bugs.launchpad.net> wrote: >> hw/usb/dev-mtp.c:1616:52: warning: logical ‘or’ of collectively >> exhaustive tests is always true [-Wlogical-op] >> >> Source code is >> >> if ((ret == -1) && (errno != EINTR || errno

[Qemu-devel] [PATCH v4 1/3] target/ppc: Add SPRs XML generation code for gdbstub

2019-01-22 Thread Fabiano Rosas
A following patch will add support for handling the Special Purpose Registers (SPR) in GDB via gdbstub. For that purpose, GDB needs to be provided with an XML description of the registers (see gdb-xml directory). This patch adds the code that generates the XML dynamically based on the SPRs already

[Qemu-devel] [PATCH 2/2] slirp: Don't mark struct ipq or struct ipasfrag as packed

2019-01-22 Thread Peter Maydell
There is no reason to mark the struct ipq and struct ipasfrag as packed: they are naturally aligned anyway, and are not representing any on-the-wire packet format. Indeed they vary in size depending on the size of pointers on the host system, because the 'struct qlink' members include 'void *' fie

Re: [Qemu-devel] [PATCH v2 1/5] vfio-ccw: make it safe to access channel programs

2019-01-22 Thread Halil Pasic
On Mon, 21 Jan 2019 12:03:50 +0100 Cornelia Huck wrote: > When we get a solicited interrupt, the start function may have > been cleared by a csch, but we still have a channel program > structure allocated. Make it safe to call the cp accessors in > any case, so we can call them unconditionally. >

Re: [Qemu-devel] [PATCH v4] tests: vm: auto_install OpenBSD

2019-01-22 Thread Daniel P . Berrangé
On Mon, Jan 14, 2019 at 10:15:15AM +, Daniel P. Berrangé wrote: > On Mon, Jan 14, 2019 at 11:50:08AM +0800, Fam Zheng wrote: > > > > > > > On Jan 9, 2019, at 21:59, Daniel P. Berrangé wrote: > > > > > > On Wed, Jan 09, 2019 at 01:55:04PM +, Daniel P. Berrangé wrote: > > >> On Wed, Nov 1

Re: [Qemu-devel] [PATCH v3 1/4] display: ensure qxl log_buf is a nul terminated string

2019-01-22 Thread Eric Blake
On 1/22/19 10:49 AM, Daniel P. Berrangé wrote: > The QXL_IO_LOG command allows the guest to send log messages to the host > via a buffer in the QXLRam struct. QEMU prints these to the console if > the qxl 'guestdebug' option is set to non-zero. It will also feed them > to the trace subsystem if any

Re: [Qemu-devel] [PATCH 4/4] KVM: MMU: fast cleanup D bit based on fast write protect

2019-01-22 Thread Sean Christopherson
On Mon, Jan 21, 2019 at 06:37:36AM +, Zhuangyanying wrote: > > > > u64 wp_all_indicator, kvm_wp_all_gen; > > > > > > - mutex_lock(&kvm->slots_lock); > > > wp_all_indicator = get_write_protect_all_indicator(kvm); > > > kvm_wp_all_gen = get_write_protect_all_gen(wp_all_indicator); > > > >

[Qemu-devel] [PATCH v4 2/3] target/ppc: Add GDB callbacks for SPRs

2019-01-22 Thread Fabiano Rosas
These will be used to let GDB know about PPC's Special Purpose Registers (SPR). They take an index based on the order the registers appear in the XML file sent by QEMU to GDB. This index does not match the actual location of the registers in the env->spr array so the gdb_find_spr_idx function does

Re: [Qemu-devel] [PATCH v2 3/4] trace: forbid use of %m in trace event format strings

2019-01-22 Thread Eric Blake
On 1/22/19 8:32 AM, Daniel P. Berrangé wrote: >>> +++ b/hw/vfio/pci.c >>> @@ -2581,7 +2581,7 @@ static void vfio_populate_device(VFIOPCIDevice *vdev, >>> Error **errp) >>> ret = ioctl(vdev->vbasedev.fd, VFIO_DEVICE_GET_IRQ_INFO, &irq_info); >>> if (ret) { >>> /* This can fail f

Re: [Qemu-devel] [PATCH v2 3/4] trace: forbid use of %m in trace event format strings

2019-01-22 Thread Daniel P . Berrangé
On Tue, Jan 22, 2019 at 11:19:42AM -0600, Eric Blake wrote: > On 1/22/19 8:32 AM, Daniel P. Berrangé wrote: > > >>> +++ b/hw/vfio/pci.c > >>> @@ -2581,7 +2581,7 @@ static void vfio_populate_device(VFIOPCIDevice > >>> *vdev, Error **errp) > >>> ret = ioctl(vdev->vbasedev.fd, VFIO_DEVICE_GET_I

[Qemu-devel] [PATCH] usb-mtp: replace the homebrew write with qemu_write_full

2019-01-22 Thread Bandan Das
qemu_write_full takes care of partial blocking writes, as in cases of larger file sizes Suggested-by: Peter Maydell Signed-off-by: Bandan --- hw/usb/dev-mtp.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 31fa8358

Re: [Qemu-devel] [PATCH] virtio-net: Fix VirtIONet typedef redefinition

2019-01-22 Thread Michael S. Tsirkin
On Tue, Jan 22, 2019 at 06:23:34AM +0100, Thomas Huth wrote: > On 2019-01-22 06:05, Michael S. Tsirkin wrote: > > On Tue, Jan 22, 2019 at 05:28:12AM +0100, Thomas Huth wrote: > >> On 2019-01-21 20:46, Philippe Mathieu-Daudé wrote: > >>> On 1/21/19 8:22 PM, Eric Blake wrote: > On 1/21/19 12:10

Re: [Qemu-devel] [PATCH v3] .cirrus.yml: basic compile and test for FreeBSD

2019-01-22 Thread Ed Maste
On Tue, 22 Jan 2019 at 04:40, Thomas Huth wrote: > > Then I finally increased the CPUs back to 8 again, but stick with 8G of > RAM, and that indeed finished in time successfully: > > https://cirrus-ci.com/build/6218565876187136 > > So yes, looks like 8 CPUs should work indeed, but I think you sho

Re: [Qemu-devel] [PATCH v3 3/4] trace: forbid use of %m in trace event format strings

2019-01-22 Thread Eric Blake
On 1/22/19 10:49 AM, Daniel P. Berrangé wrote: > The '%m' format specifier instructs glibc's printf() implementation to > insert the contents of strerror(errno). Since this is a glibc extension > it should generally be avoided in QEMU due to need for portability to a > variety of platforms. Up to

[Qemu-devel] [PATCH v1 1/2] s390x/pci: Fix primary bus number for PCI bridges

2019-01-22 Thread David Hildenbrand
The primary bus number corresponds always to the bus number of the bus the bridge is attached to. Right now, if we have two bridges attached to the same bus (e.g. root bus) this is however not the case. Fix assignment. While at it - Add a comment why we have to reassign durign every reset (which

[Qemu-devel] [PULL v1 0/3] Xilinx queue

2019-01-22 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" The following changes since commit e56b86bc7735dd076939fa33a76e1ee9d5907e47: Merge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' into staging (2019-01-21 19:19:47 +) are available in the Git repository at: g...@github.com:edgarigl/qemu.git t

Re: [Qemu-devel] [PATCH 0/4] Add ignore-external migration capability

2019-01-22 Thread Dr. David Alan Gilbert
* Yury Kotov (yury-ko...@yandex-team.ru) wrote: > Hi, > > Just want to clarify your suggestions. > > 1) migrate=off/share=on > > I'm not sure that adding new flag 'migrate=off' is a good idea. I think that > share=on as you suggested at first is enough. > * It's a new flag which has sense only w

Re: [Qemu-devel] [PATCH v1] s390x/pci: Warn when adding PCI devices without the 'zpci' feature

2019-01-22 Thread Cornelia Huck
On Tue, 22 Jan 2019 10:41:43 +0100 David Hildenbrand wrote: > We decided to always create the PCI host bridge, even if 'zpci' is not > enabled (due to migration compatibility). This however right now allows > to add zPCI/PCI devices to a VM although the guest will never actually see > them, confu

  1   2   3   4   >