Re: [PATCH 09/14] tests/qapi-schema: Improve union discriminator coverage

2023-03-16 Thread Markus Armbruster
Eric Blake writes: > On Thu, Mar 16, 2023 at 08:13:20AM +0100, Markus Armbruster wrote: >> A union's 'discriminator' must name a one of the common members. > > s/ a// Yes. >> QAPISchemaVariants.check() looks it up by its c_name(), then checks >> the name matches exactly (because c_name() is

Re: [PATCH 08/14] qapi: Fix to reject 'data': 'mumble' in struct

2023-03-16 Thread Markus Armbruster
Eric Blake writes: > On Thu, Mar 16, 2023 at 08:13:19AM +0100, Markus Armbruster wrote: >> A struct's 'data' must be a JSON object defining the struct's members. >> The QAPI code generator incorrectly accepts a JSON string instead, and >> then crashes in QAPISchema._make_members() called from >>

Re: [PATCH for 8.0 v2] igb: Save the entire Tx context descriptor

2023-03-16 Thread Akihiko Odaki
On 2023/03/17 5:27, Sriram Yagnaraman wrote: -Original Message- From: qemu-devel-bounces+sriram.yagnaraman=est.t...@nongnu.org On Behalf Of Akihiko Odaki Sent: Thursday, 16 March 2023 16:57 Cc: qemu-devel@nongnu.org; Jason Wang ; Dmitry Fleytman ; quint...@redhat.com; Philippe

Re: [PATCH 06/14] qapi: Simplify code a bit after previous commit

2023-03-16 Thread Markus Armbruster
Eric Blake writes: > On Thu, Mar 16, 2023 at 08:13:17AM +0100, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster > > Looks like 'previous commit' in the subject line actually means 4/14 > (two commits ago); a victim of rebasing, I'm sure. Hmm, actually both commits matter. The

Re: [PATCH 04/14] qapi: Split up check_type()

2023-03-16 Thread Markus Armbruster
Eric Blake writes: > On Thu, Mar 16, 2023 at 08:13:15AM +0100, Markus Armbruster wrote: >> check_type() can check type names, arrays, and implicit struct types. >> Callers pass flags to select from this menu. This makes the function >> somewhat hard to read. Moreover, a few minor bugs are

RE: [PATCH v5 04/16] hw/9pfs: Implement Windows specific xxxdir() APIs

2023-03-16 Thread Shi, Guohuai
> -Original Message- > From: Shi, Guohuai > Sent: Friday, March 17, 2023 01:28 > To: Christian Schoenebeck ; Greg Kurz > ; qemu-devel@nongnu.org > Cc: Meng, Bin > Subject: RE: [PATCH v5 04/16] hw/9pfs: Implement Windows specific xxxdir() > APIs > > > > > -Original Message- >

Re: [PATCH v7 0/4] Add zoned storage emulation to virtio-blk driver

2023-03-16 Thread Sam Li
Stefan Hajnoczi 于2023年3月17日周五 03:46写道: > > On Fri, Mar 10, 2023 at 06:54:27PM +0800, Sam Li wrote: > > This patch adds zoned storage emulation to the virtio-blk driver. > > > > The patch implements the virtio-blk ZBD support standardization that is > > recently accepted by virtio-spec. The link

Re: [PATCH for-8.1 v2 25/26] target/riscv: rework write_misa()

2023-03-16 Thread liweiwei
On 2023/3/16 04:37, Daniel Henrique Barboza wrote: On 3/15/23 02:25, liweiwei wrote: On 2023/3/15 00:49, Daniel Henrique Barboza wrote: write_misa() must use as much common logic as possible. We want to open code just the bits that are exclusive to the CSR write operation and TCG

Question about TCG liveness_pass_1

2023-03-16 Thread LIU Zhiwei
Hi Richard, When I read the tcg code, I find a corner case which may be a bug in liveness_pass_1. I see all TEMP_TBs or global temps are set to TS_DEAD | TS_MEM when enter liveness_pass_1. Think about the  sequence. 1)Write_global_temp_0 // 0->TS_DEAD, but not recorded in arg_life

Re: [PATCH 14/14] qapi: Require boxed for conditional command and event arguments

2023-03-16 Thread Eric Blake
On Thu, Mar 16, 2023 at 08:13:25AM +0100, Markus Armbruster wrote: > The C code generator fails to honor 'if' conditions of command and > event arguments. > ... > > Conditional arguments work fine with 'boxed': true, simply because > complex types with conditional members work fine. Not worth

Re: [PATCH 13/14] qapi: Fix code generated for optional conditional struct member

2023-03-16 Thread Eric Blake
On Thu, Mar 16, 2023 at 08:13:24AM +0100, Markus Armbruster wrote: > The generated member visit neglects to emit #if around a conditional > struct member's has_ variable. For instance, > tests/qapi-schema/qapi-schema-test.json generates > > #if defined(TEST_IF_STRUCT) > bool

Re: [PATCH 11/14] tests/qapi-schema: Clean up positive test for conditionals

