Re: [PATCH 0/3] ppc: Implement ISA 3.00 tlbie[l]

2022-05-20 Thread Cédric Le Goater
On 5/20/22 19:33, Leandro Lupori wrote: Add support for ISA 3.00 tlbie/tlbiel instructions, with RIC, PRS and R operands. Also, for Radix MMU, add support for the TLB invalidation of a single page. Flush by PID/LPID, or based in process/partition scope is not supported, because it would make usi

Re: [PATCH v4 00/17] target/m68k: Conditional traps + trap cleanup

2022-05-20 Thread Richard Henderson
Ping. r~ On 4/30/22 10:53, Richard Henderson wrote: Changes for v4: - Rebase, which requires QEMU_NORETURN -> G_NORETURN. - Cast -4096 to abi_ulong for print_syscall_err. r~ v1: https://lore.kernel.org/qemu-devel/20211130103752.72099-1-richard.hender...@linaro.org/ v2: https://lore.

Re: [PATCH v2] linux-user: Clean up arg_start/arg_end confusion

2022-05-20 Thread Richard Henderson
Ping? r~ On 4/26/22 19:51, Richard Henderson wrote: We had two sets of variables: arg_start/arg_end, and arg_strings/env_strings. In linuxload.c, we set the first pair to the bounds of the argv strings, but in elfload.c, we set the first pair to the bounds of the argv pointers and the second p

Re: [PATCH v3 05/49] semihosting: Add target_strlen for softmmu-uaccess.h

2022-05-20 Thread Richard Henderson
On 5/20/22 17:03, Richard Henderson wrote: Mirror the interface of the user-only function of the same name. Use probe_access_flags for the common case of ram, and cpu_memory_rw_debug for the uncommon case of mmio. Signed-off-by: Richard Henderson --- v3: Use probe_access_flags (pmm) Ho hum.

[PATCH] ide_ioport_read: Return lower octet of data register instead of 0xFF

2022-05-20 Thread Lev Kujawski
Prior to this patch, the pre-GRUB Solaris x86 bootloader would fail to load on QEMU with the following screen output: SunOS Secondary Boot version 3.00 prom_panic: Could not mount filesystem. Entering boot debugger: [136419]: _ This occurs because the bootloader issues an ATA IDENTIFY DEVICE com

[PATCH v3 42/49] semihosting: Add GuestFDConsole

2022-05-20 Thread Richard Henderson
Add a GuestFDType for connecting to the semihosting console. Hook up to read, write, isatty, and fstat syscalls. Note that the arm-specific syscall flen cannot be applied to the console, because the console is not a descriptor exposed to the guest. Signed-off-by: Richard Henderson --- include/s

[PATCH v3 41/49] semihosting: Create qemu_semihosting_console_write

2022-05-20 Thread Richard Henderson
Will replace qemu_semihosting_console_{outs,outc}, but we need more plumbing first. Signed-off-by: Richard Henderson --- include/semihosting/console.h | 12 linux-user/semihost.c | 5 + semihosting/console.c | 9 + 3 files changed, 26 insertions(+) dif

[PATCH v3 31/49] semihosting: Split out semihost_sys_remove

2022-05-20 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_REMOVE to a reusable function. Signed-off-by: Richard Henderson --- include/semihosting/syscalls.h | 3 +++ semihosting/arm-compat-semi.c | 13 +-- semihosting/syscalls.c | 40 ++ 3 files changed, 44

[PATCH v3 29/49] semihosting: Split out semihost_sys_isatty

2022-05-20 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_ISTTY to a reusable function. This handles all GuestFD. Signed-off-by: Richard Henderson --- include/exec/gdbstub.h | 1 + include/semihosting/syscalls.h | 3 +++ semihosting/arm-compat-semi.c | 27 + semihosting/

[PATCH v3 37/49] semihosting: Fix docs comment for qemu_semihosting_console_inc

2022-05-20 Thread Richard Henderson
The implementation of qemu_semihosting_console_inc does not defer to gdbstub, but only reads from the fifo in console.c. Signed-off-by: Richard Henderson --- include/semihosting/console.h | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/semihosting/console.h b

[PATCH v3 35/49] semihosting: Create semihost_sys_gettimeofday

2022-05-20 Thread Richard Henderson
This syscall will be used by m68k and nios2 semihosting. Signed-off-by: Richard Henderson --- include/semihosting/syscalls.h | 3 +++ semihosting/syscalls.c | 42 ++ 2 files changed, 45 insertions(+) diff --git a/include/semihosting/syscalls.h b/include/

[PATCH v3 30/49] semihosting: Split out semihost_sys_flen

