[PATCH] tools/meson.build: Error on enabling virtiofsd and have_system is false

2021-04-28 Thread Mahmoud Mandour
Previously, on configuring with --enable-virtiofsd and specifying a target list that does not contain a full-system emulation target, a spurious error message is emitted. This patch introduces a meaningful error message for such case. Signed-off-by: Mahmoud Mandour --- tools/meson.build | 4 +++-

[PATCH v7 00/15] RAM_NORESERVE, MAP_NORESERVE and hostmem "reserve" property

2021-04-28 Thread David Hildenbrand
Based-on: 20210406080126.24010-1-da...@redhat.com Some cleanups previously sent in other context (resizeable allocations), followed by RAM_NORESERVE, implementing it under Linux using MAP_NORESERVE, and letting users configure it for memory backens using the "reserve" property (default: true). MA

[PATCH v7 03/15] util/mmap-alloc: Factor out activating of memory to mmap_activate()

2021-04-28 Thread David Hildenbrand
We want to activate memory within a reserved memory region, to make it accessible. Let's factor that out. Reviewed-by: Richard Henderson Acked-by: Murilo Opsfelder Araujo Reviewed-by: Peter Xu Acked-by: Eduardo Habkost for memory backend and machine core Signed-off-by: David Hildenbrand ---

[PATCH v7 01/15] util/mmap-alloc: Factor out calculation of the pagesize for the guard page

2021-04-28 Thread David Hildenbrand
Let's factor out calculating the size of the guard page and rename the variable to make it clearer that this pagesize only applies to the guard page. Reviewed-by: Peter Xu Acked-by: Murilo Opsfelder Araujo Acked-by: Eduardo Habkost for memory backend and machine core Cc: Igor Kotrasinski Sign

[PATCH v7 10/15] hostmem: Wire up RAM_NORESERVE via "reserve" property

2021-04-28 Thread David Hildenbrand
Let's provide a way to control the use of RAM_NORESERVE via memory backends using the "reserve" property which defaults to true (old behavior). Only Linux currently supports clearing the flag (and support is checked at runtime, depending on the setting of "/proc/sys/vm/overcommit_memory"). Windows

[PATCH v7 04/15] softmmu/memory: Pass ram_flags to qemu_ram_alloc_from_fd()

2021-04-28 Thread David Hildenbrand
Let's pass in ram flags just like we do with qemu_ram_alloc_from_file(), to clean up and prepare for more flags. Simplify the documentation of passed ram flags: Looking at our documentation of RAM_SHARED and RAM_PMEM is sufficient, no need to be repetitive. Reviewed-by: Philippe Mathieu-Daudé Re

[PATCH v7 02/15] util/mmap-alloc: Factor out reserving of a memory region to mmap_reserve()

2021-04-28 Thread David Hildenbrand
We want to reserve a memory region without actually populating memory. Let's factor that out. Reviewed-by: Igor Kotrasinski Acked-by: Murilo Opsfelder Araujo Reviewed-by: Richard Henderson Reviewed-by: Peter Xu Acked-by: Eduardo Habkost for memory backend and machine core Signed-off-by: Davi

[PATCH v7 05/15] softmmu/memory: Pass ram_flags to memory_region_init_ram_shared_nomigrate()

2021-04-28 Thread David Hildenbrand
Let's forward ram_flags instead, renaming memory_region_init_ram_shared_nomigrate() into memory_region_init_ram_flags_nomigrate(). Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Acked-by: Eduardo Habkost for memory backend and machine core Signed-off-by: David Hildenbrand --- back

[PATCH v7 13/15] hmp: Print "share" property of memory backends with "info memdev"

2021-04-28 Thread David Hildenbrand
Let's print the property. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Eduardo Habkost Reviewed-by: Markus Armbruster Acked-by: Eduardo Habkost for memory backend and machine core Cc: Markus Armbruster Cc: Eric Blake Cc: Igor Mammedov Signed-off-by:

[PATCH v7 06/15] softmmu/memory: Pass ram_flags to qemu_ram_alloc() and qemu_ram_alloc_internal()

2021-04-28 Thread David Hildenbrand
Let's pass ram_flags to qemu_ram_alloc() and qemu_ram_alloc_internal(), preparing for passing additional flags. Reviewed-by: Philippe Mathieu-Daudé Acked-by: Eduardo Habkost for memory backend and machine core Signed-off-by: David Hildenbrand --- include/exec/ram_addr.h | 2 +- softmmu/memor

[PATCH v7 07/15] util/mmap-alloc: Pass flags instead of separate bools to qemu_ram_mmap()