2023-03-16 Thread Eric Blake
On Thu, Mar 16, 2023 at 08:13:22AM +0100, Markus Armbruster wrote: > Union TestIfUnion is conditional on macros TEST_IF_UNION and > TEST_IF_STRUCT. It uses TestIfEnum, which is conditional on macro > TEST_IF_ENUM. If TEST_IF_ENUM and TEST_IF_STRUCT are defined, but > TEST_IF_ENUM isn't, the

Re: [PATCH 09/14] tests/qapi-schema: Improve union discriminator coverage

2023-03-16 Thread Eric Blake
On Thu, Mar 16, 2023 at 08:13:20AM +0100, Markus Armbruster wrote: > A union's 'discriminator' must name a one of the common members. s/ a// > QAPISchemaVariants.check() looks it up by its c_name(), then checks > the name matches exactly (because c_name() is not injective). > > Tests

Re: [PATCH 08/14] qapi: Fix to reject 'data': 'mumble' in struct

2023-03-16 Thread Eric Blake
On Thu, Mar 16, 2023 at 08:13:19AM +0100, Markus Armbruster wrote: > A struct's 'data' must be a JSON object defining the struct's members. > The QAPI code generator incorrectly accepts a JSON string instead, and > then crashes in QAPISchema._make_members() called from > ._def_struct_type(). > >

Re: [PATCH 07/14] qapi: Fix error message when type name or array is expected

2023-03-16 Thread Eric Blake
On Thu, Mar 16, 2023 at 08:13:18AM +0100, Markus Armbruster wrote: > We incorrectly report "FOO should be a type name" when it could also > be an array. Fix that. > > Signed-off-by: Markus Armbruster > --- > scripts/qapi/expr.py| 15 +++ >

Re: [PATCH 06/14] qapi: Simplify code a bit after previous commit

2023-03-16 Thread Eric Blake
On Thu, Mar 16, 2023 at 08:13:17AM +0100, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster Looks like 'previous commit' in the subject line actually means 4/14 (two commits ago); a victim of rebasing, I'm sure. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red

Re: [PATCH 04/14] qapi: Split up check_type()

2023-03-16 Thread Eric Blake
On Thu, Mar 16, 2023 at 08:13:15AM +0100, Markus Armbruster wrote: > check_type() can check type names, arrays, and implicit struct types. > Callers pass flags to select from this menu. This makes the function > somewhat hard to read. Moreover, a few minor bugs are hiding in > there, as we'll

Re: [PATCH 03/14] qapi: Clean up after removal of simple unions

2023-03-16 Thread Eric Blake
On Thu, Mar 16, 2023 at 08:13:14AM +0100, Markus Armbruster wrote: > Commit 4e99f4b12c0 (qapi: Drop simple unions) missed a bit of code > dealing with simple union branches. Drop it. > > Signed-off-by: Markus Armbruster > --- Reviewed-by: Eric Blake -- Eric Blake, Principal Software

[PATCH v2] virtio: refresh vring region cache after updating a virtqueue size

2023-03-16 Thread Carlos López
When a virtqueue size is changed by the guest via virtio_queue_set_num(), its region cache is not automatically updated. If the size was increased, this could lead to accessing the cache out of bounds. For example, in vring_get_used_event(): static inline uint16_t

[PATCH v2 4/4] tests/avocado: Add reboot tests to Cubieboard

2023-03-16 Thread Strahinja Jankovic
Cubieboard tests end with comment "reboot not functioning; omit test". Fix this so reboot is done at the end of each test. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank Tested-by: Niek Linnenbank --- tests/avocado/boot_linux_console.py | 15 --- 1 file changed,

[PATCH v2 3/4] hw/arm: Add WDT to Allwinner-H3 and Orangepi-PC

2023-03-16 Thread Strahinja Jankovic
This patch adds WDT to Allwinner-H3 and Orangepi-PC. WDT is added as an overlay to the Timer module memory area. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- docs/system/arm/orangepi.rst | 1 + hw/arm/Kconfig| 1 + hw/arm/allwinner-h3.c | 8

[PATCH v2 2/4] hw/arm: Add WDT to Allwinner-A10 and Cubieboard

2023-03-16 Thread Strahinja Jankovic
This patch adds WDT to Allwinner-A10 and Cubieboard. WDT is added as an overlay to the Timer module memory map. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- docs/system/arm/cubieboard.rst | 1 + hw/arm/Kconfig | 1 + hw/arm/allwinner-a10.c | 7

[PATCH v2 1/4] hw/watchdog: Allwinner WDT emulation for system reset

2023-03-16 Thread Strahinja Jankovic
This patch adds basic support for Allwinner WDT. Both sun4i and sun6i variants are supported. However, interrupt generation is not supported, so WDT can be used only to trigger system reset. Signed-off-by: Strahinja Jankovic --- hw/watchdog/Kconfig | 4 +

[PATCH v2 0/4] Basic Allwinner WDT emulation

