Re: [PATCH v4 3/3] virtiofsd: prevent opening of special files (CVE-2020-35517)

2021-02-03 Thread Stefan Hajnoczi
On Wed, Feb 03, 2021 at 04:57:59PM +0100, Greg Kurz wrote: > On Wed, 3 Feb 2021 11:37:19 + > Stefan Hajnoczi wrote: > > static int lo_do_open(struct lo_data *lo, struct lo_inode *inode, > > - struct fuse_file_info *fi) > > + int existing_fd, struct

[PATCH 19/22] Acceptance Tests: add port redirection for ssh by default

2021-02-03 Thread Cleber Rosa
For users of the LinuxTest class, let's set up the VM with the port redirection for SSH, instead of requiring each test to set the same arguments. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 2 ++ tests/acceptance/virtiofs_submounts.py| 4 2 files

[Bug 1913917] Re: aarch64-virt: heap-use-after-free in gic_dist_writeb

2021-02-03 Thread Alexander Bulekov
*** This bug is a duplicate of bug 1914353 *** https://bugs.launchpad.net/bugs/1914353 ** This bug has been marked a duplicate of bug 1914353 QEMU: aarch64: :GIC: out-of-bounds access via interrupt ID -- You received this bug notification because you are a member of qemu- devel-ml, which

Re: [PATCH v2 1/1] target/arm: Fix SCR RES1 handling

2021-02-03 Thread Richard Henderson
On 2/3/21 6:55 AM, michael.nawrocki--- via wrote: > The FW and AW bits of SCR_EL3 are RES1 only in some contexts. Force them > to 1 only when there is no support for AArch32 at EL1 or above. > > The reset value will be 0x30 only if the CPU is AArch64-only; if there > is support for AArch32 at EL1

Re: [PATCH v4 1/1] target-riscv: support QMP dump-guest-memory

2021-02-03 Thread Alistair Francis
On Mon, Feb 1, 2021 at 4:46 AM Yifei Jiang wrote: > > Add the support needed for creating prstatus elf notes. This allows > us to use QMP dump-guest-memory. > > Now ELF notes of RISC-V only contain prstatus elf notes. > > Signed-off-by: Yifei Jiang > Signed-off-by: Mingwang Li > Reviewed-by:

[PATCH v5 08/31] bsd-user: Tidy VERIFY_READ/VERIFY_WRITE

2021-02-03 Thread Richard Henderson
These constants are only ever used with access_ok, and friends. Rather than translating them to PAGE_* bits, let them equal the PAGE_* bits to begin. Reviewed-by: Warner Losh Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- bsd-user/qemu.h | 9 - 1 file changed, 4

[PATCH v5 17/31] linux-user: Move lock_user et al out of line

2021-02-03 Thread Richard Henderson
These functions are not small, except for unlock_user without debugging enabled. Move them out of line, and add missing braces on the way. Signed-off-by: Richard Henderson --- linux-user/qemu.h| 45 ++- linux-user/uaccess.c | 46

[PATCH v5 12/31] exec: Use cpu_untagged_addr in g2h; split out g2h_untagged

2021-02-03 Thread Richard Henderson
Use g2h_untagged in contexts that have no cpu, e.g. the binary loaders that operate before the primary cpu is created. As a collolary, target_mmap and friends must use untagged addresses, since they are used by the loaders. Use g2h_untagged on values returned from target_mmap, as the kernel

Re: [PATCH v7 4/6] [RISCV_PM] Support pointer masking for RISC-V for i/c/f/d/a types of instructions

2021-02-03 Thread Alistair Francis
On Sun, Jan 10, 2021 at 10:51 AM Alexey Baturo wrote: > > Signed-off-by: Alexey Baturo Reviewed-by: Alistair Francis Alistair > --- > target/riscv/insn_trans/trans_rva.c.inc | 3 +++ > target/riscv/insn_trans/trans_rvd.c.inc | 2 ++ > target/riscv/insn_trans/trans_rvf.c.inc | 2 ++ >

Re: [PULL v2 00/20] NBD patches for 2021-02-02

2021-02-03 Thread Peter Maydell
On Wed, 3 Feb 2021 at 14:28, Eric Blake wrote: > > The following changes since commit 8360ebeb4f4a707984cafd1a22c049ec82ddcb4c: > > Merge remote-tracking branch > 'remotes/ehabkost-gl/tags/machine-next-pull-request' into staging (2021-02-03 > 09:54:21 +) > > are available in the Git

Re: [PATCH v21 00/20] Initial support for multi-process Qemu

2021-02-03 Thread Elena Ufimtseva
On Wed, Feb 03, 2021 at 04:11:50PM +, Stefan Hajnoczi wrote: > On Fri, Jan 29, 2021 at 11:46:01AM -0500, Jagannathan Raman wrote: > > This is the v21 of the patchset. This version has the following changes: > > The docs/multi-process.rst file caused Sphinx to fail with "document > isn't

