Re: [PATCH 4/4] ui: Fix gtk/gl when the scaled virtual console does not fit the window

2021-12-20 Thread Marc-André Lureau
Hi On Sun, Dec 19, 2021 at 6:32 AM Alexander Orzechowski < orzechowski.alexan...@gmail.com> wrote: > gtk/gl was incorrectly always rendering as if the 'Zoom to Fit' was > always checked even if it wasn't. This is now using logic closer > to what is being used for the existing cairo code paths. >

[PULL v2 33/36] option: add g_auto for QemuOpts

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Used in the next commit. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- include/qemu/option.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/option.h b/include/qemu/option.h index 306bf0757509..bbd86e1c4eab 100644 ---

Re: [PATCH 2/4] ui: Remove unnecessary checks

2021-12-20 Thread Marc-André Lureau
Hi On Sun, Dec 19, 2021 at 6:32 AM Alexander Orzechowski < orzechowski.alexan...@gmail.com> wrote: > These conditionals should never be false as scale_x and scale_y should > scale the fbw and fbh variables such that the ww and wh variables always > have a greater magnitude. > > Signed-off-by:

Re: [PATCH v4 3/3] target/riscv: Implement the stval/mtval illegal instruction

2021-12-20 Thread Bin Meng
On Mon, Dec 20, 2021 at 2:49 PM Alistair Francis wrote: > > From: Alistair Francis > > The stval and mtval registers can optionally contain the faulting > instruction on an illegal instruction exception. This patch adds support > for setting the stval and mtval registers. > > The RISC-V spec

[PULL v2 28/36] tests: start dbus-display-test

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Cover basic display interface usage. More cases to be added to cover disconnections, multiple connections, corner cases. At this point, they would be better written in Rust or Python though. The proxy also covers reading the properties, since they are automatically

Re: [PATCH v4 2/3] target/riscv: Fixup setting GVA

2021-12-20 Thread Bin Meng
On Mon, Dec 20, 2021 at 2:49 PM Alistair Francis wrote: > > From: Alistair Francis > > In preperation for adding support for the illegal instruction address typo: preparation > let's fixup the Hypervisor extension setting GVA logic and improve the > variable names. > > Signed-off-by: Alistair

[PULL v2 25/36] ui: add a D-Bus display backend

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau The "dbus" display backend exports the QEMU consoles and other UI-related interfaces over D-Bus. By default, the connection is established on the session bus, but you can specify a different bus with the "addr" option. The backend takes the "org.qemu" service name,

Re: [PATCH 1/4] ui: Use allocated size instead of window size

2021-12-20 Thread Marc-André Lureau
Hi On Sun, Dec 19, 2021 at 6:33 AM Alexander Orzechowski < orzechowski.alexan...@gmail.com> wrote: > In these cases, we only care about the size of the virtual console > itself. Previously, these calculations were made using the size of > the entire window, which would include the size of the

[PULL v2 20/36] docs/sphinx: add sphinx modules to include D-Bus documentation

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Add a new dbus-doc directive to import D-Bus interfaces documentation from the introspection XML. The comments annotations follow the gtkdoc/kerneldoc style, and should be formatted with reST. Note: I realize after the fact that I was implementing those modules with

Re: [PATCH v4 1/3] target/riscv: Set the opcode in DisasContext

2021-12-20 Thread Bin Meng
On Mon, Dec 20, 2021 at 2:49 PM Alistair Francis wrote: > > From: Alistair Francis > > Signed-off-by: Alistair Francis > Reviewed-by: Richard Henderson > --- > target/riscv/translate.c | 2 ++ > 1 file changed, 2 insertions(+) > I remember I once reviewed the whole series. Not sure what

[PULL v2 32/36] chardev: make socket derivable

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- include/chardev/char-socket.h | 84 +++ chardev/char-socket.c | 58 +--- 2 files changed, 85 insertions(+), 57

[PULL v2 19/36] scripts: teach modinfo to skip non-C sources

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- scripts/modinfo-collect.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/modinfo-collect.py b/scripts/modinfo-collect.py index 4acb188c3e89..61b90688c6dc 100755 ---

[PULL v2 36/36] MAINTAINERS: update D-Bus section

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- MAINTAINERS | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1de6ce6e44eb..dc4b6f7c1e06 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2873,11