2023-03-16 Thread Strahinja Jankovic
This patch set introduces basic emulation of Allwinner WDT. Since WDT in both A10 and H3 is part of Timer module, the WDT functionality is added as an overlay in the memory map. The focus was to enable reboot functionality, so WDT interrupt handling is not covered in this patch set. With these

[PATCH] hw/usb/imx: Fix out of bounds access in imx_usbphy_read()

2023-03-16 Thread Guenter Roeck
The i.MX USB Phy driver does not check register ranges, resulting in out of bounds accesses if an attempt is made to access non-existing PHY registers. Add range check and conditionally report bad accesses to fix the problem. While at it, also conditionally log attempted writes to non-existing or

[PATCH docs_and_memory_encryption 1/1] initial commit

2023-03-16 Thread ~titilola
From: Titilola --- README.md | Bin 0 -> 30 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index ..1f2ce0dcfc24c1ca3291260835280a1b6ac24e37 GIT binary patch

[PATCH docs_and_memory_encryption 0/1] An attempt to convert txt file to rst

2023-03-16 Thread ~titilola
== PULL 16/26 == :Subject: docs: add firmware feature flags :Author: Gerd Hoffmann :Date: 2022-10-13 6:52 UTC Description === This patch adds information about firmware feature flags. Changes === - Add information about firmware feature flags to documentation. Doc

Re: [PATCH 01/14] qapi: Fix error message format regression

2023-03-16 Thread Eric Blake
On Thu, Mar 16, 2023 at 08:13:12AM +0100, Markus Armbruster wrote: > Commit 52a474180ae3 changed reporting of errors connected to a source > location without mentioning it in the commit message. For instance, > > $ python scripts/qapi-gen.py tests/qapi-schema/unknown-escape.json >

[PATCH v3] tests/tcg/x86_64: add cross-modifying code test

2023-03-16 Thread Ilya Leoshkevich
commit f025692c992c ("accel/tcg: Clear PAGE_WRITE before translation") fixed cross-modifying code handling, but did not add a test. The changed code was further improved recently [1], and I was not sure whether these modifications were safe (spoiler: they were fine). Add a test to make sure there

[PATCH v3 0/2] Fix EXECUTE of relative long instructions

2023-03-16 Thread Ilya Leoshkevich
v2: https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg04499.html v2 -> v3: Make mem static (Nina). Initialize cc with cr (Nina). Drop long casts (Nina). Move mask assignment outside of asm. Use "a" constraints instead of "r" where necessary.

[PATCH v3 2/2] tests/tcg/s390x: Add ex-relative-long.c

2023-03-16 Thread Ilya Leoshkevich
Test EXECUTE and EXECUTE RELATIVE LONG with relative long instructions as targets. Reviewed-by: Richard Henderson Reviewed-by: Nina Schoetterl-Glausch Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target| 1 + tests/tcg/s390x/ex-relative-long.c | 156

[PATCH v3 1/2] target/s390x: Fix EXECUTE of relative long instructions

2023-03-16 Thread Ilya Leoshkevich
The code uses the wrong base for relative addressing: it should use the target instruction address and not the EXECUTE's address. Fix by storing the target instruction address in the new CPUS390XState member and loading it from the code generated by gen_ri2(). Reported-by: Nina

Re: [PATCH v2 2/2] tests/tcg/s390x: Add ex-relative-long.c

2023-03-16 Thread Ilya Leoshkevich
On Thu, 2023-03-16 at 18:50 +0100, Nina Schoetterl-Glausch wrote: > On Wed, 2023-03-15 at 01:11 +0100, Ilya Leoshkevich wrote: > > > Test EXECUTE and EXECUTE RELATIVE LONG with relative long > > > instructions > > > as targets. > > > > > > Signed-off-by: Ilya Leoshkevich > > Reviewed-by: Nina

RE: [PATCH for 8.0 v2] igb: Save the entire Tx context descriptor

2023-03-16 Thread Sriram Yagnaraman
> -Original Message- > From: qemu-devel-bounces+sriram.yagnaraman=est.t...@nongnu.org > On Behalf > Of Akihiko Odaki > Sent: Thursday, 16 March 2023 16:57 > Cc: qemu-devel@nongnu.org; Jason Wang ; Dmitry > Fleytman ; quint...@redhat.com; Philippe > Mathieu-Daudé ; Akihiko Odaki > >

[PULL 0/2] target/xtensa TCG test updates

2023-03-16 Thread Max Filippov
repository at: https://github.com/OSLL/qemu-xtensa.git tags/20230316-xtensa for you to fetch changes up to 51139fb3e7b05dd7daeca8f00748678ce9e087e5: tests/tcg/xtensa: allow testing big-endian cores (2023-03-15 05:08:04 -0700) target

Re: [PATCH v6 1/4] file-posix: add tracking of the zone write pointers