2022-05-20 Thread Richard Henderson
The ARM-specific SYS_FLEN isn't really something that can be reused by other semihosting apis, but there are parts that can reused for the implementation of semihost_sys_fstat. Signed-off-by: Richard Henderson --- include/exec/gdbstub.h | 1 + include/semihosting/syscalls.h | 4 ++ sem

[PATCH v3 14/49] include/exec: Move gdb open flags to gdbstub.h

2022-05-20 Thread Richard Henderson
There were 3 copies of these flags. Place them in the file with gdb_do_syscall, with which they belong. Signed-off-by: Richard Henderson --- include/exec/gdbstub.h| 10 ++ semihosting/arm-compat-semi.c | 8 target/m68k/m68k-semi.c | 8 target/nios2/nios

[PATCH v3 15/49] include/exec: Move gdb_stat and gdb_timeval to gdbstub.h

2022-05-20 Thread Richard Henderson
We have two copies of these structures, and require them in semihosting/ going forward. Signed-off-by: Richard Henderson --- include/exec/gdbstub.h| 25 + target/m68k/m68k-semi.c | 30 +++--- target/nios2/nios2-semi.c | 30 +++

[PATCH v3 33/49] semihosting: Split out semihost_sys_system

2022-05-20 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_SYSTEM to a reusable function. Signed-off-by: Richard Henderson --- include/semihosting/syscalls.h | 3 +++ semihosting/arm-compat-semi.c | 12 +- semihosting/syscalls.c | 40 ++ 3 files changed, 44

[PATCH v3 38/49] semihosting: Pass CPUState to qemu_semihosting_console_inc

2022-05-20 Thread Richard Henderson
We don't need CPUArchState, and we do want the CPUState of the thread performing the operation -- use this instead of current_cpu. Signed-off-by: Richard Henderson --- include/semihosting/console.h | 4 ++-- linux-user/semihost.c | 2 +- semihosting/arm-compat-semi.c | 2 +- semihosti

[PATCH v3 48/49] semihosting: Remove qemu_semihosting_console_outs

2022-05-20 Thread Richard Henderson
This function has been replaced by *_write. Signed-off-by: Richard Henderson --- include/semihosting/console.h | 13 -- linux-user/semihost.c | 17 semihosting/console.c | 49 --- 3 files changed, 79 deletions(-) diff --git a/

[PATCH v3 22/49] semihosting: Move GET_ARG/SET_ARG earlier in the file

2022-05-20 Thread Richard Henderson
Moving this to be useful for another function besides do_common_semihosting. Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 48 +-- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/ar

[PATCH v3 47/49] semihosting: Use console_out_gf for SYS_WRITE0

2022-05-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index e24e9284c2..1e4c931327 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihostin

[PATCH v3 21/49] semihosting: Use env more often in do_common_semihosting

2022-05-20 Thread Richard Henderson
We've already loaded cs->env_ptr into a local variable; use it. Since env is unconditionally used, we don't need a dummy use. Signed-off-by: Richard Henderson --- target/arm/common-semi-target.h | 62 ++ target/riscv/common-semi-target.h | 50 +++ semihosting/arm-

[PATCH v3 43/49] semihosting: Create qemu_semihosting_guestfd_init

2022-05-20 Thread Richard Henderson
For arm-compat, initialize console_{in,out}_gf; otherwise, initialize stdio file descriptors. This will go some way to cleaning up arm-compat, and will allow other semihosting to use normal stdio. Signed-off-by: Richard Henderson --- include/semihosting/guestfd.h | 7 + include/semihostin

[PATCH v3 24/49] semihosting: Split out semihost_sys_close

2022-05-20 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_CLOSE to a reusable function. This handles all GuestFD. Note that gdb_do_syscall %x reads target_ulong, not int. Signed-off-by: Richard Henderson --- include/semihosting/syscalls.h | 3 +++ semihosting/arm-compat-semi.c | 41 +---

[PATCH v3 40/49] semihosting: Cleanup chardev init

2022-05-20 Thread Richard Henderson
Rename qemu_semihosting_connect_chardevs to qemu_semihosting_chardev_init; pass the result directly to qemu_semihosting_console_init. Store the chardev in SemihostingConsole instead of SemihostingConfig, which lets us drop semihosting_get_chardev. Signed-off-by: Richard Henderson --- include/se

[PATCH v3 19/49] semihosting: Split common_semi_flen_buf per target

2022-05-20 Thread Richard Henderson
We already have some larger ifdef blocks for ARM and RISCV; split out common_semi_stack_bottom per target. Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 44 +-- 1 file changed, 21 insertions(+), 23 deletions(-)

[PATCH v3 49/49] semihosting: Create semihost_sys_poll_one

