[risu PATCH 2/4] s390x: Add simple s390x.risu file

2023-09-04 Thread Thomas Huth
This only adds a limited set of s390x instructions for initial testing. More instructions will be added later. Signed-off-by: Thomas Huth --- s390x.risu | 48 1 file changed, 48 insertions(+) create mode 100644 s390x.risu diff --git a/s390x.risu

[risu PATCH 1/4] s390x: Add basic s390x support to the C code

2023-09-04 Thread Thomas Huth
With these changes, it is now possible to compile the "risu" binary for s390x hosts. Signed-off-by: Thomas Huth --- risu_reginfo_s390x.c | 142 +++ risu_reginfo_s390x.h | 23 +++ risu_s390x.c | 48 +++ test_s390x.S | 32 +

Re: [PATCH 60/67] ui/vnc: VNC requires PIXMAN

2023-09-04 Thread Paolo Bonzini
On 8/30/23 11:38, marcandre.lur...@redhat.com wrote: -if get_option('vnc').allowed() and have_system +if get_option('vnc') \ + .disable_auto_if(not pixman.found()) \ + .require(pixman.found()) \ + .allowed() and have_system ".disable_auto_if()" is not needed, because ".require()" handles it.

[risu PATCH 0/4] Add support for s390x to RISU

2023-09-04 Thread Thomas Huth
Hi Peter! Here are some patches that add basic support for s390x to RISU. It's still quite limited, e.g. no support for load/store memory operations yet, but the basics with simple 16-bit or 32-bit instructions work already fine. (In the long run, we'd need to support instructions with 48-bit le

[risu PATCH 4/4] s390x: Update the configure script for s390x support

2023-09-04 Thread Thomas Huth
Auto-detect s390x hosts and add s390x information to the help text. Signed-off-by: Thomas Huth --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index ca2d7db..2f7c580 100755 --- a/configure +++ b/configure @@ -58,6 +58,8 @@ guess_arch() {

Re: [PATCH v5 01/20] tests/docker: Update docker-loongarch-cross toolchain

2023-09-04 Thread Alex Bennée
Richard Henderson writes: > Update from clfs 5.0 to clfs 8.1, which includes updates > to binutils 2.41, gcc 13.2, and glibc 2.38. > > See https://github.com/loongson/build-tools > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée Do you want this queued ahead of a vdso series? -

Re: [PATCH 61/67] ui/spice: SPICE/QXL requires PIXMAN

2023-09-04 Thread Paolo Bonzini
On 8/30/23 11:38, marcandre.lur...@redhat.com wrote: diff --git a/ui/meson.build b/ui/meson.build index b3525ef064..08d845d43a 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -133,7 +133,7 @@ if sdl.found() ui_modules += {'sdl' : sdl_ss} endif -if spice.found() +if spice.found() and

Re: [PATCH 65/67] ppc/kconfig: make SAM460EX depend on PPC & PIXMAN

2023-09-04 Thread Paolo Bonzini
On 8/30/23 11:38, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau SM501 is going to depend on PIXMAN next. Signed-off-by: Marc-André Lureau --- configs/devices/ppc-softmmu/default.mak | 2 +- hw/ppc/Kconfig | 2 ++ 2 files changed, 3 insertions(+), 1 dele

Re: [PATCH 02/11] target/arm: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
On 1/9/23 12:46, Peter Maydell wrote: On Thu, 31 Aug 2023 at 23:56, Philippe Mathieu-Daudé wrote: Fix: target/arm/tcg/translate-m-nocp.c:509:18: error: declaration shadows a local variable [-Werror,-Wshadow] TCGv_i32 tmp = load_cpu_field(v7m.fpdscr[M_REG_NS]); ^

Re: [PATCH for-8.1] vfio/display: Fix missing update to set backing fields

2023-09-04 Thread Alex Williamson
On Mon, 4 Sep 2023 15:06:21 +0400 Marc-André Lureau wrote: > Hi > > On Thu, Aug 17, 2023 at 8:29 PM Kim, Dongwon wrote: > > > > Ok, this regression happened not just because of renaming. Originally > > width and height were representing the size of whole surface that guest > > shares while scan

Re: [risu PATCH 1/4] s390x: Add basic s390x support to the C code

2023-09-04 Thread Ilya Leoshkevich
On Mon, 2023-09-04 at 16:00 +0200, Thomas Huth wrote: > With these changes, it is now possible to compile the "risu" binary > for s390x hosts. > > Signed-off-by: Thomas Huth > --- >  risu_reginfo_s390x.c | 142 > +++ >  risu_reginfo_s390x.h |  23 +++ >  

Re: [risu PATCH 2/4] s390x: Add simple s390x.risu file

2023-09-04 Thread Ilya Leoshkevich
On Mon, 2023-09-04 at 16:00 +0200, Thomas Huth wrote: > This only adds a limited set of s390x instructions for initial > testing. > More instructions will be added later. > > Signed-off-by: Thomas Huth > --- >  s390x.risu | 48 >  1 file changed, 48

Re: [PATCH 16/20] target/riscv/tcg: move riscv_cpu_add_misa_properties() to tcg-cpu.c

2023-09-04 Thread Daniel Henrique Barboza
On 8/31/23 09:01, Andrew Jones wrote: On Fri, Aug 25, 2023 at 10:08:49AM -0300, Daniel Henrique Barboza wrote: All code related to MISA TCG properties is also moved. At this point, all TCG properties handling is done in tcg-cpu.c, all KVM properties handling is done in kvm-cpu.c. Signed-off

Re: [PATCH 06/13] range: Introduce range_inverse_array()

2023-09-04 Thread Eric Auger
Hi Philippe, On 9/4/23 10:18, Philippe Mathieu-Daudé wrote: > On 4/9/23 10:03, Eric Auger wrote: >> This helper reverses an array of regions, turning original >> regions into holes and original holes into actual regions, >> covering the whole UINT64_MAX span. >> >> Signed-off-by: Eric Auger >> ---

Re: [PATCH 01/13] memory: Let ReservedRegion use Range

2023-09-04 Thread Eric Auger
On 9/4/23 10:12, Philippe Mathieu-Daudé wrote: > On 4/9/23 10:03, Eric Auger wrote: >> A reserved region is a range tagged with a type. Let's directly use >> the Range type in the prospect to reuse some of the library helpers >> shipped with the Range type. >> >> Signed-off-by: Eric Auger >> --

Re: [risu PATCH 4/4] s390x: Update the configure script for s390x support

2023-09-04 Thread Philippe Mathieu-Daudé
On 4/9/23 16:00, Thomas Huth wrote: Auto-detect s390x hosts and add s390x information to the help text. Signed-off-by: Thomas Huth --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v5 02/20] linux-user: Introduce imgsrc_read, imgsrc_read_alloc

