Re: [PATCH] virtio-net: correctly copy vnet header when flushing TX

2024-01-20 Thread Michael Tokarev
02.01.2024 06:29, Jason Wang : When HASH_REPORT is negotiated, the guest_hdr_len might be larger than the size of the mergeable rx buffer header. Using virtio_net_hdr_mrg_rxbuf during the header swap might lead a stack overflow in this case. Fixing this by using virtio_net_hdr_v1_hash instead.

Re: [PULL 0/8] tcg + linux-user patch queue

2024-01-20 Thread Michael Tokarev
21.01.2024 03:20, Richard Henderson: tcg/s390x: Fix encoding of VRIc, VRSa, VRSc insns tcg: Clean up error paths in alloc_code_gen_buffer_splitwx_memfd linux-user/riscv: Adjust vdso signal frame cfa offsets linux-user: Fixed cpu restore with pc 0 on SIGBUS It looks like the last two should go

Re: [PATCH v4 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-20 Thread Alexey Baturo
Hi, Having the feature to run binaries with pointer masking on qemu-user is really nice, but I see this patch series as an initial support. Obviously there'll be more patches and fixes for pointer masking as soon as arch tests are ready. I suggest supporting qemu-user in the next patches, but

[PULL 5/8] tests/tcg/s390x: Import linux tools/testing/crypto/chacha20-s390

2024-01-20 Thread Richard Henderson
Modify and simplify the driver, as we're really only interested in correctness of translation of chacha-vx.S. Tested-by: Michael Tokarev Tested-by: Thomas Huth Message-Id: <20240117213646.159697-3-richard.hender...@linaro.org> Signed-off-by: Richard Henderson --- tests/tcg/s390x/chacha.c

[PULL 6/8] linux-user/riscv: Adjust vdso signal frame cfa offsets

2024-01-20 Thread Richard Henderson
A typo in sizeof_reg put the registers at the wrong offset. Simplify the expressions to use positive addresses from the start of uc_mcontext instead of negative addresses from the end of uc_mcontext. Reported-by: Vineet Gupta Signed-off-by: Richard Henderson --- linux-user/riscv/vdso-32.so |

[PULL 0/8] tcg + linux-user patch queue

2024-01-20 Thread Richard Henderson
The following changes since commit 3f2a357b95845ea0bf7463eff6661e43b97d1afc: Merge tag 'hw-cpus-20240119' of https://github.com/philmd/qemu into staging (2024-01-19 11:39:38 +) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20240121 for you

[PULL 1/8] tcg: Remove unreachable code

2024-01-20 Thread Richard Henderson
From: Samuel Tardieu The `fail_rx`/`fail` block is only entered while `buf_rx` is equal to its initial value `MAP_FAILED`. The `munmap(buf_rx, size);` was never executed. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2030 Signed-off-by: Samuel Tardieu Reviewed-by: Peter Maydell

[PULL 7/8] linux-user/elfload: test return value of getrlimit

2024-01-20 Thread Richard Henderson
From: Thomas Weißschuh Should getrlimit() fail the value of dumpsize.rlimit_cur may not be initialized. Avoid reading garbage data by checking the return value of getrlimit. Reviewed-by: Richard Henderson Signed-off-by: Thomas Weißschuh Message-Id: <20240120-qemu-user-dumpable-v3-1-6aa410

[PULL 8/8] linux-user/elfload: check PR_GET_DUMPABLE before creating coredump

2024-01-20 Thread Richard Henderson
so. Reviewed-by: Richard Henderson Signed-off-by: Thomas Weißschuh Message-Id: <20240120-qemu-user-dumpable-v3-2-6aa410c93...@t-8ch.de> Signed-off-by: Richard Henderson --- linux-user/elfload.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfloa

[PULL 4/8] tcg/s390x: Fix encoding of VRIc, VRSa, VRSc insns

2024-01-20 Thread Richard Henderson
While the format names the second vector register 'v3', it is still in the second position (bits 12-15) and the argument to RXB must match. Example error: - e7 00 00 10 2a 33 verllf %v16,%v0,16 + e7 00 00 10 2c 33 verllf %v16,%v16,16 Cc: qemu-sta...@nongnu.org Reported-by:

[PULL 2/8] tcg: Make the cleanup-on-error path unique

2024-01-20 Thread Richard Henderson
From: Samuel Tardieu By calling `error_setg_errno()` before jumping to the cleanup-on-error path at the `fail` label, the cleanup path is clearer. Signed-off-by: Samuel Tardieu Reviewed-by: Peter Maydell Message-Id: <20231219182212.455952-3-...@rfc1149.net> Signed-off-by: Richard Henderson

[PULL 3/8] linux-user: Fixed cpu restore with pc 0 on SIGBUS

2024-01-20 Thread Richard Henderson
From: Robbin Ehn Commit f4e1168198 (linux-user: Split out host_sig{segv,bus}_handler) introduced a bug, when returning from host_sigbus_handler the PC is never set. Thus cpu_loop_exit_restore is called with a zero PC and we immediate get a SIGSEGV. Signed-off-by: Robbin Ehn Fixes: f4e1168198

Re: [PATCH 7/7] qapi: Fix malformed "Since:" section tags (again)

2024-01-20 Thread Philippe Mathieu-Daudé
On 20/1/24 10:53, Markus Armbruster wrote: "Since X.Y" is not recognized as a tagged section, and therefore not formatted as such in generated documentation. Fix by adding the required colon. Previously fixed in commit 433a4fdc420 (qapi: Fix malformed "Since:" section tags) Signed-off-by:

[PATCH v3 0/2] linux-user: two fixes to coredump generation

2024-01-20 Thread Thomas Weißschuh
Signed-off-by: Thomas Weißschuh --- Changes in v3: - Add braces to if statements - Add Reviewed-by from Richard - Link to v2: https://lore.kernel.org/r/20240107-qemu-user-dumpable-v2-0-54e3bcfc0...@t-8ch.de Changes in v2: - Rebase on 8.2 master - Resend after closed tree and holidays - Link to

[PATCH v3 1/2] linux-user/elfload: test return value of getrlimit

2024-01-20 Thread Thomas Weißschuh
Should getrlimit() fail the value of dumpsize.rlimit_cur may not be initialized. Avoid reading garbage data by checking the return value of getrlimit. Reviewed-by: Richard Henderson Signed-off-by: Thomas Weißschuh --- linux-user/elfload.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v3 2/2] linux-user/elfload: check PR_GET_DUMPABLE before creating coredump