2022-05-20 Thread Richard Henderson
This will be used for implementing the xtensa select_one system call. Choose "poll" over "select" so that we can reuse Glib's g_poll constants and to avoid struct timeval. Signed-off-by: Richard Henderson --- include/semihosting/console.h | 16 include/semihosting/syscalls.h | 3 ++

[PATCH v3 46/49] semihosting: Remove qemu_semihosting_console_outc

2022-05-20 Thread Richard Henderson
This function has been replaced by *_write. Signed-off-by: Richard Henderson --- include/semihosting/console.h | 13 - linux-user/semihost.c | 16 semihosting/console.c | 18 -- 3 files changed, 47 deletions(-) diff --git a/include/se

[PATCH v3 18/49] semihosting: Split is_64bit_semihosting per target

2022-05-20 Thread Richard Henderson
We already have some larger ifdef blocks for ARM and RISCV; split the function into multiple implementations per arch. Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) dif

[PATCH v3 20/49] semihosting: Split out common_semi_has_synccache

2022-05-20 Thread Richard Henderson
We already have some larger ifdef blocks for ARM and RISCV; split out a boolean test for SYS_SYNCCACHE. Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/semi

[PATCH v3 12/49] semihosting: Return void from do_common_semihosting

2022-05-20 Thread Richard Henderson
Perform the cleanup in the FIXME comment in common_semi_gdb_syscall. Do not modify guest registers until the syscall is complete, which in the gdbstub case is asynchronous. In the synchronous non-gdbstub case, use common_semi_set_ret to set the result. Merge set_swi_errno into common_semi_cb. Rel

[PATCH v3 45/49] semihosting: Use console_out_gf for SYS_WRITEC

2022-05-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 9230c69ff2..e24e9284c2 100644 --- a/semihosting/arm-compat-semi.c +++ b/

[PATCH v3 36/49] gdbstub: Widen gdb_syscall_complete_cb return value

2022-05-20 Thread Richard Henderson
Always pass a uint64_t. This resolves a FIXME in the m68k and nios2 semihosting that we've lost data. Signed-off-by: Richard Henderson --- include/exec/gdbstub.h| 3 +-- gdbstub.c | 7 --- semihosting/arm-compat-semi.c | 9 - semihosting/console.c

[PATCH v3 34/49] semihosting: Create semihost_sys_{stat,fstat}

2022-05-20 Thread Richard Henderson
These syscalls will be used by m68k and nios2 semihosting. Signed-off-by: Richard Henderson --- include/semihosting/syscalls.h | 7 ++ semihosting/syscalls.c | 137 + 2 files changed, 144 insertions(+) diff --git a/include/semihosting/syscalls.h b/inclu

[PATCH v3 44/49] semihosting: Use console_in_gf for SYS_READC

2022-05-20 Thread Richard Henderson
Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 20d97290ff..9230c69ff2 100644 --- a/semihosting/arm-compat-semi.c

[PATCH v3 16/49] include/exec: Define errno values in gdbstub.h

2022-05-20 Thread Richard Henderson
Define constants for the errno values defined by the gdb remote fileio protocol. Signed-off-by: Richard Henderson --- include/exec/gdbstub.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 33a262a5a3..0a6e0d6eeb 10

[PATCH v3 39/49] semihosting: Expand qemu_semihosting_console_inc to read

2022-05-20 Thread Richard Henderson
Allow more than one character to be read at one time. Will be used by m68k and nios2 semihosting for stdio. Signed-off-by: Richard Henderson --- include/semihosting/console.h | 14 -- linux-user/semihost.c | 10 ++ semihosting/arm-compat-semi.c | 11 +-- semih

[PATCH v3 28/49] semihosting: Split out semihost_sys_lseek

2022-05-20 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_SEEK to a reusable function. This handles all GuestFD. Isolate the curious ARM-specific return value processing to a new callback, common_semi_seek_cb. Expand the internal type of the offset to int64_t, and provide the whence argument, which will be

[PATCH v3 32/49] semihosting: Split out semihost_sys_rename

2022-05-20 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_RENAME to a reusable function. Signed-off-by: Richard Henderson --- include/semihosting/syscalls.h | 4 +++ semihosting/arm-compat-semi.c | 21 + semihosting/syscalls.c | 57 ++ 3 files changed,

[PATCH v3 11/49] semihosting: Clean up common_semi_open_cb

2022-05-20 Thread Richard Henderson
Use common_semi_cb to return results instead of calling set_swi_errno and common_semi_set_ret directly. Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-com

[PATCH v3 25/49] semihosting: Split out semihost_sys_read

2022-05-20 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_READ to a reusable function. This handles all GuestFD. Isolate the curious ARM-specific return value processing to a new callback, common_semi_rw_cb. Note that gdb_do_syscall %x reads target_ulong, not int. Signed-off-by: Richard Henderson --- in

