[PATCH v3 1/1] target/riscv: Add Zihintpause support

2022-06-07 Thread Dao Lu
Tested-by: Heiko Stuebner Signed-off-by: Dao Lu --- target/riscv/cpu.c | 2 ++ target/riscv/cpu.h | 1 + target/riscv/insn32.decode | 7 ++- target/riscv/insn_trans/trans_rvi.c.inc | 18 ++ 4 files changed, 27 insertio

Re: [RFC PATCH v8 09/21] vhost: Add svq copy desc mode

2022-06-07 Thread Jason Wang
在 2022/5/20 03:12, Eugenio Pérez 写道: Enable SVQ to not to forward the descriptor translating its address to qemu's IOVA but copying to a region outside of the guest. Virtio-net control VQ will use this mode, so we don't need to send all the guest's memory every time there is a change, but only

Re: [RFC PATCH v8 11/21] vhost: Update kernel headers

2022-06-07 Thread Jason Wang
在 2022/5/20 03:12, Eugenio Pérez 写道: Signed-off-by: Eugenio Pérez --- It's better to use the helpers in scripts/ and mentioned to which version is this synced. Thanks include/standard-headers/linux/vhost_types.h | 11 - linux-headers/linux/vhost.h | 25

Re: [RFC PATCH v8 12/21] vdpa: delay set_vring_ready after DRIVER_OK

2022-06-07 Thread Jason Wang
在 2022/5/20 03:12, Eugenio Pérez 写道: To restore the device in the destination of a live migration we send the commands through control virtqueue. For a device to read CVQ it must have received DRIVER_OK status bit. However this open a window where the device could start receiving packets in rx

Re: [RFC PATCH v8 14/21] vhost: Make possible to check for device exclusive vq group

2022-06-07 Thread Jason Wang
在 2022/5/20 03:12, Eugenio Pérez 写道: CVQ needs to be in its own group, not shared with any data vq. Enable the checking of it here, before introducing address space id concepts. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost.h | 2 + hw/net/vhost_net.c| 4 +- hw/virtio

[PATCH v4 01/11] target/mips: Use an exception for semihosting

2022-06-07 Thread Richard Henderson
Within do_interrupt, we hold the iothread lock, which is required for Chardev access for the console, and for the round trip for use_gdb_syscalls(). Signed-off-by: Richard Henderson --- target/mips/cpu.h | 3 ++- target/mips/tcg/tcg-internal.h| 2 ++ target/

[PATCH v4 00/11] target/mips: semihosting cleanup

2022-06-07 Thread Richard Henderson
Based-on: <20220607204557.658541-1-richard.hender...@linaro.org> ("[PATCH v4 00/53] semihosting cleanup") Changes for v4: * Split out of v2. * Undo the gdb errno thing; continue to convert between host and uhi. r~ Richard Henderson (11): target/mips: Use an exception for semihosting ta

[PATCH v4 09/11] semihosting: Remove qemu_semihosting_log_out

2022-06-07 Thread Richard Henderson
The function is no longer used. Signed-off-by: Richard Henderson --- include/semihosting/console.h | 13 - semihosting/console.c | 9 - 2 files changed, 22 deletions(-) diff --git a/include/semihosting/console.h b/include/semihosting/console.h index 61b0cb3a94..bd78

[PATCH v4 06/11] target/mips: Use semihosting/syscalls.h

2022-06-07 Thread Richard Henderson
This separates guest file descriptors from host file descriptors, and utilizes shared infrastructure for integration with gdbstub. Signed-off-by: Richard Henderson --- target/mips/tcg/sysemu/mips-semi.c | 219 + 1 file changed, 95 insertions(+), 124 deletions(-) diff

[PATCH v4 02/11] target/mips: Add UHI errno values

2022-06-07 Thread Richard Henderson
>From the Unified Hosting Interface, MD01069 Reference Manual, version 1.1.6, 06 July 2015. Signed-off-by: Richard Henderson --- target/mips/tcg/sysemu/mips-semi.c | 40 ++ 1 file changed, 40 insertions(+) diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mip

