Re: [PATCH v2 23/23] test-clone-visitor: Correct an accidental rename

2021-09-24 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 9/17/21 16:31, Markus Armbruster wrote: >> Commit b359f4b203 "tests: Rename UserDefNativeListUnion to >> UserDefListUnion" renamed test_clone_native_list() to >> test_clone_list_union(). The function has nothing to do with unions. >> Rename it to

Re: [PATCH v5 04/30] tcg/loongarch64: Add generated instruction opcodes and encoding helpers

2021-09-24 Thread WANG Xuerui
Hi all, On 9/25/21 01:25, WANG Xuerui wrote: Signed-off-by: WANG Xuerui Acked-by: Richard Henderson --- tcg/loongarch64/tcg-insn-defs.c.inc | 979 1 file changed, 979 insertions(+) create mode 100644 tcg/loongarch64/tcg-insn-defs.c.inc This patch series is

Re: [PATCH v5 23/30] tcg/loongarch64: Add softmmu load/store helpers, implement qemu_ld/qemu_st ops

2021-09-24 Thread Richard Henderson
On 9/24/21 1:25 PM, WANG Xuerui wrote: Signed-off-by: WANG Xuerui --- tcg/loongarch64/tcg-target-con-set.h | 2 + tcg/loongarch64/tcg-target.c.inc | 353 +++ 2 files changed, 355 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH 14/14] bsd-user/signal: Create a dummy signal queueing function

2021-09-24 Thread Richard Henderson
On 9/24/21 4:11 PM, Warner Losh wrote: It brings to mind something else... There's times it might be easier to refactor between bsd-user and linux-user rather than upstream something that's largely copied from linux-user. Is there a good way to do that and talk about the design before I sink a

[PATCH v2] ui/gtk: skip any extra draw of same guest scanout blob res

2021-09-24 Thread Dongwon Kim
Any extra draw call for the same blob resource representing guest scanout before the previous drawing is not finished can break synchronous draw sequence. To prevent this, drawing is now done only once for each draw submission (when draw_submitted == true). v2: - removed mutex - updated commit