2021-04-28 Thread David Hildenbrand
Let's pass flags instead of bools to prepare for passing other flags and update the documentation of qemu_ram_mmap(). Introduce new QEMU_MAP_ flags that abstract the mmap() PROT_ and MAP_ flag handling and simplify it. We expose only flags that are currently supported by qemu_ram_mmap(). Maybe, we

[PATCH v7 14/15] qmp: Include "reserve" property of memory backends

2021-04-28 Thread David Hildenbrand
Let's include the new property. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eduardo Habkost Reviewed-by: Markus Armbruster Acked-by: Eduardo Habkost for memory backend and machine core Cc: Eric Blake Cc: Markus Armbruster Cc: Igor Mammedov Signed-off-by: David Hildenbrand --- hw/cor

[PATCH v7 08/15] memory: Introduce RAM_NORESERVE and wire it up in qemu_ram_mmap()

2021-04-28 Thread David Hildenbrand
Let's introduce RAM_NORESERVE, allowing mmap'ing with MAP_NORESERVE. The new flag has the following semantics: " RAM is mmap-ed with MAP_NORESERVE. When set, reserving swap space (or huge pages if applicable) is skipped: will bail out if not supported. When not set, the OS will do the reservation,

Re: X on old (non-x86) Linux guests

2021-04-28 Thread Dr. David Alan Gilbert
* BALATON Zoltan (bala...@eik.bme.hu) wrote: > On Wed, 28 Apr 2021, Andrew Randrianasulu wrote: > > On Wednesday, April 28, 2021, Andrew Randrianasulu > > wrote: > > > On Monday, April 26, 2021, BALATON Zoltan wrote: > > > > On Mon, 26 Apr 2021, Dr. David Alan Gilbert wrote: > > > > > Over the w

Re: [PATCH 1/3] linux-user/s390x: Fix sigframe types

2021-04-28 Thread David Hildenbrand
On 28.04.21 05:32, Richard Henderson wrote: Noticed via gitlab clang-user job: TESTsignals on s390x ../linux-user/s390x/signal.c:258:9: runtime error: \ 1.84467e+19 is outside the range of representable values of \ type 'unsigned long' Which points to the fact that we were performi

[PATCH v7 11/15] qmp: Clarify memory backend properties returned via query-memdev

2021-04-28 Thread David Hildenbrand
We return information on the currently configured memory backends and don't configure them, so decribe what the currently set properties express. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eduardo Habkost Reviewed-by: Markus Armbruster Suggested-by: Markus Armbruster Acked-by: Eduardo Ha

[PATCH v7 09/15] util/mmap-alloc: Support RAM_NORESERVE via MAP_NORESERVE under Linux

2021-04-28 Thread David Hildenbrand
Let's support RAM_NORESERVE via MAP_NORESERVE on Linux. The flag has no effect on most shared mappings - except for hugetlbfs and anonymous memory. Linux man page: "MAP_NORESERVE: Do not reserve swap space for this mapping. When swap space is reserved, one has the guarantee that it is possible

Re: [PATCH v5 cxl2.0-v3-doe 5/6] cxl/cdat: CXL CDAT Data Object Exchange implementation

2021-04-28 Thread Jonathan Cameron
On Mon, 26 Apr 2021 13:36:02 -0400 Chris Browy wrote: > From: hchkuo > > The Data Object Exchange implementation of CXL Coherent Device Attribute > Table (CDAT). This implementation is referring to "Coherent Device > Attribute Table Specification, Rev. 1.02, Oct. 2020" and "Compute > Express Li

Re: [PATCH] tools/meson.build: Error on enabling virtiofsd and have_system is false

2021-04-28 Thread Connor Kuehl
On 4/28/21 8:35 AM, Mahmoud Mandour wrote: > Previously, on configuring with --enable-virtiofsd and specifying > a target list that does not contain a full-system emulation target, > a spurious error message is emitted. This patch introduces a > meaningful error message for such case. > > Signed-o

[PATCH v7 12/15] qmp: Include "share" property of memory backends

2021-04-28 Thread David Hildenbrand
Let's include the property, which can be helpful when debugging, for example, to spot misuse of MAP_PRIVATE which can result in some ugly corner cases (e.g., double-memory consumption on shmem). Use the same description we also use for describing the property. Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC] tcg plugin: Additional plugin interface