2023-09-04 Thread Alex Bennée
Richard Henderson writes: > Introduced and initialized, but not yet really used. > These will tidy the current tests vs BPRM_BUF_SIZE. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [risu PATCH 1/4] s390x: Add basic s390x support to the C code

2023-09-04 Thread Thomas Huth
On 04/09/2023 16.19, Ilya Leoshkevich wrote: On Mon, 2023-09-04 at 16:00 +0200, Thomas Huth wrote: With these changes, it is now possible to compile the "risu" binary for s390x hosts. Signed-off-by: Thomas Huth ---  risu_reginfo_s390x.c | 142 +++  risu

Re: [risu PATCH 0/4] Add support for s390x to RISU

2023-09-04 Thread Ilya Leoshkevich
On Mon, 2023-09-04 at 16:00 +0200, Thomas Huth wrote: >  Hi Peter! > > Here are some patches that add basic support for s390x to RISU. > It's still quite limited, e.g. no support for load/store memory > operations yet, but the basics with simple 16-bit or 32-bit > instructions work already fine. >

[PULL 12/14] block-backend: process zoned requests in the current AioContext

2023-09-04 Thread Kevin Wolf
From: Stefan Hajnoczi Process zoned requests in the current thread's AioContext instead of in the BlockBackend's AioContext. There is no need to use the BlockBackend's AioContext thanks to CoMutex bs->wps->colock, which protects zone metadata. Signed-off-by: Stefan Hajnoczi Message-ID: <202308

[PULL 09/14] vmdk: Clean up bdrv_open_child() return value check

2023-09-04 Thread Kevin Wolf
From: Dmitry Frolov bdrv_open_child() may return NULL. Usually return value is checked for this function. Check for return value is more reliable. Fixes: 24bc15d1f6 ("vmdk: Use BdrvChild instead of BDS for references to extents") Signed-off-by: Dmitry Frolov Message-ID: <20230831125926.796205

[PULL 07/14] block: Be more verbose in create fallback

2023-09-04 Thread Kevin Wolf
From: Hanna Czenczek For image creation code, we have central fallback code for protocols that do not support creating new images (like NBD or iscsi). So for them, you can only specify existing paths/exports that are overwritten to make clean new images. In such a case, if the given path cannot

[PULL 11/14] block-backend: process I/O in the current AioContext

2023-09-04 Thread Kevin Wolf
From: Stefan Hajnoczi Switch blk_aio_*() APIs over to multi-queue by using qemu_get_current_aio_context() instead of blk_get_aio_context(). This change will allow devices to process I/O in multiple IOThreads in the future. I audited existing blk_aio_*() callers: - migration/block.c: blk_mig_lock

[PULL 03/14] block: minimize bs->reqs_lock section in tracked_request_end()

2023-09-04 Thread Kevin Wolf
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Message-ID: <20230808155852.2745350-2-stefa...@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/io.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/block/io.c b/blo

[PULL 01/14] block/vpc: Avoid dynamic stack allocation

2023-09-04 Thread Kevin Wolf
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Here we don't expect the bitmap size to be enormous, and since we're about to read/write it to disk the overhead of the allocation should be fine. The codebase has very few VLAs, and if we ca

[PULL 10/14] block: remove AIOCBInfo->get_aio_context()