Re: [PATCH v2 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-09-24 Thread John Snow
On Tue, Sep 7, 2021 at 4:28 AM Markus Armbruster wrote: > John Snow writes: > > > It simplifies the typing to say that _section is always a > > QAPIDoc.Section(). > > If you say so > > I mean, I thought so at the time. I have an aversion to making optional types and then littering

Re: [External] Re: [RFC v7] virtio/vsock: add two more queues for datagram types

2021-09-24 Thread Jiang Wang .
On Thu, Sep 23, 2021 at 2:18 AM Stefano Garzarella wrote: > > On Wed, Sep 22, 2021 at 10:36:24AM -0700, Jiang Wang . wrote: > >On Wed, Sep 22, 2021 at 2:23 AM Stefano Garzarella > >wrote: > >> > >> On Wed, Sep 22, 2021 at 12:00:24AM +, Jiang Wang wrote: > >> >Datagram sockets are

Re: [PATCH v4 01/35] acpi: add helper routines to initialize ACPI tables

2021-09-24 Thread Stefan Berger
On 9/24/21 8:27 AM, Igor Mammedov wrote: Patch introduces acpi_table_begin()/ acpi_table_end() API that hides pointer/offset arithmetic from user as opposed to build_header(), to prevent errors caused by it [1]. acpi_table_begin(): initializes table header and keeps track of

Re: [PATCH v4 15/35] acpi: build_tpm_tcpa: use acpi_table_begin()/acpi_table_end() instead of build_header()

2021-09-24 Thread Stefan Berger
On 9/24/21 8:27 AM, Igor Mammedov wrote: it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. While at it switch to build_append_int_noprefix() to build table entries (which also removes

Re: [PATCH 14/14] bsd-user/signal: Create a dummy signal queueing function

2021-09-24 Thread Kyle Evans
On Fri, Sep 24, 2021 at 3:11 PM Warner Losh wrote: > > > > On Fri, Sep 24, 2021 at 6:00 AM Richard Henderson > wrote: >> >> On 9/21/21 11:14 PM, Warner Losh wrote: >> > Create dummy signal queueing function so we can start to integrate other >> > architectures (at the cost of signals remaining

Re: [PATCH 14/14] bsd-user/signal: Create a dummy signal queueing function

2021-09-24 Thread Warner Losh
On Fri, Sep 24, 2021 at 6:00 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 9/21/21 11:14 PM, Warner Losh wrote: > > Create dummy signal queueing function so we can start to integrate other > > architectures (at the cost of signals remaining broken) to tame the > > dependency

[PATCH 1/5] fuse: Header file changes for FUSE_SECURITY_CTX

2021-09-24 Thread Vivek Goyal
These are just header file changes which should show up in qemu if corresponding kernel changes get merged. Signed-off-by: Vivek Goyal --- include/standard-headers/linux/fuse.h | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git

[PATCH 2/5] fuse_lowlevel.c: Add capability to parse security context

2021-09-24 Thread Vivek Goyal
Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_common.h | 5 +++ tools/virtiofsd/fuse_i.h| 7

[PATCH 3/5] virtiofsd: Move core file creation code in separate function

2021-09-24 Thread Vivek Goyal
Move core file creation bits in a separate function. Soon this is going to get more complex as file creation need to set security context also. And there will be multiple modes of file creation in next patch. Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 36

[PATCH 0/5] virtiofsd: Add support for file security context at creation

2021-09-24 Thread Vivek Goyal
Hi, These patches add support to receive and set file security context at the time of file creation. This is one of the components needed to support SELinux on virtiofs. I have posted kernel patches here just now.

[PATCH 4/5] virtiofsd: Create new file with fscreate set

2021-09-24 Thread Vivek Goyal
This patch adds support to set /proc/thread-self/attr/fscreate before file creation. It is set to a value as sent by client. This will allow for atomic creation of security context on files w.r.t file creation. This is primarily useful when either there is no SELinux enabled on host or host and

[PATCH 5/5] virtiofsd: Create new file using O_TMPFILE and set security context

2021-09-24 Thread Vivek Goyal
If guest and host policies can't work with each other, then guest security context (selinux label) needs to be set into an xattr. Say remap guest security.selinux xattr to trusted.virtiofs.security.selinux. That means setting "fscreate" is not going to help as that's ony useful for

Re: [PATCH 05/16] Acceptance Tests: add standard clean up at test tearDown()

2021-09-24 Thread Willian Rampazzo
Hi, Cleber, On Fri, Sep 24, 2021 at 3:57 PM Cleber Rosa wrote: > > The avocado.Test class, used as the basis of the avocado_qemu.Test > class, performs a clean of temporary directories up as part of its own > tearDown() implementation. > > But the avocado_qemu.Test class is currently missing the

Re: [PATCH v3 1/9] nbd/client-connection: nbd_co_establish_connection(): fix non set errp

2021-09-24 Thread Eric Blake
On Tue, Sep 07, 2021 at 12:44:53PM -0500, Eric Blake wrote: > On Mon, Sep 06, 2021 at 10:06:46PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > When we don't have a connection and blocking is false, we return NULL > > but don't set errp. That's wrong. > > Oops... > > > > > We have two paths for

Re: [PATCH] nbd/server: Allow LIST_META_CONTEXT without STRUCTURED_REPLY

2021-09-24 Thread Eric Blake
On Tue, Sep 14, 2021 at 05:19:42PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 07.09.2021 20:35, Eric Blake wrote: > > The NBD protocol just relaxed the requirements on > > NBD_OPT_LIST_META_CONTEXT: > > > > https://github.com/NetworkBlockDevice/nbd/commit/13a4e33a87 > > > > Since listing is

[PATCH 14/16] tests/acceptance/ppc_prep_40p.py: NetBSD 7.1.2 location update

2021-09-24 Thread Cleber Rosa
The NetBSD-7.1.2-prep.iso is no longer available on the CDN, but it's still available in the archive. Let's update its location so that users without the file on cache can still fetch it and run the test. Signed-off-by: Cleber Rosa --- tests/acceptance/ppc_prep_40p.py | 4 ++-- 1 file changed,

Re: [PATCH v2] nbd/server: Add --selinux-label option

2021-09-24 Thread Eric Blake
Ping On Wed, Aug 25, 2021 at 02:35:04PM -0500, Eric Blake wrote: > On Fri, Jul 23, 2021 at 05:38:06PM +0100, Daniel P. Berrangé wrote: > > On Fri, Jul 23, 2021 at 06:18:55PM +0200, Kevin Wolf wrote: > > > Am 23.07.2021 um 12:33 hat Richard W.M. Jones geschrieben: > > > > Under SELinux, Unix

[PATCH 16/16] tests/acceptance/ppc_prep_40p.py: unify tags

2021-09-24 Thread Cleber Rosa
The arch and machine tags apply to all tests, so let's define them only once. Signed-off-by: Cleber Rosa --- tests/acceptance/ppc_prep_40p.py | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/acceptance/ppc_prep_40p.py b/tests/acceptance/ppc_prep_40p.py

[PATCH 13/16] tests/acceptance/boot_xen.py: use class attribute

2021-09-24 Thread Cleber Rosa
Rather than defining a single use variable, let's just use the class attribute directly. Signed-off-by: Cleber Rosa --- tests/acceptance/boot_xen.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/acceptance/boot_xen.py b/tests/acceptance/boot_xen.py index

Re: [PATCH 10/11] vl: Enable JSON syntax for -device

2021-09-24 Thread Eric Blake
On Fri, Sep 24, 2021 at 11:04:26AM +0200, Kevin Wolf wrote: > Like we already do for -object, introduce support for JSON syntax in > -device, which can be kept stable in the long term and guarantees that a > single code path with identical behaviour is used for both QMP and the > command line.

[PATCH 04/16] Acceptance Tests: keep track and disable tests with known issues

2021-09-24 Thread Cleber Rosa
This introduces a convention, under which tests with known open issues, will be automatically excluded from execution via "make check-acceptance". It should by itself improve the reliability of test jobs, even those with rare failures. Those tests can still be run with:

[PATCH 12/16] tests/acceptance/boot_xen.py: removed unused import

2021-09-24 Thread Cleber Rosa
Just a clean up for an unused import. Signed-off-by: Cleber Rosa --- tests/acceptance/boot_xen.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/acceptance/boot_xen.py b/tests/acceptance/boot_xen.py index cd916ddba4..66621fd14d 100644 --- a/tests/acceptance/boot_xen.py +++

[PATCH 02/16] Acceptance Tests: improve check-acceptance description

2021-09-24 Thread Cleber Rosa
The "check-acceptance" make rule won't necessarily run *all* available tests, because it employs a filter based on the currently configured targets. This change in the description of the rule makes that behavior extra clear. Signed-off-by: Cleber Rosa --- tests/Makefile.include | 2 +- 1 file

[PATCH 15/16] tests/acceptance/ppc_prep_40p.py: clean up unused import

2021-09-24 Thread Cleber Rosa
Just a removal of an unused imported symbol. Signed-off-by: Cleber Rosa --- tests/acceptance/ppc_prep_40p.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/acceptance/ppc_prep_40p.py b/tests/acceptance/ppc_prep_40p.py index 6b28a69ea5..5e61e686bd 100644 ---

[PATCH 11/16] tests/acceptance/boot_xen.py: fetch kernel during test setUp()

2021-09-24 Thread Cleber Rosa
The kernel is a common blob used in all tests. By moving it to the setUp() method, the "fetch asset" plugin will recognize the kernel and attempt to fetch it and cache it before the tests are started. Signed-off-by: Cleber Rosa --- tests/acceptance/boot_xen.py | 13 ++--- 1 file

[PATCH 10/16] tests/acceptance/boot_xen.py: unify tags

2021-09-24 Thread Cleber Rosa
Because all tests share the same tags, it's possible to have all of them at the class level. Signed-off-by: Cleber Rosa --- tests/acceptance/boot_xen.py | 26 +- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/tests/acceptance/boot_xen.py

[PATCH 07/16] Acceptance Tests: workaround expired mipsdistros.mips.com HTTPS cert

2021-09-24 Thread Cleber Rosa
The certficiate at https://mipsdistros.mips.com/ is currently expired (since Jan 23, 2021). Instead of failing to obtaining the files, let's downgrade to HTTP instead, given that the integrity of the files are already performed locally, after the download, using the recorded hash. Signed-off-by:

[PATCH 09/16] tests/acceptance/boot_xen.py: merge base classes

2021-09-24 Thread Cleber Rosa
While it's a good practice to have reusable base classes, in this specific case there's no other user of the BootXenBase class. By unifying the class used in this test, we can improve readability and have the opportunity to add some future improvements in a clearer fashion. Signed-off-by: Cleber

[PATCH 03/16] Acceptance Tests: add mechanism for listing tests

2021-09-24 Thread Cleber Rosa
It is helpful to know the tests that would be executed with a "make check-acceptance" without executing them. Let's introduce a "make list-acceptance" rule for that purpose. Signed-off-by: Cleber Rosa --- tests/Makefile.include | 8 1 file changed, 8 insertions(+) diff --git

Re: [PATCH v3 03/15] target/ppc: PMU basic cycle count for pseries TCG

2021-09-24 Thread Daniel Henrique Barboza
On 9/24/21 15:34, Matheus K. Ferst wrote: On 24/09/2021 11:41, Daniel Henrique Barboza wrote: On 9/22/21 08:24, Matheus K. Ferst wrote: On 03/09/2021 17:31, Daniel Henrique Barboza wrote: [E-MAIL EXTERNO] Não clique em links ou abra anexos, a menos que você possa confirmar o remetente e

[PATCH 06/16] Acceptance Tests: use extract from package from avocado.utils

2021-09-24 Thread Cleber Rosa
There's code in avocado.utils to handle package extractions in various (currently rpm, and deb) formats. Let's use it. Reference: https://avocado-framework.readthedocs.io/en/91.0/api/utils/avocado.utils.software_manager.html#avocado.utils.software_manager.SoftwareManager.extract_from_package

Re: [PATCH 11/11] Deprecate stable non-JSON -device and -object

2021-09-24 Thread Eric Blake
On Fri, Sep 24, 2021 at 11:04:27AM +0200, Kevin Wolf wrote: > We want to switch both from QemuOpts to the keyval parser in the future, > which results in some incompatibilities, mainly around list handling. > Mark the non-JSON version of both as unstable syntax so that management > tools switch to

[PATCH 01/16] Acceptance Tests: bump Avocado requirement to 91.0

2021-09-24 Thread Cleber Rosa
Avocado 91.0, brings, among other changes, a switch to a new runner implementation, known as "nrunner". While my personal testing shows that it's suitable for running the QEMU tests, there are some considerations that should be addressed before the change. For instance, the "nrunner"

[PATCH 08/16] acceptance/tests/vnc.py: use explicit syntax for enabling passwords

2021-09-24 Thread Cleber Rosa
This matches the command line on 82a17d1d67, where the "on" or "off" should be explicitly given. Signed-off-by: Cleber Rosa --- tests/acceptance/vnc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py index

[PATCH 00/16] Acceptance Tests: use Avocado 91.0 features and other improvements

2021-09-24 Thread Cleber Rosa
This is a collection of patches for the Acceptance Tests to leverage some of the features of Avocado 91.0. With the Avocado version bump by itself, there would be a change in the default "test runner" implementation that Avocado uses, from the one simply known as "runner" to the new one called

Re: [PATCH 09/11] qdev: Avoid QemuOpts in QMP device_add

2021-09-24 Thread Eric Blake
On Fri, Sep 24, 2021 at 11:04:25AM +0200, Kevin Wolf wrote: > Directly call qdev_device_add_from_qdict() for QMP device_add instead of > first going through QemuOpts and converting back to QDict. > > Note that this changes the behaviour of device_add, though in ways that > should be considered

[PATCH 05/16] Acceptance Tests: add standard clean up at test tearDown()

2021-09-24 Thread Cleber Rosa
The avocado.Test class, used as the basis of the avocado_qemu.Test class, performs a clean of temporary directories up as part of its own tearDown() implementation. But the avocado_qemu.Test class is currently missing the same clean up, as it implemented its own tearDown() method without

Re: [PATCH 08/11] qdev: Base object creation on QDict rather than QemuOpts

2021-09-24 Thread Eric Blake
On Fri, Sep 24, 2021 at 11:04:24AM +0200, Kevin Wolf wrote: > QDicts are both what QMP natively uses and what the keyval parser > produces. Going through QemuOpts isn't useful for either one, so switch > the main device creation function to QDicts. By sharing more code with > the

RE: [PATCH v3 08/27] linux-user/hexagon: Implement setup_sigtramp

2021-09-24 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Friday, September 24, 2021 11:59 AM > To: qemu-devel@nongnu.org > Cc: laur...@vivier.eu; peter.mayd...@linaro.org; Taylor Simpson > ; Philippe Mathieu-Daudé > Subject: [PATCH v3 08/27] linux-user/hexagon: Implement setup_sigtramp >

RE: [PATCH v6 21/40] target/hexagon: Remove unused has_work() handler

2021-09-24 Thread Taylor Simpson
> -Original Message- > From: Philippe Mathieu-Daudé On > Behalf Of Philippe Mathieu-Daudé > Sent: Friday, September 24, 2021 4:38 AM > To: qemu-devel@nongnu.org > Cc: Richard Henderson ; Philippe Mathieu- > Daudé ; Taylor Simpson > Subject: [PATCH v6 21/40] target/hexagon: Remove

Re: [PATCH] hw/misc: Add an iBT device model

2021-09-24 Thread Titus Rwantare
On Fri, 24 Sept 2021 at 03:55, Cédric Le Goater wrote: > > Hello Titus, > > On 9/24/21 10:42, Philippe Mathieu-Daudé wrote: > > On 9/24/21 01:48, Titus Rwantare wrote: > >> Hello all, > >> > >> I'd like some clarification on how the following code transfers irqs > >> back and forth: > >>>

Re: [PATCH 04/11] qdev: Avoid using string visitor for properties

2021-09-24 Thread Eric Blake
On Fri, Sep 24, 2021 at 11:04:20AM +0200, Kevin Wolf wrote: > The only thing the string visitor adds compared to a keyval visitor is > list support. git grep for 'visit_start_list' and 'visit.*List' shows > that devices don't make use of this. > > In a world with a QAPIfied command line

Re: [PATCH v3 03/15] target/ppc: PMU basic cycle count for pseries TCG

2021-09-24 Thread Matheus K. Ferst
On 24/09/2021 11:41, Daniel Henrique Barboza wrote: On 9/22/21 08:24, Matheus K. Ferst wrote: On 03/09/2021 17:31, Daniel Henrique Barboza wrote: [E-MAIL EXTERNO] Não clique em links ou abra anexos, a menos que você possa confirmar o remetente e saber que o conteúdo é seguro. Em caso de

Re: Ping: [PATCH 0/2] cocoa.m: keyboard quality of life reborn

2021-09-24 Thread Programmingkid
> On Sep 24, 2021, at 5:26 AM, Peter Maydell wrote: > > On Fri, 24 Sept 2021 at 00:08, Programmingkid > wrote: >> >> Hi Peter, are you reviewing cocoa patches? Should someone else see these >> patches? > > Gerd sent out a message a while back suggesting that people interested > in the

Re: [PATCH 01/11] qom: Reduce use of error_propagate()

2021-09-24 Thread Eric Blake
On Fri, Sep 24, 2021 at 11:04:17AM +0200, Kevin Wolf wrote: > ERRP_GUARD() makes debugging easier by making sure that _abort > still fails at the real origin of the error instead of > error_propagate(). > > Signed-off-by: Kevin Wolf > --- > qom/object.c| 7 +++ >

Re: [PATCH v2 0/6] iotests: update environment and linting configuration

2021-09-24 Thread John Snow
On Thu, Sep 23, 2021 at 2:07 PM John Snow wrote: > GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-package-iotest-pt1 > CI: https://gitlab.com/jsnow/qemu/-/pipelines/376236687 > > This series partially supersedes: > [PATCH v3 00/16] python/iotests: Run iotest linters during Python CI' >

Re: [PATCH v2 2/6] iotests: add warning for rogue 'qemu' packages

2021-09-24 Thread John Snow
On Thu, Sep 23, 2021 at 4:27 PM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > 23.09.2021 21:44, John Snow wrote: > > > > > > On Thu, Sep 23, 2021 at 2:32 PM Vladimir Sementsov-Ogievskiy < > vsement...@virtuozzo.com > wrote: > > > >

Re: [PATCH v6 4/5] block/nbd: drop connection_co

2021-09-24 Thread Eric Blake
On Thu, Sep 02, 2021 at 01:38:04PM +0300, Vladimir Sementsov-Ogievskiy wrote: > OK, that's a big rewrite of the logic. And a time-consuming review on my part! > > Pre-patch we have an always running coroutine - connection_co. It does > reply receiving and reconnecting. And it leads to a lot of

Re: [PATCH v3 20/27] linux-user/ppc: Simplify encode_trampoline

2021-09-24 Thread Philippe Mathieu-Daudé
On 9/24/21 18:59, Richard Henderson wrote: The sigret parameter is never 0, and even if it was the encoding of the LI instruction would still work. Reported-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/ppc/signal.c | 6 ++ 1 file changed, 2 insertions(+), 4

Re: [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-24 Thread Daniel P . Berrangé
On Wed, Sep 22, 2021 at 07:24:22PM -0300, Leonardo Bras wrote: > Implement the new optional callbacks io_async_write and io_async_flush on > QIOChannelSocket, but enables it only when MSG_ZEROCOPY feature is > available in the host kernel, and TCP sockets are used. > > qio_channel_socket_writev()

Re: [PATCH v3 26/27] linux-user/xtensa: Implement setup_sigtramp

2021-09-24 Thread Philippe Mathieu-Daudé
On 9/24/21 18:59, Richard Henderson wrote: Create and record the rt signal trampoline. Use it when the guest does not use SA_RESTORER. Reviewed-by: Max Filippov Signed-off-by: Richard Henderson --- linux-user/xtensa/target_signal.h | 2 ++ linux-user/xtensa/signal.c| 56

[PATCH v5 27/30] tcg/loongarch64: Register the JIT

2021-09-24 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 c34683b2d0..39938fd5c2 100644 ---

Re: [PATCH v3 10/27] linux-user/i386: Implement setup_sigtramp

2021-09-24 Thread Philippe Mathieu-Daudé
On 9/24/21 18:59, Richard Henderson wrote: Create and record the two signal trampolines. Use them when the guest does not use SA_RESTORER. Note that x86_64 does not use this code. Signed-off-by: Richard Henderson --- linux-user/i386/target_signal.h | 2 ++

Re: [PATCH v3 3/3] multifd: Send using asynchronous write on nocomp to send RAM pages.

2021-09-24 Thread Daniel P . Berrangé
On Wed, Sep 22, 2021 at 07:24:23PM -0300, Leonardo Bras wrote: > Change multifd nocomp version to use asynchronous write for RAM pages, and > benefit of MSG_ZEROCOPY when it's available. > > The asynchronous flush happens on cleanup only, before destroying the > QIOChannel. > > This will work

[PATCH v5 28/30] linux-user: Add safe syscall handling for loongarch64 hosts

2021-09-24 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- linux-user/host/loongarch64/hostdep.h | 34 .../host/loongarch64/safe-syscall.inc.S | 80 +++ 2 files changed, 114 insertions(+) create mode 100644 linux-user/host/loongarch64/hostdep.h create

[PATCH v5 29/30] accel/tcg/user-exec: Implement CPU-specific signal handler for loongarch64 hosts

2021-09-24 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- accel/tcg/user-exec.c | 73 +++ 1 file changed, 73 insertions(+) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 8fed542622..38d4ad8a7d 100644 --- a/accel/tcg/user-exec.c +++

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

2021-09-24 Thread WANG Xuerui
Signed-off-by: WANG Xuerui --- 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 b/tcg/loongarch64/tcg-target-con-set.h index

[PATCH v5 25/30] tcg/loongarch64: Implement exit_tb/goto_tb

2021-09-24 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 4900af1853..4437b07541 100644 ---

[PATCH v5 16/30] tcg/loongarch64: Implement shl/shr/sar/rotl/rotr ops

2021-09-24 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 | 91 tcg/loongarch64/tcg-target.h | 4 +- 3 files changed, 94 insertions(+), 2 deletions(-) diff --git

[PATCH v5 24/30] tcg/loongarch64: Implement tcg_target_qemu_prologue

2021-09-24 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 d4f1fe5d58..4900af1853 100644 ---

[PATCH v5 11/30] tcg/loongarch64: Implement sign-/zero-extension ops

2021-09-24 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 | 82 tcg/loongarch64/tcg-target.h | 24 3 files changed, 95 insertions(+), 12 deletions(-) diff --git

[PATCH v5 22/30] tcg/loongarch64: Implement simple load/store ops

2021-09-24 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 | 131 +++ 2 files changed, 132 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-set.h

[PATCH v5 15/30] tcg/loongarch64: Implement clz/ctz ops

2021-09-24 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 v5 30/30] configure, meson.build: Mark support for loongarch64 hosts

2021-09-24 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- configure | 7 ++- meson.build | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 1043ccce4f..3a9035385d 100755 --- a/configure +++ b/configure @@ -659,6 +659,8 @@ elif

[PATCH v5 21/30] tcg/loongarch64: Implement tcg_out_call

2021-09-24 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 4e34f4ac97..0f02f4be04 100644 ---

[PATCH v5 10/30] tcg/loongarch64: Implement goto_ptr

2021-09-24 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 17 + tcg/loongarch64/tcg-target.c.inc | 15 +++ 2 files changed, 32 insertions(+) create mode 100644 tcg/loongarch64/tcg-target-con-set.h diff --git

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

2021-09-24 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 | 65 tcg/loongarch64/tcg-target.h | 16 +++ 3 files changed, 74 insertions(+), 8 deletions(-) diff --git

[PATCH v5 07/30] tcg/loongarch64: Implement necessary relocation operations

2021-09-24 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- 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 f0930f77ef..6967f143e9 100644 ---

[PATCH v5 26/30] tcg/loongarch64: Implement tcg_target_init

2021-09-24 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 4437b07541..c34683b2d0 100644 ---

[PATCH v5 19/30] tcg/loongarch64: Implement br/brcond ops

2021-09-24 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 | 53 2 files changed, 54 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-set.h

[PATCH v5 20/30] tcg/loongarch64: Implement setcond ops

2021-09-24 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 v5 17/30] tcg/loongarch64: Implement add/sub ops

2021-09-24 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 --- tcg/loongarch64/tcg-target-con-set.h | 2 ++ tcg/loongarch64/tcg-target.c.inc | 38 2 files changed, 40 insertions(+)

[PATCH v5 04/30] tcg/loongarch64: Add generated instruction opcodes and encoding helpers

2021-09-24 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Acked-by: Richard Henderson --- 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 a/tcg/loongarch64/tcg-insn-defs.c.inc

[PATCH v5 13/30] tcg/loongarch64: Implement deposit/extract ops

2021-09-24 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 | 21 + tcg/loongarch64/tcg-target.h | 8 3 files changed, 26 insertions(+), 4 deletions(-) diff --git

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

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

[PATCH v5 08/30] tcg/loongarch64: Implement the memory barrier op

2021-09-24 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- 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 6967f143e9..8f7c556c37 100644 ---

[PATCH v5 00/30] LoongArch64 port of QEMU TCG

2021-09-24 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. Tests (run with `ninja test`) all passed, as usual; I also boot-tested x86_64 (Debian and Gentoo installation CDs) and install-tested aarch64 (Debian netboot

[PATCH v5 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi

2021-09-24 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 109 +++ 1 file changed, 109 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 8f7c556c37..f1d0047f5b 100644 ---

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

2021-09-24 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 | 88 tcg/loongarch64/tcg-target.h | 16 ++--- 3 files changed, 98 insertions(+), 8 deletions(-) diff --git

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

2021-09-24 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 v5 06/30] tcg/loongarch64: Define the operand constraints

2021-09-24 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-str.h | 28 +++ tcg/loongarch64/tcg-target.c.inc | 52 2 files changed, 80 insertions(+) create mode 100644 tcg/loongarch64/tcg-target-con-str.h diff --git

[PATCH v5 01/30] elf: Add machine type value for LoongArch

2021-09-24 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]:

Re: [PATCH v3 1/3] QIOChannel: Add io_async_writev & io_async_flush callbacks

2021-09-24 Thread Daniel P . Berrangé
On Wed, Sep 22, 2021 at 07:24:21PM -0300, Leonardo Bras wrote: > Adds io_async_writev and io_async_flush as optional callback to > QIOChannelClass, > allowing the implementation of asynchronous writes by subclasses. > > How to use them: > - Write data using qio_channel_async_writev(), > - Wait

[PATCH v5 03/30] tcg/loongarch64: Add the tcg-target.h file

2021-09-24 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 v3 24/27] linux-user/sh4: Implement setup_sigtramp

2021-09-24 Thread Richard Henderson
Create and record the two signal trampolines. Use them when the guest does not use SA_RESTORER. Cc: Yoshinori Sato Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/sh4/target_signal.h | 2 ++ linux-user/sh4/signal.c| 40

[PATCH v5 02/30] MAINTAINERS: Add tcg/loongarch64 entry with myself as maintainer

2021-09-24 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 d7915ec128..859e5b5ba2 100644

Re: [RFC PATCH] spapr/xive: Allocate vCPU IPIs from local context

2021-09-24 Thread Greg Kurz
On Fri, 24 Sep 2021 16:58:00 +0200 Cédric Le Goater wrote: > [ ... ] > > >> The changes only impact KVM support since we are deferring the IRQ > >> initialization at the KVM level. What we have to be careful about is not > >> accessing an ESB page of an interrupt that would not have been

[PATCH v3 21/27] linux-user/ppc: Implement setup_sigtramp

2021-09-24 Thread Richard Henderson
Create and record the two signal trampolines. Cc: qemu-...@nongnu.org Signed-off-by: Richard Henderson --- linux-user/ppc/target_signal.h | 2 ++ linux-user/ppc/signal.c| 34 ++ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git

[PATCH v3 23/27] linux-user/s390x: Implement setup_sigtramp

2021-09-24 Thread Richard Henderson
Create and record the two signal trampolines. Use them when the guest does not use SA_RESTORER. Cc: qemu-s3...@nongnu.org Tested-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/s390x/target_signal.h | 2 ++ linux-user/s390x/signal.c

[PATCH v3 19/27] linux-user/openrisc: Implement setup_sigtramp

2021-09-24 Thread Richard Henderson
Create and record the rt signal trampoline. Reviewed-by: Stafford Horne Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/openrisc/target_signal.h | 2 ++ linux-user/openrisc/signal.c| 22 ++ 2 files changed, 16 insertions(+), 8

[PATCH v3 17/27] linux-user/nios2: Map a real kuser page

2021-09-24 Thread Richard Henderson
The first word of page1 is data, so the whole thing can't be implemented with emulation of addresses. Hijack trap number 31 to implement cmpxchg. Set default_rt_sigreturn based on the kuser page. Signed-off-by: Richard Henderson --- linux-user/nios2/target_signal.h | 3 ++

[PATCH v3 14/27] linux-user/mips: Tidy install_sigtramp

2021-09-24 Thread Richard Henderson
The return value is constant 0, and unused as well -- change to void. Drop inline marker. Change tramp type to uint32_t* for clarity. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/mips/signal.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)

[PATCH v3 15/27] linux-user/mips: Implement setup_sigtramp

2021-09-24 Thread Richard Henderson
Create and record the two signal trampolines. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/mips/target_signal.h | 1 + linux-user/mips64/target_signal.h | 2 ++ linux-user/mips/signal.c | 34 ++- 3 files changed,

[PATCH v3 26/27] linux-user/xtensa: Implement setup_sigtramp

2021-09-24 Thread Richard Henderson
Create and record the rt signal trampoline. Use it when the guest does not use SA_RESTORER. Reviewed-by: Max Filippov Signed-off-by: Richard Henderson --- linux-user/xtensa/target_signal.h | 2 ++ linux-user/xtensa/signal.c| 56 --- 2 files changed, 38

[PATCH v3 10/27] linux-user/i386: Implement setup_sigtramp

2021-09-24 Thread Richard Henderson
Create and record the two signal trampolines. Use them when the guest does not use SA_RESTORER. Note that x86_64 does not use this code. Signed-off-by: Richard Henderson --- linux-user/i386/target_signal.h | 2 ++ linux-user/x86_64/target_signal.h | 3 ++ linux-user/i386/signal.c |

  1   2   3   4   >