[PATCH v2 04/12] block: Split BlockNodeInfo off of ImageInfo

2022-06-20 Thread Hanna Reitz
ImageInfo sometimes contains flat information, and sometimes it does not. Split off a BlockNodeInfo struct, which only contains information about a single node and has no link to the backing image. We do this so we can extend BlockNodeInfo to a BlockGraphInfo struct, which has links to all child

Re: Building tools on unsupported cpu/arch

2022-06-20 Thread Thomas Huth
On 20/06/2022 12.54, Michael Tokarev wrote: 20.06.2022 13:31, Thomas Huth write: On 30/04/2022 16.11, Michael Tokarev wrote: Hello! Previously, it was possible to build qemu tools (such as qemu-img, or qemu-ga) on an unsupported cpu/architecture.  In a hackish way, by specifying

[PATCH v3 3/4] target/mips: implement Octeon-specific arithmetic instructions

2022-06-20 Thread Pavel Dovgalyuk
This patch implements several Octeon-specific instructions: - BADDU - DMUL - EXTS/EXTS32 - CINS/CINS32 - POP/DPOP - SEQ/SEQI - SNE/SNEI Signed-off-by: Pavel Dovgalyuk -- v3 changes: - Fixed length field for EXTS/CINS (bug found by Richard Henderson) v2 changes: - Using existing tcg

Re: [PATCH 1/4] qdev: add DEVICE_RUNTIME_ERROR event

2022-06-20 Thread Roman Kagan
On Mon, May 30, 2022 at 06:04:32PM +0300, Roman Kagan wrote: > On Mon, May 30, 2022 at 01:28:17PM +0200, Markus Armbruster wrote: > > Roman Kagan writes: > > > > > On Wed, May 25, 2022 at 12:54:47PM +0200, Markus Armbruster wrote: > > >> Konstantin Khlebnikov writes: > > >> > > >> > This event

[PATCH v8 03/12] s390x/cpu_topology: implementating Store Topology System Information

2022-06-20 Thread Pierre Morel
The handling of STSI is enhanced with the interception of the function code 15 for storing CPU topology. Using the objects built during the plugging of CPU, we build the SYSIB 15_1_x structures. With this patch the maximum MNEST level is 2, this is also the only level allowed and only SYSIB

Re: [PATCH] sphinx: change default language to 'en'

2022-06-20 Thread Peter Maydell
On Fri, 17 Jun 2022 at 15:02, Martin Liška wrote: > > Fixes the following Sphinx warning (treated as error) starting > with 5.0 release: > > Warning, treated as error: > Invalid configuration value found: 'language = None'. Update your > configuration to a valid langauge code. Falling back to

[PATCH 7/7] target/xtensa: use semihosting_exit_request on semihosted exit syscall

2022-06-20 Thread Luc Michel
Use the new semihosting_exit_request instead of a call to exit when handling a semihosted exit syscall. Signed-off-by: Luc Michel --- target/xtensa/xtensa-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/xtensa/xtensa-semi.c b/target/xtensa/xtensa-semi.c index

Re: [PATCH v2 12/21] migration: hardcode assumption that QEMUFile is backed with QIOChannel

2022-06-20 Thread Juan Quintela
Daniel P. Berrangé wrote: > The only callers of qemu_fopen_ops pass 'true' for the 'has_ioc' > parameter, so hardcode this assumption in QEMUFile, by passing in > the QIOChannel object as a non-opaque parameter. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Daniel P. Berrangé

Re: [PATCH v4 2/4] QIOChannelSocket: Fix zero-copy send so socket flush works

2022-06-20 Thread Peter Xu
On Mon, Jun 20, 2022 at 02:39:43AM -0300, Leonardo Bras wrote: > Somewhere between v6 and v7 the of the zero-copy-send patchset a crucial > part of the flushing mechanism got missing: incrementing zero_copy_queued. > > Without that, the flushing interface becomes a no-op, and there is no >

Re: [PATCH v2 14/21] migration: remove unused QEMUFileGetFD typedef / qemu_get_fd method

2022-06-20 Thread Juan Quintela
Daniel P. Berrangé wrote: > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Daniel P. Berrangé Reviewed-by: Juan Quintela

Re: [PATCH v4 4/4] migration: Change zero_copy_send from migration parameter to migration capability

2022-06-20 Thread Peter Xu
On Mon, Jun 20, 2022 at 02:39:45AM -0300, Leonardo Bras wrote: > When originally implemented, zero_copy_send was designed as a Migration > paramenter. > > But taking into account how is that supposed to work, and how > the difference between a capability and a parameter, it only makes sense >