2023-03-16 Thread Stefan Hajnoczi
On Fri, Mar 10, 2023 at 06:31:03PM +0800, Sam Li wrote: > @@ -2338,9 +2424,15 @@ static int coroutine_fn raw_co_prw(BlockDriverState > *bs, uint64_t offset, > { > BDRVRawState *s = bs->opaque; > RawPosixAIOData acb; > +int ret; > > if (fd_open(bs) < 0) > return

Re: [PATCH v7 0/4] Add zoned storage emulation to virtio-blk driver

2023-03-16 Thread Stefan Hajnoczi
On Fri, Mar 10, 2023 at 06:54:27PM +0800, Sam Li wrote: > This patch adds zoned storage emulation to the virtio-blk driver. > > The patch implements the virtio-blk ZBD support standardization that is > recently accepted by virtio-spec. The link to related commit is at > >

Re: [PATCH v6 2/4] block: introduce zone append write for zoned devices

2023-03-16 Thread Stefan Hajnoczi
On Fri, Mar 10, 2023 at 06:31:04PM +0800, Sam Li wrote: > A zone append command is a write operation that specifies the first > logical block of a zone as the write position. When writing to a zoned > block device using zone append, the byte offset of writes is pointing > to the write pointer of

Re: [PATCH v7 3/4] block: add accounting for zone append operation

2023-03-16 Thread Stefan Hajnoczi
On Fri, Mar 10, 2023 at 06:54:30PM +0800, Sam Li wrote: > Taking account of the new zone append write operation for zoned devices, > BLOCK_ACCT_APPEND enum is introduced as other I/O request type (read, > write, flush). Can it be called BLOCK_ACCT_ZONE_APPEND so it's clear that this operation is

Re: [PATCH v7 2/4] virtio-blk: add zoned storage emulation for zoned devices

2023-03-16 Thread Stefan Hajnoczi
On Fri, Mar 10, 2023 at 06:54:29PM +0800, Sam Li wrote: > This patch extends virtio-blk emulation to handle zoned device commands > by calling the new block layer APIs to perform zoned device I/O on > behalf of the guest. It supports Report Zone, four zone oparations (open, > close, finish,

Re: [PATCH v6 3/4] qemu-iotests: test zone append operation

2023-03-16 Thread Stefan Hajnoczi
On Fri, Mar 10, 2023 at 06:31:05PM +0800, Sam Li wrote: > This tests is mainly a helper to indicate append writes in block layer > behaves as expected. > > Signed-off-by: Sam Li > --- > qemu-io-cmds.c | 65 ++ > tests/qemu-iotests/tests/zoned.out

Call failed: MCTP Endpoint did not respond: Qemu CXL switch with mctp-1.0

2023-03-16 Thread Maverickk 78
Hi I am trying mctp & mctpd with aspeed +buildroot(master) + linux v6.2 with Qemu 7.2. I have added necessary FMAPI related patches into QEMU to support CLX switch emulation RFC-1-2-misc-i2c_mctp_cxl_fmapi-Initial-device-emulation.diff RFC-2-3-hw-i2c-add-mctp-core.diff

Re: [PATCH v16 0/8] Add support for zoned device

2023-03-16 Thread Stefan Hajnoczi
On Fri, Mar 10, 2023 at 06:23:55PM +0800, Sam Li wrote: > Zoned Block Devices (ZBDs) devide the LBA space to block regions called zones > that are larger than the LBA size. It can only allow sequential writes, which > reduces write amplification in SSD, leading to higher throughput and increased >

Re: [PATCH v2 2/2] tests/tcg/s390x: Add ex-relative-long.c

2023-03-16 Thread Nina Schoetterl-Glausch
On Wed, 2023-03-15 at 01:11 +0100, Ilya Leoshkevich wrote: > > Test EXECUTE and EXECUTE RELATIVE LONG with relative long instructions > > as targets. > > > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Nina Schoetterl-Glausch Some comments below. > > --- > > tests/tcg/s390x/Makefile.target

Re: [RFC 1/2] block: Split padded I/O vectors exceeding IOV_MAX

2023-03-16 Thread Vladimir Sementsov-Ogievskiy
On 15.03.23 15:13, Hanna Czenczek wrote: When processing vectored guest requests that are not aligned to the storage request alignment, we pad them by adding head and/or tail buffers for a read-modify-write cycle. The guest can submit I/O vectors up to IOV_MAX (1024) in length, but with this

RE: [PATCH v5 04/16] hw/9pfs: Implement Windows specific xxxdir() APIs

2023-03-16 Thread Shi, Guohuai
> -Original Message- > From: Christian Schoenebeck > Sent: Thursday, March 16, 2023 19:05 > To: Greg Kurz ; qemu-devel@nongnu.org > Cc: Meng, Bin ; Shi, Guohuai > > Subject: Re: [PATCH v5 04/16] hw/9pfs: Implement Windows specific xxxdir() > APIs > > CAUTION: This email comes from a

[PATCH v3 1/2] target/s390x: Fix R[NOX]SBG with T=1

2023-03-16 Thread Ilya Leoshkevich
RXSBG usage in the "filetests" test from the wasmtime testsuite makes tcg_reg_alloc_op() attempt to temp_load() a TEMP_VAL_DEAD temporary, causing an assertion failure: 0x01000a70: ec14 b040 3057 rxsbg%r1, %r4, 0xb0, 0x40, 0x30 OP after optimization and liveness analysis:

[PATCH v3 2/2] tests/tcg/s390x: Add rxsbg.c

2023-03-16 Thread Ilya Leoshkevich
Add a small test for RXSBG with T=1 to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 3 +++ tests/tcg/s390x/rxsbg.c | 46 + 2 files changed, 49 insertions(+) create mode 100644 tests/tcg/s390x/rxsbg.c diff

[PATCH v3 0/2] target/s390x: Fix R[NOX]SBG with T=1

2023-03-16 Thread Ilya Leoshkevich
v2: https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg04699.html v2 -> v3: Assert that o->out != NULL, mention the commit that exposed the problem (Philippe). v1: https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg04493.html v1 -> v2: Work around a clang issue (Thomas).

Re: [PATCH v2 1/2] target/s390x: Fix R[NOX]SBG with T=1

2023-03-16 Thread Ilya Leoshkevich
On Thu, 2023-03-16 at 09:41 +0100, Philippe Mathieu-Daudé wrote: > On 16/3/23 00:56, Ilya Leoshkevich wrote: > > RXSBG usage in the "filetests" test from the wasmtime testsuite > > makes > > tcg_reg_alloc_op() attempt to temp_load() a TEMP_VAL_DEAD > > temporary, > > causing an assertion failure:

Re: [PATCH v3 1/5] hw/usb: Add basic i.MX USB Phy support

2023-03-16 Thread Guenter Roeck
On Thu, Mar 16, 2023 at 02:51:23PM +, Peter Maydell wrote: > On Thu, 16 Mar 2023 at 14:12, Guenter Roeck wrote: > > > > Hi Peter, > > > > On 3/16/23 06:41, Peter Maydell wrote: > > > On Fri, 13 Mar 2020 at 01:45, Guenter Roeck wrote: > > >> > > >> Add basic USB PHY support as implemented in

Re: [PATCH for 8.0 v2] igb: Save the entire Tx context descriptor

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

Re: [PATCH v2 09/32] include/exec: fix kerneldoc definition

2023-03-16 Thread Peter Maydell
On Wed, 15 Mar 2023 at 17:49, Alex Bennée wrote: > > The kerneldoc processor complains about the mismatched variable name. > Fix it. > > Message-Id: <20230310103123.2118519-11-alex.ben...@linaro.org> > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Alex Bennée Note that Laurent has

Re: [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support

2023-03-16 Thread Viktor Prutyanov
> Hi, > > For now, elf2dmp is unable to convert ELF-dump to DMP-dump made of > Windows Server 2022 guest. This patch series fixes it. > > v1: improve code-style fix > v2: don't remove data directory entry RVA print and DOS header size check > > Viktor Prutyanov (3): > contrib/elf2dmp: fix

[PATCH v4 08/12] target/s390x: Handle CLRL and CLGFRL with non-aligned addresses

2023-03-16 Thread Ilya Leoshkevich
Use MO_ALIGN and let do_unaligned_access() generate a specification exception. Reported-by: Nina Schoetterl-Glausch Suggested-by: Nina Schoetterl-Glausch Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/translate.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH v4 05/12] target/s390x: Handle LLGFRL from non-aligned addresses

2023-03-16 Thread Ilya Leoshkevich
Use MO_ALIGN and let do_unaligned_access() generate a specification exception. Reported-by: Nina Schoetterl-Glausch Suggested-by: Nina Schoetterl-Glausch Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/insn-data.h.inc | 6 +++---

[PATCH v4 07/12] target/s390x: Handle CGRL and CLGRL with non-aligned addresses

2023-03-16 Thread Ilya Leoshkevich
Use MO_ALIGN and let do_unaligned_access() generate a specification exception. Reported-by: Nina Schoetterl-Glausch Suggested-by: Nina Schoetterl-Glausch Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/translate.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH v4 06/12] target/s390x: Handle CRL and CGFRL with non-aligned addresses

2023-03-16 Thread Ilya Leoshkevich
Use MO_ALIGN and let do_unaligned_access() generate a specification exception. Reported-by: Nina Schoetterl-Glausch Suggested-by: Nina Schoetterl-Glausch Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/translate.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH v4 11/12] target/s390x: Update do_unaligned_access() comment

2023-03-16 Thread Ilya Leoshkevich
Relative long instructions now depend on do_unaligned_access() too. Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/excp_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/tcg/excp_helper.c

[PATCH v4 00/12] target/s390x: Handle unaligned accesses

2023-03-16 Thread Ilya Leoshkevich
v3: https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg04687.html v3 -> v4: Get rid of the preprocessor magic in the new tests (Thomas). v2: https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg04231.html v2 -> v3: Fix clang build (Thomas). v1:

[PATCH v4 04/12] target/s390x: Handle LRL and LGFRL from non-aligned addresses

2023-03-16 Thread Ilya Leoshkevich
Use MO_ALIGN and let do_unaligned_access() generate a specification exception. Reported-by: Nina Schoetterl-Glausch Suggested-by: Nina Schoetterl-Glausch Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/insn-data.h.inc | 14 +++---

[PATCH v4 09/12] target/s390x: Handle STRL to non-aligned addresses

2023-03-16 Thread Ilya Leoshkevich
Use MO_ALIGN and let do_unaligned_access() generate a specification exception. Reported-by: Nina Schoetterl-Glausch Suggested-by: Nina Schoetterl-Glausch Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/insn-data.h.inc | 12 ++--

[PATCH v4 02/12] target/s390x: Handle EXECUTE of odd addresses

2023-03-16 Thread Ilya Leoshkevich
Generate a specification exception in the helper before trying to fetch the instruction. Reported-by: Nina Schoetterl-Glausch Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/mem_helper.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-)