[PATCH v3 13/49] semihosting: Move common-semi.h to include/semihosting/

2022-05-20 Thread Richard Henderson
This header is not private to the top-level semihosting directory, so place it in the public include directory. Signed-off-by: Richard Henderson --- {semihosting => include/semihosting}/common-semi.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {semihosting => include/semihosting

[PATCH v3 09/49] semihosting: Adjust error checking in common_semi_cb

2022-05-20 Thread Richard Henderson
The err parameter is non-zero if and only if an error occured. Use this instead of ret == -1 for determining if we need to update the saved errno. This fixes the errno setting of SYS_ISTTY, which returns 0 on error, not -1. Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 2

[PATCH v3 17/49] semihosting: Use struct gdb_stat in common_semi_flen_cb

2022-05-20 Thread Richard Henderson
Use offsetof instead of an integer constant. Load the entire 64-bit size while we're at it. Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat

[PATCH v3 27/49] semihosting: Bound length for semihost_sys_{read, write}

2022-05-20 Thread Richard Henderson
Fixes a minor bug in which a 64-bit guest on a 32-bit host could truncate the length. This would only ever cause a problem if there were no bits set in the low 32, so that it truncates to 0. Signed-off-by: Richard Henderson --- semihosting/syscalls.c | 16 1 file changed, 16 in

[PATCH v3 23/49] semihosting: Split out semihost_sys_open

2022-05-20 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_OPEN to a reusable function. This handles gdb and host file i/o. Add helpers to validate the length of the filename string. Prepare for usage by other semihosting by allowing the filename length parameter to be 0, and calling strlen. Signed-off-by:

[PATCH v3 07/49] semihosting: Split out guestfd.c

2022-05-20 Thread Richard Henderson
In arm-compat-semi.c, we have more advanced treatment of guest file descriptors than we do in other implementations. Split out GuestFD and related functions to a new file so that they can be shared. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- configs/targets/aarch64-linux-us

[PATCH v3 06/49] semihosting: Simplify softmmu_lock_user_string

2022-05-20 Thread Richard Henderson
We are not currently bounding the search to the 1024 bytes that we allocated, possibly overrunning the buffer. Use softmmu_strlen_user to find the length and allocate the correct size from the beginning. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- semihosting/uaccess.c | 15

[PATCH v3 08/49] semihosting: Inline set_swi_errno into common_semi_cb

2022-05-20 Thread Richard Henderson
Do not store 'err' into errno only to read it back immediately. Use 'ret' for the return value, not 'reg0'. Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/

[PATCH v3 10/49] semihosting: Clean up common_semi_flen_cb

2022-05-20 Thread Richard Henderson
Do not read from the gdb struct stat buffer if the callback is reporting an error. Use common_semi_cb to finish returning results. Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/semihost

[PATCH v3 26/49] semihosting: Split out semihost_sys_write

2022-05-20 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_WRITE to a reusable function. This handles all GuestFD. This removes the last use of common_semi_syscall_len. Note that gdb_do_syscall %x reads target_ulong, not int. Signed-off-by: Richard Henderson --- include/semihosting/syscalls.h | 6

[PATCH v3 04/49] semihosting: Move softmmu-uaccess.h functions out of line

2022-05-20 Thread Richard Henderson
Rather that static (and not even inline) functions within a header, move the functions to semihosting/uaccess.c. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/semihosting/softmmu-uaccess.h | 42 +++--- semihosting/uaccess.c | 51

[PATCH v3 03/49] semihosting: Improve condition for config.c and console.c

2022-05-20 Thread Richard Henderson
While CONFIG_SEMIHOSTING is currently only set for softmmu, this will not continue to be true. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- semihosting/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semihosting/meson.build b/semihosting/meson.

[PATCH v3 05/49] semihosting: Add target_strlen for softmmu-uaccess.h

2022-05-20 Thread Richard Henderson
Mirror the interface of the user-only function of the same name. Use probe_access_flags for the common case of ram, and cpu_memory_rw_debug for the uncommon case of mmio. Signed-off-by: Richard Henderson --- v3: Use probe_access_flags (pmm) --- include/semihosting/softmmu-uaccess.h | 3 ++ semi

[PATCH v3 01/49] semihosting: Move exec/softmmu-semi.h to semihosting/softmmu-uaccess.h

2022-05-20 Thread Richard Henderson
We have a subdirectory for semihosting; move this file out of exec. Rename to emphasize the contents are a replacement for the functions in linux-user/bsd-user uaccess.c. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- .../{exec/softmmu-semi.h => semihosting/softmmu-uaccess.h}

[PATCH v3 02/49] semihosting: Return failure from softmmu-uaccess.h functions

2022-05-20 Thread Richard Henderson
We were reporting unconditional success for these functions; pass on any failure from cpu_memory_rw_debug. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/semihosting/softmmu-uaccess.h | 91 --- 1 file changed, 39 insertions(+), 52 deletions(-) d

[PATCH v3 00/49] semihosting cleanup

2022-05-20 Thread Richard Henderson
Changes for v3: * Split the patch set -- only include arm-compat-semi.c changes here. * Fix softmmu_target_strlen vs mmio (pmm). * Add kerneldoc comments for guestfd.h. r~ Richard Henderson (49): semihosting: Move exec/softmmu-semi.h to semihosting/softmmu-uaccess.h semihosting: Retur

Re: [PATCH] qga-win32: Add support for NVME but type

2022-05-20 Thread Marc-André Lureau
On Fri, May 20, 2022 at 10:15 PM Konstantin Kostiuk wrote: > Bus type spaces (Indicates a storage spaces bus) is not > supported, so return it as unknown. > > Signed-off-by: Konstantin Kostiuk > Reviewed-by: Marc-André Lureau > --- > qga/commands-win32.c | 5 + > 1 file changed, 5 inser

[PATCH] qga-win32: Add support for NVME but type

2022-05-20 Thread Konstantin Kostiuk
Bus type spaces (Indicates a storage spaces bus) is not supported, so return it as unknown. Signed-off-by: Konstantin Kostiuk --- qga/commands-win32.c | 5 + 1 file changed, 5 insertions(+) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index d56b5fd2a7..5ca2af9173 100644 --- a/qg

[PATCH v5 6/8] target/ppc: Implemented pmxvf*ger*

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: pmxvf16ger2: Prefixed Masked VSX Vector 16-bit Floating-Point GER (rank-2 update) pmxvf16ger2nn: Prefixed Masked VSX Vector 16-bit Floating-Point GER (rank-2 update) Negative multiply, Negative accumulate

[PATCH v5 5/8] target/ppc: Implemented xvf16ger*

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvf16ger2: VSX Vector 16-bit Floating-Point GER (rank-2 update) xvf16ger2nn: VSX Vector 16-bit Floating-Point GER (rank-2 update) Negative multiply, Negative accumulate xvf16ger2np: VSX Vector 16-bit Float

[PATCH v5 7/8] target/ppc: Implemented [pm]xvbf16ger2*

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvbf16ger2: VSX Vector bfloat16 GER (rank-2 update) xvbf16ger2nn: VSX Vector bfloat16 GER (rank-2 update) Negative multiply, Negative accumulate xvbf16ger2np: VSX Vector bfloat16 GER (rank-2 update) Negati

[PATCH v5 8/8] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: Joel Stanley These are new hwcap bits added for power10. Signed-off-by: Joel Stanley Signed-off-by: Lucas Mateus Castro (alqotel) Reviewed-by: Richard Henderson --- linux-user/elfload.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c

[PATCH v5 1/8] target/ppc: Implement xxm[tf]acc and xxsetaccz

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xxmfacc: VSX Move From Accumulator xxmtacc: VSX Move To Accumulator xxsetaccz: VSX Set Accumulator to Zero The PowerISA 3.1 mentions that for the current version of the architecture, "the hardware implement

[PATCH v5 2/8] target/ppc: Implemented xvi*ger* instructions

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvi4ger8: VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) xvi4ger8pp: VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) Positive multiply, Positive accumulate xvi8ger4: VSX