Re: [PATCH v4 3/4] migration: zero-copy flush only at the end of bitmap scanning

2022-06-20 Thread Peter Xu
On Mon, Jun 20, 2022 at 11:23:53AM +0200, Juan Quintela wrote: > Once discussed this, what I asked in the past is that you are having too > much dirty memory on zero_copy. When you have a Multiterabyte guest, in > a single round you have a "potentially" dirty memory on each channel of: > >

[PATCH v2 00/12] qemu-img info: Show protocol-level information

2022-06-20 Thread Hanna Reitz
Hi, This series is a v2 to: https://lists.nongnu.org/archive/html/qemu-block/2022-05/msg00042.html Like v1, the purpose is to have qemu-img info print the extent-size-hint for images on filesystems that support it. In contrast to v1, it does so in a more complicated way. v1 printed this

[PATCH v2 05/12] qemu-img: Use BlockNodeInfo

2022-06-20 Thread Hanna Reitz
qemu-img info never uses ImageInfo's backing-image field, because it opens the backing chain one by one with BDRV_O_NO_BACKING, and prints all backing chain nodes' information consecutively. Use BlockNodeInfo to make it clear that we only print information about a single node, and that we are not

[PATCH v2 12/12] qemu-img: Change info key names for protocol nodes

2022-06-20 Thread Hanna Reitz
Currently, when querying a qcow2 image, qemu-img info reports something like this: image: test.qcow2 file format: qcow2 virtual size: 64 MiB (67108864 bytes) disk size: 196 KiB cluster_size: 65536 Format specific information: compat: 1.1 compression type: zlib lazy refcounts: false

Re: [RFC PATCH v2 3/8] qapi: net: add stream and dgram netdevs

2022-06-20 Thread Laurent Vivier
On 20/06/2022 13:22, Markus Armbruster wrote: Laurent Vivier writes: On 15/06/2022 13:46, Markus Armbruster wrote: Laurent Vivier writes: On 13/05/2022 13:44, Markus Armbruster wrote: Laurent Vivier writes: Copied from socket netdev file and modified to use SocketAddress to be able to

Re: [RFC PATCH v3 03/11] qapi: net: introduce a way to bypass qemu_opts_parse_noisily()

2022-06-20 Thread Markus Armbruster
Laurent Vivier writes: > As qemu_opts_parse_noisily() flattens the QAPI structures ("type" field > of Netdev structure can collides with "type" field of SocketAddress), > we introduce a way to bypass qemu_opts_parse_noisily() and use directly > visit_type_Netdev() to parse the backend

Re: [PATCH v2 01/21] io: add a QIOChannelNull equivalent to /dev/null

2022-06-20 Thread Juan Quintela
Daniel P. Berrangé wrote: > This is for code which needs a portable equivalent to a QIOChannelFile > connected to /dev/null. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Juan Quintela

Re: [PATCH v2 02/21] migration: switch to use QIOChannelNull for dummy channel

2022-06-20 Thread Juan Quintela
Daniel P. Berrangé wrote: > This removes one further custom impl of QEMUFile, in favour of a > QIOChannel based impl. > > Reviewed-by: Eric Blake > Signed-off-by: Daniel P. Berrangé Reviewed-by: Juan Quintela

Re: [PATCH v2] memory: prevent dma-reentracy issues

2022-06-20 Thread Alexander Bulekov
On 220609 0958, Alexander Bulekov wrote: > Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. > This flag is set/checked prior to calling a device's MemoryRegion > handlers, and set when device code initiates DMA. The purpose of this > flag is to prevent two types of

Re: [PATCH 0/7] semihosting: proper QEMU exit on semihosted exit syscall

2022-06-20 Thread Peter Maydell
On Mon, 20 Jun 2022 at 15:25, Luc Michel wrote: > This series implements a clean way for semihosted exit syscalls to > terminate QEMU with a given return code. > > Until now, exit syscalls implementations consisted in calling exit() > with the wanted return code. The problem with this approach is

[PATCH 6/7] target/nios2: use semihosting_exit_request on semihosted exit syscall

2022-06-20 Thread Luc Michel
Use the new semihosting_exit_request instead of a call to exit when handling a semihosted exit syscall. Signed-off-by: Luc Michel --- target/nios2/nios2-semi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c index

Re: proposed 7.1 release schedule