[PULL v2 35/36] ui/dbus: register D-Bus VC handler

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Export the default consoles over the D-Bus chardev. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- ui/dbus.c | 53 + 1 file changed, 53 insertions(+) diff --git a/ui/dbus.c b/ui/dbus.c index

[PULL v2 29/36] audio: add "dbus" audio backend

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Add a new -audio backend that accepts D-Bus clients/listeners to handle playback & recording, to be exported via the -display dbus. Example usage: -audiodev dbus,in.mixing-engine=off,out.mixing-engine=off,id=dbus -display dbus,audiodev=dbus Signed-off-by: Marc-André

[PULL v2 16/36] ui: split the GL context in a different object

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau This will allow to have one GL context but a variable number of listeners. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- include/ui/console.h | 34 ++ include/ui/egl-context.h | 6 +++--- include/ui/gtk.h

[PULL v2 31/36] chardev: teach socket to accept no addresses

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau The following patches are going to use CharSocket as a base class for sockets that are created with a given fd (without a given address). Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- chardev/char-socket.c | 14 +- 1 file changed, 9

[PULL v2 30/36] ui/dbus: add clipboard interface

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Expose the clipboard API over D-Bus. See the interface documentation for further details. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- ui/dbus.h| 14 ++ ui/dbus-clipboard.c | 457 +++ ui/dbus.c

[PULL v2 26/36] ui/dbus: add p2p=on/off option

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Add an option to use direct connections instead of via the bus. Clients are accepted with QMP add_client. This allows to provide the D-Bus display without a bus. It also simplifies the testing setup (some CI have issues to setup a D-Bus bus in a container).

[PULL v2 22/36] docs: move D-Bus VMState documentation to source XML

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Use the source XML document as single reference, importing its documentation via the dbus-doc directive. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- docs/interop/dbus-vmstate.rst | 52 ++- backends/dbus-vmstate1.xml

[PULL v2 15/36] ui: dispatch GL events to all listeners

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau For now, only one listener can receive GL events. Let's dispatch to all listeners. (preliminary check ensure there is a single listener now during regitration, and in next patches, compatible listeners only) Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann ---

[PULL v2 24/36] build-sys: set glib dependency version

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Further meson configuration tests are to be added based on the glib version. Also correct the version reporting in the config log. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- configure | 1 + meson.build | 6

[PULL v2 27/36] tests/qtests: add qtest_qmp_add_client()

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- tests/qtest/libqos/libqtest.h | 10 ++ tests/qtest/libqtest.c| 19 +++ 2 files changed, 29 insertions(+) diff --git a/tests/qtest/libqos/libqtest.h

[PULL v2 18/36] console: save current scanout details

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Add a new DisplayScanout structure to save the current scanout details. This allows to attach later UI backends and set the scanout. Introduce displaychangelistener_display_console() helper function to handle the dpy_gfx_switch/gl_scanout() & dpy_gfx_update() calls.

[PULL v2 11/36] ui: associate GL context outside of display listener registration

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Consoles can have an associated GL context, without listeners (they may be added or removed later on). Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- ui/console.c | 7 +-- ui/egl-headless.c | 1 + ui/gtk.c | 3 +++ ui/sdl2.c

[PULL v2 21/36] backends: move dbus-vmstate1.xml to backends/

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Although not used by the backend itself, use a common location for documentation and sharing purposes. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- {tests/qtest => backends}/dbus-vmstate1.xml | 0 tests/qtest/meson.build | 2 +- 2

[PULL v2 23/36] docs: add dbus-display documentation

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Wire up the dbus-display documentation. The interface and feature is implemented next. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- docs/interop/dbus-display.rst | 31 +++ docs/interop/dbus.rst | 2 ++

[PULL v2 17/36] ui: move qemu_spice_fill_device_address to ui/util.c

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Other backends can use it. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- include/ui/console.h | 6 +++ include/ui/spice-display.h | 4 -- hw/display/qxl.c | 7 +++- ui/spice-core.c| 50 -

[PULL v2 06/36] ui/clipboard: add a clipboard reset serial event

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- include/ui/clipboard.h | 9 + ui/clipboard.c | 7 +++ ui/gtk-clipboard.c | 3 +++ ui/vdagent.c | 12 ui/vnc-clipboard.c | 3 +++ ui/cocoa.m |

[PULL v2 10/36] ui: factor out qemu_console_set_display_gl_ctx()

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau The next patch will make use of this function to dissociate DisplayChangeListener from GL context. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- include/ui/console.h | 3 +++ ui/console.c | 22

