Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-19 Thread Chao Peng
On Mon, Dec 19, 2022 at 03:36:28PM +0100, Borislav Petkov wrote: > On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao Peng wrote: > > In memory encryption usage, guest memory may be encrypted with special > > key and can be accessed only by the guest itself. We call such memory > > private memory.

Re: [PATCH] hvf: arm: Add support for GICv3

2022-12-19 Thread Alexander Graf
Hi Zenghui, On 20.12.22 08:14, Zenghui Yu wrote: On 2022/12/20 6:08, Alexander Graf wrote: We currently only support GICv2 emulation. Before looking into it, I think it's worth finalizing the GIC version in the hvf case - only v2 is allowed and fail early if user selects the unsupported

Re: [PATCH 1/5] target/arm: only build psci for TCG

2022-12-19 Thread Alexander Graf
Hey Fabiano, On 19.12.22 12:42, Fabiano Rosas wrote: Claudio Fontana writes: Ciao Alex, On 12/19/22 11:47, Alexander Graf wrote: Hey Claudio, On 19.12.22 09:37, Claudio Fontana wrote: On 12/16/22 22:59, Alexander Graf wrote: Hi Claudio, If the PSCI implementation becomes TCG only, can

Re: [PULL 00/21] Hexagon update: bug fixes, performance, idef-parser

2022-12-19 Thread Philippe Mathieu-Daudé
On 20/12/22 00:19, Philippe Mathieu-Daudé wrote: Hi, On 16/12/22 21:48, Taylor Simpson wrote: 12-21) Instruction definition parser (idef-parser) from rev.ng Parses the instruction semantics and generates TCG Building QEMU

Re: [PATCH v10 2/9] KVM: Introduce per-page memory attributes

2022-12-19 Thread Chao Peng
On Mon, Dec 19, 2022 at 11:17:22AM +0100, Borislav Petkov wrote: > On Mon, Dec 19, 2022 at 04:15:32PM +0800, Chao Peng wrote: > > Tamping down with error number a bit: > > > > if (attrs->flags) > > return -ENXIO; > > if (attrs->attributes & ~supported_attrs) > >

Re: [PATCH v10 1/9] mm: Introduce memfd_restricted system call to create restricted user memory