[PATCH v4 03/12] target/s390x: Handle LGRL from non-aligned addresses

2023-03-16 Thread Ilya Leoshkevich
Use MO_ALIGN and let do_unaligned_access() generate a specification exception. Reported-by: Nina Schoetterl-Glausch Suggested-by: Nina Schoetterl-Glausch Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/insn-data.h.inc | 6 +++---

[PATCH v4 10/12] target/s390x: Handle STGRL to non-aligned addresses

2023-03-16 Thread Ilya Leoshkevich
Use MO_ALIGN and let do_unaligned_access() generate a specification exception. Reported-by: Nina Schoetterl-Glausch Suggested-by: Nina Schoetterl-Glausch Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/insn-data.h.inc | 8

[PATCH v4 12/12] tests/tcg/s390x: Test unaligned accesses

2023-03-16 Thread Ilya Leoshkevich
Add a number of small test that check whether accessing unaligned addresses in various ways leads to a specification exception. Run these test both in softmmu and user configurations; expect a PGM in one case and SIGILL in the other. Signed-off-by: Ilya Leoshkevich ---

[PATCH v4 01/12] target/s390x: Handle branching to odd addresses

2023-03-16 Thread Ilya Leoshkevich
Let branching happen and try to generate a new translation block with an odd address. Generate a specification exception in cpu_get_tb_cpu_state(). Reported-by: Harold Grovesteen Reported-by: Nina Schoetterl-Glausch Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich ---