[PULL v2 14/36] ui: simplify gl unblock & flush

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau GraphicHw.gl_flushed was introduced to notify the device (vhost-user-gpu) that the GL resources (the display scanout) are no longer needed. It was decoupled from QEMU own gl-blocking mechanism, but that difference isn't helping. Instead, we can reuse QEMU gl-blocking and

[PULL v2 12/36] ui: make gl_block use a counter

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Track multiple callers blocking requests. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- ui/console.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ui/console.c b/ui/console.c index 87f897e46dc4..39f7b66baf54

[PULL v2 03/36] ui: generalize clipboard notifier

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Use a QemuClipboardNotify union type for extendable clipboard events. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- include/ui/clipboard.h | 32 ++-- ui/clipboard.c | 12 ui/gtk-clipboard.c | 20

[PULL v2 08/36] virtio-gpu: use VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau It's part of Linux headers for a while now. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- hw/display/virtio-gpu-virgl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL v2 13/36] ui: add a gl-unblock warning timer

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Similar to the one that exists for Spice, so we can investigate if something is locked. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- ui/console.c | 17 + 1 file changed, 17 insertions(+) diff --git a/ui/console.c b/ui/console.c index

[PULL v2 05/36] ui/clipboard: add qemu_clipboard_check_serial()

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- include/ui/clipboard.h | 10 ++ ui/clipboard.c | 15 +++ 2 files changed, 25 insertions(+) diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h index

[PULL v2 02/36] ui/vdagent: replace #if 0 with protocol version check

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- ui/vdagent.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index 1f8fc77ee8f3..64e00170017f 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -87,8