2022-06-20 Thread Richard Henderson
On 6/20/22 03:50, Peter Maydell wrote: On Mon, 23 May 2022 at 16:08, Richard Henderson wrote: On 5/23/22 02:53, Peter Maydell wrote: I just put some proposed dates into the 7.1 schedule page: https://wiki.qemu.org/Planning/7.1#Release_Schedule * 2022-07-12 Softfreeze * 2022-07-19

Re: [PATCH v2 06/21] migration: rename qemu_ftell to qemu_file_total_transferred

2022-06-20 Thread Juan Quintela
Daniel P. Berrangé wrote: > The name 'ftell' gives the misleading impression that the QEMUFile > objects are seekable. This is not the case, as in general we just > have an opaque stream. The users of this method are only interested > in the total bytes processed. This switches to a new name that

Re: [PATCH v2 11/21] migration: stop passing 'opaque' parameter to QEMUFile hooks

2022-06-20 Thread Juan Quintela
Daniel P. Berrangé wrote: > The only user of the hooks is RDMA which provides a QIOChannel backed > impl of QEMUFile. It can thus use the qemu_file_get_ioc() method. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Daniel P. Berrangé Reviewed-by: Juan Quintela

Re: [PATCH v4 1/4] QIOChannelSocket: Introduce assert and reduce ifdefs to improve readability

2022-06-20 Thread Peter Xu
On Mon, Jun 20, 2022 at 02:39:42AM -0300, Leonardo Bras wrote: > During implementation of MSG_ZEROCOPY feature, a lot of #ifdefs were > introduced, particularly at qio_channel_socket_writev(). > > Rewrite some of those changes so it's easier to read. > > Also, introduce an assert to help detect

Re: [PATCH v2 18/21] migration: remove the QEMUFileOps 'get_buffer' callback

2022-06-20 Thread Juan Quintela
Daniel P. Berrangé wrote: > This directly implements the get_buffer logic using QIOChannel APIs. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Daniel P. Berrangé Reviewed-by: Juan Quintela

[PATCH] target/arm: Catch invalid kvm state also for hvf

2022-06-20 Thread Alexander Graf
Some features such as running in EL3 or running M profile code are incompatible with virtualization as QEMU implements it today. To prevent users from picking invalid configurations on Hvf as well, let's run the same checks there as well. Resolves:

[PATCH v2 02/12] block/file: Add file-specific image info

2022-06-20 Thread Hanna Reitz
Add some (optional) information that the file driver can provide for image files, namely the extent size hint. Signed-off-by: Hanna Reitz --- qapi/block-core.json | 26 -- block/file-posix.c | 30 ++ 2 files changed, 54 insertions(+), 2

[PATCH v2 10/12] iotests/106, 214, 308: Read only one size line

2022-06-20 Thread Hanna Reitz
These tests read size information (sometimes disk size, sometimes virtual size) from qemu-img info's output. Once qemu-img starts printing info about child nodes, we are going to see multiple instances of that per image, but these tests are only interested in the first one, so use "head -n 1" to

Re: [PATCH] target/arm: Catch invalid kvm state also for hvf

