[PATCH] Use io_uring_register_ring_fd() to skip fd operations

2022-04-18 Thread Sam Li
Linux recently added a new io_uring(7) optimization API that QEMU doesn't take advantage of yet. The liburing library that QEMU uses has added a corresponding new API calling io_uring_register_ring_fd(). When this API is called after creating the ring, the io_uring_submit() library function passes

Re: [PATCH for-7.1] hw/block/fdc-sysbus: Always mark sysbus floppy controllers as not having DMA

2022-04-18 Thread Mark Cave-Ayland
On 12/04/2022 17:49, Peter Maydell wrote: The sysbus floppy controllers (devices sysbus-fdc and sun-fdtwo) don't support DMA. The core floppy controller code expects this to be indicated by setting FDCtrl::dma_chann to -1. This used to be done in the device instance_init functions sysbus_fdc_i

Re: [PATCH] qga/vss-win32: enable qga-vss.tlb generation with widl

2022-04-18 Thread Marc-André Lureau
Hi Helge On Sun, Apr 17, 2022 at 6:51 PM Helge Konetzka wrote: > Generation with widl needs to be triggered explicitly and requires > library and include directories containing referenced *.idl and *.tlb > as parameters. > Ok, that's different issues, it would help to split the patch. > > Sig

Re: [PATCH] Use io_uring_register_ring_fd() to skip fd operations

2022-04-18 Thread Damien Le Moal
On 2022/04/18 16:52, Sam Li wrote: > Linux recently added a new io_uring(7) optimization API that QEMU > doesn't take advantage of yet. The liburing library that QEMU uses > has added a corresponding new API calling io_uring_register_ring_fd(). > When this API is called after creating the ring, the

RE: [RFC 00/18] vfio: Adopt iommufd

2022-04-18 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, April 14, 2022 6:47 PM > > With the introduction of iommufd[1], the linux kernel provides a generic > interface for userspace drivers to propagate their DMA mappings to kernel > for assigned devices. This series does the porting of the VFIO devices > onto the /

Re: [PATCH v1 35/43] hw/intc: Add LoongArch extioi interrupt controller(EIOINTC)