2022-12-19 Thread Chao Peng
On Mon, Dec 19, 2022 at 08:48:10AM +, Huang, Kai wrote: > On Mon, 2022-12-19 at 15:53 +0800, Chao Peng wrote: > > > > > > [...] > > > > > > > + > > > > + /* > > > > +* These pages are currently unmovable so don't place them into > > > > movable > > > > +* pageblocks

Re: [PATCH v2 2/3] hvf: implement guest debugging on Apple Silicon hosts

2022-12-19 Thread Francesco Cagnin
Hi, indeed, the patch doesn't keep separate copies of debug registers and just directly sets cp15.* values, as I was not aware of the issue—thanks for the detailed explanation. I remain available to implement the required fixes, but I'd need some guidance on how to proceed. Thanks, -- Francesco

Re: [PATCH 01/11] contrib/gitdm: add C-Sky to the domain map

2022-12-19 Thread Guo Ren
On Tue, Dec 20, 2022 at 9:13 AM LIU Zhiwei wrote: > > The c-sky domain mail is no longer being used for Guo Ren and me. > > C-SKY company and C-SKY arch is still existing, but its website domain > has been moved to https://www.t-head.cn/. Acked-by: Guo Ren > > Otherwise, > > Reviewed-by: LIU

Re: [PATCH] hvf: arm: Add support for GICv3

2022-12-19 Thread Zenghui Yu via
On 2022/12/20 6:08, Alexander Graf wrote: We currently only support GICv2 emulation. Before looking into it, I think it's worth finalizing the GIC version in the hvf case - only v2 is allowed and fail early if user selects the unsupported versions. Currently finalize_gic_version() does not

Re: [PATCH 5/4] target/i386: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Philippe Mathieu-Daudé
On 20/12/22 01:01, Richard Henderson wrote: On 12/19/22 13:22, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daude Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only

Re: [PATCH v11 5/5] docs: Add generic vhost-vdpa device documentation

2022-12-19 Thread longpeng2--- via
在 2022/12/20 14:15, Michael S. Tsirkin 写道: On Tue, Dec 20, 2022 at 08:02:51AM +0800, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: 在 2022/12/20 5:37, Michael S. Tsirkin 写道: On Fri, Dec 16, 2022 at 11:33:49AM +0800, Jason Wang wrote: On Thu, Dec 15, 2022 at 9:50 PM

Re: [PATCH v11 5/5] docs: Add generic vhost-vdpa device documentation

2022-12-19 Thread Michael S. Tsirkin
On Tue, Dec 20, 2022 at 08:02:51AM +0800, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > > 在 2022/12/20 5:37, Michael S. Tsirkin 写道: > > On Fri, Dec 16, 2022 at 11:33:49AM +0800, Jason Wang wrote: > > > On Thu, Dec 15, 2022 at 9:50 PM Longpeng(Mike) > > > wrote: > > >

[PATCH v3 2/2] target/ppc: Check DEXCR on hash{st, chk} instructions

2022-12-19 Thread Nicholas Miehlbradt
Adds checks to the hashst and hashchk instructions to only execute if enabled by the relevant aspect in the DEXCR and HDEXCR. This behaviour is guarded behind TARGET_PPC64 since Power10 is currently the only implementation which has the DEXCR. Reviewed-by: Daniel Henrique Barboza Signed-off-by:

[PATCH v3 1/2] target/ppc: Implement the DEXCR and HDEXCR

2022-12-19 Thread Nicholas Miehlbradt
Define the DEXCR and HDEXCR as special purpose registers. Each register occupies two SPR indicies, one which can be read in an unprivileged state and one which can be modified in the appropriate priviliged state, however both indicies refer to the same underlying value. Note that the ISA uses

[PATCH v3 0/2] target/ppc: Implement Dynamic Execution Control Registers

2022-12-19 Thread Nicholas Miehlbradt
Implements the Dynamic Execution Control Register (DEXCR) and the Hypervisor Dynamic Execution Control Register (HDEXCR) in TCG as defined in Power ISA 3.1B. Only aspects 5 (Non-privileged hash instruction enable) and 6 (Privileged hash instruction enable) have architectural effects. Other aspects

Re: [PATCH 01/11] contrib/gitdm: add C-Sky to the domain map

2022-12-19 Thread LIU Zhiwei
The c-sky domain mail is no longer being used for Guo Ren and me. C-SKY company and C-SKY arch is still existing, but its website domain has been moved to https://www.t-head.cn/. Otherwise, Reviewed-by: LIU Zhiwei Thanks, Zhiwei On 2022/12/19 20:19, Alex Bennée wrote: Although the

Re: [PATCH-for-8.0 7/7] hw/mips/gt64xxx_pci: Move it to hw/pci-host/

2022-12-19 Thread Richard Henderson
On 12/9/22 07:15, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé The GT-64120 is a north-bridge, and it is not MIPS specific. Move it with the other north-bridge devices. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 +-

Re: [PATCH-for-8.0 6/7] hw/mips/meson: Make gt64xxx_pci.c endian-agnostic

2022-12-19 Thread Richard Henderson
On 12/9/22 07:15, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé The single machine using this device explicitly sets its endianness. We don't need to set a default. This allow us to remove the target specificity from the build system. Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH-for-8.0 5/7] hw/mips/malta: Explicit GT64120 endianness upon device creation

2022-12-19 Thread Richard Henderson
On 12/9/22 07:15, Philippe Mathieu-Daudé wrote: Propagate the controller endianess from the machine, setting the "cpu-little-endian" property. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Modulo using

Re: [PATCH-for-8.0 4/7] hw/mips/gt64xxx_pci: Add a 'cpu-little-endian' qdev property

2022-12-19 Thread Richard Henderson
On 12/9/22 07:15, Philippe Mathieu-Daudé wrote: +static Property gt64120_properties[] = { +DEFINE_PROP_BIT("cpu-little-endian", GT64120State, +features, FEAT_CPU_LE, !TARGET_BIG_ENDIAN), Unless you're really planning on more feature bits, DEFINE_PROP_BOOL would be

Re: [PATCH-for-8.0 3/7] hw/mips/gt64xxx_pci: Manage endian bits with the RegisterField API

2022-12-19 Thread Richard Henderson
On 12/9/22 07:15, Philippe Mathieu-Daudé wrote: /* CPU Configuration */ -#if TARGET_BIG_ENDIAN s->regs[GT_CPU] = 0x; -#else -s->regs[GT_CPU] = 0x1000; -#endif +s->regs[GT_CPU] = FIELD_DP32(s->regs[GT_CPU], GT_CPU, Endianess, cpu_le); Missing

Re: [PATCH-for-8.0 2/7] hw/mips/gt64xxx_pci: Let the GT64120 manage the lower 512MiB hole

2022-12-19 Thread Richard Henderson
On 12/9/22 07:15, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Per the comment in the Malta board, the [0x.-0x2000.] range is decoded by the GT64120, so move the "empty_slot" there. Signed-off-by: Philippe Mathieu-Daudé --- configs/devices/mips-softmmu/common.mak |

Re: [PATCH-for-8.0 1/7] hw/mips/Kconfig: Introduce CONFIG_GT64120 to select gt64xxx_pci.c