2021-04-28 Thread Aaron Lindsay
On Apr 26 18:42, Alex Bennée wrote: > > Min-Yih Hsu writes: > > > Hi Alex, > > > >> On Apr 23, 2021, at 8:44 AM, Alex Bennée wrote: > >> > >> > >> Min-Yih Hsu writes: > >> > >>> Hi Alex and QEMU developers, > >>> > >>> Recently I was working with the TCG plugin. I found that > >>> `qemu_p

[PATCH v7 15/15] hmp: Print "reserve" property of memory backends with "info memdev"

2021-04-28 Thread David Hildenbrand
Let's print the new property. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Eduardo Habkost Reviewed-by: Markus Armbruster Acked-by: Eduardo Habkost for memory backend and machine core Cc: Markus Armbruster Cc: Eric Blake Cc: Igor Mammedov Signed-off

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-04-28 Thread Cédric Le Goater
On 4/28/21 3:12 PM, Bin Meng wrote: > Hi Cédric, > > On Tue, Apr 27, 2021 at 10:32 PM Cédric Le Goater wrote: >> >> Hello, >> >> On 4/27/21 10:54 AM, Francisco Iglesias wrote: >>> On [2021 Apr 27] Tue 15:56:10, Alistair Francis wrote: On Fri, Apr 23, 2021 at 4:46 PM Bin Meng wrote: > >>

Re: [PATCH 2/3] linux-user/s390x: Clean up signal.c

2021-04-28 Thread David Hildenbrand
On 28.04.21 05:32, Richard Henderson wrote: The "save" routines from the kernel, which are currently commented out, are unnecessary in qemu. We can copy from env where the kernel needs special instructions. Drop the return value from restore_sigregs, as it cannot fail. Use __get_user return as

Re: [PATCH v2 09/15] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI

2021-04-28 Thread Matheus K. Ferst
On 27/04/2021 14:16, Luis Pires wrote: From: Richard Henderson Signed-off-by: Richard Henderson --- target/ppc/insn32.decode | 8 + target/ppc/insn64.decode | 14 target/ppc/translate.c | 29 --- target/ppc/

Re: [PATCH] tools/meson.build: Error on enabling virtiofsd and have_system is false

2021-04-28 Thread Mahmoud Mandour
On Wed, Apr 28, 2021 at 3:56 PM Connor Kuehl wrote: > On 4/28/21 8:35 AM, Mahmoud Mandour wrote: > > Previously, on configuring with --enable-virtiofsd and specifying > > a target list that does not contain a full-system emulation target, > > a spurious error message is emitted. This patch introd

[PATCH v2 0/4] hw/sparc: Kconfig fixes to build with/without the leon3 machine

2021-04-28 Thread Philippe Mathieu-Daudé
Missing review: 2-4 Since v1: - move cpu_check_irqs() to target/sparc/ (rth) This series fixes link failure when building either the leon3 machine or the sun4m ones. The problem is we have hardware specific code in the architectural translation code. Move this code to hw/sparc/. The link failur

[PATCH v2 3/4] hw/sparc64: Fix code style for checkpatch.pl

2021-04-28 Thread Philippe Mathieu-Daudé
We are going to move this code, fix its style first. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc64/sparc64.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/sparc64/sparc64.c b/hw/sparc64/sparc64.c index cc0b9bd30d3..fd29a79edc0 100644 --- a/hw/sparc64/

[RFC] AVR watchdog

2021-04-28 Thread Fred Konrad
Hi, I fall on a segfault while running the wdr instruction on AVR: (gdb) bt #0 0xadd0b23a in gdb_get_cpu_pid (cpu=0xaf5a4af0) at ../gdbstub.c:718 #1 0xadd0b2dd in gdb_get_cpu_process (cpu=0xaf5a4af0) at ../gdbstub.c:743 #2 0xadd0e47

[PATCH v2 1/4] hw/sparc: Allow building without the leon3 machine

2021-04-28 Thread Philippe Mathieu-Daudé
When building without the leon3 machine, we get this link failure: /usr/bin/ld: target_sparc_int32_helper.c.o: in function `leon3_irq_manager': target/sparc/int32_helper.c:172: undefined reference to `leon3_irq_ack' This is because the leon3_irq_ack() is declared in hw/sparc/leon3.c, which is

[PATCH v2 2/4] hw/sparc64: Remove unused "hw/char/serial.h" header

2021-04-28 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc64/sparc64.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/sparc64/sparc64.c b/hw/sparc64/sparc64.c index e3f9219a101..cc0b9bd30d3 100644 --- a/hw/sparc64/sparc64.c +++ b/hw/sparc64/sparc64.c @@ -26,7 +26,6 @@ #include "qemu/osdep.h" #in

[PATCH v2 4/4] hw/sparc*: Move cpu_check_irqs() to target/sparc/

2021-04-28 Thread Philippe Mathieu-Daudé
Since cpu_check_irqs() doesn't reference to anything outside of CPUSPARCState, it better belongs to the architectural code in target/, rather than the hardware specific code in hw/. Note: while we moved the trace events, we don't rename them. Remark: this allows us to build the leon3 machine stan