[PATCH 0/4] Remove the deprecated pc-1.x machine types and related stuff

2021-02-03 Thread Thomas Huth
The pc-1.x machine types have been deprecated since QEMU v5.0 already, and nobody complained, so they can now be removed. While we're at it, also remove some compatibility switches and related code that are now not necessary anymore after these machine types have been removed. (We could maybe even

[PATCH 1/4] hw/i386: Remove the deprecated pc-1.x machine types

2021-02-03 Thread Thomas Huth
They have been deprecated since QEMU v5.0, time to remove them now. Signed-off-by: Thomas Huth --- docs/system/deprecated.rst | 6 -- docs/system/removed-features.rst | 6 ++ hw/i386/pc_piix.c| 94 3 files changed, 6 insertions(+), 100

[PATCH 05/22] tests/acceptance/virtiofs_submounts.py: do not ask for ssh key password

2021-02-03 Thread Cleber Rosa
Tests are supposed to be non-interactive, and ssh-keygen is asking for a password when creating a key. Let's set an empty key, which prevents ssh-keygen for asking for a password. Signed-off-by: Cleber Rosa --- tests/acceptance/virtiofs_submounts.py | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 16/22] Acceptance Tests: introduce method for requiring an accelerator

2021-02-03 Thread Cleber Rosa
Some tests explicitly require a QEMU accelerator to be available. Given that this depends on some runtime aspects not known before the test is started, such as the currently set QEMU binary, it's left to be checked also at runtime. Signed-off-by: Cleber Rosa ---

[PATCH 13/22] tests/acceptance/virtiofs_submounts.py: add missing accel tag

2021-02-03 Thread Cleber Rosa
Which is useful to select tests that depend/use a particular feature. Signed-off-by: Cleber Rosa --- tests/acceptance/virtiofs_submounts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virtiofs_submounts.py index

[PATCH 17/22] Acceptance Tests: fix population of public key in cloudinit image

2021-02-03 Thread Cleber Rosa
Currently the path of the ssh public key is being set, but its content is obviously what's needed. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py

Re: [PATCH v8 10/13] spapr: Add PEF based confidential guest support

2021-02-03 Thread Greg Kurz
On Tue, 2 Feb 2021 15:13:12 +1100 David Gibson wrote: > Some upcoming POWER machines have a system called PEF (Protected > Execution Facility) which uses a small ultravisor to allow guests to > run in a way that they can't be eavesdropped by the hypervisor. The > effect is roughly similar to

[Bug 1914353] Re: QEMU: aarch64: :GIC: out-of-bounds access via interrupt ID

2021-02-03 Thread Alexander Bulekov
** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1914353 Title: QEMU: aarch64: :GIC: out-of-bounds access via interrupt ID Status in QEMU:

Re: [PATCH v4 06/18] migration/rdma: export MultiFDSendParams/MultiFDRecvParams

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > MultiFDSendParams and MultiFDRecvParams is need for rdma, export it > > Signed-off-by: Zhimin Feng > Signed-off-by: Chuan Zheng I think these become simpler if you just return a NULL on error, also I think you can make 'id' unsigned and then you

[PATCH v5 00/31] target-arm: Implement ARMv8.5-MemTag, user mode

2021-02-03 Thread Richard Henderson
The kernel abi was finally merged into 5.10. Changes for v5: * Actually include the revamp for TARGET_TAGGED_ADDRESSES, which got lost at some point before posting v4. Patches lacking review are only the new ones: 0011-exec-Introduce-cpu_untagged_addr.patch

[PATCH v5 03/31] exec: Use uintptr_t for guest_base

2021-02-03 Thread Richard Henderson
This is more descriptive than 'unsigned long'. No functional change, since these match on all linux+bsd hosts. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 2 +- bsd-user/main.c| 4 ++-- linux-user/elfload.c | 4 ++-- linux-user/main.c

[PATCH v5 15/31] exec: Rename guest_{addr,range}_valid to *_untagged

2021-02-03 Thread Richard Henderson
The places that use these are better off using untagged addresses, so do not provide a tagged versions. Rename to make it clear about the address type. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 4 ++-- linux-user/qemu.h | 4 ++-- accel/tcg/user-exec.c | 9

[PATCH v5 18/31] linux-user: Fix types in uaccess.c

2021-02-03 Thread Richard Henderson
For copy_*_user, only 0 and -TARGET_EFAULT are returned; no need to involve abi_long. Use size_t for lengths. Use bool for the lock_user copy argument. Use ssize_t for target_strlen, because we can't overflow the host memory space. Signed-off-by: Richard Henderson --- linux-user/qemu.h|

[PATCH v5 04/31] exec: Use uintptr_t in cpu_ldst.h