2024-01-20 Thread Thomas Weißschuh
A process can opt-out of coredump creation by calling prctl(PR_SET_DUMPABLE, 0). linux-user passes this call from the guest through to the operating system. >From there it can be read back again to avoid creating coredumps from qemu-user itself if the guest chose so. Reviewed-by: Richard

Re: [PATCH] hw/elf_ops: Ignore loadable segments with zero size

2024-01-20 Thread Richard Henderson
On 1/20/24 21:28, Michael Tokarev wrote: 16.01.2024 19:38, Richard Henderson wrote: On 1/17/24 02:50, Bin Meng wrote: Some ELF files really do have segments of zero size, e.g.: Program Headers:    Type   Offset VirtAddr   PhysAddr   FileSiz  

Re: [PULL 00/14] Block layer patches

2024-01-20 Thread Peter Maydell
On Fri, 19 Jan 2024 at 18:15, Kevin Wolf wrote: > > The following changes since commit 3f2a357b95845ea0bf7463eff6661e43b97d1afc: > > Merge tag 'hw-cpus-20240119' of https://github.com/philmd/qemu into staging > (2024-01-19 11:39:38 +) > > are available in the Git repository at: > >

Re: [PATCH 0/4] esp-pci: fixes for Linux and MS-DOS

2024-01-20 Thread Guenter Roeck
On 1/20/24 05:09, Michael Tokarev wrote: 12.01.2024 16:15, Mark Cave-Ayland: This series contains fixes for the esp-pci device (am53c974 or dc390) for a few issues spotted whilst testing the previous ESP series. Patches 1-3 are fixes for issues found by Helge/Guenter whilst testing the hppa