2023-09-04 Thread Kevin Wolf
From: Stefan Hajnoczi The synchronous bdrv_aio_cancel() function needs the acb's AioContext so it can call aio_poll() to wait for cancellation. It turns out that all users run under the BQL in the main AioContext, so this callback is not needed. Remove the callback, mark bdrv_aio_cancel() GLOBA

[PULL 14/14] block: Remove unnecessary variable in bdrv_block_device_info

2023-09-04 Thread Kevin Wolf
From: Fabiano Rosas The commit 5d8813593f ("block/qapi: Let bdrv_query_image_info() recurse") removed the loop where we set the 'bs0' variable, so now it is just the same as 'bs'. Signed-off-by: Fabiano Rosas Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20230901184605.32260-3-faro...@suse.

[PULL 13/14] block: Remove bdrv_query_block_node_info

2023-09-04 Thread Kevin Wolf
From: Fabiano Rosas The last call site of this function has been removed by commit c04d0ab026 ("qemu-img: Let info print block graph"). Reviewed-by: Claudio Fontana Signed-off-by: Fabiano Rosas Message-ID: <20230901184605.32260-2-faro...@suse.de> Reviewed-by: Kevin Wolf Signed-off-by: Kevin W

[PULL 02/14] iotests: adapt test output for new qemu_cleanup() behavior

2023-09-04 Thread Kevin Wolf
From: Fiona Ebner Since commit ca2a5e630d ("qemu_cleanup: begin drained section after vm_shutdown()"), there will be an additional pause for jobs during qemu_cleanup(). The reason is that the bdrv_drain_all() call in do_vm_stop() is not inside the drained section used by qemu_cleanup() anymore. I

[PULL 08/14] qemu-img: Update documentation for compressed images

2023-09-04 Thread Kevin Wolf
Document the 'compression_type' option for qcow2, and mention that streamOptimized vmdk supports compression, too. Reported-by: Richard W.M. Jones Signed-off-by: Kevin Wolf Message-ID: <20230901102430.23856-1-kw...@redhat.com> Reviewed-by: Richard W.M. Jones Signed-off-by: Kevin Wolf --- docs

[PULL 04/14] block: change reqs_lock to QemuMutex

2023-09-04 Thread Kevin Wolf
From: Stefan Hajnoczi CoMutex has poor performance when lock contention is high. The tracked requests list is accessed frequently and performance suffers in QEMU multi-queue block layer scenarios. It is not necessary to use CoMutex for the requests lock. The lock is always released across corout

[PULL 06/14] block/iscsi: Document why we use raw malloc()

2023-09-04 Thread Kevin Wolf
From: Peter Maydell In block/iscsi.c we use a raw malloc() call, which is unusual given the project standard is to use the glib memory allocation functions. Document why we do so, to avoid it being converted to g_malloc() by mistake. Signed-off-by: Peter Maydell Message-ID: <20230727150705.2664

[PULL 05/14] qemu-img: omit errno value in error message

2023-09-04 Thread Kevin Wolf
From: Michael Tokarev I'm getting io-qcow2-244 test failure on mips* due to output mismatch: Take an internal snapshot: -qemu-img: Could not create snapshot 'test': -95 (Operation not supported) +qemu-img: Could not create snapshot 'test': -122 (Operation not supported) No errors were foun

[PULL 00/14] Block layer patches

2023-09-04 Thread Kevin Wolf
The following changes since commit 17780edd81d27fcfdb7a802efc870a99788bd2fc: Merge tag 'quick-fix-pull-request' of https://gitlab.com/bsdimp/qemu into staging (2023-08-31 10:06:29 -0400) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-upstream for you to

[PATCH] io: Stop appending -listen to net listeners

2023-09-04 Thread Fabiano Rosas
All callers of qio_net_listener_set_name() already add some sort of "listen" or "listener" suffix. For intance, we currently have "migration-socket-listener-listen" and "vnc-listen-listen" as ioc names. Signed-off-by: Fabiano Rosas --- io/net-listener.c | 4 +--- 1 file changed, 1 insertion(+),

Re: [PATCH 61/67] ui/spice: SPICE/QXL requires PIXMAN

2023-09-04 Thread Paolo Bonzini
Il mer 30 ago 2023, 17:21 Philippe Mathieu-Daudé ha scritto: > On 30/8/23 11:38, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Signed-off-by: Marc-André Lureau > > --- > > hw/display/Kconfig | 2 +- > > ui/meson.build | 12 ++-- > > 2 files changed, 7 i

[PATCH] iothread: Set the GSource "name" field

2023-09-04 Thread Fabiano Rosas
Having a name in the source helps with debugging core dumps when one might not have access to TLS data to cross-reference AioContexts with their addresses. Signed-off-by: Fabiano Rosas --- iothread.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/iothread.c b/i

Re: [PATCH v5 03/20] linux-user: Tidy loader_exec

2023-09-04 Thread Alex Bennée
Richard Henderson writes: > Reorg the if cases to reduce indentation. > Test for 4 bytes in the file before checking the signatures. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 04/20] linux-user: Do not clobber bprm_buf swapping ehdr