2021-02-03 Thread Richard Henderson
This is more descriptive than 'unsigned long'. No functional change, since these match on all linux+bsd hosts. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v5 31/31] tests/tcg/aarch64: Add mte smoke tests

2021-02-03 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tests/tcg/aarch64/mte.h | 60 +++ tests/tcg/aarch64/mte-1.c | 28 +++ tests/tcg/aarch64/mte-2.c | 45 +++ tests/tcg/aarch64/mte-3.c | 51

[PATCH v5 23/31] linux-user/aarch64: Implement PR_MTE_TCF and PR_MTE_TAG

2021-02-03 Thread Richard Henderson
These prctl fields are required for the function of MTE. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/aarch64/target_syscall.h | 9 ++ linux-user/syscall.c| 43 + 2 files changed, 52 insertions(+) diff --git

Re: [PATCH v7 2/6] [RISCV_PM] Support CSRs required for RISC-V PM extension except for the ones required for hypervisor mode

2021-02-03 Thread Alistair Francis
On Sun, Jan 10, 2021 at 10:56 AM Alexey Baturo wrote: > > Signed-off-by: Alexey Baturo > --- > target/riscv/cpu.c | 3 + > target/riscv/cpu.h | 12 ++ > target/riscv/cpu_bits.h | 66 ++ > target/riscv/csr.c | 271 > 4 files

[PATCH v5 26/31] linux-user/aarch64: Pass syndrome to EXC_*_ABORT

2021-02-03 Thread Richard Henderson
A proper syndrome is required to fill in the proper si_code. Use page_get_flags to determine permission vs translation for user-only. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/aarch64/cpu_loop.c | 24 +--- target/arm/tlb_helper.c | 15

Re: [PATCH v5 00/31] target-arm: Implement ARMv8.5-MemTag, user mode

2021-02-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210203190010.759771-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210203190010.759771-1-richard.hender...@linaro.org Subject: [PATCH v5 00/31]

Re: [PATCH v4 14/18] migration/rdma: register memory for multifd RDMA channels

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > Signed-off-by: Zhimin Feng > Signed-off-by: Chuan Zheng This could do with a description in the commit message of the sequence; I think you're waiting for the semaphore; doing the registratin, then waiting again to say that everyone has finished???

Re: [PATCH 6/6] travis.yml: Move the -fsanitize=thread compile-testing to the gitlab-CI

2021-02-03 Thread Wainer dos Santos Moschetta
On 2/3/21 4:23 PM, Wainer dos Santos Moschetta wrote: Hi, On 2/3/21 8:32 AM, Thomas Huth wrote: It's only about compile-testing (there is too much noise when running the tests), so let's simply add the -fsanitize=thread flag to a job that only compiles the sources. The "build-gprof-gcov"

Re: [PATCH v4 2/4] target/arm: Support AA32 DIT by moving PSTATE_SS from cpsr into env->pstate

2021-02-03 Thread Richard Henderson
On 2/2/21 6:58 PM, Rebecca Cran wrote: > if (!arm_singlestep_active(env)) { > -env->uncached_cpsr &= ~PSTATE_SS; > +env->pstate &= ~PSTATE_SS; > +} else { > +env->pstate |= PSTATE_SS; > } Where did this addition come from? r~

Re: About creating machines on the command line

2021-02-03 Thread graf--- via
On 03.02.21 17:55, Philippe Mathieu-Daudé wrote: On 1/11/21 3:50 PM, Luc Michel wrote: Hi, We would like to work on improving QEMU to be able to create custom machines from the command line. The goal here is to get feedback from the community and shape the future developments. Cc'ing John

Re: [PATCH 01/22] tests/acceptance/boot_linux.py: fix typo on cloudinit error message

2021-02-03 Thread Philippe Mathieu-Daudé
On 2/3/21 6:23 PM, Cleber Rosa wrote: > Signed-off-by: Cleber Rosa > --- > tests/acceptance/boot_linux.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC PATCH 3/3] hw/cxl/cxl-device-utils: Allow incorrect read lengths

2021-02-03 Thread Jonathan Cameron
On Wed, 3 Feb 2021 08:10:32 -0800 Ben Widawsky wrote: > On 21-02-01 23:26:55, Jonathan Cameron wrote: > > This is currently needed to avoid an issue in the Linux RFC > > in which a read is issued that is not a multiple of DW. > > On arm64 that results in byte reads being issued and a bus > >

Re: [PATCH 19/22] Acceptance Tests: add port redirection for ssh by default

2021-02-03 Thread Philippe Mathieu-Daudé
On 2/3/21 6:23 PM, Cleber Rosa wrote: > For users of the LinuxTest class, let's set up the VM with the port > redirection for SSH, instead of requiring each test to set the same > arguments. > > Signed-off-by: Cleber Rosa > --- > tests/acceptance/avocado_qemu/__init__.py | 2 ++ >