Re: [PATCH 0/4] esp-pci: fixes for Linux and MS-DOS

2024-01-20 Thread Michael Tokarev
12.01.2024 16:15, Mark Cave-Ayland: This series contains fixes for the esp-pci device (am53c974 or dc390) for a few issues spotted whilst testing the previous ESP series. Patches 1-3 are fixes for issues found by Helge/Guenter whilst testing the hppa C3700 machine with the amd53c974/dc390

Re: [PATCH v15 0/9] rutabaga_gfx + gfxstream

2024-01-20 Thread Alyssa Ross
Gurchetan Singh writes: > On Fri, Jan 19, 2024 at 1:13 PM Alyssa Ross wrote: >> >> Hi Gurchetan, >> >> > Thanks for the reminder. I did make a request to create the release >> > tags, but changes were requested by Fedora packaging effort: >> > >> >

Re: [PATCH v13 1/9] hw/misc: Add Nuvoton's PCI Mailbox Module

2024-01-20 Thread Peter Maydell
On Fri, 19 Jan 2024 at 20:33, Nabih Estefan wrote: > > From: Hao Wu > > The PCI Mailbox Module is a high-bandwidth communcation module > between a Nuvoton BMC and CPU. It features 16KB RAM that are both > accessible by the BMC and core CPU. and supports interrupt for > both sides. > > This patch

Re: [PATCH] fsl-imx6ul: Add various missing unimplemented devices

2024-01-20 Thread Philippe Mathieu-Daudé
On 20/1/24 01:53, Guenter Roeck wrote: Add MMDC, OCOTP, SQPI, CAAM, and USBMISC as unimplemented devices. This allows operating systems such as Linux to run emulations such as mcimx6ul-evk. Before commit 0cd4926b85 ("Refactor i.MX6UL processor code"), the affected memory ranges were covered by

Re: [PATCH v3 26/38] tcg/i386: Use TEST r,r to test 8/16/32 bits

2024-01-20 Thread Philippe Mathieu-Daudé
On 10/1/24 23:43, Richard Henderson wrote: From: Paolo Bonzini Just like when testing against the sign bits, TEST r,r can be used when the immediate is 0xff, 0xff00, 0x, 0x. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson ---

Re: [PATCH] virtio-net: correctly copy vnet header when flushing TX

2024-01-20 Thread Michael Tokarev
02.01.2024 06:29, Jason Wang : When HASH_REPORT is negotiated, the guest_hdr_len might be larger than the size of the mergeable rx buffer header. Using virtio_net_hdr_mrg_rxbuf during the header swap might lead a stack overflow in this case. Fixing this by using virtio_net_hdr_v1_hash instead.

Re: [PATCH] hw/elf_ops: Ignore loadable segments with zero size

2024-01-20 Thread Michael Tokarev
16.01.2024 19:38, Richard Henderson wrote: On 1/17/24 02:50, Bin Meng wrote: Some ELF files really do have segments of zero size, e.g.: Program Headers:    Type   Offset VirtAddr   PhysAddr   FileSiz    MemSiz  Flags  Align   

Re: [PATCH v2 0/3] hw/pflash: implement update buffer for block writes

2024-01-20 Thread Michael Tokarev
08.01.2024 19:08, Gerd Hoffmann: When running qemu with edk2 efi firmware on aarch64 the efi variable store in pflash can get corrupted. qemu not doing proper block writes -- flush all or nothing to storage -- is a hot candidate for being the root cause. This little series tries to fix that