Re: [PATCH v2 02/32] tests/docker: all add DOCKER_BUILDKIT to RUNC environment

2023-03-16 Thread Richard Henderson
On 3/15/23 10:43, Alex Bennée wrote: It seems we also need to pass DOCKER_BUILDKIT as an argument to docker itself to get the full benefit of caching. Signed-off-by: Alex Bennée Suggested-by: Fabiano Rosas --- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH for 8.0 v2] memory: Prevent recursive memory access

2023-03-16 Thread Akihiko Odaki
On 2023/03/17 1:15, Alexander Bulekov wrote: On 230316 2124, Akihiko Odaki wrote: A guest may request ask a memory-mapped device to perform DMA. If the address specified for DMA is the device performing DMA, it will create recursion. It is very unlikely that device implementations are prepared

[PATCH for 8.0 v3] memory: Prevent recursive memory access

2023-03-16 Thread Akihiko Odaki
A guest may request ask a memory-mapped device to perform DMA. If the address specified for DMA is the device performing DMA, it will create recursion. It is very unlikely that device implementations are prepared for such an abnormal access, which can result in unpredictable behavior. In

Re: [PATCH for 8.0 v2] memory: Prevent recursive memory access

2023-03-16 Thread Alexander Bulekov
On 230316 2124, Akihiko Odaki wrote: > A guest may request ask a memory-mapped device to perform DMA. If the > address specified for DMA is the device performing DMA, it will create > recursion. It is very unlikely that device implementations are prepared > for such an abnormal access, which can

Re: [PATCH v2 09/32] include/exec: fix kerneldoc definition

2023-03-16 Thread Richard Henderson
On 3/15/23 10:43, Alex Bennée wrote: The kerneldoc processor complains about the mismatched variable name. Fix it. Message-Id:<20230310103123.2118519-11-alex.ben...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- include/exec/memory.h | 2 +- 1 file changed, 1

Re: [PATCH v2 07/32] tests/tcg: add some help output for running individual tests

2023-03-16 Thread Richard Henderson
On 3/15/23 10:43, Alex Bennée wrote: So you can do: cd tests/tcg/aarch64-linux-user make -f ../Makefile.target help To see the list of tests. You can then run each one individually. Signed-off-by: Alex Bennée --- tests/tcg/Makefile.target | 7 +++ 1 file changed, 7 insertions(+)

Re: [PATCH v2 06/32] include/qemu: add documentation for memory callbacks

2023-03-16 Thread Richard Henderson
On 3/15/23 10:43, Alex Bennée wrote: Some API documentation was missed, rectify that. Fixes:https://gitlab.com/qemu-project/qemu/-/issues/1497 Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 47 ++ 1 file changed, 43 insertions(+), 4

Re: [PATCH for 8.0 v2] igb: Save the entire Tx context descriptor