Re: [RFC PATCH 2/4] hw/pci/pcie_doe: Introduce utility functions for PCIe DOE

2021-02-03 Thread Jonathan Cameron
On Tue, 2 Feb 2021 09:54:11 -0800 Ben Widawsky wrote: > This was a bit more complicated than I was anticipating :-) > > On 21-02-01 23:16:27, Jonathan Cameron wrote: > > This implements the ECN to the PCI 5.0 specification available at > > https://members.pcisig.com/wg/PCI-SIG/document/14143 >

[PATCH v5 09/31] linux-user: Do not use guest_addr_valid for h2g_valid

2021-02-03 Thread Richard Henderson
This is the only use of guest_addr_valid that does not begin with a guest address, but a host address being transformed to a guest address. We will shortly adjust guest_addr_valid to handle guest memory tags, and the host address should not be subjected to that. Move h2g_valid adjacent to the

[PATCH v5 11/31] exec: Introduce cpu_untagged_addr

2021-02-03 Thread Richard Henderson
Provide an identity fallback for target that do not use tagged addresses. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index e62f4fba00..d9dc1de414 100644 ---

[PATCH v5 02/31] linux-user: Introduce PAGE_ANON

2021-02-03 Thread Richard Henderson
Record whether the backing page is anonymous, or if it has file backing. This will allow us to get close to the Linux AArch64 ABI for MTE, which allows tag memory only on ram-backed VMAs. The real ABI allows tag memory on files, when those files are on ram-backed filesystems, such as tmpfs. We

[PATCH v5 24/31] linux-user/aarch64: Implement PROT_MTE

2021-02-03 Thread Richard Henderson
Remember the PROT_MTE bit as PAGE_MTE/PAGE_TARGET_2. Otherwise this does not yet have effect. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/cpu-all.h| 1 + linux-user/syscall_defs.h | 1 + target/arm/cpu.h | 1 + linux-user/mmap.c | 22

Re: [PATCH v5 03/31] exec: Use uintptr_t for guest_base

2021-02-03 Thread Philippe Mathieu-Daudé
On 2/3/21 7:59 PM, Richard Henderson wrote: > This is more descriptive than 'unsigned long'. > No functional change, since these match on all linux+bsd hosts. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson > --- > include/exec/cpu-all.h | 2 +- > bsd-user/main.c| 4

Re: [PATCH 6/6] travis.yml: Move the -fsanitize=thread compile-testing to the gitlab-CI

2021-02-03 Thread Wainer dos Santos Moschetta
Hi, On 2/3/21 8:32 AM, Thomas Huth wrote: It's only about compile-testing (there is too much noise when running the tests), so let's simply add the -fsanitize=thread flag to a job that only compiles the sources. The "build-gprof-gcov" seems to be a good candidate. Signed-off-by: Thomas Huth

Re: [RFC 3/4] clock: Add clock_ns_to_ticks() function

2021-02-03 Thread Luc Michel
On 12:30 Mon 01 Feb , Peter Maydell wrote: > Add a clock_ns_to_ticks() function which does the opposite of > clock_ticks_to_ns(): given a duration in nanoseconds, it returns the > number of clock ticks that would happen in that time. This is useful > for devices that have a free running

Re: [RFC 0/4] New APIs for the Clock framework

2021-02-03 Thread Luc Michel
On 12:30 Mon 01 Feb , Peter Maydell wrote: [snip] > > Side note: there is currently no MAINTAINERS entry for the > clock framework. Any volunteers? It would cover > > F: include/hw/clock.h > F: include/hw/qdev-clock.h > F: hw/core/clock.c > F: hw/core/qdev-clock.c > F: docs/devel/clocks.rst

[PATCH] MAINTAINERS: Fix the location of virtiofsd.rst

2021-02-03 Thread Wainer dos Santos Moschetta
The virtiofsd.rst file was moved to docs/tools, so this update MAINTAINERS accordingly. Fixes: a08b4a9fe6c ("docs: Move tools documentation to tools manual") Signed-off-by: Wainer dos Santos Moschetta --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v4 2/4] target/arm: Support AA32 DIT by moving PSTATE_SS from cpsr into env->pstate