2022-12-19 Thread Richard Henderson
On 12/9/22 07:15, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/Kconfig | 6 ++ hw/mips/meson.build | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v11 5/5] docs: Add generic vhost-vdpa device documentation

2022-12-19 Thread longpeng2--- via
在 2022/12/20 5:37, Michael S. Tsirkin 写道: On Fri, Dec 16, 2022 at 11:33:49AM +0800, Jason Wang wrote: On Thu, Dec 15, 2022 at 9:50 PM Longpeng(Mike) wrote: From: Longpeng Signed-off-by: Longpeng --- .../devices/vhost-vdpa-generic-device.rst | 68 +++ 1 file

Re: [PATCH 5/4] target/i386: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Richard Henderson
On 12/19/22 13:22, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daude Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Guard qmp_query_cpu_definitions() within

Re: [PATCH 4/4] target/ppc: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Richard Henderson
On 12/19/22 13:10, Philippe Mathieu-Daudé wrote: Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Move the QMP functions from cpu_init.c (which is always compiled) to

Re: [PATCH 3/4] target/mips: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Richard Henderson
On 12/19/22 13:10, Philippe Mathieu-Daudé wrote: Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Extract the QMP functions from cpu.c (which is always compiled) to the

Re: [PATCH 2/4] target/loongarch: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Richard Henderson
On 12/19/22 13:10, Philippe Mathieu-Daudé wrote: Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Extract the QMP functions from cpu.c (which is always compiled) to the

Re: [PATCH 1/4] target/arm: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Richard Henderson
On 12/19/22 13:10, Philippe Mathieu-Daudé wrote: Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Move the QMP functions from helper.c (which is always compiled) to

Re: [PULL v3 00/50] Block layer patches

2022-12-19 Thread Fabiano Rosas
Kevin Wolf writes: > The following changes since commit 48804eebd4a327e4b11f902ba80a00876ee53a43: > > Merge tag 'pull-misc-2022-12-14' of https://repo.or.cz/qemu/armbru into > staging (2022-12-15 10:13:46 +) > > are available in the Git repository at: > >

Re: [PULL 00/45] riscv-to-apply queue

2022-12-19 Thread Alistair Francis
Merge tag 'pull-loongarch-20221215' of https://gitlab.com/gaosong/qemu > > into staging (2022-12-18 13:53:29 +) > > > > are available in the Git repository at: > > > > https://github.com/alistair23/qemu.git tags/pull-riscv-to-apply-20221219-3 > > > > for

Re: [PULL 00/21] Hexagon update: bug fixes, performance, idef-parser

2022-12-19 Thread Philippe Mathieu-Daudé
Hi, On 16/12/22 21:48, Taylor Simpson wrote: 12-21) Instruction definition parser (idef-parser) from rev.ng Parses the instruction semantics and generates TCG Building QEMU with Clang I'm now getting:

[PULL 0/2] Hppa fixes patches

2022-12-19 Thread Helge Deller
The following changes since commit c15dc499cc22f4a71639e42e36051e118761c25f: Merge tag 'pull-misc-20221218' of https://gitlab.com/rth7680/qemu into staging (2022-12-19 10:28:57 +) are available in the Git repository at: https://github.com/hdeller/qemu-hppa.git

[PULL 2/2] target/hppa: Fix fid instruction emulation

2022-12-19 Thread Helge Deller
The fid instruction (Floating-Point Identify) puts the FPU model and revision into the Status Register. Since those values shouldn't be 0, store values there which a PCX-L2 (for 32-bit) or a PCX-W2 (for 64-bit) would return. Noticed while trying to install MPE/iX. Signed-off-by: Helge Deller

[PULL 1/2] target/hppa: Generate illegal instruction exception for 64-bit instructions

2022-12-19 Thread Helge Deller
Qemu currently emulates a 32-bit CPU only, and crashes with this error when it faces a 64-bit load (e.g. "ldd 0(r26),r0") or a 64-bit store (e.g. "std r26,0(r26)") instruction in the guest: ERROR:../qemu/tcg/tcg-op.c:2822:tcg_canonicalize_memop: code should not be reached Add checks for 64-bit

Re: [RFC] gitlab: introduce s390x wasmtime job

2022-12-19 Thread Alex Bennée
Ilya Leoshkevich writes: > On Fri, 2022-12-16 at 15:10 +, Alex Bennée wrote: >> >> Ilya Leoshkevich writes: >> >> > On Tue, 2022-07-05 at 15:40 +0100, Peter Maydell wrote: >> > > On Tue, 5 Jul 2022 at 15:37, Ilya Leoshkevich >> > > wrote: >> > > > >> > > > On Tue, 2022-07-05 at 14:57

[PATCH v4 04b/27] tcg: Massage tcg_reg_alloc_op()