2023-03-16 Thread Philippe Mathieu-Daudé
On 16/3/23 16:57, Akihiko Odaki wrote: The current implementation of igb uses only part of a advanced Tx context descriptor because it misses some features and sniffs the trait of the packet instead of respecting the packet type specified in the descriptor. However, we will certainly need the

[PATCH for 8.0 v2] igb: Save the entire Tx context descriptor

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

Re: dropping 32-bit host support

2023-03-16 Thread Daniel P . Berrangé
On Thu, Mar 16, 2023 at 04:01:06PM +0300, Andrew Randrianasulu wrote: > Well, this language about "market" and "investment" not just figures of > the speech, sadly? Because paid developers work on areas they paid to > develop, by boss with big bucks. This is FUD. Many QEMU maintainers are

[PATCH v2 2/3] vhost: Remove vhost_backend_can_merge() callback

2023-03-16 Thread David Hildenbrand
Checking whether the memory regions are equal is sufficient: if they are equal, then most certainly the contained fd is equal. The whole vhost-user memslot handling is suboptimal and overly complicated. We shouldn't have to lookup a RAM memory regions we got notified about in

[PATCH v2 3/3] softmmu/physmem: Fixup qemu_ram_block_from_host() documentation

2023-03-16 Thread David Hildenbrand
Let's fixup the documentation (e.g., removing traces of the ram_addr_t parameter that no longer exists) and move it to the header file while at it. Suggested-by: Igor Mammedov Signed-off-by: David Hildenbrand --- include/exec/cpu-common.h | 15 +++ softmmu/physmem.c | 17

[PATCH v2 0/3] vhost: memslot handling improvements