[PATCH v4 08/11] target/mips: Use error_report for UHI_assert

2022-06-07 Thread Richard Henderson
Always log the assert locally. Do not report_fault, but instead include the fact of the fault in the assertion. Don't bother freeing allocated strings before the abort(). Signed-off-by: Richard Henderson --- target/mips/tcg/sysemu/mips-semi.c | 39 ++ 1 file changed,

[PATCH v4 03/11] target/mips: Create report_fault for semihosting

2022-06-07 Thread Richard Henderson
The UHI specification does not have an EFAULT value, and further specifies that "undefined UHI operations should not return control to the target". So, log the error and abort. Signed-off-by: Richard Henderson --- target/mips/tcg/sysemu/mips-semi.c | 33 ++ 1 file ch

Re: [External] [PATCH v13 3/8] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-06-07 Thread Leonardo Bras Soares Passos
Hello 徐闯, Thanks for reviewing! On Wed, Jun 1, 2022 at 6:37 AM 徐闯 wrote: [...] > Hi, Leonardo. I'm also paying attention to the application of > MSG_ZEROCOPY in live migration recently. I noticed that you defined a > member `zero_copy_queued` in the struct QIOChannelSocket, but I can't > find ou

[PATCH v4 04/11] target/mips: Drop link syscall from semihosting

2022-06-07 Thread Richard Henderson
We don't implement it with _WIN32 hosts, and the syscall is missing from the gdb remote file i/o interface. Since we can't implement it universally, drop it. Signed-off-by: Richard Henderson --- target/mips/tcg/sysemu/mips-semi.c | 9 - 1 file changed, 9 deletions(-) diff --git a/target

[PATCH v4 07/11] target/mips: Avoid qemu_semihosting_log_out for UHI_plog

2022-06-07 Thread Richard Henderson
Use semihost_sys_write and/or qemu_semihosting_console_write for implementing plog. When using gdbstub, copy the temp string below the stack so that gdb has a guest address from which to perform the log. Signed-off-by: Richard Henderson --- target/mips/tcg/sysemu/mips-semi.c | 52 ++

[PATCH v4 10/11] target/mips: Simplify UHI_argnlen and UHI_argn

2022-06-07 Thread Richard Henderson
With semihosting_get_arg, we already have a check vs argc, so there's no point replicating it -- just check the result vs NULL. Merge copy_argn_to_target into its caller. Signed-off-by: Richard Henderson --- target/mips/tcg/sysemu/mips-semi.c | 44 ++ 1 file changed,

[PATCH v4 05/11] target/mips: Drop pread and pwrite syscalls from semihosting

2022-06-07 Thread Richard Henderson
We don't implement it with _WIN32 hosts, and the syscalls are missing from the gdb remote file i/o interface. Since we can't implement them universally, drop them. Signed-off-by: Richard Henderson --- target/mips/tcg/sysemu/mips-semi.c | 39 ++ 1 file changed, 7 inser

[PATCH v4 11/11] target/mips: Remove GET_TARGET_STRING and FREE_TARGET_STRING

2022-06-07 Thread Richard Henderson
Inline these macros into the only two callers. Signed-off-by: Richard Henderson --- target/mips/tcg/sysemu/mips-semi.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mips/tcg/sysemu/mips-semi.c index b

[PATCH v4 0/2] target/xtensa: semihosting cleanup

2022-06-07 Thread Richard Henderson
Based-on: <20220607204557.658541-1-richard.hender...@linaro.org> ("[PATCH v4 00/53] semihosting cleanup") Changes for v4: * Split out of v2. * Undo the gdb errno thing; continue to convert between host and xtensa. r~ Richard Henderson (2): target/xtensa: Use an exception for semihosting

[PATCH v4 2/2] target/xtensa: Use semihosting/syscalls.h