2022-12-19 Thread Philippe Mathieu-Daudé
In preparation of introducing paired registers in the next commit, massage tcg_reg_alloc_op() a bit by converting it to a switch with a single case: the current non-paired register. Signed-off-by: Richard Henderson [PMD: Split from bigger patch, 2/3] Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH v4 04/27] tcg: Introduce paired register allocation

2022-12-19 Thread Philippe Mathieu-Daudé
Splitting this patch in 3 to ease review. Philippe Mathieu-Daudé (2): tcg: Massage process_op_defs() tcg: Massage tcg_reg_alloc_op() Richard Henderson (1): tcg: Introduce paired register allocation include/tcg/tcg.h | 2 + tcg/tcg.c | 475

[PATCH v4 04a/27] tcg: Massage process_op_defs()

2022-12-19 Thread Philippe Mathieu-Daudé
In preparation of introducing paired registers, massage a bit process_op_defs()'s switch case. Signed-off-by: Richard Henderson [PMD: Split from bigger patch, 1/3] Signed-off-by: Philippe Mathieu-Daudé --- tcg/tcg.c | 61 +++ 1 file changed,

[PATCH v4 04c/27] tcg: Introduce paired register allocation

2022-12-19 Thread Philippe Mathieu-Daudé
From: Richard Henderson There are several instances where we need to be able to allocate a pair of registers to related inputs/outputs. Add 'p' and 'm' register constraints for this, in order to be able to allocate the even/odd register first or second. Signed-off-by: Richard Henderson [PMD:

[PATCH] hvf: arm: Add support for GICv3

2022-12-19 Thread Alexander Graf
We currently only support GICv2 emulation. To also support GICv3, we will need to pass a few system registers into their respective handler functions. This patch adds support for HVF to call into the TCG callbacks for GICv3 system register handlers. This is safe because the GICv3 TCG code is

Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation

2022-12-19 Thread Strahinja Jankovic
On Mon, Dec 19, 2022 at 8:15 AM Philippe Mathieu-Daudé wrote: > > On 18/12/22 23:39, Strahinja Jankovic wrote: > > Hi, > > > > On Sun, Dec 18, 2022 at 11:23 PM Philippe Mathieu-Daudé > > wrote: > >> > >> On 18/12/22 23:12, Strahinja Jankovic wrote: > >>> Hi, > >>> > >>> On Sun, Dec 18, 2022 at

Re: [PATCH v2 0/7] Enable Cubieboard A10 boot SPL from SD card

2022-12-19 Thread Strahinja Jankovic
Hi, On Mon, Dec 19, 2022 at 8:11 AM Philippe Mathieu-Daudé wrote: > > On 18/12/22 23:57, Strahinja Jankovic wrote: > > Hi, > > > > I just looked around a bit more. Would OpenWrt image be acceptable? > > Sure. > > > It looks like there are releases for cubieboard that are kept for a > > longer

Re: [PATCH 7/7] libvhost-user: Switch to unsigned int for inuse field in struct VuVirtq

2022-12-19 Thread Marcel Holtmann
Hi Philippe, >> It seems there is no need to keep the inuse field signed and end up with >> compiler warnings for sign-compare. >> CC libvhost-user.o >> libvhost-user.c: In function ‘vu_queue_pop’: >> libvhost-user.c:2763:19: error: comparison of integer expressions of >> different

[PATCH 0/3] Compiler warning fixes for libvduse

2022-12-19 Thread Marcel Holtmann
When using libvduse library in an external project it would be good if it can cope with various different compiler settings, this fixes two obvious ones similar to the patches for libvhost-user. It also contains a 3rd one, that is marked as RFC since I have no idea what is correct here. From the

[PATCH RFC 3/3] libvduse: Fix assignment in vring_set_avail_event

2022-12-19 Thread Marcel Holtmann
CC libvduse.o libvduse.c: In function ‘vring_set_avail_event’: libvduse.c:603:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasin] 603 | *((uint16_t *)>vring.used->ring[vq->vring.num]) = htole16(val); |

[PATCH 2/3] libvduse: Switch to unsigned int for inuse field in struct VduseVirtq

2022-12-19 Thread Marcel Holtmann
It seems there is no need to keep the inuse field signed and end up with compiler warnings for sign-compare. CC libvduse.o libvduse.c: In function ‘vduse_queue_pop’: libvduse.c:789:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’

[PATCH 1/3] libvduse: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-19 Thread Marcel Holtmann
When the libvduse sources are used by another project, it can not be guaranteed that _GNU_SOURCE is set by the build system. If it is for example not set, errors like this show up. CC libvduse.o libvduse.c: In function ‘vduse_log_get’: libvduse.c:172:9: error: implicit declaration of

Re: [RFC] gitlab: introduce s390x wasmtime job