2023-03-16 Thread David Hildenbrand
Following up on my previous work to make virtio-mem consume multiple memslots dynamically [1] that requires precise accounting between used vs. reserved memslots, I realized that vhost makes this extra hard by filtering out some memory region sections (so they don't consume a memslot) in the

[PATCH v2 1/3] vhost: Rework memslot filtering and fix "used_memslot" tracking

2023-03-16 Thread David Hildenbrand
Having multiple vhost devices, some filtering out fd-less memslots and some not, can mess up the "used_memslot" accounting. Consequently our "free memslot" checks become unreliable and we might run out of free memslots at runtime later. An example sequence which can trigger a potential issue that

Re: dropping 32-bit host support

2023-03-16 Thread Andrew Randrianasulu
чт, 16 мар. 2023 г., 18:21 Warner Losh : > > > On Thu, Mar 16, 2023 at 7:33 AM Thomas Huth wrote: > >> If you'd followed the QEMU project, you'd know that there are very >> helpful >> people around, from all kind of companies, Linaro guys who help with >> reviewing and merging non-ARM patches,

Re: dropping 32-bit host support

2023-03-16 Thread Andrew Randrianasulu
чт, 16 мар. 2023 г., 16:32 Thomas Huth : > On 16/03/2023 14.01, Andrew Randrianasulu wrote: > ... > > Well, this language about "market" and "investment" not just figures of > the > > speech, sadly? Because paid developers work on areas they paid to > develop, > > by boss with big bucks. > >

Re: [PATCH] docs/sphinx/kerneldoc.py: Honour --enable-werror

2023-03-16 Thread Peter Maydell
On Thu, 16 Mar 2023 at 15:16, Laurent Vivier wrote: > > Le 16/03/2023 à 14:42, Peter Maydell a écrit : > > > > > > On Thu, 16 Mar 2023 at 13:40, Laurent Vivier > > wrote: > > > > > > Le 14/03/2023 à 12:44, Peter Maydell a écrit : > > > > Currently, the kerneldoc

Re: dropping 32-bit host support

2023-03-16 Thread Warner Losh
On Thu, Mar 16, 2023 at 7:33 AM Thomas Huth wrote: > If you'd followed the QEMU project, you'd know that there are very helpful > people around, from all kind of companies, Linaro guys who help with > reviewing and merging non-ARM patches, Red Hatters who help with BSD and Haiku patches, etc. >

Re: [PATCH] docs/sphinx/kerneldoc.py: Honour --enable-werror

2023-03-16 Thread Laurent Vivier
Le 16/03/2023 à 14:42, Peter Maydell a écrit : On Thu, 16 Mar 2023 at 13:40, Laurent Vivier mailto:laur...@vivier.eu>> wrote: > > Le 14/03/2023 à 12:44, Peter Maydell a écrit : > > Currently, the kerneldoc Sphinx plugin doesn't honour the > > --enable-werror configure option, so its

[PULL 1/7] migration: Wait on preempt channel in preempt thread

2023-03-16 Thread Juan Quintela
From: Peter Xu QEMU main thread will wait until dest preempt channel established during processing the LISTEN command (within the whole postcopy PACKAGED data), by waiting on the semaphore postcopy_qemufile_dst_done. That's racy, because it's possible that the dest QEMU main thread hasn't yet

[PULL 4/7] migration/xbzrle: fix out-of-bounds write with axv512

2023-03-16 Thread Juan Quintela
From: Matheus Tavares Bernardino xbzrle_encode_buffer_avx512() checks for overflows too scarcely in its outer loop, causing out-of-bounds writes: $ ../configure --target-list=aarch64-softmmu --enable-sanitizers --enable-avx512bw $ make tests/unit/test-xbzrle && ./tests/unit/test-xbzrle

[PULL 7/7] migration: fix populate_vfio_info

2023-03-16 Thread Juan Quintela
From: Steve Sistare Include CONFIG_DEVICES so that populate_vfio_info is instantiated for CONFIG_VFIO. Without it, the 'info migrate' command never returns info about vfio. Fixes: 43bd0bf30f ("migration: Move populate_vfio_info() into a separate file") Signed-off-by: Steve Sistare

[PULL 5/7] migration/rdma: Remove deprecated variable rdma_return_path

2023-03-16 Thread Juan Quintela
From: Li Zhijian It's no longer needed since commit 44bcfd45e98 ("migration/rdma: destination: create the return patch after the first accept") Signed-off-by: Li Zhijian Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/rdma.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PULL 3/7] migration/xbzrle: use ctz64 to avoid undefined result

2023-03-16 Thread Juan Quintela
From: Matheus Tavares Bernardino __builtin_ctzll() produces undefined results when the argument is 0. This can be seen through test-xbzrle, which produces the following warning: ../migration/xbzrle.c:265: runtime error: passing zero to ctz(), which is not a valid argument Replace

[PULL 2/7] migration/rdma: Fix return-path case

2023-03-16 Thread Juan Quintela
From: "Dr. David Alan Gilbert" The RDMA code has return-path handling code, but it's only enabled if postcopy is enabled; if the 'return-path' migration capability is enabled, the return path is NOT setup but the core migration code still tries to use it and breaks. Enable the RDMA return path

[PULL 6/7] migration/multifd: correct multifd_send_thread to trace the flags

2023-03-16 Thread Juan Quintela
From: Wei Wang The p->flags could be updated via the send_prepare callback, e.g. OR-ed with MULTIFD_FLAG_ZLIB via zlib_send_prepare. Assign p->flags to the local "flags" before the send_prepare callback could only get partial of p->flags. Fix it by moving the assignment of p->flags to the local

[PULL 0/7] Migration 20230316 patches

2023-03-16 Thread Juan Quintela
-20230316-pull-request for you to fetch changes up to fa76c854ae837328187bef41d80af5d1ad36681f: migration: fix populate_vfio_info (2023-03-16 16:07:07 +0100) Migration Pull request Hi This is just fixes for migration. - Fix rdma

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

2023-03-16 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, Mar 16, 2023 at 01:31:04PM +0100, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >> > Per the C++ standard, empty enum are ill-formed. Do not generate The C standard. The C++ standard doesn't apply here :) >> > them in order to avoid: >> >

Re: [PATCH v3 1/5] hw/usb: Add basic i.MX USB Phy support

2023-03-16 Thread Peter Maydell
On Thu, 16 Mar 2023 at 14:12, Guenter Roeck wrote: > > Hi Peter, > > On 3/16/23 06:41, Peter Maydell wrote: > > On Fri, 13 Mar 2020 at 01:45, Guenter Roeck wrote: > >> > >> Add basic USB PHY support as implemented in i.MX23, i.MX28, i.MX6, > >> and i.MX7 SoCs. > >> > >> The only support really

Re: [PATCH for 8.0] igb: Save the entire Tx context descriptor

2023-03-16 Thread Juan Quintela
Philippe Mathieu-Daudé wrote: > On 16/3/23 13:40, Akihiko Odaki wrote: >> On 2023/03/16 21:36, Philippe Mathieu-Daudé wrote: >>> On 16/3/23 13:28, Akihiko Odaki wrote: The current implementation of igb uses only part of a advanced Tx context descriptor because it misses some features

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

2023-03-16 Thread Daniel P . Berrangé
On Thu, Mar 16, 2023 at 03:39:59PM +0100, Juan Quintela wrote: > Daniel P. Berrangé wrote: > > On Thu, Mar 16, 2023 at 01:31:04PM +0100, Markus Armbruster wrote: > >> Philippe Mathieu-Daudé writes: > >> > >> > Per the C++ standard, empty enum are ill-formed. Do not generate > >> > them in order

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

2023-03-16 Thread Juan Quintela
Daniel P. Berrangé wrote: > On Thu, Mar 16, 2023 at 01:31:04PM +0100, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >> > Per the C++ standard, empty enum are ill-formed. Do not generate >> > them in order to avoid: >> > >> > In file included from qga/qga-qapi-emit-events.c:14:

Re: [PATCH V2 01/20] migration: fix populate_vfio_info

2023-03-16 Thread Juan Quintela
Steve Sistare wrote: > Include CONFIG_DEVICES so that populate_vfio_info is instantiated for > CONFIG_VFIO. Without it, the 'info migrate' command never returns > info about vfio. > > Fixes: 43bd0bf30f ("migration: Move populate_vfio_info() into a separate > file") > Signed-off-by: Steve

  1   2   3   >