2021-02-03 Thread Richard Henderson
On 2/2/21 6:58 PM, Rebecca Cran wrote: > @@ -9433,8 +9448,9 @@ static void take_aarch32_exception(CPUARMState *env, > int new_mode, > * For exceptions taken to AArch32 we must clear the SS bit in both > * PSTATE and in the old-state value we save to SPSR_, so zero it > now. >

[PATCH 4/4] hw/usb/bus: Remove the "full-path" property

2021-02-03 Thread Thomas Huth
This property was only required for the pc-1.0 and earlier machine types. Since these have been removed now, we can delete the property as well. Signed-off-by: Thomas Huth --- hw/usb/bus.c | 7 +-- include/hw/usb.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git

[PATCH 3/4] hw/virtio/virtio-balloon: Remove the "class" property

2021-02-03 Thread Thomas Huth
This property was only required for compatibility reasons in the pc-1.0 machine type and earlier. Now that these machine types have been removed, the property is not useful anymore. Signed-off-by: Thomas Huth --- hw/virtio/virtio-balloon-pci.c | 11 +-- 1 file changed, 1 insertion(+),

[PATCH 09/22] tests/acceptance/virtiofs_submounts.py: required space between IP and port

2021-02-03 Thread Cleber Rosa
AFAICT, there should not be a situation where IP and port do not have at least one whitespace character separating them. This may be true for other '\s*' patterns in the same regex too. Signed-off-by: Cleber Rosa --- tests/acceptance/virtiofs_submounts.py | 2 +- 1 file changed, 1

[PATCH 11/22] tests/acceptance/linux_ssh_mips_malta.py: standardize port as integer

2021-02-03 Thread Cleber Rosa
Signed-off-by: Cleber Rosa --- tests/acceptance/linux_ssh_mips_malta.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/linux_ssh_mips_malta.py index 275659c785..ab6cb94aef 100644 ---

[PATCH 12/22] Acceptance tests: clarify ssh connection failure reason

2021-02-03 Thread Cleber Rosa
If the connection to the ssh server fails, it may indeed be a "sshd" issue, but it may also not be that. Let's state what we know: the establishment of the connection from the client side was not possible. Signed-off-by: Cleber Rosa --- tests/acceptance/linux_ssh_mips_malta.py | 2 +-

Re: [PATCH v4 07/18] migration/rdma: add rdma field into multifd send/recv param

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > Note we do want to export any rdma struct, take void * instead. You don't need to make this a void *; add a typedef struct RDMAContext into include/qemu/typedefs.h and then you can use the right type here without actually exporting the interesting

Re: [PATCH v4 08/18] migration/rdma: export getQIOChannel to get QIOchannel in rdma

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > Signed-off-by: Zhimin Feng > Signed-off-by: Chuan Zheng > --- > migration/qemu-file.c | 5 + > migration/qemu-file.h | 1 + > 2 files changed, 6 insertions(+) > > diff --git a/migration/qemu-file.c b/migration/qemu-file.c > index

Re: [PATCH 3/6] travis.yml: Move the --enable-modules test to the gitlab-CI

2021-02-03 Thread Wainer dos Santos Moschetta
On 2/3/21 8:32 AM, Thomas Huth wrote: Simply add the flag to an existing job, no need for yet another job here. Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 1 + .travis.yml| 6 -- 2 files changed, 1 insertion(+), 6 deletions(-) Reviewed-by: Wainer dos Santos Moschetta

Re: [PATCH v5 4/5] nvme: updated shared header for copy command

2021-02-03 Thread Klaus Jensen
On Feb 3 09:21, Keith Busch wrote: > On Fri, Jan 29, 2021 at 10:15:40AM +0100, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add new data structures and types for the Simple Copy command. > > > > Signed-off-by: Klaus Jensen > > Reviewed-by: Minwoo Im > > Acked-by: Stefan Hajnoczi > >

[PATCH v5 13/31] linux-user: Explicitly untag memory management syscalls

2021-02-03 Thread Richard Henderson
We define target_mmap et al as untagged, so that they can be used from the binary loaders. Explicitly call cpu_untagged_addr for munmap, mprotect, mremap syscall entry points. Add a few comments for the syscalls that are exempted by the kernel's tagged-address-abi.rst. Signed-off-by: Richard

[PATCH v5 14/31] linux-user: Use guest_range_valid in access_ok

2021-02-03 Thread Richard Henderson
We're currently open-coding the range check in access_ok; use guest_range_valid when size != 0. Signed-off-by: Richard Henderson --- linux-user/qemu.h | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 9fbc5edc4b..ba122a7903

[PATCH v5 21/31] target/arm: Improve gen_top_byte_ignore

2021-02-03 Thread Richard Henderson
Use simple arithmetic instead of a conditional move when tbi0 != tbi1. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/target/arm/translate-a64.c

Re: [PATCH v4 16/18] migration/rdma: add rdma_channel into Migrationstate field

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > Multifd RDMA is need to poll when we send data, record it. This looks like it's trying to be the equivalent of the 'static int next_channel' in multifd_send_pages. If so, why not mkae this 'multifd_channel' and make the function

Re: [PATCH v4 2/4] target/arm: Support AA32 DIT by moving PSTATE_SS from cpsr into env->pstate

2021-02-03 Thread Rebecca Cran
On 2/3/21 10:17 AM, Richard Henderson wrote: On 2/2/21 6:58 PM, Rebecca Cran wrote: if (!arm_singlestep_active(env)) { -env->uncached_cpsr &= ~PSTATE_SS; +env->pstate &= ~PSTATE_SS; +} else { +env->pstate |= PSTATE_SS; } Where

Re: [PATCH v2 20/36] block: add bdrv_attach_child_common() transaction action

2021-02-03 Thread Kevin Wolf
Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > Split out no-perm part of bdrv_root_attach_child() into separate > transaction action. bdrv_root_attach_child() now moves to new > permission update paradigm: first update graph relations then update > permissions. > >

Re: [PATCH v2 22/36] block: split out bdrv_replace_node_noperm()

2021-02-03 Thread Kevin Wolf
Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > Split part of bdrv_replace_node_common() to be used separately. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > @@ -4909,7 +4936,6 @@ static int bdrv_replace_node_common(BlockDriverState > *from, >

Re: [PATCH v4 06/14] qapi/introspect.py: replace 'extra' dict with 'comment' argument

2021-02-03 Thread John Snow
On 2/3/21 9:23 AM, Markus Armbruster wrote: John Snow writes: This is only used to pass in a dictionary with a comment already set, so skip the runaround and just accept the comment. This works because _tree_to_qlit() treats 'if': None; 'comment': None exactly like absent 'if'; 'comment'.

[PATCH 10/22] Python: add utility function for retrieving port redirection

2021-02-03 Thread Cleber Rosa
Slightly different versions for the same utility code are currently present on different locations. This unifies them all, giving preference to the version from virtiofs_submounts.py, because of the last tweaks added to it. While at it, this adds a "qemu.util" module to host the utility function

Re: [PATCH v4 02/18] migration/rdma: judge whether or not the RDMA is used for migration

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > Add enabled_rdma_migration into MigrationState to judge > whether or not the RDMA is used for migration. > > Signed-off-by: Zhimin Feng > Signed-off-by: Chuan Zheng I'd rather see a separate flag added to each of the MigrationState and

[Bug 1913916] Re: aarch64-virt: heap-buffer-overflow in address_space_lookup_region

2021-02-03 Thread Alexander Bulekov
*** This bug is a duplicate of bug 1914353 *** https://bugs.launchpad.net/bugs/1914353 ** This bug is no longer a duplicate of bug 1913917 aarch64-virt: heap-use-after-free in gic_dist_writeb ** This bug has been marked a duplicate of bug 1914353 QEMU: aarch64: :GIC: out-of-bounds

[PATCH 18/22] Acceptance Tests: set up existing ssh keys by default

2021-02-03 Thread Cleber Rosa
It's questionable wether it's necessary to create one brand new pair for each test. It's not questionable that it takes less time and resources to just use the keys available at "tests/keys" that exist for that exact reason. If a location for the public key is not given explicitly, the LinuxTest

Re: [PATCH v4 3/3] virtiofsd: prevent opening of special files (CVE-2020-35517)

2021-02-03 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Feb 03, 2021 at 11:08:58AM -0500, Vivek Goyal wrote: > > On Wed, Feb 03, 2021 at 05:02:37PM +0100, Greg Kurz wrote: > > > On Wed, 3 Feb 2021 10:28:50 -0500 > > > Vivek Goyal wrote: > > > > > > > On Wed, Feb 03, 2021 at 11:37:19AM +,

Re: [PATCH 4/6] travis.yml: Remove the --enable-debug jobs

2021-02-03 Thread Wainer dos Santos Moschetta
Hi, On 2/3/21 8:32 AM, Thomas Huth wrote: We already have such jobs in the gitlab-CI ("build-some-softmmu" and "build-user-plugins"), so we can simply drop these from the Travis-CI. Those jobs --enable-debug-tcg. Shouldn't at least one --enable-debug? - Wainer Signed-off-by: Thomas Huth

[PATCH v5 19/31] linux-user: Handle tags in lock_user/unlock_user

2021-02-03 Thread Richard Henderson
Resolve the untagged address once, using thread_cpu. Tidy the DEBUG_REMAP code using glib routines. Signed-off-by: Richard Henderson --- linux-user/uaccess.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/linux-user/uaccess.c

Re: [PATCH v4 11/18] migration/rdma: record host_port for multifd RDMA

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > Signed-off-by: Chuan Zheng > --- > migration/migration.c | 1 + > migration/migration.h | 3 +++ > migration/rdma.c | 3 +++ > 3 files changed, 7 insertions(+) > > diff --git a/migration/migration.c b/migration/migration.c > index

Re: [PATCH v2] virtiofsd: vu_dispatch locking should never fail

2021-02-03 Thread Vivek Goyal
On Wed, Feb 03, 2021 at 07:24:34PM +0100, Greg Kurz wrote: > pthread_rwlock_rdlock() and pthread_rwlock_wrlock() can fail if a > deadlock condition is detected or the current thread already owns > the lock. They can also fail, like pthread_rwlock_unlock(), if the > mutex wasn't properly

Re: [PATCH v4 04/14] qapi/introspect.py: guard against ifcond/comment misuse

2021-02-03 Thread Eduardo Habkost
On Wed, Feb 03, 2021 at 03:42:54PM -0500, John Snow wrote: > On 2/3/21 9:08 AM, Markus Armbruster wrote: > > John Snow writes: > > > > > _tree_to_qlit is called recursively on dict values alone; at such a > > > point in generating output it is too late to apply an ifcond. Similarly, > > >

Re: [PATCH v5 4/5] nvme: updated shared header for copy command

2021-02-03 Thread Keith Busch
On Fri, Jan 29, 2021 at 10:15:40AM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > Add new data structures and types for the Simple Copy command. > > Signed-off-by: Klaus Jensen > Reviewed-by: Minwoo Im > Acked-by: Stefan Hajnoczi > --- > include/block/nvme.h | 45

Re: [PATCH v4 05/18] migration/rdma: do not need sync main for rdma

2021-02-03 Thread Dr. David Alan Gilbert
This patch needs to explain why the sync isn't needed for RDMA. Dave * Chuan Zheng (zhengch...@huawei.com) wrote: > Signed-off-by: Zhimin Feng > Signed-off-by: Chuan Zheng > --- > migration/multifd.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/migration/multifd.c

[Bug 1914282] Re: block copy job sometimes hangs on the last block for minutes

2021-02-03 Thread Kashyap Chamarthy
QMP exchange on the destination, as captured by `grep -E 'QEMU_MONITOR_(SEND_MSG|RECV_REPLY)' libvirtd.log` Attaching it so that libvirt/QEMU devs can look for the QMP request/responses. (Extracted file size is ~26MB.) ** Attachment added: "QMP_exchange_libvirtd_22Jan2021_NovaCI_dest.tar.xz"

Re: [PATCH v2 19/36] block: fix bdrv_replace_node_common

2021-02-03 Thread Kevin Wolf
Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > inore_children thing doesn't help to track all propagated permissions > of children we want to ignore. The simplest way to correctly update > permissions is update graph first and then do permission update. In > this case we

[PATCH v2] virtiofsd: vu_dispatch locking should never fail

2021-02-03 Thread Greg Kurz
pthread_rwlock_rdlock() and pthread_rwlock_wrlock() can fail if a deadlock condition is detected or the current thread already owns the lock. They can also fail, like pthread_rwlock_unlock(), if the mutex wasn't properly initialized. None of these are ever expected to happen with

Re: [PATCH v2 15/36] block: use topological sort for permission update

2021-02-03 Thread Kevin Wolf
Am 28.01.2021 um 19:04 hat Vladimir Sementsov-Ogievskiy geschrieben: > 28.01.2021 20:13, Kevin Wolf wrote: > > Am 28.01.2021 um 10:34 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > 27.01.2021 21:38, Kevin Wolf wrote: > > > > Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben:

Re: [PATCH v4 10/18] migration/rdma: Create the multifd recv channels for RDMA

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > We still don't transmit anything through them, and we only build > the RDMA connections. > > Signed-off-by: Zhimin Feng > Signed-off-by: Chuan Zheng > --- > migration/rdma.c | 69 > ++-- > 1

[PATCH v5 10/31] linux-user: Fix guest_addr_valid vs reserved_va

2021-02-03 Thread Richard Henderson
We must always use GUEST_ADDR_MAX, because even 32-bit hosts can use -R to restrict the memory address of the guest. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git

[PATCH v5 07/31] linux-user: Tidy VERIFY_READ/VERIFY_WRITE

2021-02-03 Thread Richard Henderson
These constants are only ever used with access_ok, and friends. Rather than translating them to PAGE_* bits, let them equal the PAGE_* bits to begin. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/qemu.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-)

Re: [PATCH v4 13/18] migration/rdma: Add the function for dynamic page registration

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > Add the 'qemu_rdma_registration' function, multifd send threads > call it to register memory. This function is a copy of the code out of qemu_rdma_registration_stop; with some of the comments removed. It's OK to split this code out so you can use it

Re: [PATCH] target/arm: Don't migrate CPUARMState.features

2021-02-03 Thread Andrew Jones
On Wed, Feb 03, 2021 at 11:13:40AM -0500, Aaron Lindsay wrote: > As feature flags are added or removed, the meanings of bits in the > `features` field can change between QEMU versions, causing migration > failures. Additionally, migrating the field is not useful because it is > a constant function

[PATCH 00/22] Acceptance Test: introduce base class for Linux based tests

2021-02-03 Thread Cleber Rosa
This introduces a base class for tests that need to interact with a Linux guest. It generalizes the "boot_linux.py" code, already been used by the "virtiofs_submounts.py" and also SSH related code being used by that and "linux_ssh_mips_malta.py". While at it, a number of fixes on hopeful

[PATCH 20/22] Acceptance Tests: add basic documentation on LinuxTest base class

2021-02-03 Thread Cleber Rosa
Signed-off-by: Cleber Rosa --- docs/devel/testing.rst | 26 ++ 1 file changed, 26 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 209f9d8172..fe0112b21c 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -790,6 +790,32 @@

Re: [PATCH v5 0/5] hw/block/nvme: add simple copy command

2021-02-03 Thread Keith Busch
Just had the one comment on patch 4, which is really no big deal. I need to integrate tooling and/or kernel support in order to properly test this, but just from code inspection, I think it's good. Reviewed-by: Keith Busch

Re: [PATCH 03/22] Acceptance Tests: remove unnecessary tag from documentation example

2021-02-03 Thread Philippe Mathieu-Daudé
On 2/3/21 6:23 PM, Cleber Rosa wrote: > The ":avocado: enable" is not necessary and was removed in 9531d26c, > so let's remove from the docs. > > Signed-off-by: Cleber Rosa > --- > docs/devel/testing.rst | 3 --- > 1 file changed, 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC PATCH 0/4] hw/cxl/ + /hw/pci/: PCI DOE + CXL CDAT emulation

2021-02-03 Thread Jonathan Cameron
On Mon, 1 Feb 2021 23:16:25 +0800 Jonathan Cameron wrote: > Whilst I know others are working on an implementation of at least some of > this, a desire to work on the kernel user of this required an > implementation so I threw this together in the meantime and am sending > it out on the basis

[PATCH 14/22] Acceptance Tests: introduce LinuxTest base class

2021-02-03 Thread Cleber Rosa
This is basically the infrastructure around "boot_linux.py" tests, but now made into a base class for general use. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 87 + tests/acceptance/boot_linux.py| 94 ++-

Re: [PATCH] MAINTAINERS: update bsd-user maintainers

2021-02-03 Thread Warner Losh
On Sun, Jan 31, 2021 at 11:30 PM Thomas Huth wrote: > On 30/01/2021 17.46, Warner Losh wrote: > > bsd-user: Add new mainatiners > > > > The FreeBSD project has a number of enhancements to bsd-user. Add myself > > as maintainer and Kyle Evans as a reviewer. Also add our github repo. > > > >

[PATCH v5 01/31] tcg: Introduce target-specific page data for user-only

2021-02-03 Thread Richard Henderson
This data can be allocated by page_alloc_target_data() and released by page_set_flags(start, end, prot | PAGE_RESET). This data will be used to hold tag memory for AArch64 MTE. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/cpu-all.h| 42

[PATCH v5 05/31] exec: Improve types for guest_addr_valid

2021-02-03 Thread Richard Henderson
Return bool not int; pass abi_ulong not 'unsigned long'. All callers use abi_ulong already, so the change in type has no effect. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v3 2/2] pci: add romsize property