2022-12-19 Thread Ilya Leoshkevich
On Fri, 2022-12-16 at 15:10 +, Alex Bennée wrote: > > Ilya Leoshkevich writes: > > > On Tue, 2022-07-05 at 15:40 +0100, Peter Maydell wrote: > > > On Tue, 5 Jul 2022 at 15:37, Ilya Leoshkevich > > > wrote: > > > > > > > > On Tue, 2022-07-05 at 14:57 +0100, Peter Maydell wrote: > > > > >

Re: [PATCH v11 5/5] docs: Add generic vhost-vdpa device documentation

2022-12-19 Thread Michael S. Tsirkin
On Fri, Dec 16, 2022 at 11:33:49AM +0800, Jason Wang wrote: > On Thu, Dec 15, 2022 at 9:50 PM Longpeng(Mike) wrote: > > > > From: Longpeng > > > > Signed-off-by: Longpeng > > --- > > .../devices/vhost-vdpa-generic-device.rst | 68 +++ > > 1 file changed, 68 insertions(+) >

[PATCH 5/4] target/i386: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daude Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Guard qmp_query_cpu_definitions() within CONFIG_USER_ONLY; move

Re: [PATCH v5 0/3] Fix the virtio features negotiation flaw

2022-12-19 Thread Michael S. Tsirkin
On Mon, Dec 19, 2022 at 06:36:39AM -0500, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > v5: > -fix the assert statement in [PATCH v4 3/3], reported by > xiangdong. Could you pls rebase on top of master retest and repost? If I try I see some conflicts with vq reset work