2022-06-07 Thread Richard Henderson
This separates guest file descriptors from host file descriptors, and utilizes shared infrastructure for integration with gdbstub. Remove the xtensa custom console handing and rely on the generic -semihosting-config handling of chardevs. Signed-off-by: Richard Henderson --- target/xtensa/cpu.h

[PATCH v4 1/2] target/xtensa: Use an exception for semihosting

2022-06-07 Thread Richard Henderson
Within do_interrupt, we hold the iothread lock, which is required for Chardev access for the console, and for the round trip for use_gdb_syscalls(). Signed-off-by: Richard Henderson --- target/xtensa/cpu.h | 2 ++ target/xtensa/helper.h | 3 --- target/xtensa/exc_helper.c | 4

Re: [External] [PATCH v13 3/8] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-06-07 Thread Leonardo Bras Soares Passos
Hello Peter, On Wed, Jun 1, 2022 at 10:58 AM Peter Xu wrote: > [...] > > Hi, Leonardo. I'm also paying attention to the application of MSG_ZEROCOPY > > in live migration recently. I noticed that you defined a member > > `zero_copy_queued` in the struct QIOChannelSocket, but I can't find out > > w

Re: [PATCH v3 2/4] docs: rSTify MailingLists wiki; move it to QEMU Git

2022-06-07 Thread Thomas Huth
On 06/06/2022 18.43, Kashyap Chamarthy wrote: This document is referred to from the GettingStartedDevelopers wiki which will be rSTified in a follow-up commit. Converted from Mediawiki to rST using: $> pandoc -f Mediawiki -t rst MailingLists.wiki -o mailing-lists.rst The only cha

Re: [PATCH v3 4/4] Add a new doc "contacting-the-project.rst"

2022-06-07 Thread Thomas Huth
On 06/06/2022 18.43, Kashyap Chamarthy wrote: This document slightly duplicates the "support"[1] page here, but largely refers to the content in[1]. This is based on Peter Maydell's feedback[2] in v2: "there is some merit in the documentation being standalone, even if it does mean a bit of dupli

Re: [RFC PATCH v8 00/21] Net Control VQ support with asid in vDPA SVQ

2022-06-07 Thread Jason Wang
在 2022/5/20 03:12, Eugenio Pérez 写道: Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. Shadow VirtQueue (SVQ) already makes possible migration of virtqueue states, effectively intercepting

[PATCH v3] target/riscv: Don't expose the CPU properties on names CPUs

2022-06-07 Thread Alistair Francis
From: Alistair Francis There are currently two types of RISC-V CPUs: - Generic CPUs (base or any) that allow complete custimisation - "Named" CPUs that match existing hardware Users can use the base CPUs to custimise the extensions that they want, for example -cpu rv64,v=true. We originally e

[PATCH] hw/riscv: boot: Reduce FDT address alignment constraints

2022-06-07 Thread Alistair Francis
From: Alistair Francis We previously stored the device tree at a 16MB alignment from the end of memory (or 3GB). This means we need at least 16MB of memory to be able to do this. We don't actually need the FDT to be 16MB aligned, so let's drop it down to 2MB so that we can support systems with le

Re: [PATCH] hw/riscv: boot: Reduce FDT address alignment constraints

2022-06-07 Thread Bin Meng
+Atish On Wed, Jun 8, 2022 at 2:20 PM Alistair Francis wrote: > > From: Alistair Francis > > We previously stored the device tree at a 16MB alignment from the end of > memory (or 3GB). This means we need at least 16MB of memory to be able > to do this. We don't actually need the FDT to be 16MB a

Re: [External] [PATCH v13 3/8] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-06-07 Thread chuang xu
On 2022/6/8 下午1:24, Leonardo Bras Soares Passos wrote: I will send a fix shortly. Is that ok if I include a "Reported-by: 徐闯 " in the patch? okay. Best Regards, chuang xu

<    1   2   3   4