Re: [PATCH v3 2/3] qapi: Do not generate empty enum

2023-03-21 Thread Markus Armbruster
Eric Blake writes: > On Tue, Mar 21, 2023 at 03:19:28PM +, Daniel P. Berrangé wrote: >> On Tue, Mar 21, 2023 at 03:31:56PM +0100, Philippe Mathieu-Daudé wrote: >> > On 16/3/23 15:57, Markus Armbruster wrote: >> > > Daniel P. Berrangé writes: >> > > >> > > > On Thu, Mar 16, 2023 at

Re: [RFC PATCH] tests/avocado: re-factor igb test to avoid timeouts

2023-03-21 Thread Akihiko Odaki
On 2023/03/22 3:17, Alex Bennée wrote: The core of the test was utilising "ethtool -t eth1 offline" to run through a test sequence. For reasons unknown the test hangs under some configurations of the build on centos8-stream. Fundamentally running the old fedora-31 cloud-init is just too much for

Re: [PATCH 06/10] includes: move irq definitions out of cpu-all.h

2023-03-21 Thread Richard Henderson
On 3/21/23 09:06, Alessandro Di Federico wrote: On Mon, 20 Mar 2023 10:10:31 + Alex Bennée wrote: +#define CPU_INTERRUPT_HARD0x0002 Out of curiosity, do we have a policy when to use `const` globals as opposed to `#define`? In theory, if a constant is never used in any

[PATCH for 8.0 v2] igb: Save more Tx states

2023-03-21 Thread Akihiko Odaki
The current implementation of igb uses only part of a advanced Tx context descriptor and first data descriptor because it misses some features and sniffs the trait of the packet instead of respecting the packet type specified in the descriptor. However, we will certainly need the entire Tx context

Re: [PATCH for-8.0 v2 3/3] target/ppc: Fix helper_pminsn() prototype