[PATCH 2/4] target/loongarch: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Philippe Mathieu-Daudé
Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Extract the QMP functions from cpu.c (which is always compiled) to the new 'cpu-monitor.c' unit (which is only compiled

[PATCH 4/4] target/ppc: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Philippe Mathieu-Daudé
Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Move the QMP functions from cpu_init.c (which is always compiled) to monitor.c (which is only compiled when

[PATCH 1/4] target/arm: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Philippe Mathieu-Daudé
Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Move the QMP functions from helper.c (which is always compiled) to monitor.c (which is only compiled when system-emulation

[PATCH 0/4] target: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Philippe Mathieu-Daudé
The "qapi-commands-machine.h" header is not generated in user-only emulation. This series removes its use in user-emu code by moving the QMP code depending on this header into a separate sysemu unit. Philippe Mathieu-Daudé (4): target/arm: Restrict 'qapi-commands-machine.h' to system emulation

[PATCH 3/4] target/mips: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Philippe Mathieu-Daudé
Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Extract the QMP functions from cpu.c (which is always compiled) to the new 'sysemu/monitor.c' unit (which is only compiled

Re: [PATCH] thread-posix: add support for setting threads name on OpenBSD

2022-12-19 Thread Philippe Mathieu-Daudé
On 18/12/22 09:22, Brad Smith wrote: Make use of pthread_set_name_np() to be able to set the threads name on OpenBSD. Signed-off-by: Brad Smith --- meson.build | 12 util/qemu-thread-posix.c | 9 - 2 files changed, 20 insertions(+), 1 deletion(-)

Re: [PATCH 1/6] disas: add G_GNUC_PRINTF to gstring_printf

2022-12-19 Thread Stefan Weil via
Am 19.12.22 um 14:02 schrieb Daniel P. Berrangé: Signed-off-by: Daniel P. Berrangé --- disas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/disas.c b/disas.c index 94d3b45042..31df8f5b89 100644 --- a/disas.c +++ b/disas.c @@ -239,6 +239,7 @@ void target_disas(FILE *out, CPUState *cpu,

Re: Plugin Memory Callback Debugging

2022-12-19 Thread Aaron Lindsay
Emilio, On Dec 18 00:24, Emilio Cota wrote: > On Tue, Nov 29, 2022 at 15:37:51 -0500, Aaron Lindsay wrote: > (snip) > > > Does this hint that there are cases where reset cpu->plugin_mem_cbs to > > > NULL is > > > getting optimized away, but not the code to set it in the first place? > > > > Is

Re: [PATCH] .gitlab/issue_templates: Move suggestions into comments

2022-12-19 Thread Alex Bennée
Thomas Huth writes: > Many users forget to remove the suggestions from the bug template > when creating a new issue. So when searching for strings like "s390x" > or "Windows", you get a lot of unrelated issues in the results. > Thus let's move the suggestions into HTML comments - so they will

Re: [PATCH] gitlab-ci: Check building ppc64 without TCG

2022-12-19 Thread Alex Bennée
Thomas Huth writes: > Building QEMU for ppc64 hosts with --disable-tcg used to break a couple > of times in the past, see e.g. commit a01b64cee7 ("target/ppc: Put do_rfi > under a TCG-only block") or commit 049b4ad669 ("target/ppc: Fix build > warnings when building with 'disable-tcg'"), so we

Re: [PATCH] gitlab-ci: Disable docs and GUIs for the build-tci and build-tcg-disabled jobs

2022-12-19 Thread Alex Bennée
Thomas Huth writes: > These jobs use their own "script:" section and thus do not profit from > the global "--disable-docs" from the template. While we're at it, disable > also some GUI front ends here since we do not gain any additional test > coverage by compiling those here again. > >

Re: [PATCH] tests/docker: use prebuilt toolchain for debian-hexagon-cross

2022-12-19 Thread Alex Bennée
Mukilan Thiyagarajan writes: > The current docker image for cross compiling hexagon guests > is manually built since it takes >2 hours to build from source. > > This patch: > 1. Solves the above issue by using the prebuilt clang > toolchain hosted on CodeLinaro [1] and maintained by QUIC

RE: [PULL 00/21] Hexagon update: bug fixes, performance, idef-parser

2022-12-19 Thread Taylor Simpson
> -Original Message- > From: Peter Maydell > Sent: Monday, December 19, 2022 4:28 AM > To: Taylor Simpson > Cc: qemu-devel@nongnu.org; richard.hender...@linaro.org; > phi...@linaro.org; Brian Cain ; Matheus Bernardino > (QUIC) ; stefa...@redhat.com > Subject: Re: [PULL 00/21] Hexagon

Re: [RFC PATCH for 8.0] backends/vhost-user: relax the ioeventfd check

2022-12-19 Thread Stefan Hajnoczi
On Fri, 2 Dec 2022 at 08:23, Alex Bennée wrote: > > While you certainly need ioeventfds to work for KVM guests it > shouldn't be limited to that. We can run vhost-user backends for TCG > guests and either use ioeventfds or in band signalling. I suggest tweaking this sentence so it's clear that

Re: [PATCH 5/5] tests/unit: Restrict machine-smp.c test to system emulation

2022-12-19 Thread Richard Henderson
On 12/19/22 09:08, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daude Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 3/5] accel/tcg: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Richard Henderson
On 12/19/22 09:08, Philippe Mathieu-Daudé wrote: Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Rename 'hmp.c' as 'monitor.c' and move the QMP functions from cpu-exec.c

Re: [PATCH 2/5] tcg/tcg-op-gvec: Remove unused "qemu/main-loop.h" header

2022-12-19 Thread Richard Henderson
On 12/19/22 09:08, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- Added in db72581598 ("Include qemu/main-loop.h less") but now I can't see what is requiring it. I checked 'git diff db725815985..origin/master -- tcg/tcg-op-gvec.c' to see if some code was removed

Re: [PATCH 1/5] exec: Remove unused 'qemu/timer.h' timer

2022-12-19 Thread Richard Henderson
On 12/19/22 09:08, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/cpu-exec.c | 1 - accel/tcg/translate-all.c | 1 - include/exec/gen-icount.h | 1 - include/sysemu/cpus.h | 1 - tcg/tcg.c | 1 - 5 files changed, 5 deletions(-)

Re: [PATCH 7/7] libvhost-user: Switch to unsigned int for inuse field in struct VuVirtq

2022-12-19 Thread Philippe Mathieu-Daudé
On 19/12/22 18:53, Marcel Holtmann wrote: It seems there is no need to keep the inuse field signed and end up with compiler warnings for sign-compare. CC libvhost-user.o libvhost-user.c: In function ‘vu_queue_pop’: libvhost-user.c:2763:19: error: comparison of integer expressions of

Re: [PATCH v2 3/6] spec: Add NBD_OPT_EXTENDED_HEADERS

2022-12-19 Thread Vladimir Sementsov-Ogievskiy
On 11/15/22 01:46, Eric Blake wrote: Add a new negotiation feature where the client and server agree to use larger packet headers on every packet sent during transmission phase. This has two purposes: first, it makes it possible to perform operations like trim, write zeroes, and block status on

RE: [PATCH v2] Hexagon (target/hexagon) implement mutability mask for GPRs

2022-12-19 Thread Taylor Simpson
> -Original Message- > From: Marco Liebel (QUIC) > Sent: Friday, December 16, 2022 2:04 PM > To: qemu-devel@nongnu.org > Cc: Brian Cain ; Taylor Simpson > ; Marco Liebel (QUIC) > Subject: [PATCH v2] Hexagon (target/hexagon) implement mutability mask > for GPRs > > Some registers are

Re: [PATCH v4 01/27] tcg: Fix tcg_reg_alloc_dup*

2022-12-19 Thread Richard Henderson
On 12/19/22 07:49, Alex Bennée wrote: Richard Henderson writes: The assignment to mem_coherent should be done with any modification, not simply with a newly allocated register. What exactly does mem_coherent mean in this case? Is it that our register store is potentially out of sync with

[PATCH 5/7] libvhost-user: Declare uffdio_register early to make it C90 compliant

2022-12-19 Thread Marcel Holtmann
When using libvhost-user source in an external project that wants to comply with the C90 standard, it is best to declare variables before code. CC libvhost-user.o libvhost-user.c: In function ‘generate_faults’: libvhost-user.c:683:9: error: ISO C90 forbids mixed declarations and code

[PATCH 3/7] libvhost-user: Cast rc variable to avoid compiler warning

2022-12-19 Thread Marcel Holtmann
The assert from recvmsg() return value against an uint32_t size field from a protocol struct throws a compiler warning. CC libvhost-user.o In file included from libvhost-user.c:27: libvhost-user.c: In function ‘vu_message_read_default’: libvhost-user.c:363:19: error: comparison of integer

[PATCH 0/7] Various compiler warning fixes for libvhost-user

2022-12-19 Thread Marcel Holtmann
The libvhost-user library is also useful for external usage outside of QEMU and thus it would be nice if the two files libvhost-user.[ch] could be just copied and used. However due to different compiler settings, a lot of manual fixups are needed. This is the first attempt at some obvious fixes

[PATCH 1/7] libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-19 Thread Marcel Holtmann
Then the libvhost-user sources are used by another project, it can not be guaranteed that _GNU_SOURCE is set by the build system. If it is for example not set, errors like this show up. CC libvhost-user.o libvhost-user.c: In function ‘vu_panic’: libvhost-user.c:195:9: error: implicit

[PATCH 2/7] libvhost-user: Replace typeof with __typeof__

2022-12-19 Thread Marcel Holtmann
Strictly speaking only -std=gnu99 support the usage of typeof and for easier inclusion in external projects, it is better to use __typeof__. CC libvhost-user.o libvhost-user.c: In function ‘vu_log_queue_fill’: libvhost-user.c:86:13: error: implicit declaration of function ‘typeof’

Re: [PATCH 08/11] contrib/gitdm: Add Facebook the domain map

2022-12-19 Thread Peter Delevoryas
> On Dec 19, 2022, at 7:49 AM, Philippe Mathieu-Daudé wrote: > > !---| > This Message Is From an External Sender > > |---! > > On 19/12/22 16:22, Peter Delevoryas

Re: [PATCH 08/11] contrib/gitdm: Add Facebook the domain map

2022-12-19 Thread Peter Delevoryas
> On Dec 19, 2022, at 7:56 AM, Peter Delevoryas wrote: > > > >> On Dec 19, 2022, at 7:49 AM, Philippe Mathieu-Daudé >> wrote: >> >> !---| >> This Message Is From an External Sender >> >>

[PATCH 7/7] libvhost-user: Switch to unsigned int for inuse field in struct VuVirtq

2022-12-19 Thread Marcel Holtmann
It seems there is no need to keep the inuse field signed and end up with compiler warnings for sign-compare. CC libvhost-user.o libvhost-user.c: In function ‘vu_queue_pop’: libvhost-user.c:2763:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’

[PATCH 4/7] libvhost-user: Use unsigned int i for some for-loop iterations

2022-12-19 Thread Marcel Holtmann
The sign-compare warning also hits some of the for-loops, but it easy fixed by just making the iterator variable unsigned int. CC libvhost-user.o libvhost-user.c: In function ‘vu_gpa_to_va’: libvhost-user.c:223:19: error: comparison of integer expressions of different signedness: ‘int’

[PATCH 6/7] libvhost-user: Change dev->postcopy_ufd assignment to make it C90 compliant

2022-12-19 Thread Marcel Holtmann
The assignment of dev->postcopy_ufd can be moved into an else clause and then the code becomes C90 compliant. CC libvhost-user.o libvhost-user.c: In function ‘vu_set_postcopy_advise’: libvhost-user.c:1625:5: error: ISO C90 forbids mixed declarations and code

Re: [PATCH] target/i386/gdbstub: Fix a bug about order of FPU stack in 'g' packets.

2022-12-19 Thread Richard Henderson
On 12/18/22 20:04, TaiseiIto wrote: Before this commit, when GDB attached an OS working on QEMU, order of FPU stack registers printed by GDB command 'info float' was wrong. There was a bug causing the problem in 'g' packets sent by QEMU to GDB. The packets have values of registers of machine

Re: [RFC v4 3/3] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2022-12-19 Thread Gregory Price
> I think an address space needs a memory region, not a memdev. > Initialize a container region with memory_region_init() > We could then add the two memdev associated regions (with different > attributes) as subregions using memory_region_add_subregion() > > Similar is done for the system

Re: [RFC PATCH for 8.0] backends/vhost-user: relax the ioeventfd check

2022-12-19 Thread Michael S. Tsirkin
On Mon, Dec 19, 2022 at 05:48:50PM +, Alex Bennée wrote: > > Alex Bennée writes: > > > While you certainly need ioeventfds to work for KVM guests it > > shouldn't be limited to that. We can run vhost-user backends for TCG > > guests and either use ioeventfds or in band signalling. > > > >

Re: [RFC PATCH for 8.0] backends/vhost-user: relax the ioeventfd check

2022-12-19 Thread Alex Bennée
Alex Bennée writes: > While you certainly need ioeventfds to work for KVM guests it > shouldn't be limited to that. We can run vhost-user backends for TCG > guests and either use ioeventfds or in band signalling. > > Maybe we should apply the same fix as b0aa77d36d (vhost-user: fix >

Re: [PATCH v4 20/27] tcg: Vary the allocation size for TCGOp

2022-12-19 Thread Alex Bennée
Richard Henderson writes: > We have been allocating a worst case number of arguments > to support calls. Instead, allow the size to vary. > By default leave space for 4 args, to maximize reuse, > but allow calls to increase the number of args to 32. > > Signed-off-by: Richard Henderson

Re: [RFC v4 3/3] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2022-12-19 Thread Jonathan Cameron via
On Mon, 19 Dec 2022 11:12:34 -0500 Gregory Price wrote: > On Mon, Dec 19, 2022 at 12:42:11PM +, Jonathan Cameron wrote: > > As a process thing, when reworking a patch I picked up for the > > CXL qemu gitlab tree, drop the SOB that I added as it's not relevant > > to the new patch. > > >

Re: [PATCH v4 19/27] accel/tcg/plugin: Use copy_op in append_{udata,mem}_cb

2022-12-19 Thread Alex Bennée
Richard Henderson writes: > Better to re-use the existing function for copying ops. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson Acked-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v4 18/27] accel/tcg/plugin: Avoid duplicate copy in copy_call

2022-12-19 Thread Alex Bennée
Richard Henderson writes: > We copied all of the arguments in copy_op_nocheck. > We only need to replace the one argument that we change. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson Acked-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v4 13/27] tcg: Introduce TCGCallReturnKind and TCGCallArgumentKind

2022-12-19 Thread Alex Bennée
Richard Henderson writes: > Prepare to replace a bunch of separate ifdefs with a > consistent way to describe the ABI of a function call. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v4 05/27] accel/tcg: Set cflags_next_tb in cpu_common_initfn

2022-12-19 Thread Alex Bennée
Richard Henderson writes: > While we initialize this value in cpu_common_reset, that > isn't called during startup, so set it as well in init. > This fixes -singlestep versus the very first TB. > > Fixes: 04f5b647ed07 ("accel/tcg: Handle -singlestep in curr_cflags") > Signed-off-by: Richard

[PATCH 3/5] accel/tcg: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-19 Thread Philippe Mathieu-Daudé
Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Rename 'hmp.c' as 'monitor.c' and move the QMP functions from cpu-exec.c (which is always compiled) to monitor.c (which is

[PATCH 5/5] tests/unit: Restrict machine-smp.c test to system emulation

2022-12-19 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daude Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/meson.build b/tests/unit/meson.build index ffa444f432..51f453e6c4 100644 --- a/tests/unit/meson.build +++

[PATCH 1/5] exec: Remove unused 'qemu/timer.h' timer

2022-12-19 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/cpu-exec.c | 1 - accel/tcg/translate-all.c | 1 - include/exec/gen-icount.h | 1 - include/sysemu/cpus.h | 1 - tcg/tcg.c | 1 - 5 files changed, 5 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c

[PATCH 4/5] replay: Extract core API to 'exec/replay-core.h'

2022-12-19 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daude replay API is used deeply within TCG common code (common to user and system emulation). Unfortunately "sysemu/replay.h" requires some QAPI headers for few system-specific declarations, example: void replay_input_event(QemuConsole *src, InputEvent *evt); Since

[PATCH 0/5] exec: QAPI housekeeping for user emulation

2022-12-19 Thread Philippe Mathieu-Daudé
Since there is no monitor in user emulation builds, we don't generate the QAPI headers for the QMP commands. I'm not sure when the --disable-system --disable-tools configuration started to bitrot; it might not be super important, but I'm using it to better sort SYSEMU vs USER code, so I need to

[PATCH 2/5] tcg/tcg-op-gvec: Remove unused "qemu/main-loop.h" header

2022-12-19 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- Added in db72581598 ("Include qemu/main-loop.h less") but now I can't see what is requiring it. I checked 'git diff db725815985..origin/master -- tcg/tcg-op-gvec.c' to see if some code was removed without removing the header; I haven't checked individual

  1   2   3   >