[PATCH 1/7] docs/devel/qapi-code-gen: Fix missing ':' in tagged section docs

2024-01-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst index ea8228518c..899c16adf3 100644 --- a/docs/devel/qapi-code-gen.rst +++

[PATCH 4/7] docs/interop/bitmaps: Clean up a reference to qemu-qmp-ref

2024-01-20 Thread Markus Armbruster
docs/interop/bitmaps.rst uses references like `qemu-qmp-ref `_ `query-block `_ to refer to and into docs/interop/qemu-qmp-ref.rst. Clean up the former: use :doc:`qemu-qmp-ref`. I don't know how to clean up the latter. Signed-off-by: Markus Armbruster --- docs/interop/bitmaps.rst | 4

[PATCH 2/7] docs: Replace dangling references to docs/interop/qmp-intro.txt

2024-01-20 Thread Markus Armbruster
Deletion of docs/interop/qmp-intro.txt left two dangling references behind. Replace them by references to docs/interop/qmp-spec.rst. Fixes: 0ec4468f233c (docs/interop: Delete qmp-intro.txt) Signed-off-by: Markus Armbruster --- docs/devel/writing-monitor-commands.rst | 4 ++--

[PATCH 5/7] qapi: Fix mangled "Returns" sections in documentation

2024-01-20 Thread Markus Armbruster
Commit e050e426782e (qapi: Use explicit bulleted lists) added list markup to correct bad rendering: A JSON block comment like this: Returns: nothing on success If @node is not a valid block device, DeviceNotFound If @name is not found, GenericError

[PATCH 7/7] qapi: Fix malformed "Since:" section tags (again)

2024-01-20 Thread Markus Armbruster
"Since X.Y" is not recognized as a tagged section, and therefore not formatted as such in generated documentation. Fix by adding the required colon. Previously fixed in commit 433a4fdc420 (qapi: Fix malformed "Since:" section tags) Signed-off-by: Markus Armbruster --- qapi/block-core.json |

[PATCH 3/7] qapi: Fix dangling references to docs/devel/qapi-code-gen.txt

2024-01-20 Thread Markus Armbruster
Conversion of docs/devel/qapi-code-gen.txt to ReST left several dangling references behind. Fix them to point to docs/devel/qapi-code-gen.rst. Fixes: f7aa076dbdfc (docs: convert qapi-code-gen.txt to ReST) Signed-off-by: Markus Armbruster --- docs/devel/writing-monitor-commands.rst | 2 +-

[PATCH 6/7] qapi: Indent tagged doc comment sections properly

2024-01-20 Thread Markus Armbruster
docs/devel/qapi-code-gen demands that the "second and subsequent lines of sections other than "Example"/"Examples" should be indented". Commit a937b6aa739 (qapi: Reformat doc comments to conform to current conventions) missed a few instances, and a few more have crept in since. Indent them.

[PATCH 0/7] qapi qmp: Documentation fixes

2024-01-20 Thread Markus Armbruster
Markus Armbruster (7): docs/devel/qapi-code-gen: Fix missing ':' in tagged section docs docs: Replace dangling references to docs/interop/qmp-intro.txt qapi: Fix dangling references to docs/devel/qapi-code-gen.txt docs/interop/bitmaps: Clean up a reference to qemu-qmp-ref qapi: Fix

Re: Why invtsc (CPUID_APM_INVTSC) is unmigratable?

2024-01-20 Thread Xiaoyao Li
On 1/20/2024 12:14 AM, Marcelo Tosatti wrote: On Fri, Jan 19, 2024 at 02:46:22PM +0800, Xiaoyao Li wrote: I'm wondering why CPUID_APM_INVTSC is set as unmigratable_flags. Could anyone explain it? commit 68bfd0ad4a1dcc4c328d5db85dc746b49c1ec07e Author: Marcelo Tosatti Date: Wed May 14