2023-03-21 Thread Richard Henderson
On 3/21/23 09:16, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error: ../target/ppc/excp_helper.c:2625:6: error: conflicting types for ‘helper_pminsn’ due to enum/integer mismatch; have ‘void(CPUPPCState *, powerpc_pm_insn_t)’ {aka ‘void(struct CPUArchState *,

Re: [PATCH for-8.0 v2 2/3] target/s390x: Fix float_comp_to_cc() prototype

2023-03-21 Thread Richard Henderson
On 3/21/23 09:16, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../target/s390x/tcg/fpu_helper.c:123:5: error: conflicting types for ‘float_comp_to_cc’ due to enum/integer mismatch; have ‘int(CPUS390XState *, FloatRelation)’ {aka ‘int(struct CPUArchState *,

Re: [PATCH for-8.0 3/3] target/ppc: Fix helper_pminsn() prototype

2023-03-21 Thread Richard Henderson
On 3/21/23 01:33, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error: ../target/ppc/excp_helper.c:2625:6: error: conflicting types for ‘helper_pminsn’ due to enum/integer mismatch; have ‘void(CPUPPCState *, powerpc_pm_insn_t)’ {aka ‘void(struct CPUArchState *,

Re: [PATCH for-8.0 2/3] target/s390x: Fix float_comp_to_cc() prototype

2023-03-21 Thread Richard Henderson
On 3/21/23 01:33, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../target/s390x/tcg/fpu_helper.c:123:5: error: conflicting types for ‘float_comp_to_cc’ due to enum/integer mismatch; have ‘int(CPUS390XState *, FloatRelation)’ {aka ‘int(struct CPUArchState *,

Re: [PATCH] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-21 Thread Wu, Fei
On 3/22/2023 11:31 AM, Richard Henderson wrote: > On 3/21/23 19:47, Wu, Fei wrote: You should be making use of different softmmu indexes, similar to how ARM uses a separate index for PAN (privileged access never) mode.  If I read the manual properly, PAN == !SUM. When you

Re: [PATCH] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-21 Thread Richard Henderson
On 3/21/23 19:47, Wu, Fei wrote: You should be making use of different softmmu indexes, similar to how ARM uses a separate index for PAN (privileged access never) mode.  If I read the manual properly, PAN == !SUM. When you do this, you need no additional flushing. Hi Fei, Let's follow

Re: [PATCH v2 0/3] Enable -cpu ,help

2023-03-21 Thread Dinah B
Friendly ping for code review on this patch series. Full series: https://lore.kernel.org/qemu-devel/20230314100026.536079-1-dinahbaum...@gmail.com/ Thanks, -DInah On Tue, Mar 14, 2023 at 6:00 AM Dinah Baum wrote: > Part 1 is a refactor/code motion patch for > qapi/machine target required for

Re: [PATCH] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-21 Thread LIU Zhiwei
On 2023/3/22 10:47, Wu, Fei wrote: On 3/22/2023 9:58 AM, LIU Zhiwei wrote: On 2023/3/22 0:10, Richard Henderson wrote: On 3/20/23 23:37, fei2...@intel.com wrote: From: Fei Wu Kernel needs to access user mode memory e.g. during syscalls, the window is usually opened up for a very limited

Re: [PATCH] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-21 Thread Wu, Fei
On 3/22/2023 9:58 AM, LIU Zhiwei wrote: > > On 2023/3/22 0:10, Richard Henderson wrote: >> On 3/20/23 23:37, fei2...@intel.com wrote: >>> From: Fei Wu >>> >>> Kernel needs to access user mode memory e.g. during syscalls, the window >>> is usually opened up for a very limited time through

Re: [PATCH 4/4] hw/pci: Ensure pci_add_capability() is called before device is realized

2023-03-21 Thread Michael S. Tsirkin
On Tue, Mar 14, 2023 at 12:14:35PM +0100, Philippe Mathieu-Daudé wrote: > PCI capabilities can't appear magically at runtime. > Guests aren't expecting that. Assert all capabilities > are added _before_ a device instance is realized. > > Signed-off-by: Philippe Mathieu-Daudé > --- >

Re: [PATCH] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-21 Thread LIU Zhiwei
On 2023/3/22 0:10, Richard Henderson wrote: On 3/20/23 23:37, fei2...@intel.com wrote: From: Fei Wu Kernel needs to access user mode memory e.g. during syscalls, the window is usually opened up for a very limited time through MSTATUS.SUM, the overhead is too much if tlb_flush() gets called

Re: [PATCH RESEND] hw/i2c: Enable an id for the pca954x devices

2023-03-21 Thread Corey Minyard
On Tue, Mar 21, 2023 at 11:27:44AM -0700, Patrick Venture wrote: > This allows the devices to be more readily found and specified. > Without setting the id field, they can only be found by device type > name, which doesn't let you specify the second of the same device type > behind a bus. So

Re: [PATCH 3/3] Add support for TPM devices over I2C bus

2023-03-21 Thread Stefan Berger
On 3/21/23 01:30, Ninad Palsule wrote: Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. I2C model only supports TPM2 protocol. + +/* Send data to TPM */ +static inline void tpm_tis_i2c_tpm_send(TPMStateI2C *i2cst) +{ +

Re: [PATCH 3/3] Add support for TPM devices over I2C bus

2023-03-21 Thread Stefan Berger
On 3/21/23 01:30, Ninad Palsule wrote: Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. I2C model only supports TPM2 protocol. This commit includes changes for the common code. - Added I2C emulation model. Logic was added

Re: s390 migration crash

2023-03-21 Thread Peter Xu
On Tue, Mar 21, 2023 at 08:24:37PM +, Dr. David Alan Gilbert wrote: > Hi Peter's, > Peter M pointed me to a seg in a migration test in CI; I can reproduce > it: > * On an s390 host How easy to reproduce? > * only as part of a make check - running migration-test by itself > doesn't

Re: [PATCH 2/3] Add support for TPM devices over I2C bus

2023-03-21 Thread Stefan Berger
On 3/21/23 01:30, Ninad Palsule wrote: Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. This commit includes changes for the common code. - Added support for the new checksum registers which are required for the I2C

[RFC PATCH] tests/qemu-iotests: serialise all the qemu-iotests

2023-03-21 Thread Alex Bennée
Something on OpenBSD fails with multiple tests running at once and fiddling with J=1 on invocation just made everything else very slow. Based-on: 20230318114644.1340899-1-alex.ben...@linaro.org Signed-off-by: Alex Bennée Cc: Daniel P. Berrangé --- tests/qemu-iotests/meson.build | 1 + 1 file

Re: [PATCH 1/3] Add support for TPM devices over I2C bus

2023-03-21 Thread Stefan Berger
On 3/21/23 01:29, Ninad Palsule wrote: This is a documentation change for I2C TPM device support. Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. Signed-off-by: Ninad Palsule --- docs/specs/tpm.rst | 5 - 1 file

Re: [RFC PATCH] tests/avocado: re-factor igb test to avoid timeouts

2023-03-21 Thread Philippe Mathieu-Daudé
On 21/3/23 19:17, Alex Bennée wrote: The core of the test was utilising "ethtool -t eth1 offline" to run through a test sequence. For reasons unknown the test hangs under some configurations of the build on centos8-stream. Fundamentally running the old fedora-31 cloud-init is just too much for

Re: [PATCH v4 3/4] qga/vss-win32: fix warning for clang++-15

2023-03-21 Thread Pierrick Bouvier
Sorry to come back on this, but it seems this specific commit was not integrated in trunk. @Konstantin Kostiuk: If you plan to integrate this later (before 8.0 tag), sorry for the noise. Since rc1 was published today, I think it may have been "lost". If someone wants to merge it, that would

Re: [PATCH v3 2/3] qapi: Do not generate empty enum

2023-03-21 Thread Eric Blake
On Tue, Mar 21, 2023 at 03:19:28PM +, Daniel P. Berrangé wrote: > On Tue, Mar 21, 2023 at 03:31:56PM +0100, Philippe Mathieu-Daudé wrote: > > On 16/3/23 15:57, Markus Armbruster wrote: > > > Daniel P. Berrangé writes: > > > > > > > On Thu, Mar 16, 2023 at 01:31:04PM +0100, Markus Armbruster

RE: [PATCH v3 2/2] Use black code style for python scripts

2023-03-21 Thread Taylor Simpson
> -Original Message- > From: Marco Liebel (QUIC) > Sent: Monday, March 20, 2023 3:26 AM > To: qemu-devel@nongnu.org > Cc: Taylor Simpson ; Philippe Mathieu-Daudé > ; Markus Armbruster ; Daniel P . > Berrangé ; Marco Liebel (QUIC) > > Subject: [PATCH v3 2/2] Use black code style for

RE: [PATCH v3 1/2] Use f-strings in python scripts

2023-03-21 Thread Taylor Simpson
> -Original Message- > From: Marco Liebel (QUIC) > Sent: Monday, March 20, 2023 3:26 AM > To: qemu-devel@nongnu.org > Cc: Taylor Simpson ; Philippe Mathieu-Daudé > ; Markus Armbruster ; Daniel P . > Berrangé ; Marco Liebel (QUIC) > > Subject: [PATCH v3 1/2] Use f-strings in python

Re: [PATCH v2 1/1] util/async-teardown: wire up query-command-line-options

2023-03-21 Thread Paolo Bonzini
Il lun 20 mar 2023, 16:42 Thomas Huth ha scritto: > Would it make sense to add it e.g. to "-action" instead, i.e. something > like > "-action teardown=async" ? > -action is just a wrapper for the action-set QMP command. I don't think it fits very well; its arguments are only guest actions while

Re: About the instance_finalize callback in VFIO PCI

2023-03-21 Thread Paolo Bonzini
Il mar 21 mar 2023, 18:30 Cédric Le Goater ha scritto: > I would have thought that user_creatable_cleanup would have taken care > of it. But it's not. This needs some digging. > user_creatable_cleanup is only for -object, not for -device. Paolo > C. > > > > By the way, i also debugged other

s390 migration crash

2023-03-21 Thread Dr. David Alan Gilbert
Hi Peter's, Peter M pointed me to a seg in a migration test in CI; I can reproduce it: * On an s390 host * only as part of a make check - running migration-test by itself doesn't trigger for me. * It looks like it's postcopy preempt (gdb) bt full #0 iov_size (iov=iov@entry=0x2aa00e60670,

[PATCH qemu v3] linux-user: Emulate /proc/cpuinfo output for riscv

2023-03-21 Thread Afonso Bordado
RISC-V does not expose all extensions via hwcaps, thus some userspace applications may want to query these via /proc/cpuinfo. Currently when querying this file the host's file is shown instead which is slightly confusing. Emulate a basic /proc/cpuinfo file with mmu info and an ISA string.

[RFC PATCH v2 0/2] Providing mount in memfd_restricted() syscall

2023-03-21 Thread Ackerley Tng
Hello, This patchset builds upon the memfd_restricted() system call that was discussed in the 'KVM: mm: fd-based approach for supporting KVM' patch series, at https://lore.kernel.org/lkml/20221202061347.1070246-1-chao.p.p...@linux.intel.com/T/#m7e944d7892afdd1d62a03a287bd488c56e377b0c The tree

[RFC PATCH v2 2/2] selftests: restrictedmem: Check hugepage-ness of shmem file backing restrictedmem fd

2023-03-21 Thread Ackerley Tng
For memfd_restricted() calls without a userspace mount, the backing file should be the shmem mount in the kernel, and the size of backing pages should be as defined by system-wide shmem configuration. If a userspace mount is provided, the size of backing pages should be as defined in the mount.

[RFC PATCH v2 1/2] mm: restrictedmem: Allow userspace to specify mount for memfd_restricted

2023-03-21 Thread Ackerley Tng
By default, the backing shmem file for a restrictedmem fd is created on shmem's kernel space mount. With this patch, an optional tmpfs mount can be specified via an fd, which will be used as the mountpoint for backing the shmem file associated with a restrictedmem fd. This change is modeled

[PATCH] vhost-user-blk-server: notify client about disk resize

2023-03-21 Thread Vladimir Sementsov-Ogievskiy
Currently block_resize qmp command is simply ignored by vhost-user-blk export. So, the block-node is successfully resized, but virtio config is unchanged and guest doesn't see that disk is resized. Let's handle the resize by modifying the config and notifying the guest appropriately. After this

Re: [PATCH 1/2] hw/cxl: Fix endian handling for decoder commit.

2023-03-21 Thread Fan Ni
On Tue, Mar 21, 2023 at 06:00:11PM +, Jonathan Cameron wrote: > Not a real problem yet as all supported architectures are > little endian, but continue to tidy these up when touching > code for other reasons. > > Signed-off-by: Jonathan Cameron Hi Jonathan, Did you forget to send the other

RE: [PATCH] hw/acpi/cxl: Drop device-memory support from CFMWS entries

2023-03-21 Thread Dan Williams
Dan Williams wrote: > While it was a reasonable idea to specify no window restricitions at the > outset of the CXL emulation support, it turns out that in practice a > platform will never follow the QEMU example of specifying simultaneous > support for HDM-H and HDM-D[B] in a single window. > >

Re: [PATCH v3 2/3] qapi: Do not generate empty enum

2023-03-21 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Can we meet half-way only generating the MAX definitions for > unconditional enums, keeping the conditional ones as is? > > -- >8 -- > diff --git a/scripts/qapi/types.py b/scripts/qapi/types.py > @@ -88,16 +88,18 @@ def gen_enum(name: str, >

[PATCH RESEND] hw/i2c: Enable an id for the pca954x devices

2023-03-21 Thread Patrick Venture
This allows the devices to be more readily found and specified. Without setting the id field, they can only be found by device type name, which doesn't let you specify the second of the same device type behind a bus. Tested: Verified that by default the device was findable with the id

RE: [PATCH 2/2] Add test for storing .new vector

2023-03-21 Thread Marco Liebel
> -Original Message- > From: Peter Maydell > Sent: Dienstag, 21. März 2023 18:20 > To: Marco Liebel (QUIC) > Cc: qemu-devel@nongnu.org; Taylor Simpson ; > Matheus Bernardino (QUIC) > Subject: Re: [PATCH 2/2] Add test for storing .new vector > > WARNING: This email originated from

Re: [RFC PATCH] tests/avocado: probe for multi-process support before running test

2023-03-21 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 21/3/23 12:17, Alex Bennée wrote: >> A recent attempt to let avocado run more tests on the CentOS stream >> build failed because there was no gating on the multiprocess feature. >> Like missing accelerators avocado should gracefully skip when the >> feature

[RFC PATCH] tests/avocado: re-factor igb test to avoid timeouts

2023-03-21 Thread Alex Bennée
The core of the test was utilising "ethtool -t eth1 offline" to run through a test sequence. For reasons unknown the test hangs under some configurations of the build on centos8-stream. Fundamentally running the old fedora-31 cloud-init is just too much for something that is directed at testing

[PATCH 1/2] hw/cxl: Fix endian handling for decoder commit.

2023-03-21 Thread Jonathan Cameron via
Not a real problem yet as all supported architectures are little endian, but continue to tidy these up when touching code for other reasons. Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-component-utils.c | 10 -- hw/mem/cxl_type3.c | 9 ++--- 2 files changed, 10

Re: [PATCH v2 0/2] fix for #285

2023-03-21 Thread Richard Henderson
On 3/19/23 07:15, Emilio Cota wrote: Ping. Any feedback on these two patches? https://patchew.org/QEMU/20230205163758.416992-1-c...@braap.org/ https://lore.kernel.org/qemu-devel/20230205163758.416992-1-c...@braap.org/ Queued to tcg-next. r~ Happy to resend if needed. Thanks,

Re: [Virtio-fs] [RFC 2/2] vhost-user-fs: Implement stateful migration

2023-03-21 Thread Hanna Czenczek
On 20.03.23 13:39, Anton Kuchin wrote: On 20/03/2023 11:33, Hanna Czenczek wrote: On 17.03.23 19:37, Anton Kuchin wrote: On 17/03/2023 19:52, Hanna Czenczek wrote: On 17.03.23 18:19, Anton Kuchin wrote: On 13/03/2023 19:48, Hanna Czenczek wrote: A virtio-fs device's VM state consists of: -

Re: About the instance_finalize callback in VFIO PCI

2023-03-21 Thread Cédric Le Goater
On 3/20/23 10:31, Yang Zhong wrote: Hello Alex and Paolo, There is one instance_finalize callback definition in hw/vfio/pci.c, but i find this callback(vfio_instance_finalize()) never be called during the VM shutdown with close VM or "init 0" command in guest. The Qemu related command:

Re: [PATCH 2/2] Add test for storing .new vector

2023-03-21 Thread Peter Maydell
On Tue, 21 Mar 2023 at 14:13, Marco Liebel wrote: > > Hexagon toolchain version 16.0.0 fixes a bug where the ecoding of > storing a .new vector was incorrect. This resulted in an incorrect > valued being stored. The test checks that the correct value is used. So is this a compiler/assembler bug?

Re: [PULL 0/8] target-arm queue

2023-03-21 Thread Peter Maydell
available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20230321 > > for you to fetch changes up to 5787d17a42f7af4bd117e5d6bfa54b1fdf93c255: > > target/arm: Don't advertise aarch64-paut

RE: [PATCH 2/2] Add test for storing .new vector

2023-03-21 Thread Taylor Simpson
> -Original Message- > From: Marco Liebel (QUIC) > Sent: Tuesday, March 21, 2023 8:12 AM > To: qemu-devel@nongnu.org > Cc: Taylor Simpson ; Matheus Bernardino (QUIC) > ; Marco Liebel (QUIC) > > Subject: [PATCH 2/2] Add test for storing .new vector > > Hexagon toolchain version 16.0.0

Re: out of CI pipeline minutes again

2023-03-21 Thread Daniel P . Berrangé
On Mon, Feb 27, 2023 at 12:43:55PM -0500, Stefan Hajnoczi wrote: > Here are IRC logs from a discussion that has taken place about this > topic. Summary: > - QEMU has ~$500/month Azure credits available that could be used for CI > - Burstable VMs like Azure AKS nodes seem like a good strategy in >

Re: [PATCH v2 2/2] tcg: use QTree instead of GTree

2023-03-21 Thread Philippe Mathieu-Daudé
On 5/2/23 17:37, Emilio Cota wrote: qemu-user can hang in a multi-threaded fork. One common reason is that when creating a TB, between fork and exec we manipulate a GTree whose memory allocator (GSlice) is not fork-safe. Although POSIX does not mandate it, the system's allocator (e.g. tcmalloc,

[PATCH for-8.0 v2 1/3] async: Suppress GCC13 false positive in aio_bh_poll()

2023-03-21 Thread Cédric Le Goater
From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-Werror=dangling-pointer=] 303 | (head)->sqh_last = &(elm)->field.sqe_next;

[PATCH for-8.0 v2 3/3] target/ppc: Fix helper_pminsn() prototype

2023-03-21 Thread Cédric Le Goater
From: Cédric Le Goater GCC13 reports an error: ../target/ppc/excp_helper.c:2625:6: error: conflicting types for ‘helper_pminsn’ due to enum/integer mismatch; have ‘void(CPUPPCState *, powerpc_pm_insn_t)’ {aka ‘void(struct CPUArchState *, powerpc_pm_insn_t)’} [-Werror=enum-int-mismatch] 2625

[PATCH for-8.0 v2 2/3] target/s390x: Fix float_comp_to_cc() prototype

2023-03-21 Thread Cédric Le Goater
From: Cédric Le Goater GCC13 reports an error : ../target/s390x/tcg/fpu_helper.c:123:5: error: conflicting types for ‘float_comp_to_cc’ due to enum/integer mismatch; have ‘int(CPUS390XState *, FloatRelation)’ {aka ‘int(struct CPUArchState *, FloatRelation)’} [-Werror=enum-int-mismatch]

[PATCH for-8.0 v2 0/3] Fixes for GCC13

2023-03-21 Thread Cédric Le Goater
Hello, I activated a GH workflow using fedora rawhide and found out that there were a couple of compile breakage with the new GCC. Here are fixes, the first requiring more attention. Thanks, C. Changes in v2: - replaced helper routine by pragmas in util/async.c to suppress GCC warning

Re: [PATCH] linux-user/mips: Low down switchable NaN2008 requirement

2023-03-21 Thread Philippe Mathieu-Daudé
On 21/3/23 10:23, Jiaxun Yang wrote: 2023年3月15日 08:18,Philippe Mathieu-Daudé 写道: On 11/3/23 13:39, Jiaxun Yang wrote: 2023年3月9日 12:32,Philippe Mathieu-Daudé 写道: On 11/2/23 18:34, Jiaxun Yang wrote: Previously switchable NaN2008 requires fcsr31.nan2008 to be writable for guest. However as per

Re: [PATCH] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-21 Thread Richard Henderson
On 3/20/23 23:37, fei2...@intel.com wrote: From: Fei Wu Kernel needs to access user mode memory e.g. during syscalls, the window is usually opened up for a very limited time through MSTATUS.SUM, the overhead is too much if tlb_flush() gets called for every SUM change. This patch saves

Re: [PATCH 02/10] accel/tcg: move cpu_reloading_memory_map into cpu-exec-softmmu

2023-03-21 Thread Alessandro Di Federico via
On Mon, 20 Mar 2023 10:10:27 + Alex Bennée wrote: > This doesn't save much as cpu-exec-common still needs to be built > per-target for its knowledge of CPUState but this helps with keeping > things organised. > --- /dev/null > +++ b/accel/tcg/cpu-exec-softmmu.c Could

Re: [RFC PATCH 40/43] target/loongarch: Implement vreplve vpack vpick

2023-03-21 Thread Richard Henderson
On 3/21/23 04:31, gaosong wrote: but for this case. e.g vreplve_b  vd vj, rk index  = gpr[rk] % (128/8); Vd->B(i) = Vj->B(index); tcg_gen_gvec_dup_mem(MO_8, vreg_full_offset(a->vd), offsetof(CPULoongArchState, fpr[a->vj].vreg.B(index))), 16, 16 ); How can we get the index with cpu_env? or 

Re: [PATCH] tcg/tcg: Avoid TS_DEAD for basic block ending

2023-03-21 Thread Richard Henderson
On 3/20/23 23:44, LIU Zhiwei wrote: On 2023/3/21 14:06, Richard Henderson wrote: On 3/20/23 21:53, LIU Zhiwei wrote: TS_DEAD means we will release the register allocated for this temporary. But at basic block ending, we can still use the allocted register. Signed-off-by: LIU Zhiwei Test

Re: [kvm-unit-tests PATCH v10 0/7] MTTCG sanity tests for ARM

2023-03-21 Thread Andrew Jones
On Tue, Mar 07, 2023 at 11:28:38AM +, Alex Bennée wrote: > I last had a go at getting these up-streamed at the end of 2021 so > its probably worth having another go. From the last iteration a > number of the groundwork patches did get merged: > > Subject: [kvm-unit-tests PATCH v9 0/9] MTTCG

Re: [PATCH v3 2/3] qapi: Do not generate empty enum

2023-03-21 Thread Daniel P . Berrangé
On Tue, Mar 21, 2023 at 03:31:56PM +0100, Philippe Mathieu-Daudé wrote: > On 16/3/23 15:57, Markus Armbruster wrote: > > Daniel P. Berrangé writes: > > > > > On Thu, Mar 16, 2023 at 01:31:04PM +0100, Markus Armbruster wrote: > > > > Philippe Mathieu-Daudé writes: > > > > > > > > > Per the C++

Re: [kvm-unit-tests PATCH v10 4/7] arm/tlbflush-code: TLB flush during code execution

2023-03-21 Thread Andrew Jones
On Tue, Mar 21, 2023 at 04:02:21PM +0100, Andrew Jones wrote: ... > > + > > +# TLB Torture Tests > > +[tlbflush-code::all_other] > > It's better to use '-', '_', '.', or ',' than '::' because otherwise the > standalone test will have a filename like tests/tlbflush-code::all_other > which will be

Re: [kvm-unit-tests PATCH v10 5/7] arm/locking-tests: add comprehensive locking test

2023-03-21 Thread Andrew Jones
On Tue, Mar 07, 2023 at 11:28:43AM +, Alex Bennée wrote: > This test has been written mainly to stress multi-threaded TCG behaviour > but will demonstrate failure by default on real hardware. The test takes > the following parameters: > > - "lock" use GCC's locking semantics > - "atomic"

Re: [kvm-unit-tests PATCH v10 4/7] arm/tlbflush-code: TLB flush during code execution

2023-03-21 Thread Andrew Jones
On Tue, Mar 07, 2023 at 11:28:42AM +, Alex Bennée wrote: > This adds a fairly brain dead torture test for TLB flushes intended > for stressing the MTTCG QEMU build. It takes the usual -smp option for > multiple CPUs. > > By default it CPU0 will do a TLBIALL flush after each cycle. You can >

Re: [PATCH-for-8.1] target/m68k/fpu_helper: Use FloatRelation enum to hold comparison result

2023-03-21 Thread Richard Henderson
On 3/21/23 02:49, Philippe Mathieu-Daudé wrote: Use the FloatRelation enum to hold the comparison result (missed in commit 71bfd65c5f "softfloat: Name compare relation enum"). Inspired-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- target/m68k/fpu_helper.c | 4 ++-- 1 file

Re: [kvm-unit-tests PATCH v10 2/7] add .gitpublish metadata

2023-03-21 Thread Andrew Jones
On Tue, Mar 07, 2023 at 11:28:40AM +, Alex Bennée wrote: > This allows for users of git-publish to have default routing for kvm > and kvmarm patches. > > Signed-off-by: Alex Bennée > --- > .gitpublish | 18 ++ > 1 file changed, 18 insertions(+) > create mode 100644

Re: [kvm-unit-tests PATCH v10 1/7] Makefile: add GNU global tags support

2023-03-21 Thread Andrew Jones
On Tue, Mar 07, 2023 at 11:28:39AM +, Alex Bennée wrote: > If you have ctags you might as well offer gtags as a target. > > Signed-off-by: Alex Bennée > Message-Id: <2028184650.661575-4-alex.ben...@linaro.org> > > --- > v10 > - update .gitignore > --- > Makefile | 5 - >

Re: [PATCH v3 2/3] qapi: Do not generate empty enum

2023-03-21 Thread Philippe Mathieu-Daudé
On 16/3/23 15:57, Markus Armbruster wrote: Daniel P. Berrangé writes: But all of this falls apart with conditional members! Example 1 (taken from qapi/block-core.json): { 'enum': 'BlockdevAioOptions', 'data': [ 'threads', 'native', { 'name': 'io_uring', 'if':

Re: [PATCH v3 2/3] qapi: Do not generate empty enum

2023-03-21 Thread Philippe Mathieu-Daudé
On 16/3/23 15:57, Markus Armbruster wrote: Daniel P. Berrangé writes: On Thu, Mar 16, 2023 at 01:31:04PM +0100, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Per the C++ standard, empty enum are ill-formed. Do not generate The C standard. The C++ standard doesn't apply here

[PATCH v15 2/4] vhost_vdpa: fix the input in trace_vhost_vdpa_listener_region_del()

2023-03-21 Thread Cindy Lu
In trace_vhost_vdpa_listener_region_del, the value for llend should change to int128_get64(int128_sub(llend, int128_one())) Signed-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c

[PATCH v15 4/4] vhost-vdpa: Add support for vIOMMU.

2023-03-21 Thread Cindy Lu
1. The vIOMMU support will make vDPA can work in IOMMU mode. This will fix security issues while using the no-IOMMU mode. To support this feature we need to add new functions for IOMMU MR adds and deletes. Also since the SVQ does not support vIOMMU yet, add the check for IOMMU in

[PATCH v15 1/4] vhost: expose function vhost_dev_has_iommu()

2023-03-21 Thread Cindy Lu
To support vIOMMU in vdpa, need to exposed the function vhost_dev_has_iommu, vdpa will use this function to check if vIOMMU enable. Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 2 +- include/hw/virtio/vhost.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v15 3/4] vhost-vdpa: Add check for full 64-bit in region delete

2023-03-21 Thread Cindy Lu
The unmap ioctl doesn't accept a full 64-bit span. So need to add check for the section's size in vhost_vdpa_listener_region_del(). Signed-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-vdpa.c

[PATCH v15 0/4] vhost-vdpa: add support for vIOMMU

2023-03-21 Thread Cindy Lu
These patches are to support vIOMMU in vdpa device changes in V3 1. Move function vfio_get_xlat_addr to memory.c 2. Use the existing memory listener, while the MR is iommu MR then call the function iommu_region_add/ iommu_region_del changes in V4 1.make the comments in vfio_get_xlat_addr more

Re: [PATCH 01/10] metadata: add .git-blame-ignore-revs

2023-03-21 Thread Philippe Mathieu-Daudé
On 20/3/23 11:10, Alex Bennée wrote: Someone mentioned this on IRC so I thought I would try it out with a few commits that are pure code style fixes. Signed-off-by: Alex Bennée --- .git-blame-ignore-revs | 18 ++ 1 file changed, 18 insertions(+) create mode 100644

[PATCH 2/2] Add test for storing .new vector

2023-03-21 Thread Marco Liebel
Hexagon toolchain version 16.0.0 fixes a bug where the ecoding of storing a .new vector was incorrect. This resulted in an incorrect valued being stored. The test checks that the correct value is used. Signed-off-by: Marco Liebel --- tests/tcg/hexagon/hvx_misc.c | 29

[PATCH 0/2] Update hexagon toolchain

2023-03-21 Thread Marco Liebel
Updates the hexagon toolchain and adds a test for a bug that was fixed by the new version. Marco Liebel (2): Use hexagon toolchain version 16.0.0 Add test for storing .new vector .../dockerfiles/debian-hexagon-cross.docker | 2 +- tests/tcg/hexagon/hvx_misc.c | 29

[PATCH 1/2] Use hexagon toolchain version 16.0.0

2023-03-21 Thread Marco Liebel
Signed-off-by: Marco Liebel --- tests/docker/dockerfiles/debian-hexagon-cross.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/docker/dockerfiles/debian-hexagon-cross.docker index 5308ccb8fe..b99d99f943

Re: [PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6

2023-03-21 Thread Philippe Mathieu-Daudé
On 22/2/23 15:37, Paolo Bonzini wrote: This is my take on John's patches to improve Python detection and to prepare for dropping Python 3.6 support. The main change with respect to John's work is that lcitool is updated and the container images for CI can install Sphinx via pip; this way

Re: [PULL 0/7] ui/ fixes for 8.0

2023-03-21 Thread Peter Maydell
On Tue, 21 Mar 2023 at 09:04, wrote: > > From: Marc-André Lureau > > The following changes since commit aa9e7fa4689d1becb2faf67f65aafcbcf664f1ce: > > Merge tag 'edk2-stable202302-20230320-pull-request' of > https://gitlab.com/kraxel/qemu into staging (2023-03-20 13:43:35 +) > > are

Re: [RFC PATCH v2 10/11] hw/arm/smmuv3: Populate OAS based on CPU PARANGE

2023-03-21 Thread Peter Maydell
On Tue, 21 Mar 2023 at 13:55, Mostafa Saleh wrote: > > Hi Peter, > > On Tue, Mar 21, 2023 at 01:34:55PM +, Peter Maydell wrote: > > > >>> + */ > > > >>> +ARMCPU *armcpu = ARM_CPU(qemu_get_cpu(0)); > > > >>> +uint8_t oas = FIELD_EX64(armcpu->isar.id_aa64mmfr0, > > > >>>

Re: [PULL 0/7] ui/ fixes for 8.0

2023-03-21 Thread Erico Nunes
On 21/03/2023 10:03, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The following changes since commit aa9e7fa4689d1becb2faf67f65aafcbcf664f1ce: > > Merge tag 'edk2-stable202302-20230320-pull-request' of > https://gitlab.com/kraxel/qemu into staging (2023-03-20 13:43:35

vma-pthread unstable on aarch64 hardware

2023-03-21 Thread Alex Bennée
Date: Tue, 21 Mar 2023 13:48:20 + User-agent: mu4e 1.9.22; emacs 29.0.60 Hi, Chasing down some unstable check-tcg tests and I can get vma-pthread to fail fairly reliably on the CI configuration ('../../configure' '--enable-debug' '--static' '--disable-system' '--disable-pie') although it

Re: [RFC PATCH v2 10/11] hw/arm/smmuv3: Populate OAS based on CPU PARANGE

2023-03-21 Thread Mostafa Saleh
Hi Peter, On Tue, Mar 21, 2023 at 01:34:55PM +, Peter Maydell wrote: > > >>> + */ > > >>> +ARMCPU *armcpu = ARM_CPU(qemu_get_cpu(0)); > > >>> +uint8_t oas = FIELD_EX64(armcpu->isar.id_aa64mmfr0, ID_AA64MMFR0, > > >>> PARANGE); > > >> is this working in accelerated mode? > > > I

Re: [PATCH] .editorconfig: set max line at 70 chars for QAPI files

2023-03-21 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Tue, Mar 7, 2023 at 4:32 PM wrote: >> >> From: Marc-André Lureau >> >> This seems to be the preferred style. >> >> The EditorConfig property is not supported by all editors: >>

Re: [RFC PATCH v2 10/11] hw/arm/smmuv3: Populate OAS based on CPU PARANGE

2023-03-21 Thread Eric Auger
Hi Peter, On 3/21/23 14:34, Peter Maydell wrote: > thout having read much of the context, but why > would we need to migrate the ID registers? They are constant, read-only, > so they will be the same value on both source and destination. this series modifies the values of IDR[5] (oas).  So my

Re: [PATCH 1/2] hw/i2c: smbus_slave: Reset state on reset

2023-03-21 Thread Philippe Mathieu-Daudé
On 20/3/23 23:14, Joe Komlodi wrote: If a reset comes while the SMBus device is not in its idle state, it's possible for it to get confused on valid transactions post-reset. Signed-off-by: Joe Komlodi --- hw/i2c/smbus_slave.c | 9 + 1 file changed, 9 insertions(+) Reviewed-by:

Re: [RFC PATCH v2 10/11] hw/arm/smmuv3: Populate OAS based on CPU PARANGE

2023-03-21 Thread Mostafa Saleh
Hi Peter, On Tue, Mar 21, 2023 at 01:34:55PM +, Peter Maydell wrote: > > >>> +s->idr[5] = FIELD_DP32(s->idr[5], IDR5, OAS, oas); > > >> I am not sure you can change that easily. In case of migration this is > > >> going to change the behavior of the device, no? > > > I see IDR registers

[PATCH v2] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-21 Thread Fei Wu
Kernel needs to access user mode memory e.g. during syscalls, the window is usually opened up for a very limited time through MSTATUS.SUM, the overhead is too much if tlb_flush() gets called for every SUM change. This patch saves addresses accessed when SUM=1, and flushs only these pages when SUM

Re: [RFC PATCH] tests/avocado: probe for multi-process support before running test

2023-03-21 Thread Philippe Mathieu-Daudé
On 21/3/23 12:17, Alex Bennée wrote: A recent attempt to let avocado run more tests on the CentOS stream build failed because there was no gating on the multiprocess feature. Like missing accelerators avocado should gracefully skip when the feature is not enabled. In this case we use the

Re: [RFC PATCH v2 10/11] hw/arm/smmuv3: Populate OAS based on CPU PARANGE

2023-03-21 Thread Peter Maydell
On Tue, 21 Mar 2023 at 13:23, Eric Auger wrote: > > Hi Mostafa, > > On 3/21/23 14:06, Mostafa Saleh wrote: > > Hi Eric, > > > >>> + * According to 6.3.6 SMMU_IDR5, OAS must match the system physical > >>> address > >>> + * size. > >>> + */ > >>> +ARMCPU *armcpu =

Re: [RFC PATCH v2 10/11] hw/arm/smmuv3: Populate OAS based on CPU PARANGE

2023-03-21 Thread Eric Auger
On 3/21/23 14:29, Mostafa Saleh wrote: > On Tue, Mar 21, 2023 at 02:23:03PM +0100, Eric Auger wrote: > s->idr[5] = FIELD_DP32(s->idr[5], IDR5, GRAN64K, 1); > -s->idr[5] = FIELD_DP32(s->idr[5], IDR5, OAS, SMMU_IDR5_OAS); /* 44 > bits */ > +s->idr[5] =

Re: [RFC PATCH v2 10/11] hw/arm/smmuv3: Populate OAS based on CPU PARANGE

2023-03-21 Thread Mostafa Saleh
On Tue, Mar 21, 2023 at 02:23:03PM +0100, Eric Auger wrote: > >>> s->idr[5] = FIELD_DP32(s->idr[5], IDR5, GRAN64K, 1); > >>> -s->idr[5] = FIELD_DP32(s->idr[5], IDR5, OAS, SMMU_IDR5_OAS); /* 44 > >>> bits */ > >>> +s->idr[5] = FIELD_DP32(s->idr[5], IDR5, OAS, oas); > >> I am not sure

Re: [PATCH] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-21 Thread liweiwei
On 2023/3/21 21:22, Wu, Fei wrote: On 3/21/2023 8:58 PM, liweiwei wrote: On 2023/3/21 14:37, fei2...@intel.com wrote: From: Fei Wu Kernel needs to access user mode memory e.g. during syscalls, the window is usually opened up for a very limited time through MSTATUS.SUM, the overhead is too

[PULL 1/8] target/arm: Add Neoverse-N1 registers

2023-03-21 Thread Peter Maydell
From: Chen Baozi Add implementation defined registers for neoverse-n1 which would be accessed by TF-A. Since there is no DSU in Qemu, CPUCFR_EL1.SCU bit is set to 1 to avoid DSU registers definition. Signed-off-by: Chen Baozi Reviewed-by: Peter Maydell Tested-by: Marcin Juszkiewicz

Re: [RFC PATCH v2 10/11] hw/arm/smmuv3: Populate OAS based on CPU PARANGE

2023-03-21 Thread Eric Auger
Hi Mostafa, On 3/21/23 14:06, Mostafa Saleh wrote: > Hi Eric, > >>> + * According to 6.3.6 SMMU_IDR5, OAS must match the system physical >>> address >>> + * size. >>> + */ >>> +ARMCPU *armcpu = ARM_CPU(qemu_get_cpu(0)); >>> +uint8_t oas = FIELD_EX64(armcpu->isar.id_aa64mmfr0,

[PULL 3/8] contrib/elf2dmp: fix code style

2023-03-21 Thread Peter Maydell
From: Viktor Prutyanov Originally elf2dmp were added with some code style issues, especially in pe.h header, and some were introduced by 2d0fc797faaa73fbc1d30f5f9e90407bf3dd93f0. Fix them now. Signed-off-by: Viktor Prutyanov Reviewed-by: Annie Li Message-id:

Re: [PATCH] target/riscv: reduce overhead of MSTATUS_SUM change

2023-03-21 Thread Wu, Fei
On 3/21/2023 8:58 PM, liweiwei wrote: > > On 2023/3/21 14:37, fei2...@intel.com wrote: >> From: Fei Wu >> >> Kernel needs to access user mode memory e.g. during syscalls, the window >> is usually opened up for a very limited time through MSTATUS.SUM, the >> overhead is too much if tlb_flush()

[PULL 4/8] contrib/elf2dmp: move PE dir search to pe_get_data_dir_entry

2023-03-21 Thread Peter Maydell
From: Viktor Prutyanov Move out PE directory search functionality to be reused not only for Debug Directory processing but for arbitrary PE directory. Signed-off-by: Viktor Prutyanov Reviewed-by: Annie Li Message-id: 2023011246.883679-3-vik...@daynix.com Signed-off-by: Peter Maydell ---

  1   2   >