Re: [PATCH] hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine

2021-04-28 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Tue, Apr 27, 2021 at 02:02:27PM -0400, John Snow wrote: >> On 4/27/21 1:54 PM, Philippe Mathieu-Daudé wrote: >> > On 4/27/21 7:16 PM, John Snow wrote: >> > > On 4/27/21 9:54 AM, Stefan Hajnoczi wrote: >> > > > I suggest fixing this at the qdev level. Make piix3-ide ha

Re: [PATCH] hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine

2021-04-28 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Tue, Apr 27, 2021 at 07:54:21PM +0200, Philippe Mathieu-Daudé wrote: >> On 4/27/21 7:16 PM, John Snow wrote: >> > On 4/27/21 9:54 AM, Stefan Hajnoczi wrote: >> >> I suggest fixing this at the qdev level. Make piix3-ide have a >> >> sub-device that inherits from ISA_DE

[PATCH] accel: kvm: clarify that extra exit data is hexadecimal

2021-04-28 Thread David Edmondson
When dumping the extra exit data provided by KVM, make it clear that the data is hexadecimal. At the same time, zero-pad the output. Signed-off-by: David Edmondson --- accel/kvm/kvm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all

Re: [RFC] AVR watchdog

2021-04-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20b7f194-066f-c3bf-a830-deb1cde8f...@adacore.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20b7f194-066f-c3bf-a830-deb1cde8f...@adacore.com Subject: [RFC] AVR watchdog === T

Re: [PATCH] tools/meson.build: Error on enabling virtiofsd and have_system is false

2021-04-28 Thread Connor Kuehl
On 4/28/21 9:13 AM, Mahmoud Mandour wrote: >> I am not entirely sure if this is true. The error message before this >> patch is applied is: >> >> ../tools/meson.build:12:6: ERROR: Problem encountered: virtiofsd >> requires libcap-ng-devel and seccomp-devel >> >> From what I know abo

Re: [PATCH v2 2/4] hw/sparc64: Remove unused "hw/char/serial.h" header

2021-04-28 Thread Fred Konrad
Le 4/28/21 à 4:16 PM, Philippe Mathieu-Daudé a écrit : Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: KONRAD Frederic --- hw/sparc64/sparc64.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/sparc64/sparc64.c b/hw/sparc64/sparc64.c index e3f9219a101..cc0b9bd30d3 100644 --- a

Re: [PATCH v2 3/4] hw/sparc64: Fix code style for checkpatch.pl

2021-04-28 Thread Fred Konrad
Le 4/28/21 à 4:16 PM, Philippe Mathieu-Daudé a écrit : We are going to move this code, fix its style first. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: KONRAD Frederic --- hw/sparc64/sparc64.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/

[PATCH v2] vfio-ccw: Attempt to clean up all IRQs on error

2021-04-28 Thread Eric Farman
The vfio_ccw_unrealize() routine makes an unconditional attempt to unregister every IRQ notifier, though they may not have been registered in the first place (when running on an older kernel, for example). Let's mirror this behavior in the error cleanups in vfio_ccw_realize() so that if/when new I

Re: [PATCH v2] vfio-ccw: Attempt to clean up all IRQs on error

2021-04-28 Thread Matthew Rosato
On 4/28/21 10:36 AM, Eric Farman wrote: The vfio_ccw_unrealize() routine makes an unconditional attempt to unregister every IRQ notifier, though they may not have been registered in the first place (when running on an older kernel, for example). Let's mirror this behavior in the error cleanups i

RE: [RFC PATCH 3/4] target/ppc: Move SPR generation to separate file

2021-04-28 Thread Bruno Piazera Larsen
> > > This move is required to enable building without TCG. > > > All the logic related to registering SPRs specific to > > > some architectures or machines has been hidden in this > > > new file. > > > > Hm... I thought we ended up deciding to keep the gen_spr_ > > functions in translate_init.c.in

Re: [PATCH v2 2/4] hw/sparc64: Remove unused "hw/char/serial.h" header

2021-04-28 Thread Richard Henderson
On 4/28/21 7:16 AM, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc64/sparc64.c | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 3/4] hw/sparc64: Fix code style for checkpatch.pl

2021-04-28 Thread Richard Henderson
On 4/28/21 7:16 AM, Philippe Mathieu-Daudé wrote: We are going to move this code, fix its style first. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc64/sparc64.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) Reviewed-by: Richard Henderson r~

[PATCH 0/2] virtiofsd: Meson build fixes