2022-06-20 Thread Richard Henderson
On 6/20/22 09:08, Alexander Graf wrote: -if (kvm_enabled()) { +if (kvm_enabled() || hvf_enabled()) { I think this should be !tcg_enabled(). No hw virtualization can use EL3 (or M-profile), only full emulation from TCG. There is such a thing as ARM on Windows, so I can imagine that

[PATCH v3 03/51] target/arm: Add syn_smetrap

2022-06-20 Thread Richard Henderson
This will be used for raising various traps for SME. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/syndrome.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/target/arm/syndrome.h b/target/arm/syndrome.h index c105f9e6ba..73df5e3793 100644 ---

[PATCH v3 04/51] target/arm: Add ARM_CP_SME

2022-06-20 Thread Richard Henderson
This will be used for controlling access to SME cpregs. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpregs.h| 5 + target/arm/translate-a64.c | 18 ++ 2 files changed, 23 insertions(+) diff --git a/target/arm/cpregs.h

[PATCH v3 31/51] target/arm: Implement BFMOPA, BFMOPS

2022-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper-sme.h| 2 ++ target/arm/sme.decode | 2 ++ target/arm/sme_helper.c| 52 ++ target/arm/translate-sme.c | 29 + 4 files changed, 85 insertions(+) diff --git

[PATCH v3 23/51] target/arm: Implement SME RDSVL, ADDSVL, ADDSPL

2022-06-20 Thread Richard Henderson
These SME instructions are nominally within the SVE decode space, so we add them to sve.decode and translate-sve.c. Signed-off-by: Richard Henderson --- target/arm/translate-a64.h | 1 + target/arm/sve.decode | 5 - target/arm/translate-a64.c | 15 +++

[PATCH v3 42/51] linux-user/aarch64: Tidy target_restore_sigframe error return

2022-06-20 Thread Richard Henderson
Fold the return value setting into the goto, so each point of failure need not do both. Signed-off-by: Richard Henderson --- linux-user/aarch64/signal.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/linux-user/aarch64/signal.c

[PATCH v3 51/51] linux-user/aarch64: Add SME related hwcap entries

2022-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/elfload.c | 20 1 file changed, 20 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index f7eae357f4..8135960305 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -601,6 +601,18 @@ enum {

[PATCH v3 39/51] linux-user/aarch64: Clear tpidr2_el0 if CLONE_SETTLS

2022-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/aarch64/target_cpu.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux-user/aarch64/target_cpu.h b/linux-user/aarch64/target_cpu.h index 97a477bd3e..f90359faf2 100644 --- a/linux-user/aarch64/target_cpu.h +++

[PATCH v3 45/51] linux-user/aarch64: Move sve record checks into restore

2022-06-20 Thread Richard Henderson
Move the checks out of the parsing loop and into the restore function. This more closely mirrors the code structure in the kernel, and is slightly clearer. Reject rather than silently skip incorrect VL and SVE record sizes. Signed-off-by: Richard Henderson --- linux-user/aarch64/signal.c | 51

Re: [PATCH 07/10] bsd-user: Implement chroot and flock

2022-06-20 Thread Richard Henderson
On 6/20/22 10:42, Warner Losh wrote: Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 19 +++ bsd-user/freebsd/os-syscall.c | 8 2 files changed, 27 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH 08/10] bsd-user: Implement mkfifo and mkfifoat

2022-06-20 Thread Richard Henderson
On 6/20/22 10:42, Warner Losh wrote: Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 27 +++ bsd-user/freebsd/os-syscall.c | 8 2 files changed, 35 insertions(+) Reviewed-by: Richard Henderson r~

[PATCH v2 2/2] target/arm: Catch invalid kvm state also for hvf

2022-06-20 Thread Alexander Graf
Some features such as running in EL3 or running M profile code are incompatible with virtualization as QEMU implements it today. To prevent users from picking invalid configurations on other virt solutions like Hvf, let's run the same checks there too. Resolves:

[PATCH v2 1/2] accel: Introduce current_accel_name()

2022-06-20 Thread Alexander Graf
We need to fetch the name of the current accelerator in flexible error messages more going forward. Let's create a helper that gives it to us without casting in the target code. Signed-off-by: Alexander Graf --- accel/accel-common.c | 8 include/qemu/accel.h | 1 + softmmu/vl.c

Re: [PATCH 03/10] bsd-user: implement chmod, fchmod, lchmod and fchmodat

2022-06-20 Thread Richard Henderson
On 6/20/22 10:42, Warner Losh wrote: Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 46 +++ bsd-user/freebsd/os-syscall.c | 16 2 files changed, 62 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH] target/avr: Drop avr_cpu_memory_rw_debug()

2022-06-20 Thread Richard Henderson
On 3/22/22 02:50, Bin Meng wrote: CPUClass::memory_rw_debug() holds a callback for GDB memory access. If not provided, cpu_memory_rw_debug() is used by the GDB stub. Drop avr_cpu_memory_rw_debug() which does nothing special. Signed-off-by: Bin Meng Queued to tcg-next, for lack of anything

[PATCH 3/3] target/ppc: Check page dir/table base alignment

2022-06-20 Thread Leandro Lupori
Check if each page dir/table base address is properly aligned and log a guest error if not, as real hardware behave incorrectly in this case. These checks are only performed when DEBUG_MMU is defined, to avoid hurting the performance. Signed-off-by: Leandro Lupori --- target/ppc/mmu-radix64.c

Re: [PATCH 04/10] bsd-user: Implement freebsd11_mknod, freebsd11_mknodat and mknodat

2022-06-20 Thread Warner Losh
On Mon, Jun 20, 2022 at 1:13 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 6/20/22 10:42, Warner Losh wrote: > > These implement both the old-pre INO64 mknod variations, as well as the > > now current INO64 variant. To implement the old stuff, we use some > > linker magic to

[PATCH v3] ui/cocoa: Take refresh rate into account

2022-06-20 Thread Akihiko Odaki
Retreieve the refresh rate of the display and reflect it with dpy_set_ui_info() and update_displaychangelistener(), allowing the guest and DisplayChangeListener to consume the information. Signed-off-by: Akihiko Odaki --- meson.build | 3 ++- ui/cocoa.m | 12 2 files changed, 14

Re: [PATCH 3/4] slirp: Add mfr-id to -netdev options

2022-06-20 Thread Peter Delevoryas
On Jun 20, 2022, at 12:16 AM, Markus Armbruster mailto:arm...@redhat.com>> wrote: Peter Delevoryas mailto:p...@fb.com>> writes: This lets you set the manufacturer's ID for a slirp netdev, which can be queried from the guest through the Get Version ID NC-SI command. For example, by setting the

Re: [PATCH] migration: Remove RDMA_UNREGISTRATION_EXAMPLE

2022-06-20 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Nobody has ever showed up to unregister individual pages, and another > set of patches written by Daniel P. Berrangé > just remove qemu_rdma_signal_unregister() function needed here. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan

[PATCH 08/10] bsd-user: Implement mkfifo and mkfifoat

2022-06-20 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 27 +++ bsd-user/freebsd/os-syscall.c | 8 2 files changed, 35 insertions(+) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index f11369655a0..0b4b89c8d5c 100644

[PATCH 06/10] bsd-user: Implement chflags, lchflags and fchflags

2022-06-20 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 32 bsd-user/freebsd/os-syscall.c | 12 2 files changed, 44 insertions(+) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index 152579ad541..f5375a39a2c

[PATCH 10/10] bsd-user: Implement undelete

2022-06-20 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 13 + bsd-user/freebsd/os-syscall.c | 4 2 files changed, 17 insertions(+) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index 79eb5a73a9b..94e756ae550 100644 ---

[PATCH v3 08/51] target/arm: Add PSTATE.{SM,ZA} to TB flags

2022-06-20 Thread Richard Henderson
These are required to determine if various insns are allowed to issue. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 2 ++ target/arm/translate.h | 4 target/arm/helper.c| 4 target/arm/translate-a64.c | 2 ++ 4 files

[PATCH v3 06/51] target/arm: Add SMCR_ELx

2022-06-20 Thread Richard Henderson
These cpregs control the streaming vector length and whether the full a64 instruction set is allowed while in streaming mode. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h| 8 ++-- target/arm/helper.c | 41 + 2

[PATCH v3 14/51] target/arm: Generalize cpu_arm_{get, set}_default_vec_len

2022-06-20 Thread Richard Henderson
Rename from cpu_arm_{get,set}_sve_default_vec_len, and take the pointer to default_vq from opaque. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu64.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git

[PATCH v3 16/51] target/arm: Unexport aarch64_add_*_properties

2022-06-20 Thread Richard Henderson
These functions are not used outside cpu64.c, so make them static. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 3 --- target/arm/cpu64.c | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index

[PATCH v3 09/51] target/arm: Add the SME ZA storage to CPUARMState

2022-06-20 Thread Richard Henderson
Place this late in the resettable section of the structure, to keep the most common element offsets from being > 64k. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 8 target/arm/machine.c | 34 ++ 2 files

[PATCH v3 32/51] target/arm: Implement FMOPA, FMOPS (widening)

2022-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper-sme.h| 2 ++ target/arm/sme.decode | 1 + target/arm/sme_helper.c| 74 ++ target/arm/translate-sme.c | 2 ++ 4 files changed, 79 insertions(+) diff --git a/target/arm/helper-sme.h

[PATCH v3 12/51] target/arm: Create ARMVQMap

2022-06-20 Thread Richard Henderson
Pull the three sve_vq_* values into a structure. This will be reused for SME. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h| 29 ++--- target/arm/cpu64.c | 22 +++--- target/arm/helper.c | 2 +- target/arm/kvm64.c

[PATCH v3 17/51] target/arm: Add cpu properties for SME

2022-06-20 Thread Richard Henderson
Mirror the properties for SVE. The main difference is that any arbitrary set of powers of 2 may be supported, and not the stricter constraints that apply to SVE. Include a property to control FEAT_SME_FA64, as failing to restrict the runtime to the proper subset of insns could be a major point

[PATCH v3 24/51] target/arm: Implement SME ZERO

2022-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper-sme.h| 2 ++ target/arm/translate-a64.h | 1 + target/arm/sme.decode | 4 target/arm/sme_helper.c| 25 + target/arm/translate-a64.c | 14 ++ target/arm/translate-sme.c | 13

[PATCH v3 34/51] target/arm: Implement PSEL

2022-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/sve.decode | 20 + target/arm/translate-sve.c | 57 ++ 2 files changed, 77 insertions(+) diff --git a/target/arm/sve.decode b/target/arm/sve.decode index bbdaac6ac7..bf561c270a 100644 ---

[PATCH v3 43/51] linux-user/aarch64: Do not allow duplicate or short sve records

2022-06-20 Thread Richard Henderson
In parse_user_sigframe, the kernel rejects duplicate sve records, or records that are smaller than the header. We were silently allowing these cases to pass, dropping the record. Signed-off-by: Richard Henderson --- linux-user/aarch64/signal.c | 5 - 1 file changed, 4 insertions(+), 1

[PATCH v3 26/51] target/arm: Implement SME LD1, ST1

2022-06-20 Thread Richard Henderson
We cannot reuse the SVE functions for LD[1-4] and ST[1-4], because those functions accept only a Zreg register number. For SME, we want to pass a pointer into ZA storage. Signed-off-by: Richard Henderson --- target/arm/helper-sme.h| 82 + target/arm/sme.decode | 9 +

[PATCH v3 30/51] target/arm: Implement FMOPA, FMOPS (non-widening)

2022-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper-sme.h| 5 +++ target/arm/sme.decode | 9 + target/arm/sme_helper.c| 67 ++ target/arm/translate-sme.c | 33 +++ 4 files changed, 114 insertions(+) diff --git

[PATCH v3 48/51] linux-user/aarch64: Implement PR_SME_GET_VL, PR_SME_SET_VL

2022-06-20 Thread Richard Henderson
These prctl set the Streaming SVE vector length, which may be completely different from the Normal SVE vector length. Signed-off-by: Richard Henderson --- linux-user/aarch64/target_prctl.h | 48 +++ linux-user/syscall.c | 16 +++ 2 files changed,

Re: [PATCH 02/10] bsd-user: Implement symlink, symlinkat, readlink and readlinkat

2022-06-20 Thread Richard Henderson
On 6/20/22 10:42, Warner Losh wrote: +static abi_long do_bsd_readlink(CPUArchState *env, abi_long arg1, +abi_long arg2, abi_long arg3) +{ +abi_long ret; +void *p1, *p2; + +LOCK_PATH(p1, arg1); +p2 = lock_user(VERIFY_WRITE, arg2, arg3, 0); +if (p2 == NULL) { +

[PATCH v3 38/51] target/arm: Enable SME for -cpu max

2022-06-20 Thread Richard Henderson
Note that SME remains effectively disabled for user-only, because we do not yet set CPACR_EL1.SMEN. This needs to wait until the kernel ABI is implemented. Signed-off-by: Richard Henderson --- docs/system/arm/emulation.rst | 4 target/arm/cpu64.c| 11 +++ 2 files

Re: [PATCH v2 3/9] ppc/pnv: use dev->parent_bus->parent to get the PHB

2022-06-20 Thread Daniel Henrique Barboza
On 6/20/22 04:27, Mark Cave-Ayland wrote: On 18/06/2022 12:01, Daniel Henrique Barboza wrote: It is not advisable to execute an object_dynamic_cast() to poke into bus->qbus.parent and follow it up with a C cast into the PnvPHB type we think we got. A better way is to access the PnvPHB

[PATCH v3 49/51] target/arm: Only set ZEN in reset if SVE present

2022-06-20 Thread Richard Henderson
There's no reason to set CPACR_EL1.ZEN if SVE disabled. Signed-off-by: Richard Henderson --- target/arm/cpu.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 75295a14a3..5cb9f9f02c 100644 --- a/target/arm/cpu.c +++

Re: [PATCH 10/10] bsd-user: Implement undelete

2022-06-20 Thread Richard Henderson
On 6/20/22 10:42, Warner Losh wrote: Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 13 + bsd-user/freebsd/os-syscall.c | 4 2 files changed, 17 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH 01/10] bsd-user: Implement mount, umount and nmount

2022-06-20 Thread Richard Henderson
On 6/20/22 10:42, Warner Losh wrote: +/* + * XXX arg4 should be locked, but it isn't clear how to do that + * since it's it may be not be a NULL-terminated string. it's it. Unless you meant https://www.itsiticecream.com/ ;-) Reviewed-by: Richard Henderson r~

Re: [PATCH] softmmu: Always initialize xlat in address_space_translate_for_iotlb

2022-06-20 Thread Richard Henderson
On 6/20/22 05:52, Peter Maydell wrote: On Wed, 15 Jun 2022 at 17:43, Richard Henderson wrote: The bug is an uninitialized memory read, along the translate_fail path, which results in garbage being read from iotlb_to_section, which can lead to a crash in io_readx/io_writex. The bug may be

Re: [PATCH 0/8] Add some functions for LoongArch

2022-06-20 Thread Richard Henderson
On 6/20/22 01:04, Xiaojuan Yang wrote: In order to start the latest community BIOS and kernel of LoongArch, we have added the following patches. This series add some functions for LoongArch, and fix some errors. Add bios, kernel, fdt, smbios and acpi options support. The kernel file: *

[PATCH 07/10] bsd-user: Implement chroot and flock

2022-06-20 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 19 +++ bsd-user/freebsd/os-syscall.c | 8 2 files changed, 27 insertions(+) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index f5375a39a2c..f11369655a0 100644 ---

[PATCH 05/10] bsd-user: Implement chown, fchown, lchown and fchownat

2022-06-20 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 48 +++ bsd-user/freebsd/os-syscall.c | 16 2 files changed, 64 insertions(+) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index

[PATCH 03/10] bsd-user: implement chmod, fchmod, lchmod and fchmodat

2022-06-20 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 46 +++ bsd-user/freebsd/os-syscall.c | 16 2 files changed, 62 insertions(+) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index

[PATCH 09/10] bsd-user: Implement pathconf, lpathconf and fpathconf

2022-06-20 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 32 bsd-user/freebsd/os-syscall.c | 12 2 files changed, 44 insertions(+) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index 0b4b89c8d5c..79eb5a73a9b

[PATCH v3 02/51] target/arm: Add SMEEXC_EL to TB flags

2022-06-20 Thread Richard Henderson
This is CheckSMEAccess, which is the basis for a set of related tests for various SME cpregs and instructions. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 2 ++ target/arm/translate.h | 1 + target/arm/helper.c| 52

[PATCH v3 01/51] target/arm: Implement TPIDR2_EL0

2022-06-20 Thread Richard Henderson
This register is part of SME, but isn't closely related to the rest of the extension. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h| 1 + target/arm/helper.c | 32 2 files changed, 33 insertions(+) diff --git

[PATCH v3 18/51] target/arm: Introduce sve_vqm1_for_el_sm

2022-06-20 Thread Richard Henderson
When Streaming SVE mode is enabled, the size is taken from SMCR_ELx instead of ZCR_ELx. The format is shared, but the set of vector lengths is not. Further, Streaming SVE does not require any particular length to be supported. Adjust sve_vqm1_for_el to pass the current value of PSTATE.SM to the

[PATCH v3 13/51] target/arm: Generalize cpu_arm_{get,set}_vq

2022-06-20 Thread Richard Henderson
Rename from cpu_arm_{get,set}_sve_vq, and take the ARMVQMap as the opaque parameter. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu64.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/target/arm/cpu64.c

[PATCH v3 25/51] target/arm: Implement SME MOVA

2022-06-20 Thread Richard Henderson
We can reuse the SVE functions for implementing moves to/from horizontal tile slices, but we need new ones for moves to/from vertical tile slices. Signed-off-by: Richard Henderson --- target/arm/helper-sme.h| 11 target/arm/helper-sve.h| 2 + target/arm/translate-a64.h | 9 +++

[PATCH v3 37/51] target/arm: Reset streaming sve state on exception boundaries

2022-06-20 Thread Richard Henderson
We can handle both exception entry and exception return by hooking into aarch64_sve_change_el. Signed-off-by: Richard Henderson --- target/arm/helper.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index

Re: [PATCH v5 4/5] i386/pc: relocate 4g start to 1T where applicable

2022-06-20 Thread Joao Martins
On 6/20/22 17:36, Joao Martins wrote: > On 6/20/22 15:27, Igor Mammedov wrote: >> On Fri, 17 Jun 2022 14:33:02 +0100 >> Joao Martins wrote: >>> On 6/17/22 13:32, Igor Mammedov wrote: On Fri, 17 Jun 2022 13:18:38 +0100 Joao Martins wrote: > On 6/16/22 15:23, Igor Mammedov wrote:

[PATCH v3 35/51] target/arm: Implement REVD

2022-06-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 2 ++ target/arm/sve.decode | 1 + target/arm/sve_helper.c| 16 target/arm/translate-sve.c | 2 ++ 4 files changed, 21 insertions(+) diff --git a/target/arm/helper-sve.h b/target/arm/helper-sve.h

Re: [PATCH v4 06/13] accel/tcg: Reorganize tcg_accel_ops_init()

2022-06-20 Thread Richard Henderson
On 3/23/22 10:17, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Reorg TCG AccelOpsClass initialization to emphasis icount mode share more code with single-threaded TCG. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops.c | 15 --- 1 file changed, 8

[PATCH] linux-user: Add partial support for MADV_DONTNEED

2022-06-20 Thread Ilya Leoshkevich
Currently QEMU ignores madvise(MADV_DONTNEED), which break apps that rely on this for zeroing out memory [1]. Improve the situation by doing a passthrough when the range in question is a host-page-aligned anonymous mapping. This is based on the patches from Simon Hausmann [2] and Chris Fallin

Re: [RFC PATCH v3 04/11] qapi: net: add stream and dgram netdevs

2022-06-20 Thread Laurent Vivier
On 20/06/2022 17:21, Markus Armbruster wrote: Laurent Vivier writes: Copied from socket netdev file and modified to use SocketAddress to be able to introduce new features like unix socket. "udp" and "mcast" are squashed into dgram netdev, multicast is detected according to the IP address

[PATCH v3 00/51] target/arm: Scalable Matrix Extension

2022-06-20 Thread Richard Henderson
Changes for v3: * Rebase on mainline (20 patches upstreamed; new conflicts resolved). * Test bit 31 before disas_sme. The first 21 patches, excepting 17, have been reviewed. r~ Richard Henderson (51): target/arm: Implement TPIDR2_EL0 target/arm: Add SMEEXC_EL to TB flags target/arm:

[PATCH v3 05/51] target/arm: Add SVCR

2022-06-20 Thread Richard Henderson
This cpreg is used to access two new bits of PSTATE that are not visible via any other mechanism. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h| 6 ++ target/arm/helper.c | 13 + 2 files changed, 19 insertions(+) diff --git

[PATCH v3 11/51] target/arm: Move error for sve%d property to arm_cpu_sve_finalize

2022-06-20 Thread Richard Henderson
Keep all of the error messages together. This does mean that when setting many sve length properties we'll only generate one error, but we only really need one. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu64.c | 15 +++ 1 file changed, 7

[PATCH v3 07/51] target/arm: Add SMIDR_EL1, SMPRI_EL1, SMPRIMAP_EL2

2022-06-20 Thread Richard Henderson
Implement the streaming mode identification register, and the two streaming priority registers. For QEMU, they are all RES0. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper.c | 33 + 1 file changed, 33 insertions(+) diff --git

[PATCH v3 19/51] target/arm: Add SVL to TB flags

2022-06-20 Thread Richard Henderson
We need SVL separate from VL for RDSVL et al, as well as ZA storage loads and stores, which do not require PSTATE.SM. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 12 target/arm/translate.h | 1 + target/arm/helper.c| 8

[PATCH v3 10/51] target/arm: Implement SMSTART, SMSTOP

2022-06-20 Thread Richard Henderson
These two instructions are aliases of MSR (immediate). Use the two helpers to properly implement svcr_write. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 1 + target/arm/helper-sme.h| 21 + target/arm/helper.h| 1 +

[PATCH v3 27/51] target/arm: Export unpredicated ld/st from translate-sve.c

2022-06-20 Thread Richard Henderson
Add a TCGv_ptr base argument, which will be cpu_env for SVE. We will reuse this for SME save and restore array insns. Signed-off-by: Richard Henderson --- target/arm/translate-a64.h | 3 +++ target/arm/translate-sve.c | 48 -- 2 files changed, 39

[PATCH v3 15/51] target/arm: Move arm_cpu_*_finalize to internals.h

2022-06-20 Thread Richard Henderson
Drop the aa32-only inline fallbacks, and just use a couple of ifdefs. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 6 -- target/arm/internals.h | 3 +++ target/arm/cpu.c | 2 ++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git

[PATCH v3 22/51] target/arm: Trap AdvSIMD usage when Streaming SVE is active

2022-06-20 Thread Richard Henderson
This new behaviour is in the ARM pseudocode function AArch64.CheckFPAdvSIMDEnabled, which applies to AArch32 via AArch32.CheckAdvSIMDOrFPEnabled when the EL to which the trap would be delivered is in AArch64 mode. Given that ARMv9 drops support for AArch32 outside EL0, the trap EL detection ought

[PATCH v3 28/51] target/arm: Implement SME LDR, STR

2022-06-20 Thread Richard Henderson
We can reuse the SVE functions for LDR and STR, passing in the base of the ZA vector and a zero offset. Signed-off-by: Richard Henderson --- target/arm/sme.decode | 7 +++ target/arm/translate-sme.c | 23 +++ 2 files changed, 30 insertions(+) diff --git

<    1   2   3   4   >