[PATCH v5 4/8] target/ppc: Implemented xvf*ger*

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvf32ger: VSX Vector 32-bit Floating-Point GER (rank-1 update) xvf32gernn: VSX Vector 32-bit Floating-Point GER (rank-1 update) Negative multiply, Negative accumulate xvf32gernp: VSX Vector 32-bit Floating

[PATCH v5 3/8] target/ppc: Implemented pmxvi*ger* instructions

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: pmxvi4ger8: Prefixed Masked VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) pmxvi4ger8pp: Prefixed Masked VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) Positive multiply, Po

[PATCH v5 0/8] VSX MMA Implementation

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Based-on: <20220517161522.36132-1-victor.colo...@eldorado.org.br> This patch series is a patch series of the Matrix-Multiply Assist (MMA) instructions implementation from the PowerISA 3.1 These and the VDIV/VMOD implementation are the last new PowerISA 3.1

Sharing directories from Windows hosts

2022-05-20 Thread Anders Pitman
I'm running QEMU on a Windows host with multiple Linux guest VMs. I'm trying to share a host directory with all the guests. As I understand it, the way to do this with Linux hosts would be to configure a 9p share[0]. However, it appears that 9p support for Windows hosts is currently a work in p

Re: [PATCH v4 5/8] target/ppc: Implemented xvf16ger*