2021-04-28 Thread Philippe Mathieu-Daudé
A pair of fixes to allow building virtiofsd without sysemu/tools. Should this configuration be tested in CI? Regards, Phil. Philippe Mathieu-Daudé (2): meson: Check for seccomp/cap-ng libraries if virtiofsd is enabled util/meson: Build iov/hexdump/buffer_is_zero with virtiofsd meson.build

Re: [PATCH 2/2] util/meson: Build iov/hexdump/buffer_is_zero with virtiofsd

2021-04-28 Thread Philippe Mathieu-Daudé
On 4/28/21 4:48 PM, Philippe Mathieu-Daudé wrote: > When not explicitly select a sysemu target or the QEMU tools and > building virtiofsd, libqemuutil.a has missing symbols: > > /usr/bin/ld: tools/virtiofsd/virtiofsd.p/fuse_virtio.c.o: in function > `virtio_send_msg': > tools/virtiofsd/fuse_v

Re: [PATCH v2 4/4] hw/sparc*: Move cpu_check_irqs() to target/sparc/

2021-04-28 Thread Richard Henderson
On 4/28/21 7:16 AM, Philippe Mathieu-Daudé wrote: Since cpu_check_irqs() doesn't reference to anything outside of CPUSPARCState, it better belongs to the architectural code in target/, rather than the hardware specific code in hw/. Note: while we moved the trace events, we don't rename them. Re

[PATCH 1/2] meson: Check for seccomp/cap-ng libraries if virtiofsd is enabled

2021-04-28 Thread Philippe Mathieu-Daudé
When not explicitly select a sysemu target and building virtiofsd, the seccomp/cap-ng libraries are not resolved, leading to this error: $ configure --target-list=i386-linux-user --disable-tools --enable-virtiofsd tools/meson.build:12:6: ERROR: Problem encountered: virtiofsd requires libcap-n

[PATCH 2/2] util/meson: Build iov/hexdump/buffer_is_zero with virtiofsd

2021-04-28 Thread Philippe Mathieu-Daudé
When not explicitly select a sysemu target or the QEMU tools and building virtiofsd, libqemuutil.a has missing symbols: /usr/bin/ld: tools/virtiofsd/virtiofsd.p/fuse_virtio.c.o: in function `virtio_send_msg': tools/virtiofsd/fuse_virtio.c:236: undefined reference to `iov_size' /usr/bin/ld:

Re: [PATCH v2 02/15] target/ppc: Add cia field to DisasContext

2021-04-28 Thread Richard Henderson
On 4/27/21 10:16 AM, Luis Pires wrote: From: Richard Henderson Signed-off-by: Richard Henderson --- target/ppc/translate.c | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) When a patch passes through your hands, it should contain your S-o-b. r~

Re: [PATCH] tools/meson.build: Error on enabling virtiofsd and have_system is false

2021-04-28 Thread Philippe Mathieu-Daudé
On 4/28/21 3:56 PM, Connor Kuehl wrote: > On 4/28/21 8:35 AM, Mahmoud Mandour wrote: >> Previously, on configuring with --enable-virtiofsd and specifying >> a target list that does not contain a full-system emulation target, >> a spurious error message is emitted. This patch introduces a >> meaning

RE: [PATCH v2 02/15] target/ppc: Add cia field to DisasContext

2021-04-28 Thread Luis Fernando Fujita Pires
I'll do that, thanks! > -Original Message- > From: Richard Henderson > Sent: quarta-feira, 28 de abril de 2021 11:55 > To: Luis Fernando Fujita Pires ; qemu- > de...@nongnu.org; qemu-...@nongnu.org > Cc: da...@gibson.dropbear.id.au; Matheus Kowalczuk Ferst > ; Bruno Piazera Larsen > ; lag

[Bug 1822798] Re: The hover of " Full list of releases " is not effective even not visible.

2021-04-28 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/48 ** Changed in: qemu Status: New => Expired ** Changed in

Re: [PATCH v8 08/11] hw/core: deprecate old reset functions and introduce new ones

2021-04-28 Thread Peter Maydell
On Wed, 28 Apr 2021 at 14:29, Markus Armbruster wrote: > > Peter Maydell writes: > > These are two separate things: > > 1) callsites which want to reset some other device, and currently > > mostly use eg device_legacy_reset() -- the transition to be done > > is to move them to use device

Re: [PATCH] tools/meson.build: Error on enabling virtiofsd and have_system is false

2021-04-28 Thread Mahmoud Mandour
On Wed, Apr 28, 2021 at 4:29 PM Connor Kuehl wrote: > On 4/28/21 9:13 AM, Mahmoud Mandour wrote: > >> I am not entirely sure if this is true. The error message before this > >> patch is applied is: > >> > >> ../tools/meson.build:12:6: ERROR: Problem encountered: virtiofsd > >> req