2021-02-03 Thread Laszlo Ersek
On 02/03/21 14:18, Paolo Bonzini wrote: > This property can be useful for distros to set up known-good ROM sizes for > migration purposes. The VM will fail to start if the ROM is too large, > and migration compatibility will not be broken if the ROM is too small. > > Note that even though

Re: [PATCH 3/4] hw/virtio/virtio-balloon: Remove the "class" property

2021-02-03 Thread David Hildenbrand
On 03.02.21 18:18, Thomas Huth wrote: This property was only required for compatibility reasons in the pc-1.0 machine type and earlier. Now that these machine types have been removed, the property is not useful anymore. Signed-off-by: Thomas Huth --- hw/virtio/virtio-balloon-pci.c | 11

Re: [PATCH v4 12/18] migration/rdma: Create the multifd send channels for RDMA

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > Signed-off-by: Chuan Zheng > --- > migration/multifd.c | 4 ++-- > migration/multifd.h | 2 ++ > migration/rdma.c| 57 > + > 3 files changed, 61 insertions(+), 2 deletions(-) > > diff --git

[PATCH 22/22] [NOTFORMERGE] Bump Avocado version to latest master

2021-02-03 Thread Cleber Rosa
This is intende to be replaced by a bump to Avocado 85.0, to be released by Feb 8 2021. Latest master contains an improvement to "avocado.utils.vmimage" that let's it download older Fedora images from the archive locations. That allows the currently set Fedora 31 images to continue being used.

[PATCH 01/22] tests/acceptance/boot_linux.py: fix typo on cloudinit error message

2021-02-03 Thread Cleber Rosa
Signed-off-by: Cleber Rosa --- tests/acceptance/boot_linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py index 1da4a53d6a..2ac3e57587 100644 --- a/tests/acceptance/boot_linux.py +++

  1   2   3   4   5   6   >