2023-09-04 Thread Alex Bennée
Richard Henderson writes: > Rearrange the allocation of storage for ehdr between load_elf_image > and load_elf_binary. The same set of copies are done, but we don't > modify bprm_buf, which will be important later. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson R

Re: [PATCH v5 20/20] linux-user/s390x: Add vdso

2023-09-04 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson > --- > linux-user/s390x/vdso-asmoffset.h | 2 + > linux-user/elfload.c | 3 ++ > linux-user/s390x/signal.c | 4 +- > linux-user/s390x/meson.build | 24 +++ > linux-user/s390x/vdso.S

[PATCH] qcow2: keep reference on zeroize with discard-no-unref enabled

2023-09-04 Thread Jean-Louis Dupond
When the discard-no-unref flag is enabled, we keep the reference for normal discard requests. But when a discard is executed on a snapshot/qcow2 image with backing, the discards are saved as zero clusters in the snapshot image. When committing the snapshot to the backing file, not discard_in_l2_sl

Re: [PATCH v6 01/17] nbd: Replace bool structured_reply with mode enum

2023-09-04 Thread Vladimir Sementsov-Ogievskiy
On 29.08.23 20:58, Eric Blake wrote: The upcoming patches for 64-bit extensions requires various points in the protocol to make decisions based on what was negotiated. While we could easily add a 'bool extended_headers' alongside the existing 'bool structured_reply', this does not scale well if

Re: [PATCH RESEND v5 24/26] contrib/plugins: Allow to log registers

2023-09-04 Thread Alex Bennée
Akihiko Odaki writes: > On 2023/08/31 0:08, Alex Bennée wrote: >> Akihiko Odaki writes: >> >>> This demonstrates how a register can be read from a plugin. >>> >>> Signed-off-by: Akihiko Odaki >>> --- >>> docs/devel/tcg-plugins.rst | 10 ++- >>> contrib/plugins/execlog.c | 140 ++

Re: [PATCH] iothread: Set the GSource "name" field

2023-09-04 Thread Philippe Mathieu-Daudé
On 4/9/23 16:48, Fabiano Rosas wrote: Having a name in the source helps with debugging core dumps when one might not have access to TLS data to cross-reference AioContexts with their addresses. Signed-off-by: Fabiano Rosas --- iothread.c | 13 + 1 file changed, 9 insertions(+), 4

[PATCH v2 05/22] target/m68k: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: target/m68k/translate.c:828:18: error: declaration shadows a local variable [-Werror,-Wshadow] TCGv tmp = tcg_temp_new(); ^ target/m68k/translate.c:801:15: note: previous declaration is here TCGv reg, tmp, result; ^ Signed-off-by: Philippe

[PATCH v2 06/22] target/tricore: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: target/tricore/translate.c:5016:18: warning: declaration of ‘temp’ shadows a previous local [-Wshadow=compatible-local] 5016 | TCGv temp = tcg_constant_i32(const9); | ^~~~ target/tricore/translate.c:4958:10: note: shadowed declaration is here 49

[PATCH v2 00/22] (few more) Steps towards enabling -Wshadow

2023-09-04 Thread Philippe Mathieu-Daudé
Since v1: - Addressed review comments - Added R-b tags - More patches For rational see Markus cover on https://lore.kernel.org/qemu-devel/20230831132546.3525721-1-arm...@redhat.com/ This series contains few more, my take. Based-on: <20230831132546.3525721-1-arm...@redhat.com> Philippe Mathieu-D

[PATCH v2 07/22] hw/arm/armv7m: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: hw/arm/armv7m.c: In function ‘armv7m_realize’: hw/arm/armv7m.c:520:27: warning: declaration of ‘sbd’ shadows a previous local [-Wshadow=compatible-local] 520 | SysBusDevice *sbd = SYS_BUS_DEVICE(&s->bitband[i]); | ^~~ hw/arm/armv7m.c:27

[PATCH v2 02/22] target/arm/tcg: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: target/arm/tcg/translate-m-nocp.c: In function ‘gen_M_fp_sysreg_read’: target/arm/tcg/translate-m-nocp.c:509:18: warning: declaration of ‘tmp’ shadows a previous local [-Wshadow=compatible-local] 509 | TCGv_i32 tmp = load_cpu_field(v7m.fpdscr[M_REG_NS]); |

[PATCH v2 11/22] hw/ide/ahci: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
hw/ide/ahci.c:1577:23: error: declaration shadows a local variable [-Werror,-Wshadow] IDEState *s = &ad->port.ifs[j]; ^ hw/ide/ahci.c:1569:29: note: previous declaration is here void ahci_uninit(AHCIState *s) ^ Signed-off-b