Re: [PATCH v2 04/15] target/ppc: Move DISAS_NORETURN setting into gen_exception*

2021-04-28 Thread Richard Henderson
On 4/27/21 10:16 AM, Luis Pires wrote: -static inline void gen_stop_exception(DisasContext *ctx) +static inline void gen_end_tb_exception(DisasContext *ctx, uint32_t excp) { -gen_update_nip(ctx, ctx->base.pc_next); -ctx->exception = POWERPC_EXCP_STOP; +/* No need to update nip for S

Re: [PATCH 1/2] meson: Check for seccomp/cap-ng libraries if virtiofsd is enabled

2021-04-28 Thread Peter Maydell
On Wed, 28 Apr 2021 at 15:55, Philippe Mathieu-Daudé wrote: (cc'ing Paolo for a meson.build question below...) > When not explicitly select a sysemu target and building virtiofsd, > the seccomp/cap-ng libraries are not resolved, leading to this error: > > $ configure --target-list=i386-linux-u

[Bug 1874676] Re: [Feature request] MDIO bus

2021-04-28 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/49 ** Changed in: qemu Status: Incomplete => Expired ** Cha

Re: [PATCH 0/2] virtiofsd: Meson build fixes

2021-04-28 Thread Peter Maydell
On Wed, 28 Apr 2021 at 15:53, Philippe Mathieu-Daudé wrote: > > A pair of fixes to allow building virtiofsd without sysemu/tools. > > Should this configuration be tested in CI? Does the configuration make sense to support? I thought virtiofsd was only of use with system emulation ? thanks -- PMM

[PATCH v4 01/36] tests/test-bdrv-graph-mod: add test_parallel_exclusive_write

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Add the test that shows that concept of ignore_children is incomplete. Actually, when we want to update something, ignoring permission of some existing BdrvChild, we should ignore also the propagated effect of this child to the other children. But that's not done. Better approach (update permission

[PATCH v4 03/36] tests/test-bdrv-graph-mod: add test_append_greedy_filter

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
bdrv_append() is not quite good for inserting filters: it does extra permission update in intermediate state, where filter get it filtered child but is not yet replace it in a backing chain. Some filters (for example backup-top) may want permissions even when have no parents. And described interme

[PATCH v4 15/36] block: add bdrv_list_* permission update functions

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Add new interface, allowing use of existing node list. It will be used to fix bdrv_replace_node() in the further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 106 +--- 1 file changed, 71 insertions(

[PATCH v4 00/36] block: update graph permissions update

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Hi all! And here is v4. v4: git: https://src.openvz.org/scm/~vsementsov/qemu.git tag: up-block-topologic-perm-v4 01: drop misleading comment 04: add missed bdrv_unref to new bdrv_append() caller 08: s/Than/Then/ in comment 18: add missed ".clean = g_free" to bdrv_attach_child_common_drv fix

[PATCH v4 04/36] block: bdrv_append(): don't consume reference

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
We have too much comments for this feature. It seems better just don't do it. Most of real users (tests don't count) have to create additional reference. Drop also comment in external_snapshot_prepare: - bdrv_append doesn't "remove" old bs in common sense, it sounds strange - the fact that bd

[PATCH v4 18/36] block: add bdrv_attach_child_common() transaction action

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
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. qsd-jobs test output updated. Seems now permission update goes in another order. Still, t

[PATCH v4 14/36] block: add bdrv_drv_set_perm transaction action

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Refactor calling driver callbacks to a separate transaction action to be used later. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 70 - 1 file changed, 54 insertions(+), 16 deletions(-) diff --git a/bl

[PATCH v4 12/36] block: inline bdrv_child_*() permission functions calls

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Each of them has only one caller. Open-coding simplifies further pemission-update system changes. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf --- block.c | 59 + 1 file changed, 17 inser

[PATCH v4 16/36] block: add bdrv_replace_child_safe() transaction action

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
To be used in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 54 ++ 1 file changed, 54 insertions(+) diff --git a/block.c b/block.c index 98b7bc179c..a5305662dc 100644 --- a/block.c +++

[PATCH v4 21/36] block: adapt bdrv_append() for inserting filters

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
bdrv_append is not very good for inserting filters: it does extra permission update as part of bdrv_set_backing_hd(). During this update filter may conflict with other parents of top_bs. Instead, let's first do all graph modifications and after it update permissions. append-greedy-filter test-cas

[PATCH v4 06/36] block: drop ctx argument from bdrv_root_attach_child

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Passing parent aio context is redundant, as child_class and parent opaque pointer are enough to retrieve it. Drop the argument and use new bdrv_child_get_parent_aio_context() interface. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf --- include/

[PATCH v4 13/36] block: use topological sort for permission update

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Rewrite bdrv_check_perm(), bdrv_abort_perm_update() and bdrv_set_perm() to update nodes in topological sort order instead of simple DFS. With topologically sorted nodes, we update a node only when all its parents already updated. With DFS it's not so. Consider the following example: A -+

[PATCH v4 10/36] block: refactor bdrv_child* permission functions

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Split out non-recursive parts, and refactor as block graph transaction action. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 79 ++--- 1 file changed, 59 insertions(+), 20 deletions(-) diff --git a/block.c

[PATCH v4 05/36] block: BdrvChildClass: add .get_parent_aio_context handler

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Add new handler to get aio context and implement it in all child classes. Add corresponding public interface to be used soon. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf --- include/block/block.h | 2 ++ include/block/block_int.h | 2 ++

[PATCH v4 31/36] block: drop unused permission update functions

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 103 1 file changed, 103 deletions(-) diff --git a/block.c b/block.c index ffaa367a1b..bf7c187435 100644 --- a/block.c +++ b/block.c @@ -1987,11 +1987,6 @@

[PATCH v4 02/36] tests/test-bdrv-graph-mod: add test_parallel_perm_update

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Add test to show that simple DFS recursion order is not correct for permission update. Correct order is topological-sort order, which will be introduced later. Consider the block driver which has two filter children: one active with exclusive write access and one inactive with no specific permissi

[PATCH v4 19/36] block: add bdrv_attach_child_noperm() transaction action

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Split no-perm part of bdrv_attach_child as separate transaction action. It will be used in later commits. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 71 ++--- 1 file changed, 58 insertions(+), 13 deletion

[PATCH v4 25/36] block: drop ignore_children for permission update functions

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
This argument is always NULL. Drop it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 38 +++--- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/block.c b/block.c index 68dfd822dd..46af5852ab 100644 --- a/block.c

[PATCH v4 23/36] block: introduce bdrv_drop_filter()

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Using bdrv_replace_node() for removing filter is not good enough: it keeps child reference of the filter, which may conflict with original top node during permission update. Instead let's create new interface, which will do all graph modifications first and then update permissions. Let's modify b

[PATCH v4 09/36] block: bdrv_refresh_perms: check for parents permissions conflict

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Add additional check that node parents do not interfere with each other. This should not hurt existing callers and allows in further patch use bdrv_refresh_perms() to update a subtree of changed BdrvChild (check that change is correct). New check will substitute bdrv_check_update_perm() in followi

[PATCH v4 20/36] block: split out bdrv_replace_node_noperm()

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Split part of bdrv_replace_node_common() to be used separately. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 50 +++--- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/block.c b/block.c index c74e6e

[PATCH v4 32/36] block: inline bdrv_check_perm_common()

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
bdrv_check_perm_common() has only one caller, so no more sense in "common". Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 32 +++- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/block.c b/block.c index bf7c187435..3

[PATCH v4 30/36] block: bdrv_reopen_multiple: refresh permissions on updated graph

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Move bdrv_reopen_multiple to new paradigm of permission update: first update graph relations, then do refresh the permissions. We have to modify reopen process in file-posix driver: with new scheme we don't have prepared permissions in raw_reopen_prepare(), so we should reconfigure fd in raw_check

[PATCH v4 17/36] block: fix bdrv_replace_node_common

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
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 just referesh permissions for the whole subgraph (in topological-sort defined or

[PATCH v4 11/36] block: rewrite bdrv_child_try_set_perm() using bdrv_refresh_perms()

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
We are going to drop recursive bdrv_child_* functions, so stop use them in bdrv_child_try_set_perm() as a first step. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/block.c b/bloc

[PATCH v4 28/36] block: add bdrv_set_backing_noperm() transaction action

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Split out no-perm part of bdrv_set_backing_hd() as a separate transaction action. Note the in case of existing BdrvChild we reuse it, not recreate, just to do less actions. We don't need to create extra reference to backing_hd as we don't lose it in bdrv_attach_child(). Signed-off-by: Vladimir Se

[PATCH v4 26/36] block: make bdrv_unset_inherits_from to be a transaction action

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
To be used in the further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 46 ++ 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index 46af5852ab..1dc14908ac 100644 --- a/block

[PATCH v4 08/36] util: add transactions.c

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Add simple transaction API to use in further update of block graph operations. Supposed usage is: - "prepare" is main function of the action and it should make the main effect of the action to be visible for the following actions, keeping possibility of roll-back, saving necessary things in a

[PATCH v4 24/36] block/backup-top: drop .active

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
We don't need this workaround anymore: bdrv_append is already smart enough and we can use new bdrv_drop_filter(). This commit efficiently reverts also recent 705dde27c6c53b73, which checked .active on io path. Still it said that the problem should be theoretical. And the logic of filter removement

[PATCH v4 34/36] block: refactor bdrv_child_set_perm_safe() transaction action

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Old interfaces dropped, nobody directly calls bdrv_child_set_perm_abort() and bdrv_child_set_perm_commit(), so we can use personal state structure for the action and stop exploiting BdrvChild structure. Also, drop "_safe" suffix which is redundant now. Signed-off-by: Vladimir Sementsov-Ogievskiy

[PATCH v4 07/36] block: make bdrv_reopen_{prepare, commit, abort} private

2021-04-28 Thread Vladimir Sementsov-Ogievskiy via
These functions are called only from bdrv_reopen_multiple() in block.c. No reason to publish them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf --- include/block/block.h | 4 block.c | 13 + 2 files changed, 9 i

Re: [PATCH v2 09/15] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI

2021-04-28 Thread Richard Henderson
On 4/28/21 7:10 AM, Matheus K. Ferst wrote: In our first attempt, we did some efforts to keep prefixed instructions type 0b10 and 0b11 under the same implementation as their word-size counterpart, i.e. trans_ADDI and trans_PADDI had the same signature and just forwarded their arguments to a thi

[PATCH v4 33/36] block: inline bdrv_replace_child()

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
bdrv_replace_child() has only one caller, the second argument is unused. Inline it now. This triggers deletion of some more unused interfaces. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 101 ++-- 1 file c

Re: [PATCH RESEND v2] i386/cpu: Remove the deprecated cpu model 'Icelake-Client'

2021-04-28 Thread Eduardo Habkost
On Wed, Apr 28, 2021 at 10:41:13AM +0800, Robert Hoo wrote: > As it's been marked deprecated since v5.2, now I think it's time remove it > from code. > > Signed-off-by: Robert Hoo > --- > (Sorry, forgot to append changelog in last send.) > Changelog: > v2: > Update removed-features.rst. >

[PATCH v4 22/36] block: add bdrv_remove_filter_or_cow transaction action

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 84 +++-- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 5bb6a2bef9..2ea9cc110d 100644 --- a/block.c +++ b/block.c @@ -296

[PATCH v4 29/36] block: bdrv_reopen_multiple(): move bdrv_flush to separate pre-prepare

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
During reopen we may add backing bs from other aio context, which may lead to changing original context of top bs. We are going to move graph modification to prepare stage. So, it will be possible that bdrv_flush() in bdrv_reopen_prepare called on bs in non-original aio context, which we didn't aq

[PATCH v4 27/36] block: make bdrv_refresh_limits() to be a transaction action

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
To be used in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- include/block/block.h | 3 ++- block.c | 9 - block/io.c| 31 +-- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a

[PATCH v4 36/36] block: refactor bdrv_node_check_perm()

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
Now, bdrv_node_check_perm() is called only with fresh cumulative permissions, so its actually "refresh_perm". Move permission calculation to the function. Also, drop unreachable error message and rewrite the remaining one to be more generic (as now we don't know which node is added and which was a

Re: [PATCH v2 11/15] target/ppc: Move D/DS/X-form integer loads to decodetree

2021-04-28 Thread Richard Henderson
On 4/28/21 6:31 AM, Matheus K. Ferst wrote: This is a bit problematic, the instruction form isn't enough to decide its fields. Eg. setb is X-form, but the fields are rt:5 bfa:3, setbc is also X-form and the fields are rt:5 ba:5. In fact, for the X-form, there is a whole page of field designations

RE: [PATCH v4 09/12] target/hexagon: import lexer for idef-parser

2021-04-28 Thread Taylor Simpson
>From: Paolo Montesel >Sent: Wednesday, April 28, 2021 5:25 AM >To: Taylor Simpson >Cc: Alessandro Di Federico ; qemu-devel@nongnu.org; Brian >Cain ; ni...@rev.ng; >phi...@redhat.com; >richard.hender...@linaro.org; Alessandro Di Federico >Subject: Re: [PATCH v4 09/12] target/hexagon: import

[PATCH v4 35/36] block: rename bdrv_replace_child_safe() to bdrv_replace_child()

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
We don't have bdrv_replace_child(), so it's time for bdrv_replace_child_safe() to take its place. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index 7b2a8844f6..df

<    1   2   3   4   >