[PULL v2 07/36] hw/display: report an error if virgl initialization failed

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Currently, virgl initialization error is silent. Make it verbose instead. (this is likely going to bug later on, as the device isn't fully initialized) Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé ---

[PULL v2 09/36] ui: do not delay further remote resize

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau A remote client, such as Spice, will already avoid flooding the stream by delaying the resize requests. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- include/ui/console.h | 2 +- ui/console.c | 5 +++-- ui/gtk.c | 2 +- ui/sdl2.c

[PULL v2 04/36] ui/vdagent: add serial capability support

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau The Spice agent implements a simple serial mechanism to avoid clipboard races between client & guest. See: https://gitlab.freedesktop.org/spice/spice-protocol/-/commit/045a6978d6dbbf7046affc5c321fa8177c8cce56 Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann ---

[PULL v2 01/36] ui/vdagent: add CHECK_SPICE_PROTOCOL_VERSION

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- meson.build | 5 + ui/vdagent.c | 8 2 files changed, 13 insertions(+) diff --git a/meson.build b/meson.build index f45ecf31bdbe..1c70839bbf17 100644 --- a/meson.build +++ b/meson.build @@

[PULL v2 00/36] ui: D-Bus display backend

2021-12-20 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 2bf40d0841b942e7ba12953d515e62a436f0af84: Merge tag 'pull-user-20211220' of https://gitlab.com/rth7680/qemu into staging (2021-12-20 13:20:07 -0800) are available in the Git repository at: https://gitlab.com/marcandre.lureau

Re: [PATCH v2 9/9] hw/riscv: virt: Set the clock-frequency

2021-12-20 Thread Bin Meng
On Tue, Dec 21, 2021 at 2:32 PM Alistair Francis wrote: > > On Mon, Dec 20, 2021 at 5:52 PM Bin Meng wrote: > > > > On Thu, Dec 16, 2021 at 12:55 PM Alistair Francis > > wrote: > > > > > > From: Alistair Francis > > > > > > As per the device tree specification let's set the clock-frequency for

Re: [PATCH v7 12/18] target/riscv: support for 128-bit shift instructions

2021-12-20 Thread Alistair Francis
On Tue, Dec 14, 2021 at 2:52 AM Frédéric Pétrot wrote: > > Handling shifts for 32, 64 and 128 operation length for RV128, following the > general framework for handling various olens proposed by Richard. > > Signed-off-by: Frédéric Pétrot > Co-authored-by: Fabien Portas Reviewed-by: Alistair

Re: [PATCH v5 13/23] target/riscv: Implement AIA mtopi, stopi, and vstopi CSRs

2021-12-20 Thread Alistair Francis
On Sat, Dec 11, 2021 at 2:34 PM Anup Patel wrote: > > The AIA specification introduces new [m|s|vs]topi CSRs for > reporting pending local IRQ number and associated IRQ priority. > > Signed-off-by: Anup Patel > --- > target/riscv/csr.c | 155 + > 1

RE: [PATCH] tests/qtest: Make the filter tests independent from a specific NIC

2021-12-20 Thread Zhang, Chen
> -Original Message- > From: Qemu-devel bounces+chen.zhang=intel@nongnu.org> On Behalf Of Thomas Huth > Sent: Monday, December 20, 2021 6:30 PM > To: qemu-devel@nongnu.org; Laurent Vivier > Cc: Paolo Bonzini ; Yang Hongyang > ; Zhang Chen > Subject: [PATCH] tests/qtest: Make the

Re: [PATCH] target/riscv/pmp: fix no pmp illegal intrs

2021-12-20 Thread Alistair Francis
On Wed, Dec 15, 2021 at 1:00 AM Nikita Shubin wrote: > > From: Nikita Shubin > > As per the privilege specification, any access from S/U mode should fail > if no pmp region is configured and pmp is present, othwerwise access > should succeed. > > Fixes: d102f19a208 (target/riscv/pmp: Raise

Re: [PATCH v2 9/9] hw/riscv: virt: Set the clock-frequency

2021-12-20 Thread Alistair Francis
On Mon, Dec 20, 2021 at 5:52 PM Bin Meng wrote: > > On Thu, Dec 16, 2021 at 12:55 PM Alistair Francis > wrote: > > > > From: Alistair Francis > > > > As per the device tree specification let's set the clock-frequency for > > the virt CPUs. > > > > QEMU doesn't really have an exact clock, so

[PATCH v11 31/31] tests/docker: Add gentoo-loongarch64-cross image and run cross builds in GitLab

2021-12-20 Thread WANG Xuerui
Normally this would be based on qemu/debian10 or qemu/ubuntu2004, but after a week-long struggle, I still cannot build stage2 gcc with the known-good LoongArch toolchain sources, so I chose the least-resistance path with Gentoo as base image. As this image is not expected to be re-built by CI,

[PATCH v11 29/31] linux-user: Implement CPU-specific signal handler for loongarch64 hosts

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- linux-user/host/loongarch64/host-signal.h | 87 +++ 1 file changed, 87 insertions(+) create mode 100644 linux-user/host/loongarch64/host-signal.h diff --git

Re: [PATCH] failover: Silence warning messages during qtest

2021-12-20 Thread Jason Wang
On Mon, Dec 20, 2021 at 10:53 PM Laurent Vivier wrote: > > virtio-net-failover test tries several device combinations that produces > some expected warnings. > These warning can be confusing, so we disable them during the qtest > sequence. > > Reported-by: Thomas Huth > Signed-off-by: Laurent

[PATCH v11 25/31] tcg/loongarch64: Implement exit_tb/goto_tb

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 0b7d6458c5..92a30b791a 100644 ---

[PATCH v11 30/31] configure, meson.build: Mark support for loongarch64 hosts

2021-12-20 Thread WANG Xuerui
Example output of `uname -a` on an initial Gentoo LA64 port, running the upstream submission version of Linux (with some very minor patches not influencing output here): > Linux 5.14.0-10342-g37a00851b145 #5 SMP PREEMPT Tue Aug 10 > 12:56:24 PM CST 2021 loongarch64 GNU/Linux And the same on

[PATCH v11 28/31] common-user: Add safe syscall handling for loongarch64 hosts

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- .../host/loongarch64/safe-syscall.inc.S | 90 +++ 1 file changed, 90 insertions(+) create mode 100644 common-user/host/loongarch64/safe-syscall.inc.S diff --git

[PATCH v11 26/31] tcg/loongarch64: Implement tcg_target_init

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 92a30b791a..19bfc135f6 100644 ---

[PATCH v11 24/31] tcg/loongarch64: Implement tcg_target_qemu_prologue

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 68 1 file changed, 68 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index f67d5fa110..0b7d6458c5 100644 ---

[PATCH v11 27/31] tcg/loongarch64: Register the JIT

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 44 1 file changed, 44 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 19bfc135f6..9cd46c9be3 100644 ---

[PATCH v11 22/31] tcg/loongarch64: Implement simple load/store ops

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 131 +++ 2 files changed, 132 insertions(+) diff --git

[PATCH v11 19/31] tcg/loongarch64: Implement br/brcond ops

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 53 2 files changed, 54 insertions(+) diff --git

[PATCH v11 23/31] tcg/loongarch64: Add softmmu load/store helpers, implement qemu_ld/qemu_st ops

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 2 + tcg/loongarch64/tcg-target.c.inc | 353 +++ 2 files changed, 355 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-set.h

[PATCH v11 20/31] tcg/loongarch64: Implement setcond ops

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 69 2 files changed, 70 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-set.h

[PATCH v11 15/31] tcg/loongarch64: Implement clz/ctz ops

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 42 tcg/loongarch64/tcg-target.h | 8 +++--- 3 files changed, 47 insertions(+), 4 deletions(-) diff --git

[PATCH v11 16/31] tcg/loongarch64: Implement shl/shr/sar/rotl/rotr ops

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 91 tcg/loongarch64/tcg-target.h | 4 +- 3 files changed, 94

[PATCH v11 17/31] tcg/loongarch64: Implement add/sub ops

2021-12-20 Thread WANG Xuerui
The neg_i{32,64} ops is fully expressible with sub, so omitted for simplicity. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 2 ++ tcg/loongarch64/tcg-target.c.inc | 38

[PATCH v11 14/31] tcg/loongarch64: Implement bswap{16,32,64} ops

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target.c.inc | 32 tcg/loongarch64/tcg-target.h | 10 +- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git

[PATCH v11 21/31] tcg/loongarch64: Implement tcg_out_call

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 34 1 file changed, 34 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 23c151f473..151d3308ea 100644 ---

[PATCH v11 18/31] tcg/loongarch64: Implement mul/mulsh/muluh/div/divu/rem/remu ops

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 65 tcg/loongarch64/tcg-target.h | 16 +++ 3 files changed, 74

[PATCH v11 10/31] tcg/loongarch64: Implement goto_ptr

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 17 + tcg/loongarch64/tcg-target.c.inc | 15 +++ 2 files changed, 32 insertions(+) create mode 100644

[PATCH v11 12/31] tcg/loongarch64: Implement not/and/or/xor/nor/andc/orc ops

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 2 + tcg/loongarch64/tcg-target.c.inc | 88 tcg/loongarch64/tcg-target.h | 16 ++--- 3 files changed, 98

[PATCH v11 13/31] tcg/loongarch64: Implement deposit/extract ops

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 21 + tcg/loongarch64/tcg-target.h | 8 3 files changed, 26 insertions(+),

[PATCH v11 11/31] tcg/loongarch64: Implement sign-/zero-extension ops

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 82 tcg/loongarch64/tcg-target.h | 24 3 files changed, 95

[PATCH v11 09/31] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target.c.inc | 137 +++ 1 file changed, 137 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index

[PATCH v11 06/31] tcg/loongarch64: Define the operand constraints

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-str.h | 28 +++ tcg/loongarch64/tcg-target.c.inc | 52 2 files changed, 80 insertions(+) create mode 100644

[PATCH v11 07/31] tcg/loongarch64: Implement necessary relocation operations

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target.c.inc | 66 1 file changed, 66 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index

[PATCH v11 08/31] tcg/loongarch64: Implement the memory barrier op

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target.c.inc | 32 1 file changed, 32 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index

[PATCH v11 05/31] tcg/loongarch64: Add register names, allocation order and input/output sets

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 118 +++ 1 file changed, 118 insertions(+) create mode 100644 tcg/loongarch64/tcg-target.c.inc diff --git a/tcg/loongarch64/tcg-target.c.inc

[PATCH v11 03/31] tcg/loongarch64: Add the tcg-target.h file

2021-12-20 Thread WANG Xuerui
Support for all optional TCG ops are initially marked disabled; the bits are to be set in individual commits later. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target.h | 180 +++ 1 file

[PATCH v11 04/31] tcg/loongarch64: Add generated instruction opcodes and encoding helpers

2021-12-20 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Acked-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-insn-defs.c.inc | 979 1 file changed, 979 insertions(+) create mode 100644 tcg/loongarch64/tcg-insn-defs.c.inc diff --git

[PATCH v11 02/31] MAINTAINERS: Add tcg/loongarch64 entry with myself as maintainer

2021-12-20 Thread WANG Xuerui
I ported the initial code, so I should maintain it of course. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1de6ce6e44..4f6e0de3fb 100644

[PATCH v11 01/31] elf: Add machine type value for LoongArch

2021-12-20 Thread WANG Xuerui
This is already officially allocated as recorded in GNU binutils repo [1], and the description is updated in [2]. Add to enable further work. [1]: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=4cf2ad720078a9f490dd5b5bc8893a926479196e [2]:

[PATCH v11 00/31] LoongArch64 port of QEMU TCG

2021-12-20 Thread WANG Xuerui
Hi all, This is a port of QEMU TCG to the brand-new CPU architecture LoongArch, introduced by Loongson with their 3A5000 chips. Everything is tested on real 3A5000 board (system emulation, linux-user, make check) and GitLab (CI jobs), and rebased to latest master branch. ## About the series

Re: [PATCH v4 11/14] vfio-user: IOMMU support for remote device

2021-12-20 Thread Jag Raman
> On Dec 20, 2021, at 9:36 AM, Stefan Hajnoczi wrote: > > On Fri, Dec 17, 2021 at 08:00:35PM +, Jag Raman wrote: >>> On Dec 16, 2021, at 9:40 AM, Stefan Hajnoczi wrote: >>> >>> On Wed, Dec 15, 2021 at 10:35:35AM -0500, Jagannathan Raman wrote: Assign separate address space for each

Re: [RFC PATCH v3 16/27] hw/loongarch: Add LoongArch cpu interrupt support(CPUINTC)

2021-12-20 Thread yangxiaojuan
Hi,Mark On 12/18/2021 07:54 AM, Mark Cave-Ayland wrote: > On 04/12/2021 12:07, Xiaojuan Yang wrote: > >> Loongson-3A5000 support 14 interrupts from 64 - 77(Timer->75 IPI->76) >> Loongson-3A5000 and ls7a form a legacy model and extended model irq >> hierarchy.Tcg mode emulate a simplified

Re: [PATCH v4 07/14] vfio-user: run vfio-user context

2021-12-20 Thread Jag Raman
> On Dec 20, 2021, at 3:29 AM, Stefan Hajnoczi wrote: > > On Fri, Dec 17, 2021 at 05:59:48PM +, Jag Raman wrote: >> >> >>> On Dec 16, 2021, at 6:17 AM, Stefan Hajnoczi wrote: >>> >>> On Wed, Dec 15, 2021 at 10:35:31AM -0500, Jagannathan Raman wrote: @@ -114,6 +118,62 @@ static

[PATCH v2 6/7] linux-user/nios2: Fix sigmask in setup_rt_frame

2021-12-20 Thread Richard Henderson
Do not cast the signal mask elements; trust __put_user. Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/nios2/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user/nios2/signal.c b/linux-user/nios2/signal.c index

[PATCH v2 4/7] linux-user/nios2: Map a real kuser page

2021-12-20 Thread Richard Henderson
The first word of page1 is data, so the whole thing can't be implemented with emulation of addresses. Use init_guest_commpage for the allocation. Hijack trap number 16 to implement cmpxchg. Signed-off-by: Richard Henderson --- linux-user/elfload.c| 50

[PATCH v2 7/7] linux-user/nios2: Use set_sigmask in do_rt_sigreturn

2021-12-20 Thread Richard Henderson
Using do_sigprocmask directly was incorrect, as it will leave the signal blocked by the outer layers of linux-user. Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/nios2/signal.c | 2 +- linux-user/signal.c | 2 -- 2 files changed, 1 insertion(+), 3

[PATCH v2 3/7] linux-user/elfload: Rename ARM_COMMPAGE to HI_COMMPAGE

2021-12-20 Thread Richard Henderson
Arm will no longer be the only target requiring a commpage, but it will continue to be the only target placing the page at the high end of the address space. Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/elfload.c | 18 +- 1 file changed, 9

[PATCH v2 2/7] linux-user/nios2: Fixes for signal frame setup

2021-12-20 Thread Richard Henderson
Do not confuse host and guest addresses. Lock and unlock the target_rt_sigframe structure in setup_rt_sigframe. Since rt_setup_ucontext always returns 0, drop the return value entirely. This eliminates the only write to the err variable in setup_rt_sigframe. Always copy the siginfo structure.

[PATCH v2 5/7] linux-user/nios2: Fix EA vs PC confusion

2021-12-20 Thread Richard Henderson
The real kernel will talk about the user PC as EA, because that's where the hardware will have copied it, and where it expects to put it to then use ERET. But qemu does not emulate all of the exception stuff while emulating user-only. Manipulate PC directly. This fixes signal entry and return,

[PATCH v2 1/7] linux-user/nios2: Properly emulate EXCP_TRAP

2021-12-20 Thread Richard Henderson
The real kernel has to load the instruction and extract the imm5 field; for qemu, modify the translator to do this. The use of R_AT for this in cpu_loop was a bug. Handle the other trap numbers as per the kernel's trap_table. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson ---

[PATCH v2 0/7] linux-user: nios2 fixes

2021-12-20 Thread Richard Henderson
Fixes syscalls and signals for nios2. Works with the docker cross-compile toolchain that has been committed. r~ Richard Henderson (7): linux-user/nios2: Properly emulate EXCP_TRAP linux-user/nios2: Fixes for signal frame setup linux-user/elfload: Rename ARM_COMMPAGE to HI_COMMPAGE

Re: [PULL 07/16] configure, meson: move ARCH to meson.build

2021-12-20 Thread Richard Henderson
On 12/19/21 6:17 AM, Paolo Bonzini wrote: $ARCH and the HOST_* symbols are only used by the QEMU build; configure uses $cpu instead. Remove it from config-host.mak. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- configure | 21 - meson.build | 26

Re: powernv gitlab ci regression

2021-12-20 Thread Daniel Henrique Barboza
Hey, On 12/20/21 18:35, Richard Henderson wrote: Hi guys, Somewhere within Merge tag 'pull-ppc-20211217' of https://github.com/legoater/qemu into staging ppc 7.0 queue: * General cleanup for Mac machines (Peter) * Fixes for FPU exceptions (Lucas) * Support for new ISA31 instructions

[PATCH] ps2: Initial horizontal scroll support

2021-12-20 Thread Dmitry Petrov
This patch introduces horizontal scroll support for the ps/2 mouse. It includes changes in the ps/2 device driver as well as support for three display options - cocoa, gtk and sdl, tested and working on all of them against guest ubuntu system. The patch is based on the previous work by Brad

Re: [PULL 00/15] *-user: simplify safe signal handling

2021-12-20 Thread Richard Henderson
/rth7680/qemu.git tags/pull-user-20211220 for you to fetch changes up to 3363615a65af8a09d8adbd19ed3ae6b52f26ca7a: meson: Move bsd_user_ss to bsd-user/ (2021-12-20 10:13:43 -0800) Move errno processing from safe_syscall

Re: [PATCH 00/47] Patch Round-up for stable 6.1.1, freeze on 2021-12-21

2021-12-20 Thread Michael Roth via
On Tue, Dec 14, 2021 at 06:00:38PM -0600, Michael Roth wrote: > Hi everyone, > > The following new patches are queued for QEMU stable v6.1.1: > > https://gitlab.com/qemu-project/qemu/-/commits/stable-6.1-staging/ > > Patch freeze is 2021-12-21, and the release is planned for 2021-12-23: > >

Re: [PATCH] pci: Skip power-off reset when pending unplug

2021-12-20 Thread Michael S. Tsirkin
On Mon, Dec 20, 2021 at 11:26:59AM -0700, Alex Williamson wrote: > The below referenced commit introduced a change where devices under a > root port slot are reset in response to removing power to the slot. > This improves emulation relative to bare metal when the slot is powered > off, but

RE: [PATCH v7 01/13] target/hexagon: update MAINTAINERS for idef-parser

2021-12-20 Thread Taylor Simpson
> -Original Message- > From: Anton Johansson > Sent: Friday, December 17, 2021 2:01 AM > To: qemu-devel@nongnu.org > Cc: a...@rev.ng; Taylor Simpson ; Brian Cain > ; bab...@rev.ng; ni...@rev.ng; > richard.hender...@linaro.org > Subject: [PATCH v7 01/13] target/hexagon: update

Re: [PATCH v4 07/24] linux-user: Remove TARGET_NSIGFPE

2021-12-20 Thread Philippe Mathieu-Daudé
On 12/20/21 22:05, Richard Henderson wrote: > This define is unused, and we have no similar define for > the other signal sub-codes. > > Signed-off-by: Richard Henderson > --- > linux-user/syscall_defs.h | 1 - > 1 file changed, 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

  1   2   3   4   >