2022-05-20 Thread Richard Henderson
On 5/20/22 09:42, Lucas Mateus Martins Araujo e Castro wrote: On 20/05/2022 12:47, Richard Henderson wrote: On 5/20/22 06:51, Lucas Mateus Castro(alqotel) wrote: +    if (acc) { +    aux_acc = at[i].VsrSF(j); +    if (!neg_mul && !neg_acc) { +  

Re: [PULL 0/8] Misc patches (Gitlab-CI, qtest, Capstone, ...)

2022-05-20 Thread Richard Henderson
On 5/19/22 23:22, Thomas Huth wrote: On 19/05/2022 13.55, Peter Maydell wrote: On Thu, 19 May 2022 at 07:32, Thomas Huth wrote: On 18/05/2022 18.12, Richard Henderson wrote: On 5/18/22 02:04, Thomas Huth wrote:    Hi Richard! The following changes since commit eec398119fc6911d99412c37af06a

[PATCH] target/i386/kvm: Fix disabling MPX on "-cpu host" with MPX-capable host

2022-05-20 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" Since KVM commit 5f76f6f5ff96 ("KVM: nVMX: Do not expose MPX VMX controls when guest MPX disabled") it is not possible to disable MPX on a "-cpu host" just by adding "-mpx" there if the host CPU does indeed support MPX. QEMU will fail to set MSR_IA32_VMX_TRUE_{EXIT,EN

Re: [PATCH v6 4/8] KVM: Extend the memslot to support fd-based private memory

2022-05-20 Thread Sean Christopherson
On Fri, May 20, 2022, Andy Lutomirski wrote: > The alternative would be to have some kind of separate table or bitmap (part > of the memslot?) that tells KVM whether a GPA should map to the fd. > > What do you all think? My original proposal was to have expolicit shared vs. private memslots, and

[PATCH v2 10/10] docs/devel: Fix link to developer mailing lists

2022-05-20 Thread Bernhard Beschow
Ammends commit 9f73de8df0335c9387f4ee39e207a65a1615676f 'docs: rSTify the "SubmitAPatch" wiki'. Cc: qemu-sta...@nongnu.org Signed-off-by: Bernhard Beschow --- docs/devel/submitting-a-patch.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/devel/submitting-a-patch

[PATCH v2 07/10] hw/net/fsl_etsec/etsec: Remove obsolete and unused etsec_create()

2022-05-20 Thread Bernhard Beschow
etsec_create() wraps qdev API which is outdated. It is also unused, so remove it. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé --- hw/net/fsl_etsec/etsec.c | 23 --- hw/net/fsl_etsec/etsec.h | 7 --- 2 files changed, 30 deletions(-) diff --git a/

Re: [PATCH v2 09/10] accel/tcg: Inline dump_opcount_info() and remove it

2022-05-20 Thread Bernhard Beschow
Am 20. Mai 2022 18:01:08 UTC schrieb Bernhard Beschow : >dump_opcount_info() is a one-line wrapper around tcg_dump_op_count() >which is also exported. So use the latter directly. > >Signed-off-by: Bernhard Beschow >--- > accel/tcg/cpu-exec.c | 2 +- > accel/tcg/translate-all.c | 5 - > incl

Re: [PATCH v2 10/10] docs/devel: Fix link to developer mailing lists

2022-05-20 Thread Bernhard Beschow
Am 20. Mai 2022 18:01:09 UTC schrieb Bernhard Beschow : >Ammends commit 9f73de8df0335c9387f4ee39e207a65a1615676f 'docs: rSTify >the "SubmitAPatch" wiki'. > >Cc: qemu-sta...@nongnu.org >Signed-off-by: Bernhard Beschow >--- > docs/devel/submitting-a-patch.rst | 6 +++--- > 1 file changed, 3 insertion

Re: [PATCH v2 08/10] accel/tcg/cpu-exec: Unexport dump_drift_info()

2022-05-20 Thread Bernhard Beschow
Am 20. Mai 2022 18:01:07 UTC schrieb Bernhard Beschow : >Commit 3a841ab53f165910224dc4bebabf1a8f1d04200c 'qapi: introduce >x-query-jit QMP command' basically moved the only function using >dump_drift_info() to cpu-exec.c. Therefore, dump_drift_info() doesn't >need to be exported any longer. > >Sign

[PATCH v2 08/10] accel/tcg/cpu-exec: Unexport dump_drift_info()

2022-05-20 Thread Bernhard Beschow
Commit 3a841ab53f165910224dc4bebabf1a8f1d04200c 'qapi: introduce x-query-jit QMP command' basically moved the only function using dump_drift_info() to cpu-exec.c. Therefore, dump_drift_info() doesn't need to be exported any longer. Signed-off-by: Bernhard Beschow --- accel/tcg/cpu-exec.c | 2 +

[PATCH v2 03/10] hw/i386/pc: Unexport PC_CPU_MODEL_IDS macro

2022-05-20 Thread Bernhard Beschow
The macro seems to be used only internally, so remove it. Signed-off-by: Bernhard Beschow Acked-by: Michael S. Tsirkin --- hw/i386/pc.c | 9 + include/hw/i386/pc.h | 8 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c914

[PATCH v2 06/10] hw/ppc/e500: Remove unused BINARY_DEVICE_TREE_FILE

2022-05-20 Thread Bernhard Beschow
Commit 28290f37e20cda27574f15be9e9499493e3d0fe8 'PPC: E500: Generate device tree on reset' improved device tree generation and made BINARY_DEVICE_TREE_FILE obsolete. Signed-off-by: Bernhard Beschow Reviewed-by: Daniel Henrique Barboza --- hw/ppc/e500.c | 1 - 1 file changed, 1 deletion(-) diff

[PATCH v2 09/10] accel/tcg: Inline dump_opcount_info() and remove it

2022-05-20 Thread Bernhard Beschow
dump_opcount_info() is a one-line wrapper around tcg_dump_op_count() which is also exported. So use the latter directly. Signed-off-by: Bernhard Beschow --- accel/tcg/cpu-exec.c | 2 +- accel/tcg/translate-all.c | 5 - include/exec/cpu-all.h| 1 - 3 files changed, 1 insertion(+), 7

[PATCH v2 02/10] hw/audio/cs4231a: Const'ify global tables

2022-05-20 Thread Bernhard Beschow
The tables contain spcifically crafted constants for algorithms, so make them immutable. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé --- hw/audio/cs4231a.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c

[PATCH v2 05/10] hw/i386/pc: Remove orphan declarations

2022-05-20 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow Acked-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index cb491fc43b..9c1d1c0a7c 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -170,9 +170,6 @@ vo

[PATCH v2 04/10] hw/i386/pc: Unexport functions used only internally

2022-05-20 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Acked-by: Michael S. Tsirkin --- hw/i386/pc.c | 4 ++-- include/hw/i386/pc.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2ffaac52fb..d7583045a0 100644 --- a/

[PATCH v2 01/10] hw: Reuse TYPE_I8042 define

2022-05-20 Thread Bernhard Beschow
TYPE_I8042 is exported, so reuse it for consistency. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 4 ++-- hw/sparc64/sun4u.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 7c39c91335..c914a

[PATCH v2 00/10] Random cleanup patches

2022-05-20 Thread Bernhard Beschow
v2: * Omit removal of isa_connect_gpio_out() (Mark) v1: This patch series contains random cleanups that I made while studying the code. Bernhard Beschow (10): hw: Reuse TYPE_I8042 define hw/audio/cs4231a: Const'ify global tables hw/i386/pc: Unexport PC_CPU_MODEL_IDS macro hw/i386/pc: Unex

Re: [PATCH v6 4/8] KVM: Extend the memslot to support fd-based private memory

2022-05-20 Thread Andy Lutomirski
On 5/19/22 08:37, Chao Peng wrote: Extend the memslot definition to provide guest private memory through a file descriptor(fd) instead of userspace_addr(hva). Such guest private memory(fd) may never be mapped into userspace so no userspace_addr(hva) can be used. Instead add another two new fields

[PATCH 0/2] QOM improvements for rtc/mc146818rtc

2022-05-20 Thread Bernhard Beschow
This little series enhances QOM support for mc146818rtc: * makes microvm-dt respect mc146818rtc's IRQ number set by QOM property and * adds an io_base QOM property similar to other ISA devices Bernhard Beschow (2): hw/i386/microvm-dt: Determine mc146818rtc's IRQ number from QOM property rt

[PATCH 1/2] hw/i386/microvm-dt: Determine mc146818rtc's IRQ number from QOM property

2022-05-20 Thread Bernhard Beschow
Since commit 3b004a16540aa41f2aa6a1ceb0bf306716766914 'hw/rtc/ mc146818rtc: QOM'ify IRQ number' mc146818rtc's IRQ number is configurable. Fix microvm-dt to respect its value. Signed-off-by: Bernhard Beschow --- hw/i386/microvm-dt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH 2/2] rtc/mc146818rtc: QOM'ify io_base offset

2022-05-20 Thread Bernhard Beschow
Exposing the io_base offset as a QOM property not only allows it to be configurable but also to be displayed in HMP: Before: (qemu) info qtree ... dev: mc146818rtc, id "" gpio-out "" 1 base_year = 0 (0x0) irq = 8 (0x8) lost_tick_pol

[PATCH 1/3] target/ppc: Move tlbie to decode tree

2022-05-20 Thread Leandro Lupori
Also decode RIC, PRS and R operands. Signed-off-by: Leandro Lupori --- target/ppc/cpu_init.c| 4 +- target/ppc/insn32.decode | 7 ++ target/ppc/translate.c | 42 +- target/ppc/translate/storage-ctrl-impl.c.inc | 81 +

[PATCH 3/3] target/ppc: Implement ISA 3.00 tlbie[l]

2022-05-20 Thread Leandro Lupori
This initial version supports the invalidation of one or all TLB entries. Flush by PID/LPID, or based in process/partition scope is not supported, because it would make using the generic QEMU TLB implementation hard. In these cases, all entries are flushed. Signed-off-by: Leandro Lupori --- targ

[PATCH 2/3] target/ppc: Move tlbiel to decode tree

2022-05-20 Thread Leandro Lupori
Also decode RIC, PRS and R operands. Signed-off-by: Leandro Lupori --- target/ppc/insn32.decode | 1 + target/ppc/translate.c | 22 target/ppc/translate/storage-ctrl-impl.c.inc | 16 +- 3 files changed, 12 insertions(+),

[PATCH 0/3] ppc: Implement ISA 3.00 tlbie[l]

2022-05-20 Thread Leandro Lupori
Add support for ISA 3.00 tlbie/tlbiel instructions, with RIC, PRS and R operands. Also, for Radix MMU, add support for the TLB invalidation of a single page. Flush by PID/LPID, or based in process/partition scope is not supported, because it would make using the generic QEMU TLB implementation har

[RFC PATCH 2/2] arm/virt: Add aspeed-i2c controller and MCTP EP to enable MCTP testing

2022-05-20 Thread Jonathan Cameron via
As the only I2C emulation in QEMU that supports being both a master and a slave, suitable for MCTP over i2c is aspeed-i2c add this controller to the arm virt model and hook up our new i2c_mctp_cxl_fmapi device. The current Linux driver for aspeed-i2c has a hard requirement on a reset controller.

[RFC PATCH 1/2] misc/i2c_mctp_cxl_fmapi: Initial device emulation

2022-05-20 Thread Jonathan Cameron via
The Fabric Manager API is used to configure CXL switches and devices. DMTF has defined an MCTP binding specification to carry these messages. Then end goal of this work is to hook this up to an emulated CXL switch and allow control of the switch configuration. For now it's stand alone to show how

[RFC PATCH 0/2] CXL FMAPI interface over MCTP/I2C

2022-05-20 Thread Jonathan Cameron via
A quick PoC to show the feasibility of emulating the CXL 2.0 Fabric Manager API over MCTP over I2C as possible path to standards based configuration of emulated CXL switches. Lots of missing parts (such as hooking this up to the upstream ports or making it actually do anything useful), but it's en

[RFC PATCH 0/2] CXL FMAPI interface over MCTP/I2C

2022-05-20 Thread Jonathan Cameron via
A quick PoC to show the feasibility of emulating the CXL 2.0 Fabric Manager API over MCTP over I2C as possible path to standards based configuration of emulated CXL switches. Lots of missing parts (such as hooking this up to the upstream ports or making it actually do anything useful), but it's en

Re: [PATCH v4 5/8] target/ppc: Implemented xvf16ger*

2022-05-20 Thread Lucas Mateus Martins Araujo e Castro
On 20/05/2022 12:47, Richard Henderson wrote: On 5/20/22 06:51, Lucas Mateus Castro(alqotel) wrote: +    if (acc) { +    aux_acc = at[i].VsrSF(j); +    if (!neg_mul && !neg_acc) { +    r = float32_add(r, aux_acc, excp_ptr); + 

[PATCH v11 2/2] qtest/cxl: Add aarch64 virt test for CXL

2022-05-20 Thread Jonathan Cameron via
Add a single complex case for aarch64 virt machine. Signed-off-by: Jonathan Cameron --- tests/qtest/cxl-test.c | 48 + tests/qtest/meson.build | 1 + 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/tests/qtest/cxl-test.c b/tests/qtest/cxl

[PATCH v11 1/2] hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl

2022-05-20 Thread Jonathan Cameron via
Code based on i386/pc enablement. The memory layout places space for 16 host bridge register regions after the GIC_REDIST2 in the extended memmap. The CFMWs are placed above the extended memmap. Only create the CEDT table if cxl=on set for the machine. Signed-off-by: Jonathan Cameron Signed-off-

  1   2   >