2022-04-18 Thread Mark Cave-Ayland
On 18/04/2022 04:48, Richard Henderson wrote: On 4/15/22 02:40, Xiaojuan Yang wrote: +    memory_region_init(&s->mmio[cpu], OBJECT(s), +   "loongarch_extioi", EXTIOI_SIZE); + +    memory_region_init_io(&s->mmio_nodetype[cpu], OBJECT(s), + 

[PATCH 2/2] Use io_ring_register_ring_fd() to skip fd operations

2022-04-18 Thread Sam Li
fix code style issue. Signed-off-by: Sam Li --- block/io_uring.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/block/io_uring.c b/block/io_uring.c index 2942967126..57745ecfa1 100644 --- a/block/io_uring.c +++ b/block/io_uring.c @@ -436,10 +436,15 @@ LuringState *l

Re: [RFC PATCH 0/4] 9pfs: Add 9pfs support for Windows host

2022-04-18 Thread Mark Cave-Ayland
On 17/04/2022 13:55, Christian Schoenebeck wrote: On Donnerstag, 14. April 2022 19:25:04 CEST Shi, Guohuai wrote: -Original Message- From: Christian Schoenebeck Sent: 2022年4月14日 19:24 To: qemu-devel@nongnu.org; Shi, Guohuai Cc: Bin Meng ; Greg Kurz Subject: Re: [RFC PATCH 0/4] 9pfs:

Re: [PATCH v1 33/43] hw/intc: Add LoongArch ls7a interrupt controller support(PCH-PIC)

2022-04-18 Thread yangxiaojuan
Hi, Richard On 2022/4/18 上午11:15, Richard Henderson wrote: On 4/15/22 02:40, Xiaojuan Yang wrote: +static void pch_pic_update_irq(LoongArchPCHPIC *s, uint32_t mask, +   int level, int hi) +{ +    uint32_t val, irq; + +    if (level == 1) { +    if (hi) { +   

Re: [RFC PATCH v5 06/23] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-04-18 Thread Eugenio Perez Martin
On Thu, Apr 14, 2022 at 5:42 AM Jason Wang wrote: > > > 在 2022/4/8 21:33, Eugenio Pérez 写道: > > Finally offering the possibility to enable SVQ from the command line. > > > > Signed-off-by: Eugenio Pérez > > --- > > qapi/net.json| 9 - > > net/vhost-vdpa.c | 48

Re: [RFC PATCH v7 08/25] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-04-18 Thread Eugenio Perez Martin
On Thu, Apr 14, 2022 at 7:32 AM Jason Wang wrote: > > > 在 2022/4/14 00:31, Eugenio Pérez 写道: > > Finally offering the possibility to enable SVQ from the command line. > > > > Signed-off-by: Eugenio Pérez > > --- > > qapi/net.json| 9 - > > net/vhost-vdpa.c | 48 +++

Re: [RFC PATCH v7 16/25] vdpa: control virtqueue support on shadow virtqueue

2022-04-18 Thread Eugenio Perez Martin
On Thu, Apr 14, 2022 at 11:10 AM Jason Wang wrote: > > On Thu, Apr 14, 2022 at 12:32 AM Eugenio Pérez wrote: > > > > Introduce the control virtqueue support for vDPA shadow virtqueue. This > > is needed for advanced networking features like multiqueue. > > > > To demonstrate command handling, VIR

Re: [PATCH 24/26] 9p: add missing coroutine_fn annotations

2022-04-18 Thread Christian Schoenebeck
On Freitag, 15. April 2022 15:18:58 CEST Paolo Bonzini wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Acked-by: Greg Kurz > Signed-off-by: Paolo Bonzini > --- I would have expected more been missing, anyway ... Reviewed-by: Christian Schoenebeck Best regards, Chris

Re: [PATCH 3/3] docs: parallels image format supports consistency checks

2022-04-18 Thread Denis V. Lunev
On 18.04.2022 14:04, Natalia Kuzmina wrote: Add parallels to list of formats that support consistency checks by qemu-img check. Signed-off-by: Natalia Kuzmina --- docs/tools/qemu-img.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tools/qemu-img.rst b/docs/tools/

Re: [PATCH 1/3] qemu-img check: fixing duplicated clusters for parallels format

2022-04-18 Thread Denis V. Lunev
On 18.04.2022 14:04, Natalia Kuzmina wrote: Let qemu-img check fix corruption in the image file: two guest memory areas refer to the same host memory area (duplicated offsets in BAT). The code below requires big fat comment, what is reversed BAT, why it is needed and how it helps us to detect th

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-18 Thread Yi Liu
Hi Kevin, On 2022/4/18 16:49, Tian, Kevin wrote: From: Liu, Yi L Sent: Thursday, April 14, 2022 6:47 PM With the introduction of iommufd[1], the linux kernel provides a generic interface for userspace drivers to propagate their DMA mappings to kernel for assigned devices. This series does the

Re: [RFC PATCH 0/4] 9pfs: Add 9pfs support for Windows host

2022-04-18 Thread Christian Schoenebeck
On Montag, 18. April 2022 11:07:33 CEST Mark Cave-Ayland wrote: > On 17/04/2022 13:55, Christian Schoenebeck wrote: > > On Donnerstag, 14. April 2022 19:25:04 CEST Shi, Guohuai wrote: > >>> -Original Message- > >>> From: Christian Schoenebeck > >>> Sent: 2022年4月14日 19:24 > >>> To: qemu-dev

Re: [PATCH v1 25/43] target/loongarch: Add LoongArch CSR instruction

2022-04-18 Thread yangxiaojuan
On 2022/4/16 上午9:04, Richard Henderson wrote: +int cpu_csr_offset(unsigned csr_num); ... +static const uint64_t csr_offsets[] = { There's no reason for this array to be uint64_t. It really should match the function. Yes,  we shoud do this. If we use 'int', we may get a warning: ../target/

[PATCH 0/3] Repair duplicated clusters in parallels image

2022-04-18 Thread Natalia Kuzmina
Parallels image file can be corrupted this way: two guest memory areas refer to the same host memory area (duplicated offsets in BAT). qemu-img check copies data from duplicated cluster to the new cluster and writes new corresponding offset to BAT instead of duplicated one. Test 314 uses sample c

[PATCH 2/3] iotests: 314 test on duplicated clusters (parallels format)

2022-04-18 Thread Natalia Kuzmina
Reading from duplicated offset and from original offset returns the same data. After repairing changing either of these blocks of data does not affect another one. Signed-off-by: Natalia Kuzmina --- tests/qemu-iotests/314| 88 ++ tests/qemu-iotests/314.ou

[PATCH 1/3] qemu-img check: fixing duplicated clusters for parallels format

2022-04-18 Thread Natalia Kuzmina
Let qemu-img check fix corruption in the image file: two guest memory areas refer to the same host memory area (duplicated offsets in BAT). Signed-off-by: Natalia Kuzmina --- block/parallels.c | 66 +-- 1 file changed, 64 insertions(+), 2 deletions(-)

[PATCH 3/3] docs: parallels image format supports consistency checks

2022-04-18 Thread Natalia Kuzmina
Add parallels to list of formats that support consistency checks by qemu-img check. Signed-off-by: Natalia Kuzmina --- docs/tools/qemu-img.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst index 8885ea11cf..14e98df34f 100644

Re: [PATCH] target/rx: set PSW.I when executing wait instruction

2022-04-18 Thread Yoshinori Sato
On Sun, 17 Apr 2022 13:59:38 +0900, Tomoaki Kawada wrote: > > This patch fixes the implementation of the wait instruction to > implicitly update PSW.I as required by the ISA specification. > > Signed-off-by: Tomoaki Kawada > --- > target/rx/op_helper.c | 1 + > 1 file changed, 1 insertion(+) >

Re: [PATCH] target/rx: update PC correctly in wait instruction

2022-04-18 Thread Yoshinori Sato
On Sun, 17 Apr 2022 15:02:25 +0900, Tomoaki Kawada wrote: > > `cpu_pc` at this point does not necessary point to the current > instruction (i.e., the wait instruction being translated), so it's > incorrect to calculate the new value of `cpu_pc` based on this. It must > be updated with `ctx->base.p

Re: [PATCH] target/rx: swap stack pointers on clrpsw/setpsw instruction

2022-04-18 Thread Yoshinori Sato
On Sat, 16 Apr 2022 12:20:09 +0900, Tomoaki Kawada wrote: > > The control register field PSW.U determines which stack pointer register > (ISP or USP) is mapped as R0. In QEMU, this is implemented by having a > value copied between ISP or USP and R0 whenever PSW.U is updated or > access to ISP/USP

[GSoC] Adding RPi4 support to qemu-system-aarch64

2022-04-18 Thread Afront
Hi, I would like to propose adding RPi4 to the list of supported machines for `qemu-system-aarch64` as my GSoC project, but I'm not sure if it's a suitable idea for GSoC since it might be too simple. In addition, there is already ongoing progress here

Re: [RFC PATCH v7 19/25] vhost: Add vhost_svq_inject

2022-04-18 Thread Eugenio Perez Martin
On Thu, Apr 14, 2022 at 11:10 AM Jason Wang wrote: > > On Thu, Apr 14, 2022 at 12:32 AM Eugenio Pérez wrote: > > > > This allows qemu to inject packets to the device without guest's notice. s/packets/buffers/ actually. > > Does it mean it can support guests without _F_ANNOUNCE? > Technically i

Re: [RFC PATCH v7 24/25] vdpa: Add asid attribute to vdpa device

2022-04-18 Thread Eugenio Perez Martin
On Thu, Apr 14, 2022 at 11:10 AM Jason Wang wrote: > > On Thu, Apr 14, 2022 at 12:33 AM Eugenio Pérez wrote: > > > > We can configure ASID per group, but we still use asid 0 for every vdpa > > device. Multiple asid support for cvq will be introduced in next > > patches > > > > Signed-off-by: Euge

Re: [RFC PATCH v7 25/25] vdpa: Add x-cvq-svq

2022-04-18 Thread Eugenio Perez Martin
On Thu, Apr 14, 2022 at 11:10 AM Jason Wang wrote: > > On Thu, Apr 14, 2022 at 12:33 AM Eugenio Pérez wrote: > > > > This isolates shadow cvq in its own group. > > > > Signed-off-by: Eugenio Pérez > > --- > > qapi/net.json| 8 +++- > > net/vhost-vdpa.c | 98

Re: [PATCH v1 25/43] target/loongarch: Add LoongArch CSR instruction

2022-04-18 Thread Richard Henderson
On 4/18/22 05:38, yangxiaojuan wrote: On 2022/4/16 上午9:04, Richard Henderson wrote: +int cpu_csr_offset(unsigned csr_num); ... +static const uint64_t csr_offsets[] = { There's no reason for this array to be uint64_t. It really should match the function. Yes,  we shoud do this. If we use

Re: [PATCH v1 33/43] hw/intc: Add LoongArch ls7a interrupt controller support(PCH-PIC)

2022-04-18 Thread Richard Henderson
On 4/18/22 02:14, yangxiaojuan wrote: Hi, Richard On 2022/4/18 上午11:15, Richard Henderson wrote: On 4/15/22 02:40, Xiaojuan Yang wrote: +static void pch_pic_update_irq(LoongArchPCHPIC *s, uint32_t mask, +   int level, int hi) +{ +    uint32_t val, irq; + +    if (le

Re: [PATCH v1 36/43] hw/loongarch: Add irq hierarchy for the system

2022-04-18 Thread Richard Henderson
On 4/15/22 02:40, Xiaojuan Yang wrote: This patch add the irq hierarchy for the virt board. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/loongson3.c | 106 +++ 1 file changed, 106 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH 0/3] qapi-schema: support alternates with array type

2022-04-18 Thread Paolo Bonzini
On 4/4/22 14:13, Markus Armbruster wrote: Paolo Bonzini writes: As suggested in the review of the statistics subsystem. Queued for 7.1, thanks! Thanks, I will follow up with the stats patches after these land. Paolo

Re: [PATCH 1/3] qapi-schema: support alternates with array type

2022-04-18 Thread Paolo Bonzini
On 3/22/22 10:48, Markus Armbruster wrote: I double-checked the generated code; it looks good to me. Thanks for implementing this, and extra thanks for the tests! Heh, the problem is having to build the infrastructure for tests. If it's already there, patches like this are actually easier to

Question about direct block chaining

2022-04-18 Thread Taylor Simpson
I've been working on speeding up the Hexagon target by using direct block chaining. Due to Hexagon's VLIW packet semantics (possibly multiple branches in a packet, not processing change-of-flow until packet commit), we have historically treated all change-of-flow as indirect. I looked at the d

Re: [PATCH v1 40/43] hw/loongarch: Add LoongArch boot code and load elf function.

2022-04-18 Thread Richard Henderson
On 4/15/22 02:40, Xiaojuan Yang wrote: +static void ls3a5k_aui_boot(uint64_t start_addr) +{ +unsigned int ls3a5k_aui_boot_code[] = { +0x1864, /* pcaddi $r4, 0x3*/ +0x28c00084, /* ld.d$r4, $r4, 0 */ +0x4c80, /* jirl$r0, $r4, 0 */ +start_addr

Re: [PATCH v1 42/43] tests/tcg/loongarch64: Add hello/memory test in loongarch64 system

2022-04-18 Thread Richard Henderson
On 4/15/22 02:40, Xiaojuan Yang wrote: - We write a very minimal softmmu harness. - This is a very simple smoke test with no need to run a full Linux/kernel. - The Makefile.softmmu-target record the rule to run. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS

Re: Question about direct block chaining

2022-04-18 Thread Richard Henderson
On 4/18/22 07:54, Taylor Simpson wrote: I implemented both approaches for inner loops and didn't see speedup in my benchmark. So, I have a couple of questions 1) What are the pros and cons of the two approaches (lookup_and_goto_ptr and goto_tb + exit_tb)? goto_tb can only be used within a si

[PATCH for-7.1 00/10] BCDA and mffscdrn implementations

2022-04-18 Thread Víctor Colombo
Set of patches containing implementations for some instructions that were missing before. Also, moves some related instructions to decodetree Matheus Ferst (4): target/ppc: Add flag for ISA v2.06 BCDA instructions target/ppc: implement addg6s target/ppc: implement cbcdtd target/ppc: implem

[PATCH for-7.1 04/10] target/ppc: Move mffsce to decodetree

2022-04-18 Thread Víctor Colombo
Signed-off-by: Víctor Colombo --- target/ppc/insn32.decode | 1 + target/ppc/translate/fp-impl.c.inc | 45 +++--- target/ppc/translate/fp-ops.c.inc | 2 -- 3 files changed, 18 insertions(+), 30 deletions(-) diff --git a/target/ppc/insn32.decode b/target/ppc/i

[PATCH for-7.1 03/10] target/ppc: Move mffsl to decodetree

2022-04-18 Thread Víctor Colombo
Signed-off-by: Víctor Colombo --- target/ppc/insn32.decode | 4 target/ppc/translate/fp-impl.c.inc | 27 --- target/ppc/translate/fp-ops.c.inc | 2 -- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/target/ppc/insn32.decode b/target/ppc/i

[PATCH for-7.1 05/10] target/ppc: Move mffscrn[i] to decodetree

2022-04-18 Thread Víctor Colombo
Signed-off-by: Víctor Colombo --- target/ppc/insn32.decode | 8 +++ target/ppc/internal.h | 3 -- target/ppc/translate/fp-impl.c.inc | 80 ++ target/ppc/translate/fp-ops.c.inc | 4 -- 4 files changed, 23 insertions(+), 72 deletions(-) diff -

[PATCH for-7.1 01/10] target/ppc: Fix insn32.decode style issues

2022-04-18 Thread Víctor Colombo
Some lines in insn32.decode have inconsistent alignment when compared to others. Fix this by changing the alignment of some lines, making it more consistent throughout the file. Signed-off-by: Víctor Colombo --- target/ppc/insn32.decode | 24 1 file changed, 12 insertion

[PATCH for-7.1 07/10] target/ppc: Add flag for ISA v2.06 BCDA instructions

2022-04-18 Thread Víctor Colombo
From: Matheus Ferst Adds an insns_flags2 for the BCD assist instructions introduced in Power ISA 2.06. These instructions are not listed in the manuals for e5500[1] and e6500[2], so the flag is only added for POWER7/8/9/10 models. [1] https://www.nxp.com/files-static/32bit/doc/ref_manual/EREF_RM

[PATCH for-7.1 08/10] target/ppc: implement addg6s

2022-04-18 Thread Víctor Colombo
From: Matheus Ferst Implements the following Power ISA v2.06 instruction: addg6s: Add and Generate Sixes Signed-off-by: Matheus Ferst Signed-off-by: Víctor Colombo --- target/ppc/insn32.decode | 4 +++ target/ppc/translate/fixedpoint-impl.c.inc | 35 ++

[PATCH for-7.1 02/10] target/ppc: Move mffs[.] to decodetree

2022-04-18 Thread Víctor Colombo
Signed-off-by: Víctor Colombo --- target/ppc/insn32.decode | 7 +++ target/ppc/translate/fp-impl.c.inc | 25 + target/ppc/translate/fp-ops.c.inc | 1 - 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/target/ppc/insn32.decode b/target/ppc/ins

[PATCH for-7.1 10/10] target/ppc: implement cdtbcd

2022-04-18 Thread Víctor Colombo
From: Matheus Ferst Implements the Convert Declets To Binary Coded Decimal instruction. Since libdecnumber doesn't expose the methods for direct conversion (decDigitsFromDPD, DPD2BCD, etc), a positive decimal32 with zero exponent is used as an intermediate value to convert the declets. Signed-of

[PATCH for-7.1 09/10] target/ppc: implement cbcdtd

2022-04-18 Thread Víctor Colombo
From: Matheus Ferst Implements the Convert Binary Coded Decimal To Declets instruction. Since libdecnumber doesn't expose the methods for direct conversion (decDigitsToDPD, BCD2DPD, etc.), the BCD values are converted to decimal32 format, from which the declets are extracted. Where the behavior

[PATCH for-7.1 06/10] target/ppc: Implement mffscdrn[i] instructions

2022-04-18 Thread Víctor Colombo
Signed-off-by: Víctor Colombo --- target/ppc/insn32.decode | 5 + target/ppc/translate/fp-impl.c.inc | 35 ++ 2 files changed, 40 insertions(+) diff --git a/target/ppc/insn32.decode b/target/ppc/insn32.decode index 177aa49878..e16fad2853 100644 --- a/ta

[PATCH 0/3] AVX guest implementation

2022-04-18 Thread Paul Brook
Patch series to implement AXV/AVX2 guest support in TCG. All the system level code for this (cpid, xsave, wider registers, etc) already exists, we just need to implement the instruction translation. The majority of the new 256-bit operations operate on each 128-bit "lane" independently, so in the

[PATCH 1/4] Add AVX_EN hflag

2022-04-18 Thread Paul Brook
Add a new hflag bit to determine whether AVX instructions are allowed Signed-off-by: Paul Brook --- target/i386/cpu.h| 3 +++ target/i386/helper.c | 12 target/i386/tcg/fpu_helper.c | 1 + 3 files changed, 16 insertions(+) diff --git a/target/i386/cpu.h b/targ

[PATCH 3/4] Enable all x86-64 cpu features in user mode

2022-04-18 Thread Paul Brook
We don't have any migration concerns for usermode emulation, so we may as well enable all available CPU features by default. Signed-off-by: Paul Brook --- linux-user/x86_64/target_elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/x86_64/target_elf.h b/linux-use

Re: [ANNOUNCE] QEMU 7.0.0-rc4 is now available

2022-04-18 Thread Stefan Weil
Am 13.04.22 um 02:44 schrieb Michael Roth: A note from the maintainer: rc4 contains three fixes for late-breaking security bugs. The plan is to make the final 7.0 release in a week's time on the 19th April, with no further changes, unless we discover some last-minute catastrophic pro

[RFC PATCH v3 0/5] Port PPC64/PowerNV MMU tests to QEMU

2022-04-18 Thread Leandro Lupori
Changes from v2: - Added semihosting support for ppc64 - Use semihosting calls to exit tests, instead of using Processor Attention instruction - Use semihosting calls for console output, instead of programming emulated serial hardware Leandro Lupori (5): ppc64: Add semihosting support ppc64: F

[RFC PATCH v3 3/5] tests/tcg/ppc64: Add basic softmmu test support

2022-04-18 Thread Leandro Lupori
Add support to build and run the multiarch hello test, that simply prints a message and exits, through semihosting operations. The linker script was imported from https://github.com/legoater/pnv-test, that are the Microwatt tests adapted to use a PowerNV console. Boot.S code was inspired on mmu/he

[RFC PATCH v3 1/5] ppc64: Add semihosting support

2022-04-18 Thread Leandro Lupori
Add semihosting support for PPC64. This implementation is based on the standard for ARM semihosting version 2.0, as implemented by QEMU and documented in https://github.com/ARM-software/abi-aa/releases The PPC64 specific differences are the following: Semihosting Trap Instruction: sc 7 Opera

[RFC PATCH v3 2/5] ppc64: Fix semihosting on ppc64le

2022-04-18 Thread Leandro Lupori
PPC64 CPUs can change its endian dynamically, so semihosting code must check its MSR at run time to determine if byte swapping is needed. Signed-off-by: Leandro Lupori --- include/exec/softmmu-semi.h | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/inc

[RFC PATCH v3 5/5] tests/tcg/ppc64: Build PowerNV and LE tests

2022-04-18 Thread Leandro Lupori
Each Microwatt/PowerNV test use its own head.S file and thus needs different build rules. Also add rules to build and run all tests in LE mode. Signed-off-by: Leandro Lupori --- tests/tcg/ppc64/Makefile.softmmu-rules | 34 +++ tests/tcg/ppc64/Makefile.softmmu-target | 121

[RFC PATCH v3 4/5] tests/tcg/ppc64: Add MMU test sources

2022-04-18 Thread Leandro Lupori
Add MMU test sources, from https://github.com/legoater/pnv-test, based on Microwatt tests but with some adaptations. In particular, the tests that check updates to RC bits were removed, because, apparently, Microwatt never updates RC bits, but just raise an exception when they must be updated, lea

Re: [PATCH 2/4] TCG support for AVX

2022-04-18 Thread Peter Maydell
On Mon, 18 Apr 2022 at 18:48, Paul Brook wrote: > > Add TCG translation of guest AVX/AVX2 instructions > This comprises: > > * VEX encodings of most (all?) "legacy" SSE operations. > These typically add an extra source operand, and clear the unused half > of the destination register (SSE encod

Re: [PATCH 2/4] TCG support for AVX

2022-04-18 Thread Paul Brook
On Mon, 2022-04-18 at 20:33 +0100, Peter Maydell wrote: > On Mon, 18 Apr 2022 at 18:48, Paul Brook wrote: > > > > Add TCG translation of guest AVX/AVX2 instructions > > This comprises: > > > > Massively too large for a single patch, I'm afraid. This needs > to be split, probably into at least t

Re: [PATCH 2/4] TCG support for AVX

2022-04-18 Thread Peter Maydell
On Mon, 18 Apr 2022 at 20:45, Paul Brook wrote: > > On Mon, 2022-04-18 at 20:33 +0100, Peter Maydell wrote: > > On Mon, 18 Apr 2022 at 18:48, Paul Brook wrote: > > > > > > Add TCG translation of guest AVX/AVX2 instructions > > > This comprises: > > > > > > > Massively too large for a single patch

Re: [RFC PATCH v3 1/5] ppc64: Add semihosting support

2022-04-18 Thread Cédric Le Goater
On 4/18/22 21:10, Leandro Lupori wrote: Add semihosting support for PPC64. This implementation is based on the standard for ARM semihosting version 2.0, as implemented by QEMU and documented in https://github.com/ARM-software/abi-aa/releases The PPC64 specific differences are the following

Re: [RFC PATCH v3 3/5] tests/tcg/ppc64: Add basic softmmu test support

2022-04-18 Thread Cédric Le Goater
On 4/18/22 21:10, Leandro Lupori wrote: Add support to build and run the multiarch hello test, that simply prints a message and exits, through semihosting operations. The linker script was imported from https://github.com/legoater/pnv-test, that are the Microwatt tests adapted to use a PowerNV c

[PATCH v3 02/12] iotests/163: Fix broken qemu-io invocation

2022-04-18 Thread John Snow
The 'read' commands to qemu-io were malformed, and this invocation only worked by coincidence because the error messages were identical. Oops. There's no point in checking the patterning of the reference image, so just check the empty image by itself instead. (Note: as of this commit, nothing act

[PATCH v3 01/12] iotests: replace calls to log(qemu_io(...)) with qemu_io_log()

2022-04-18 Thread John Snow
This makes these callsites a little simpler, but the real motivation is a forthcoming commit will change the return type of qemu_io(), so removing users of the return value now is helpful. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz --- tests/qemu-iotests/242 | 6

[PATCH v3 09/12] iotests/image-fleecing: switch to qemu_io()

2022-04-18 Thread John Snow
This test expects failure ... but only sometimes. When? Why? It's for reads of a region not defined by a bitmap. Adjust the test to be more explicit about what it expects to fail and why. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz --- tests/qemu-iotests/tests/im

[PATCH v3 04/12] iotests/040: Don't check image pattern on zero-length image

2022-04-18 Thread John Snow
qemu-io fails on read/write beyond end-of-file on raw images, so skip these invocations when running the zero-length image tests. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz --- tests/qemu-iotests/040 | 14 -- 1 file changed, 12 insertions(+), 2 deleti

[PATCH v3 05/12] iotests/040: Fix TestCommitWithFilters test

2022-04-18 Thread John Snow
Without this change, asserting that qemu_io always returns 0 causes this test to fail in a way we happened not to be catching previously: qemu.utils.VerboseProcessError: Command '('/home/jsnow/src/qemu/bin/git/tests/qemu-iotests/../../qemu-io', '--cache', 'writeback', '--aio', 'threads', '-f'

[PATCH v3 07/12] iotests: rebase qemu_io() on top of qemu_tool()

2022-04-18 Thread John Snow
Rework qemu_io() to be analogous to qemu_img(); a function that requires a return code of zero by default unless disabled explicitly. Tests that use qemu_io(): 030 040 041 044 055 056 093 124 129 132 136 148 149 151 152 163 165 205 209 219 236 245 248 254 255 257 260 264 280 298 300 302 304 image-

[PATCH v3 08/12] iotests/migration-permissions: use assertRaises() for qemu_io() negative test

2022-04-18 Thread John Snow
Modify this test to use assertRaises for its negative testing of qemu_io. If the exception raised does not match the one we tell it to expect, we get *that* exception unhandled. If we get no exception, we get a unittest assertion failure and the provided emsg printed to screen. If we get the Calle

[PATCH v3 06/12] iotests: create generic qemu_tool() function

2022-04-18 Thread John Snow
reimplement qemu_img() in terms of qemu_tool() in preparation for doing the same with qemu_io(). Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz --- tests/qemu-iotests/iotests.py | 32 +--- 1 file changed, 21 insertions(+), 11 deletions(-)

[PATCH v3 00/12] iotests: add enhanced debugging info to qemu-io failures

2022-04-18 Thread John Snow
GitLab: https://gitlab.com/jsnow/qemu/-/commits/iotests_qemu_io_diagnostics Howdy, This series does for qemu_io() what we've done for qemu_img() and makes it a function that checks the return code by default and raises an Exception when things do not go according to plan. This series removes qem

[PATCH v3 11/12] iotests: remove qemu_io_silent() and qemu_io_silent_check().

2022-04-18 Thread John Snow
Like qemu-img, qemu-io returning 0 should be the norm and not the exception. Remove all calls to qemu_io_silent that just assert the return code is zero (That's every last call, as it turns out), and replace them with a normal qemu_io() call. qemu_io_silent_check() appeared to have been unused alr

[PATCH v3 10/12] iotests: remove qemu_io_pipe_and_status()

2022-04-18 Thread John Snow
I know we just added it, sorry. This is done in favor of qemu_io() which *also* returns the console output and status, but with more robust error handling on failure. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz --- tests/qemu-iotests/iotests.py | 3 --- 1 file cha

[PATCH v3 03/12] iotests: Don't check qemu_io() output for specific error strings

2022-04-18 Thread John Snow
A forthcoming commit updates qemu_io() to raise an exception on non-zero return by default, and changes its return type. In preparation, simplify some calls to qemu_io() that assert that specific error message strings do not appear in qemu-io's output. Asserting that all of these calls return a st

[PATCH v3 12/12] iotests: make qemu_io_log() check return codes by default

2022-04-18 Thread John Snow
Just like qemu_img_log(), upgrade qemu_io_log() to enforce a return code of zero by default. Tests that use qemu_io_log(): 242 245 255 274 303 307 nbd-reconnect-on-open Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz --- tests/qemu-iotests/iotests.py

Re: [RFC PATCH v3 3/5] tests/tcg/ppc64: Add basic softmmu test support

2022-04-18 Thread Daniel Henrique Barboza
On 4/18/22 17:27, Cédric Le Goater wrote: On 4/18/22 21:10, Leandro Lupori wrote: Add support to build and run the multiarch hello test, that simply prints a message and exits, through semihosting operations. The linker script was imported from https://github.com/legoater/pnv-test, that are

Re: [PATCH v7 08/12] target/riscv: Add sscofpmf extension support

2022-04-18 Thread Alistair Francis
On Sat, Apr 16, 2022 at 9:54 AM Atish Kumar Patra wrote: > > On Wed, Apr 13, 2022 at 12:08 AM Alistair Francis > wrote: > > > > On Thu, Mar 31, 2022 at 10:19 AM Atish Patra wrote: > > > > > > The Sscofpmf ('Ss' for Privileged arch and Supervisor-level extensions, > > > and 'cofpmf' for Count Ov

Re: [PATCH 2/4] TCG support for AVX

2022-04-18 Thread Richard Henderson
On 4/18/22 12:45, Paul Brook wrote: Unfortunately the table driven decoding means that going from two to three operands tends to be a bit all or nothing just to get the thing to compile. Yes, gen_sse is awful. Which is why the previous attempt at AVX2 rewrote the decoder: https://lore.kernel

Re: [RFC PATCH v3 1/5] ppc64: Add semihosting support

2022-04-18 Thread Richard Henderson
On 4/18/22 12:10, Leandro Lupori wrote: Add semihosting support for PPC64. This implementation is based on the standard for ARM semihosting version 2.0, as implemented by QEMU and documented in https://github.com/ARM-software/abi-aa/releases The PPC64 specific differences are the following

[PATCH v3] Use io_uring_register_ring_fd() to skip fd operations

2022-04-18 Thread Sam Li
Linux recently added a new io_uring(7) optimization API that QEMU doesn't take advantage of yet. The liburing library that QEMU uses has added a corresponding new API calling io_uring_register_ring_fd(). When this API is called after creating the ring, the io_uring_submit() library function passes

Re: [PATCH 2/2] Use io_ring_register_ring_fd() to skip fd operations

2022-04-18 Thread olc
Thanks for noticing the problem. I've done that. Sam Damien Le Moal 于2022年4月19日周二 06:24写道: > On 2022/04/18 18:05, Sam Li wrote: > > fix code style issue. > > This patch must be squashed into the previous one. > > > > > Signed-off-by: Sam Li > > --- > > block/io_uring.c | 9 +++-- > > 1 fi

Re: [RFC PATCH v3 2/5] ppc64: Fix semihosting on ppc64le

2022-04-18 Thread Richard Henderson
On 4/18/22 12:10, Leandro Lupori wrote: +static inline uint64_t sh_swap64(CPUArchState *env, uint64_t val) +{ +return msr_le ? val : tswap64(val); +} + +static inline uint32_t sh_swap32(CPUArchState *env, uint32_t val) +{ +return msr_le ? val : tswap32(val); +} That doesn't work -- tswa

[PATCH v11 04/14] target/riscv: rvk: add support for zbkx extension

2022-04-18 Thread Weiwei Li
- add xperm4 and xperm8 instructions Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Acked-by: Alistair Francis --- target/riscv/bitmanip_helper.c | 27 + target/riscv/helper.h | 2 ++ target/riscv/insn3

[PATCH v11 02/14] target/riscv: rvk: add support for zbkb extension

2022-04-18 Thread Weiwei Li
- reuse partial instructions of zbb extension, update extension check for them - add brev8, pack, packh, packw, unzip, zip instructions Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Acked-by: Alistair Francis Reviewed-by: Richard Henderson --- target/riscv/bitmanip_helper.c

[PATCH v11 03/14] target/riscv: rvk: add support for zbkc extension

2022-04-18 Thread Weiwei Li
- reuse partial instructions of zbc extension, update extension check for them Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson --- target/riscv/insn32.decode | 3 ++- target/riscv/insn_trans/trans_rvb.c.inc | 4 +

[PATCH v11 07/14] target/riscv: rvk: add support for zkne/zknd extension in RV64

2022-04-18 Thread Weiwei Li
- add aes64dsm, aes64ds, aes64im, aes64es, aes64esm, aes64ks2, aes64ks1i instructions Co-authored-by: Ruibo Lu Co-authored-by: Zewen Ye Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Acked-by: Alistair Francis --- target/riscv/crypto_helper.c

[PATCH v11 11/14] target/riscv: rvk: add support for zksed/zksh extension

2022-04-18 Thread Weiwei Li
- add sm3p0, sm3p1, sm4ed and sm4ks instructions Co-authored-by: Ruibo Lu Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/crypto_helper.c| 28 target/riscv/helper.h

[PATCH v11 08/14] target/riscv: rvk: add support for sha256 related instructions in zknh extension

2022-04-18 Thread Weiwei Li
- add sha256sig0, sha256sig1, sha256sum0 and sha256sum1 instructions Co-authored-by: Zewen Ye Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn32.decode | 5 +++ target/riscv/insn_trans/tran

[PATCH v11 05/14] crypto: move sm4_sbox from target/arm

2022-04-18 Thread Weiwei Li
- share it between target/arm and target/riscv Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson --- crypto/meson.build | 1 + crypto/sm4.c | 49

[PATCH v11 01/14] target/riscv: rvk: add cfg properties for zbk* and zk*

2022-04-18 Thread Weiwei Li
Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Acked-by: Alistair Francis --- target/riscv/cpu.c | 23 +++ target/riscv/cpu.h | 13 + 2 files changed, 36 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index faa41217d2..365bdd5fe5 10064

[PATCH v11 06/14] target/riscv: rvk: add support for zknd/zkne extension in RV32

2022-04-18 Thread Weiwei Li
- add aes32esmi, aes32esi, aes32dsmi and aes32dsi instructions Co-authored-by: Zewen Ye Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/crypto_helper.c| 105 target/riscv

[PATCH v11 09/14] target/riscv: rvk: add support for sha512 related instructions for RV32 in zknh extension

2022-04-18 Thread Weiwei Li
- add sha512sum0r, sha512sig0l, sha512sum1r, sha512sig1l, sha512sig0h and sha512sig1h instructions Co-authored-by: Zewen Ye Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn32.decode | 6 +

[PATCH v11 00/14] support subsets of scalar crypto extension

2022-04-18 Thread Weiwei Li
This patchset implements RISC-V scalar crypto extension v1.0.0 version instructions. Partial instructions are reused from B-extension. Specification: https://github.com/riscv/riscv-crypto The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-k-upstream-v11 To test rvk impl

Re: [PATCH v1 35/43] hw/intc: Add LoongArch extioi interrupt controller(EIOINTC)

2022-04-18 Thread yangxiaojuan
On 2022/4/18 下午4:57, Mark Cave-Ayland wrote: On 18/04/2022 04:48, Richard Henderson wrote: On 4/15/22 02:40, Xiaojuan Yang wrote: + memory_region_init(&s->mmio[cpu], OBJECT(s), +   "loongarch_extioi", EXTIOI_SIZE); + +    memory_region_init_io(&s->mmio_nodetype[cpu

[PATCH v11 13/14] disas/riscv.c: rvk: add disas support for Zbk* and Zk* instructions

2022-04-18 Thread Weiwei Li
Co-authored-by: Ruibo Lu Co-authored-by: Zewen Ye Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis --- disas/riscv.c | 173 +- 1 file changed, 172 insertions(+), 1 deletion(-) diff --git a/disas/riscv.c b/disa

[PATCH v11 10/14] target/riscv: rvk: add support for sha512 related instructions for RV64 in zknh extension

2022-04-18 Thread Weiwei Li
- add sha512sum0, sha512sig0, sha512sum1 and sha512sig1 instructions Co-authored-by: Zewen Ye Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn32.decode | 5 +++ target/riscv/insn_trans/tran

[PATCH v11 14/14] target/riscv: rvk: expose zbk* and zk* properties

2022-04-18 Thread Weiwei Li
Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 365bdd5fe5..973dd5ea47 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/c

Re: XIVE VFIO kernel resample failure in INTx mode under heavy load

2022-04-18 Thread Alexey Kardashevskiy
On 14/04/2022 22:31, Cédric Le Goater wrote: Hello Alexey, Thanks for taking over. On 4/13/22 06:56, Alexey Kardashevskiy wrote: On 3/17/22 06:16, Cédric Le Goater wrote: Timothy, On 3/16/22 17:29, Cédric Le Goater wrote: Hello, I've been struggling for some time with what is looki

  1   2   >