[PATCH v2 09/22] hw/arm/allwinner: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: hw/arm/allwinner-r40.c:412:14: error: declaration shadows a local variable [-Werror,-Wshadow] for (int i = 0; i < AW_R40_NUM_MMCS; i++) { ^ hw/arm/allwinner-r40.c:299:14: note: previous declaration is here unsigned i; ^ Signed-off-by: Philippe Mathieu-D

[PATCH v2 13/22] hw/microblaze: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: hw/microblaze/petalogix_ml605_mmu.c: In function ‘petalogix_ml605_init’: hw/microblaze/petalogix_ml605_mmu.c:186:24: warning: declaration of ‘dinfo’ shadows a previous local [-Wshadow=compatible-local] 186 | DriveInfo *dinfo = drive_get(IF_MTD, 0, i); |

[PATCH v2 10/22] hw/arm/aspeed: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: hw/arm/aspeed_ast2600.c:391:18: error: declaration shadows a local variable [-Werror,-Wshadow] qemu_irq irq = aspeed_soc_get_irq(s, ASPEED_DEV_TIMER1 + i); ^ hw/arm/aspeed_ast2600.c:283:14: note: previous declaration is here qemu_irq irq; ^ hw

[PATCH v2 08/22] hw/arm/virt: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: hw/arm/virt.c:821:22: error: declaration shadows a local variable [-Werror,-Wshadow] qemu_irq irq = qdev_get_gpio_in(vms->gic, ^ hw/arm/virt.c:803:13: note: previous declaration is here int irq; ^ Signed-off-by: Philippe Mathieu-Daudé

[PATCH v2 17/22] util/vhost-user-server: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: util/vhost-user-server.c: In function ‘set_watch’: util/vhost-user-server.c:274:20: warning: declaration of ‘vu_fd_watch’ shadows a previous local [-Wshadow=compatible-local] 274 | VuFdWatch *vu_fd_watch = g_new0(VuFdWatch, 1); |^~~ util/

[PATCH v2 19/22] linux-user/strace: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: linux-user/strace.c: In function ‘print_sockaddr’: linux-user/strace.c:370:17: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local] 370 | int i; | ^ linux-user/strace.c:361:9: note: shadowed declaration is here 361

[PATCH v2 12/22] hw/m68k: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: hw/m68k/virt.c:263:13: error: declaration shadows a local variable [-Werror,-Wshadow] BOOTINFOSTR(param_ptr, BI_COMMAND_LINE, ^ hw/m68k/bootinfo.h:47:13: note: expanded from macro 'BOOTINFOSTR' int i; \ ^ hw/m68k/virt.c:130:9: note: previous

[RFC PATCH v2 22/22] softmmu/physmem: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: softmmu/physmem.c: In function ‘cpu_physical_memory_snapshot_and_clear_dirty’: softmmu/physmem.c:916:27: warning: declaration of ‘offset’ shadows a parameter [-Wshadow=compatible-local] 916 | unsigned long offset = page % DIRTY_MEMORY_BLOCK_SIZE; |

[PATCH v2 01/22] tcg: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: tcg/tcg.c:2551:27: error: declaration shadows a local variable [-Werror,-Wshadow] MemOp op = get_memop(oi); ^ tcg/tcg.c:2437:12: note: previous declaration is here TCGOp *op; ^ accel/tcg/tb-maint.c:245:18: error: declaration

[PATCH v2 21/22] softmmu/memory: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: softmmu/memory.c: In function ‘mtree_print_mr’: softmmu/memory.c:3236:27: warning: declaration of ‘ml’ shadows a previous local [-Wshadow=compatible-local] 3236 | MemoryRegionList *ml; | ^~ softmmu/memory.c:3213:32: note: shadowed declaratio

[PATCH] docs/devel/loads-stores: Fix git grep regexes

2023-09-04 Thread Peter Maydell
The loads-and-stores documentation includes git grep regexes to find occurrences of the various functions. Some of these regexes have errors, typically failing to escape the '?', '(' and ')' when they should be metacharacters (since these are POSIX basic REs). We also weren't consistent about whet

Re: [PATCH v6 04/17] nbd: Prepare for 64-bit request effect lengths

2023-09-04 Thread Vladimir Sementsov-Ogievskiy
On 29.08.23 20:58, Eric Blake wrote: Widen the length field of NBDRequest to 64-bits, although we can assert that all current uses are still under 32 bits: either because of NBD_MAX_BUFFER_SIZE which is even smaller (and where size_t can still be appropriate, even on 32-bit platforms), or because

[PATCH v2 03/22] target/arm/hvf: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Per Peter Maydell analysis [*]: The hvf_vcpu_exec() function is not documented, but in practice its caller expects it to return either EXCP_DEBUG (for "this was a guest debug exception you need to deal with") or something else (presumably the intention being 0 for OK). The hvf_sysreg_re

[PATCH v2 18/22] semihosting/arm-compat: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: semihosting/arm-compat-semi.c: In function ‘do_common_semihosting’: semihosting/arm-compat-semi.c:379:13: warning: declaration of ‘ret’ shadows a previous local [-Wshadow=local] 379 | int ret, err = 0; | ^~~ semihosting/arm-compat-semi.c:370:14: note: sh

[PATCH v2 20/22] sysemu/device_tree: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: hw/mips/boston.c:472:5: error: declaration shadows a local variable [-Werror,-Wshadow] qemu_fdt_setprop_cells(fdt, name, "reg", reg_base, reg_size); ^ include/sysemu/device_tree.h:129:13: note: expanded from macro 'qemu_fdt_setprop_cells' int i; ^ hw/mips/b

[PATCH v2 16/22] crypto/cipher-gnutls.c: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: In file included from crypto/cipher.c:140: crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_encrypt’: crypto/cipher-gnutls.c.inc:116:17: warning: declaration of ‘err’ shadows a previous local [-Wshadow=compatible-local] 116 | int err = gnutls_cipher_init(&

[PATCH v2 04/22] target/mips: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: target/mips/tcg/nanomips_translate.c.inc:4410:33: error: declaration shadows a local variable [-Werror,-Wshadow] int32_t imm = extract32(ctx->opcode, 1, 13) | ^ target/mips/tcg/nanomips_translate.c.inc:3577:9: note: previous declara

[PATCH v2 15/22] net/eth: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: net/eth.c:435:20: error: declaration shadows a local variable [-Werror,-Wshadow] size_t input_size = iov_size(pkt, pkt_frags); ^ net/eth.c:413:16: note: previous declaration is here size_t input_size = iov_size(pkt, pkt_frags); ^ Sug

[PATCH v2 14/22] hw/nios2: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: hw/nios2/10m50_devboard.c: In function ‘nios2_10m50_ghrd_init’: hw/nios2/10m50_devboard.c:101:22: warning: declaration of ‘dev’ shadows a previous local [-Wshadow=compatible-local] 101 | DeviceState *dev = qdev_new(TYPE_NIOS2_VIC); | ^~~ hw/nios

[PATCH v2 0/3] hw/cxl: Add dummy ACPI QTG DSM

2023-09-04 Thread Jonathan Cameron via
v2 updates: - Edit of patch description to not confuse matters by mentioning switches. - Associated ACPI test updates. CXL platforms may support the concept of QoS Thottling groups (QTG). Typically you want to associate devices with similar performance with the same QTG. As there is no standard

[PATCH v2 1/3] tests/acpi: Allow update of DSDT.cxl

2023-09-04 Thread Jonathan Cameron via
Addition of QTG in following patch requires an update to the test data. Signed-off-by: Jonathan Cameron --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h i

[PATCH v2 2/3] hw/cxl: Add QTG _DSM support for ACPI0017 device

2023-09-04 Thread Jonathan Cameron via
From: Dave Jiang Add a simple _DSM call support for the ACPI0017 device to return a fake QTG ID value of 0 in all cases. The enabling is for _DSM plumbing testing from the OS. Following edited for readbility only Device (CXLM) { Name (_HID, "ACPI0017") // _HID: Hardware ID ... Method (

[PATCH v2 3/3] tests/acpi: Update DSDT.cxl with QTG DSM

2023-09-04 Thread Jonathan Cameron via
Description of change in previous patch. Signed-off-by: Jonathan Cameron --- tests/qtest/bios-tables-test-allowed-diff.h | 1 - tests/data/acpi/q35/DSDT.cxl| Bin 9655 -> 9723 bytes 2 files changed, 1 deletion(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/test

Re: [PATCH 65/67] ppc/kconfig: make SAM460EX depend on PPC & PIXMAN

2023-09-04 Thread Paolo Bonzini
On 8/30/23 14:34, BALATON Zoltan wrote: From: Marc-André Lureau SM501 is going to depend on PIXMAN next. Why is this patch needed when SM501 is the one that depends on PIXMAN and should pull in the dependency? Also what's the change in default.mak? The change in default.mak is needed be

[PATCH 0/1] qom: fix setting of qdev array properties

2023-09-04 Thread Daniel P . Berrangé
By the time of the 8.2.0 release, it will have been 2 years and 6 releases since we accidentally broke setting of array properties for user creatable devices: https://gitlab.com/qemu-project/qemu/-/issues/1090 Some context: * Initial identification / report on the mailing list https://list

[PATCH 1/1] qom: fix setting of array properties

2023-09-04 Thread Daniel P . Berrangé
DEFINE_PROP_ARRAY() creates a property 'len-$ARRAY-PROP-NAME' which, when set, will create a sequence of '$ARRAY-PROP-NAME[N]' properties. This only works if the 'len-$ARRAY-PROP-NAME' property is set first, and the array elements afterwards. Historically this required the user to set correct orde

Re: [PATCH] docs/devel/loads-stores: Fix git grep regexes

2023-09-04 Thread Philippe Mathieu-Daudé
On 4/9/23 18:17, Peter Maydell wrote: The loads-and-stores documentation includes git grep regexes to find occurrences of the various functions. Some of these regexes have errors, typically failing to escape the '?', '(' and ')' when they should be metacharacters (since these are POSIX basic REs

Re: [PATCH v2 16/22] crypto/cipher-gnutls.c: Clean up local variable shadowing

2023-09-04 Thread Daniel P . Berrangé
On Mon, Sep 04, 2023 at 06:12:28PM +0200, Philippe Mathieu-Daudé wrote: > Fix: > > In file included from crypto/cipher.c:140: > crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_encrypt’: > crypto/cipher-gnutls.c.inc:116:17: warning: declaration of ‘err’ shadows a > previous lo

[PATCH 3/3] tests/qtest/pflash: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: tests/qtest/pflash-cfi02-test.c: In function ‘test_geometry’: tests/qtest/pflash-cfi02-test.c:409:22: warning: declaration of ‘byte_addr’ shadows a previous local [-Wshadow=compatible-local] 409 | uint64_t byte_addr = (uint64_t)i * c->sector_len[region]; |

[PATCH] target/riscv: update checks on writing pmpcfg for ePMP to version 1.0

2023-09-04 Thread Alvin Chang
Current checks on writing pmpcfg for ePMP follows ePMP version 0.9.1. However, ePMP specification has already been ratified, and there are some differences between version 0.9.1 and 1.0. In this commit we update the checks of writing pmpcfg to follow ePMP version 1.0. When mseccfg.MML is set, the

[PATCH 1/3] hw/core/machine: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: hw/core/machine.c: In function ‘machine_initfn’: hw/core/machine.c:1081:17: warning: declaration of ‘obj’ shadows a parameter [-Wshadow=compatible-local] 1081 | Object *obj = OBJECT(ms); | ^~~ hw/core/machine.c:1065:36: note: shadowed declaration is h

[PATCH 2/3] hw/intc/openpic: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
Fix: hw/intc/openpic.c: In function ‘openpic_gbl_write’: hw/intc/openpic.c:614:17: warning: declaration of ‘idx’ shadows a previous local [-Wshadow=compatible-local] 614 | int idx; | ^~~ hw/intc/openpic.c:568:9: note: shadowed declaration is here

[PATCH 0/3] (few more) Steps towards enabling -Wshadow [3 more]

2023-09-04 Thread Philippe Mathieu-Daudé
Just missed while posting v2 eh :/ (https://lore.kernel.org/qemu-devel/20230904161235.84651-1-phi...@linaro.org/) Philippe Mathieu-Daudé (3): hw/core/machine: Clean up local variable shadowing hw/intc/openpic: Clean up local variable shadowing tests/qtest/pflash: Clean up local variable shad

Re: [PATCH v2 16/22] crypto/cipher-gnutls.c: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
On 4/9/23 18:27, Daniel P. Berrangé wrote: On Mon, Sep 04, 2023 at 06:12:28PM +0200, Philippe Mathieu-Daudé wrote: Fix: In file included from crypto/cipher.c:140: crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_encrypt’: crypto/cipher-gnutls.c.inc:116:17: warning: declar

Re: [RFC PATCH v2 22/22] softmmu/physmem: Clean up local variable shadowing

2023-09-04 Thread Daniel P . Berrangé
On Mon, Sep 04, 2023 at 06:12:34PM +0200, Philippe Mathieu-Daudé wrote: > Fix: > > softmmu/physmem.c: In function > ‘cpu_physical_memory_snapshot_and_clear_dirty’: > softmmu/physmem.c:916:27: warning: declaration of ‘offset’ shadows a > parameter [-Wshadow=compatible-local] > 916 |

Re: [PATCH 1/3] hw/core/machine: Clean up local variable shadowing

2023-09-04 Thread Peter Maydell
On Mon, 4 Sept 2023 at 17:28, Philippe Mathieu-Daudé wrote: > > Fix: > > hw/core/machine.c: In function ‘machine_initfn’: > hw/core/machine.c:1081:17: warning: declaration of ‘obj’ shadows a > parameter [-Wshadow=compatible-local] >1081 | Object *obj = OBJECT(ms); > |

Re: [PATCH 2/3] hw/intc/openpic: Clean up local variable shadowing

2023-09-04 Thread Peter Maydell
On Mon, 4 Sept 2023 at 17:28, Philippe Mathieu-Daudé wrote: > > Fix: > > hw/intc/openpic.c: In function ‘openpic_gbl_write’: > hw/intc/openpic.c:614:17: warning: declaration of ‘idx’ shadows a previous > local [-Wshadow=compatible-local] > 614 | int idx; > |

Re: [PATCH 3/3] tests/qtest/pflash: Clean up local variable shadowing

2023-09-04 Thread Peter Maydell
On Mon, 4 Sept 2023 at 17:30, Philippe Mathieu-Daudé wrote: > > Fix: > > tests/qtest/pflash-cfi02-test.c: In function ‘test_geometry’: > tests/qtest/pflash-cfi02-test.c:409:22: warning: declaration of ‘byte_addr’ > shadows a previous local [-Wshadow=compatible-local] > 409 | u

Re: [PATCH v2] qdict: Preserve order for iterating qdict elements

2023-09-04 Thread Daniel P . Berrangé
On Sat, Sep 02, 2023 at 05:40:40PM +0800, William Tsai wrote: > Changing the structure of qdict so that it can preserve order when > iterating qdict. This will fix array_properties as it relies on `len-` > prefixed argument to be set first. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issu

[PATCH 0/2] hw/cxl: Support emulating 4 HDM decoders throughout topology

2023-09-04 Thread Jonathan Cameron via
For initial CXL emulation / kernel driver bring up a single Host-managed Device Memory (HDM) decoder instance was sufficient as it let us test the basic region creation code etc. More complex testing appropriate today requires a more realistic configuration with multiple decoders. The Linux kernel

[PATCH 2/2] hw/cxl: Support 4 HDM decoders at all levels of topology

2023-09-04 Thread Jonathan Cameron via
Support these decoders in CXL host bridges (pxb-cxl), CXL Switch USP and CXL Type 3 end points. Signed-off-by: Jonathan Cameron --- Note there is a fix in here for a wrong increment that had no impact when there was only one HDM decoder. include/hw/cxl/cxl_component.h | 7 +++ hw/cxl/cxl-compo

[PATCH 1/2] hw/cxl: Add utility functions decoder interleave ways and target count.

2023-09-04 Thread Jonathan Cameron via
As an encoded version of these key configuration parameters is a register, provide functions to extract it again so as to avoid the need for duplicating the storage. Signed-off-by: Jonathan Cameron --- include/hw/cxl/cxl_component.h | 14 ++ hw/cxl/cxl-component-utils.c | 17 ++

Re: [PATCH v6 05/17] nbd/server: Refactor handling of command sanity checks

2023-09-04 Thread Vladimir Sementsov-Ogievskiy
On 29.08.23 20:58, Eric Blake wrote: Upcoming additions to support NBD 64-bit effect lengths will add a new command flag NBD_CMD_FLAG_PAYLOAD_LEN that needs to be considered in our sanity checks of the client's messages (that is, more than just CMD_WRITE have the potential to carry a client paylo

Re: [PATCH 2/5] cxl/type3: Cleanup multiple CXL_TYPE3() calls in read/write functions

2023-09-04 Thread Jonathan Cameron via
On Thu, 31 Aug 2023 21:29:11 -0400 Gregory Price wrote: > Call CXL_TYPE3 once at top of function to avoid multiple invocations. > > Signed-off-by: Gregory Price Good cleanup on it's own. I'll queue this one up on the backend of the sanitize set that introduces the second use in each of these

Re: [PATCH for-8.1] vfio/display: Fix missing update to set backing fields

2023-09-04 Thread Marc-André Lureau
Hi On Mon, Sep 4, 2023 at 6:11 PM Alex Williamson wrote: > > On Mon, 4 Sep 2023 15:06:21 +0400 > Marc-André Lureau wrote: > > > Hi > > > > On Thu, Aug 17, 2023 at 8:29 PM Kim, Dongwon wrote: > > > > > > Ok, this regression happened not just because of renaming. Originally > > > width and height

Re: [PATCH 4/5] cxl/type3: add an optional mhd validation function for memory accesses

2023-09-04 Thread Jonathan Cameron via
On Thu, 31 Aug 2023 21:29:13 -0400 Gregory Price wrote: > When memory accesses are made, some MHSLD's would validate the address > is within the scope of allocated sections. To do this, the base device > must call an optional function set by inherited devices. > > Signed-off-by: Gregory Price

[PATCH] hw/pci-bridge/cxl-upstream: Add serial number extended capability support

2023-09-04 Thread Jonathan Cameron via
Will be needed so there is a defined serial number for information queries via the Switch CCI. Signed-off-by: Jonathan Cameron --- No ordering dependencies wrt to other CXL patch sets. Whilst we 'need' it for the Switch CCI set it is valid without it and aligns with existing EP serial number sup

Re: [PATCH v22 03/20] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-09-04 Thread Nina Schoetterl-Glausch
On Fri, 2023-09-01 at 17:57 +0200, Nina Schoetterl-Glausch wrote: > From: Pierre Morel > > On interception of STSI(15.1.x) the System Information Block > (SYSIB) is built from the list of pre-ordered topology entries. > > Signed-off-by: Pierre Morel > Co-developed-by: Nina Schoetterl-Glausch >

Re: [PATCH 1/2] hw/cxl: Add utility functions decoder interleave ways and target count.

2023-09-04 Thread Philippe Mathieu-Daudé
On 4/9/23 18:47, Jonathan Cameron wrote: As an encoded version of these key configuration parameters is a register, provide functions to extract it again so as to avoid the need for duplicating the storage. Signed-off-by: Jonathan Cameron --- include/hw/cxl/cxl_component.h | 14 ++

Re: [PATCH 2/2] hw/cxl: Support 4 HDM decoders at all levels of topology

2023-09-04 Thread Philippe Mathieu-Daudé
Hi Jonathan, Few style comments inlined. On 4/9/23 18:47, Jonathan Cameron wrote: Support these decoders in CXL host bridges (pxb-cxl), CXL Switch USP and CXL Type 3 end points. Signed-off-by: Jonathan Cameron --- Note there is a fix in here for a wrong increment that had no impact when there

<    1   2   3   4   >