Re: [PATCH 07/11] hw/arm/aspeed: Clean up local variable shadowing

2023-08-31 Thread Cédric Le Goater
On 9/1/23 00:56, Philippe Mathieu-Daudé wrote: 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

Re: [PATCH v2 09/12] hw/vmapple/cfg: Introduce vmapple cfg region

2023-08-31 Thread Mark Cave-Ayland
On 30/08/2023 17:14, Alexander Graf wrote: Hi Alex, Instead of device tree or other more standardized means, VMApple passes platform configuration to the first stage boot loader in a binary encoded format that resides at a dedicated RAM region in physical address space. This patch models this

Re: [PATCH v2 08/12] hw/vmapple/bdif: Introduce vmapple backdoor interface

2023-08-31 Thread Mark Cave-Ayland
On 30/08/2023 17:14, Alexander Graf wrote: Hi Alex, The VMApple machine exposes AUX and ROOT block devices (as well as USB OTG emulation) via virtio-pci as well as a special, simple backdoor platform device. This patch implements this backdoor platform device to the best of my understanding.

Re: [PATCH v2 07/12] hw/vmapple/aes: Introduce aes engine

2023-08-31 Thread Mark Cave-Ayland
On 30/08/2023 17:14, Alexander Graf wrote: Hi Alex, VMApple contains an "aes" engine device that it uses to encrypt and decrypt its nvram. It has trivial hard coded keys it uses for that purpose. Add device emulation for this device model. Signed-off-by: Alexander Graf ---

Re: [PATCH v2 02/12] hw/misc/pvpanic: Add MMIO interface

2023-08-31 Thread Mark Cave-Ayland
On 30/08/2023 17:14, Alexander Graf wrote: Hi Alex, In addition to the ISA and PCI variants of pvpanic, let's add an MMIO platform device that we can use in embedded arm environments. Signed-off-by: Alexander Graf Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé ---

Re: [PATCH v9 0/4] hw/ufs: Add Universal Flash Storage (UFS) support

2023-08-31 Thread Jeuk Kim
On 23. 8. 30. 20:38, Stefan Hajnoczi wrote: On Thu, 3 Aug 2023 at 07:49, Jeuk Kim wrote: Dear Stefan, I'm really sorry, but could you please put this patch series instead of v8, which was previously merged into block-next? The fixes from v8 are below. Please let me know if you have any

Re: [PATCH 01/11] tcg: Clean up local variable shadowing

2023-08-31 Thread Richard Henderson
On 8/31/23 15:55, Philippe Mathieu-Daudé wrote: -MemOp op = get_memop(oi); +MemOp o = get_memop(oi); mop would be a more descriptive replacement. Otherwise, Reviewed-by: Richard Henderson r~

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

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

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

2023-08-31 Thread Philippe Mathieu-Daudé
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]); ^ target/arm/tcg/translate-m-nocp.c:433:14: note: previous declaration is here TCGv_i32 tmp;

[PATCH 11/11] sysemu/device_tree: Clean up local variable shadowing

2023-08-31 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; ^

[PATCH 07/11] hw/arm/aspeed: Clean up local variable shadowing

2023-08-31 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; ^

[PATCH 04/11] target/m68k: Clean up local variable shadowing

2023-08-31 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 03/11] target/mips: Clean up local variable shadowing

2023-08-31 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

[PATCH 10/11] net/eth: Clean up local variable shadowing

2023-08-31 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); ^

[PATCH 08/11] hw/m68k: Clean up local variable shadowing

2023-08-31 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

[PATCH 05/11] hw/arm/virt: Clean up local variable shadowing

2023-08-31 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

[PATCH 06/11] hw/arm/allwinner: Clean up local variable shadowing

2023-08-31 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

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

2023-08-31 Thread Philippe Mathieu-Daudé
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-Daudé (11): tcg: Clean up local variable shadowing target/arm:

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

2023-08-31 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

Re: [PATCH v3 10/20] hw/virtio: add config support to vhost-user-device

2023-08-31 Thread Albert Esteve
Sorry to bring up this post, it's been a while since you posted. But I have been testing the patch the last couple of days. On Mon, Jul 10, 2023 at 9:58 PM Michael S. Tsirkin wrote: > On Mon, Jul 10, 2023 at 04:35:12PM +0100, Alex Bennée wrote: > > To use the generic device the user will need

Re: [PATCH v2 11/12] hw/vmapple/virtio-blk: Add support for apple virtio-blk

2023-08-31 Thread Philippe Mathieu-Daudé
On 31/8/23 22:03, Stefan Hajnoczi wrote: On Wed, Aug 30, 2023 at 04:14:24PM +, Alexander Graf wrote: Apple has its own virtio-blk PCI device ID where it deviates from the official virtio-pci spec slightly: It puts a new "apple type" field at a static offset in config space and introduces a

Re: [PATCH 2/7] migration: Clean up local variable shadowing

2023-08-31 Thread Peter Xu
On Thu, Aug 31, 2023 at 03:25:41PM +0200, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-08-31 Thread Peter Xu
On Thu, Aug 31, 2023 at 03:25:40PM +0200, Markus Armbruster wrote: > qemu_rdma_save_page() reports polling error with error_report(), then > succeeds anyway. This is because the variable holding the polling > status *shadows* the variable the function returns. The latter > remains zero. > >

Re: [PATCH v2 11/12] hw/vmapple/virtio-blk: Add support for apple virtio-blk

2023-08-31 Thread Stefan Hajnoczi
On Wed, Aug 30, 2023 at 04:14:24PM +, Alexander Graf wrote: > Apple has its own virtio-blk PCI device ID where it deviates from the > official virtio-pci spec slightly: It puts a new "apple type" > field at a static offset in config space and introduces a new barrier > command. > > This patch

Re: [PATCH v2 08/12] hw/vmapple/bdif: Introduce vmapple backdoor interface

2023-08-31 Thread Stefan Hajnoczi
On Wed, Aug 30, 2023 at 04:14:21PM +, Alexander Graf wrote: > The VMApple machine exposes AUX and ROOT block devices (as well as USB OTG > emulation) via virtio-pci as well as a special, simple backdoor platform > device. > > This patch implements this backdoor platform device to the best of

Re: [PATCH 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-08-31 Thread Stefan Hajnoczi
On Thu, Aug 31, 2023 at 03:25:43PM +0200, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH 5/7] block/vdi: Clean up local variable shadowing

2023-08-31 Thread Stefan Hajnoczi
On Thu, Aug 31, 2023 at 03:25:44PM +0200, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH 6/7] block: Clean up local variable shadowing

2023-08-31 Thread Stefan Hajnoczi
On Thu, Aug 31, 2023 at 03:25:45PM +0200, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH v3 10/20] hw/virtio: add config support to vhost-user-device

2023-08-31 Thread Alex Bennée
Albert Esteve writes: > Sorry to bring up this post, it's been a while since you posted. > But I have been testing the patch the last couple of days. > > On Mon, Jul 10, 2023 at 9:58 PM Michael S. Tsirkin wrote: > > On Mon, Jul 10, 2023 at 04:35:12PM +0100, Alex Bennée wrote: > > To use the

Re: [PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-08-31 Thread Richard Henderson
On 8/31/23 06:25, Markus Armbruster wrote: +#define PASTE(a, b) a##b We already have glue() in qemu/compiler.h. The rest of it looks quite sensible. r~

Re: [PATCH 3/7] ui: Clean up local variable shadowing

2023-08-31 Thread Peter Maydell
On Thu, 31 Aug 2023 at 14:25, Markus Armbruster wrote: > > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-08-31 Thread Eric Blake
On Thu, Aug 31, 2023 at 03:25:46PM +0200, Markus Armbruster wrote: [This paragraph written last: Bear with my stream of consciousness review below, where I end up duplicating some of the conslusions you reached before the point where I saw where the patch was headed] > Variables declared in

[PATCH] fix bdrv_open_child return value check

2023-08-31 Thread 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 --- block/vmdk.c | 2 +- 1 file changed, 1

[PULL v2 00/40] Misc patches for 2023-08-31

2023-08-31 Thread Philippe Mathieu-Daudé
: https://github.com/philmd/qemu.git tags/misc-20230831 for you to fetch changes up to e1298bc7dc4ea05fb84f017eabec967816f7de6e: build: Only define OS_OBJECT_USE_OBJC with gcc (2023-08-31 15:51:41 +0200) Misc patches queue Overall clea

Re: [PULL 39/41] meson: Fix MESONINTROSPECT parsing

2023-08-31 Thread Philippe Mathieu-Daudé
On 31/8/23 15:06, Michael Tokarev wrote: 31.08.2023 15:56, Philippe Mathieu-Daudé wrote: From: Akihiko Odaki The arguments in MESONINTROSPECT are quoted with shlex.quote() so it must be parsed with shlex.split(). Fixes: cf60ccc330 ("cutils: Introduce bundle mechanism") Reported-by: Michael

Re: [PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-08-31 Thread Eric Blake
On Thu, Aug 31, 2023 at 03:25:40PM +0200, Markus Armbruster wrote: > qemu_rdma_save_page() reports polling error with error_report(), then > succeeds anyway. This is because the variable holding the polling > status *shadows* the variable the function returns. The latter > remains zero. > >

Re: [PATCH] util/iov: Avoid dynamic stack allocation

2023-08-31 Thread Eric Blake
On Thu, Aug 31, 2023 at 10:26:17AM +0200, Philippe Mathieu-Daudé wrote: > Cc'ing qemu-block@ (I suppose this will go via a block tree) Makes sense. I can queue it through my NBD tree if no one else beats me (since the nbd code is a heavy user of iovs). > > On 24/8/23 18:47, Peter Maydell

Re: [PATCH v3 0/4] io: follow coroutine AioContext in qio_channel_yield()

2023-08-31 Thread Eric Blake
On Wed, Aug 30, 2023 at 06:47:58PM -0400, Stefan Hajnoczi wrote: > v3: > - Fix wrong copy-pasted function name in doc comment [Eric] > - Fix "match" -> "matches" in comment [Eric] > v2: > - Add Patch 1 & 2 to remove unused NBD aio_context arguments and dead code > [Fabiano] > - Remove

Re: [PATCH v2 4/4] io: follow coroutine AioContext in qio_channel_yield()

2023-08-31 Thread Eric Blake
On Wed, Aug 30, 2023 at 08:54:40AM +0100, Daniel P. Berrangé wrote: > > > > With those minor fixes, > > > > Reviewed-by: Eric Blake > > Acked-by: Daniel P. Berrangé > > Eric, feel free to merge the two io subsystem changes at the same time > as the NBD changes. Ok; I'm queuing this series

[PATCH 3/7] ui: Clean up local variable shadowing

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster --- ui/gtk.c |

[PATCH 6/7] block: Clean up local variable shadowing

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster --- block.c |

[PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-08-31 Thread Markus Armbruster
Variables declared in macros can shadow other variables. Much of the time, this is harmless, e.g.: #define _FDT(exp) \ do { \ int ret = (exp);

[PATCH 5/7] block/vdi: Clean up local variable shadowing

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster --- block/vdi.c | 7 +++

[PATCH 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster ---

[PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-08-31 Thread Markus Armbruster
qemu_rdma_save_page() reports polling error with error_report(), then succeeds anyway. This is because the variable holding the polling status *shadows* the variable the function returns. The latter remains zero. Broken since day one, and duplicated more recently. Fixes: 2da776db4846 (rdma:

[PATCH 0/7] Steps towards enabling -Wshadow=local

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: PATCH 1. Enabling -Wshadow would prevent bugs like this one. But we'd have to clean up all the offenders first. We got a lot of them. Enabling

[PATCH 2/7] migration: Clean up local variable shadowing

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster --- migration/block.c | 4

[PULL 37/41] ui: spelling fixes

2023-08-31 Thread Philippe Mathieu-Daudé
From: Michael Tokarev Signed-off-by: Michael Tokarev Message-ID: <20230823065335.1919380-2-...@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daudé --- include/ui/kbd-state.h | 2 +- include/ui/spice-display.h | 2 +- ui/keymaps.h | 2 +- ui/vnc-enc-zywrle.h| 4 ++--

[PULL 31/41] hw/usb: spelling fixes

2023-08-31 Thread Philippe Mathieu-Daudé
From: Michael Tokarev Signed-off-by: Michael Tokarev Message-ID: <20230823065335.1919380-14-...@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/quirks.h | 2 +- hw/usb/ccid-card-emulated.c | 2 +- hw/usb/hcd-ehci.c | 6 +++--- hw/usb/hcd-ohci.c | 2

[PULL 33/41] hw/i386: Remove unuseful kvmclock_create() stub

2023-08-31 Thread Philippe Mathieu-Daudé
We shouldn't call kvmclock_create() when KVM is not available or disabled: - check for kvm_enabled() before calling it - assert KVM is enabled once called Since the call is elided when KVM is not available, we can remove the stub (it is never compiled). Signed-off-by: Philippe Mathieu-Daudé

[PULL 39/41] meson: Fix MESONINTROSPECT parsing

2023-08-31 Thread Philippe Mathieu-Daudé
From: Akihiko Odaki The arguments in MESONINTROSPECT are quoted with shlex.quote() so it must be parsed with shlex.split(). Fixes: cf60ccc330 ("cutils: Introduce bundle mechanism") Reported-by: Michael Tokarev Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by:

[PULL 36/41] util: spelling fixes

2023-08-31 Thread Philippe Mathieu-Daudé
From: Michael Tokarev Signed-off-by: Michael Tokarev Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20230823065335.1919380-3-...@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daudé --- include/elf.h | 4 ++-- include/io/channel-socket.h | 4 ++-- include/io/task.h | 2

[PULL 35/41] util/fifo8: Fix typo in fifo8_push_all() description

2023-08-31 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Francisco Iglesias Reviewed-by: Alex Bennée Message-Id: <20230522153144.30610-2-phi...@linaro.org> --- include/qemu/fifo8.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/fifo8.h b/include/qemu/fifo8.h index

[PULL 27/41] hw/ide: spelling fixes

2023-08-31 Thread Philippe Mathieu-Daudé
From: Michael Tokarev Signed-off-by: Michael Tokarev Message-ID: <20230823065335.1919380-14-...@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ahci_internal.h | 4 ++-- hw/ide/cmd646.c| 2 +- hw/ide/core.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)

[PULL 14/41] target/helpers: Remove unnecessary 'qemu/main-loop.h' header

2023-08-31 Thread Philippe Mathieu-Daudé
"qemu/main-loop.h" declares functions related to QEMU's main loop mutex, which these files don't access. Remove the unused "qemu/main-loop.h" header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230828221314.18435-8-phi...@linaro.org> ---

[PULL 34/41] hw/i386: Rename 'hw/kvm/clock.h' -> 'hw/i386/kvm/clock.h'

2023-08-31 Thread Philippe Mathieu-Daudé
kvmclock_create() is only implemented in hw/i386/kvm/clock.h. Restrict the "hw/kvm/clock.h" header to i386 by moving it to hw/i386/. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Message-Id: <20230620083228.88796-3-phi...@linaro.org> --- {include/hw => hw/i386}/kvm/clock.h | 4

[PULL 18/41] exec/translation-block: Clean up includes

2023-08-31 Thread Philippe Mathieu-Daudé
'qemu/atomic.h' and 'exec/target_page.h' are not used. 'qemu/interval-tree.h' is only required for user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230828221314.18435-12-phi...@linaro.org> --- include/exec/translation-block.h | 6 +++--- 1

[PULL 24/41] hw/char/pl011: Replace magic values by register field definitions

2023-08-31 Thread Philippe Mathieu-Daudé
0x400 is Data Register Break Error (DR_BE), 0x10 is Line Control Register Fifo Enabled (LCR_FEN) and 0x1 is Send Break (LCR_BRK). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20230522153144.30610-7-phi...@linaro.org> ---

[PULL 23/41] hw/char/pl011: Remove duplicated PL011_INT_[RT]X definitions

2023-08-31 Thread Philippe Mathieu-Daudé
PL011_INT_TX duplicates INT_TX, and PL011_INT_RX INT_RX. Follow other register fields definitions from this file, keep the shorter form. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20230522153144.30610-6-phi...@linaro.org> ---

[PULL 07/41] exec/address-spaces.h: Remove unuseful 'exec/memory.h' include

2023-08-31 Thread Philippe Mathieu-Daudé
"exec/address-spaces.h" declares get_system_io() and get_system_memory(), both returning a MemoryRegion pointer. MemoryRegion is forward declared in "qemu/typedefs.h", so we don't need any declaration from "exec/memory.h" here. Remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by:

[PULL 28/41] hw/display: spelling fixes

2023-08-31 Thread Philippe Mathieu-Daudé
From: Michael Tokarev Signed-off-by: Michael Tokarev Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20230823065335.1919380-15-...@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daudé --- hw/display/bochs-display.c | 2 +- hw/display/qxl.c | 2 +- hw/display/ssd0303.c | 2 +-

Re: [PULL 39/41] meson: Fix MESONINTROSPECT parsing

2023-08-31 Thread Michael Tokarev
31.08.2023 15:56, Philippe Mathieu-Daudé wrote: From: Akihiko Odaki The arguments in MESONINTROSPECT are quoted with shlex.quote() so it must be parsed with shlex.split(). Fixes: cf60ccc330 ("cutils: Introduce bundle mechanism") Reported-by: Michael Tokarev Signed-off-by: Akihiko Odaki

[PULL 40/41] build: Only define OS_OBJECT_USE_OBJC with gcc

2023-08-31 Thread Philippe Mathieu-Daudé
From: Alexander Graf Recent versions of macOS use clang instead of gcc. The OS_OBJECT_USE_OBJC define is only necessary when building with gcc. Let's not define it when building with clang. With this patch, I can successfully include GCD headers in QEMU when building with clang. Signed-off-by:

[PULL 41/41] tests/tcg/aarch64: Rename bti-crt.inc.c -> bti-crt.c.inc

2023-08-31 Thread Philippe Mathieu-Daudé
Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the Coding Style: If you do use template header

[PULL 32/41] hw/usb/hcd-xhci: Avoid variable-length array in xhci_get_port_bandwidth()

2023-08-31 Thread Philippe Mathieu-Daudé
From: Peter Maydell In xhci_get_port_bandwidth(), we use a variable-length array to construct the buffer to send back to the guest. Avoid the VLA by using dma_memory_set() to directly request the memory system to fill the guest memory with a string of '80's. The codebase has very few VLAs, and

[PULL 38/41] docs/style: permit inline loop variables

2023-08-31 Thread Philippe Mathieu-Daudé
From: Alex Bennée I've already wasted enough of my time debugging aliased variables in deeply nested loops. While not scattering variable declarations around is a good aim I think we can make an exception for stuff used inside a loop. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson

[PULL 22/41] hw/char/pl011: Display register name in trace events

2023-08-31 Thread Philippe Mathieu-Daudé
To avoid knowing the register addresses by heart, display their name along in the trace events. Since the MMIO region is 4K wide (0x1000 bytes), displaying the address with 3 digits is enough, so reduce the address format. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée

[PULL 29/41] hw/mips: spelling fixes

2023-08-31 Thread Philippe Mathieu-Daudé
From: Michael Tokarev Signed-off-by: Michael Tokarev Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20230823065335.1919380-7-...@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 2 +- target/mips/tcg/msa_helper.c| 12 ++--

[PULL 17/41] qemu/processor: Remove unused 'qemu/atomic.h' header

2023-08-31 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230828221314.18435-11-phi...@linaro.org> --- include/qemu/processor.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/qemu/processor.h b/include/qemu/processor.h index 8e16c9277d..9f0dcdf28f 100644

[PULL 21/41] hw/char/pl011: Restrict MemoryRegionOps implementation access sizes

2023-08-31 Thread Philippe Mathieu-Daudé
The pl011_read() and pl011_write() handlers shift the offset argument by 2, so are implemented on a 32-bit boundary. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230710175102.32429-2-phi...@linaro.org> --- hw/char/pl011.c | 2 ++ 1 file changed, 2

[PULL 19/41] chardev/char-fe: Document FEWatchFunc typedef

2023-08-31 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Acked-by: Marc-André Lureau Message-Id: <20230705133139.54419-4-phi...@linaro.org> --- include/chardev/char-fe.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h index

[PULL 16/41] target/xtensa: Include missing 'qemu/atomic.h' header

2023-08-31 Thread Philippe Mathieu-Daudé
Since commit fa92bd4af7 ("target/xtensa: fix access to the INTERRUPT SR") these files use QEMU atomic API. Explicit the header inclusion instead of relying on implicit and indirect inclusion. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id:

[PULL 12/41] target/translate: Restrict 'exec/cpu_ldst.h' to user emulation

2023-08-31 Thread Philippe Mathieu-Daudé
Only handle_sigsegv_accerr_write(), declared with user emulation, requires "exec/cpu_ldst.h" (for the abi_ptr typedef). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230828221314.18435-6-phi...@linaro.org> --- include/exec/exec-all.h | 2 +- 1 file

[PULL 26/41] hw/i2c: spelling fixes

2023-08-31 Thread Philippe Mathieu-Daudé
From: Michael Tokarev Signed-off-by: Michael Tokarev Message-ID: <20230823065335.1919380-14-...@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i2c/npcm7xx_smbus.h | 2 +- include/hw/misc/auxbus.h | 2 +- hw/i2c/pm_smbus.c | 2 +- hw/i2c/pmbus_device.c

[PULL 20/41] hw/char: Have FEWatchFunc handlers return G_SOURCE_CONTINUE/REMOVE

2023-08-31 Thread Philippe Mathieu-Daudé
GLib recommend to use G_SOURCE_REMOVE / G_SOURCE_CONTINUE for GSourceFunc callbacks. Our FEWatchFunc is a GSourceFunc returning such value. Use such definitions which are "more memorable" [*]. [*] https://docs.gtk.org/glib/callback.SourceFunc.html#return-value Signed-off-by: Philippe

[PULL 15/41] target/mips: Remove unused headers in lcsr_helper.c

2023-08-31 Thread Philippe Mathieu-Daudé
This files only access the address_space_ld/st API, declared in "exec/cpu-all.h", already included by "cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230828221314.18435-9-phi...@linaro.org> --- target/mips/tcg/sysemu/lcsr_helper.c | 3 --- 1 file

[PULL 11/41] target/translate: Remove unnecessary 'exec/cpu_ldst.h' header

2023-08-31 Thread Philippe Mathieu-Daudé
All these files only access the translator_ld/st API declared in "exec/translator.h". The CPU ld/st API from declared in "exec/cpu_ldst.h" is not used, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230828221314.18435-5-phi...@linaro.org> ---

[PULL 10/41] target/translate: Include missing 'exec/cpu_ldst.h' header

2023-08-31 Thread Philippe Mathieu-Daudé
All these files access the CPU LD/ST API declared in "exec/cpu_ldst.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230828221314.18435-4-phi...@linaro.org> --- target/avr/helper.c | 1 + target/i386/tcg/fpu_helper.c | 1 +

[PULL 30/41] hw/sd: spelling fixes

2023-08-31 Thread Philippe Mathieu-Daudé
From: Michael Tokarev Signed-off-by: Michael Tokarev Message-ID: <20230823065335.1919380-18-...@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c| 2 +- hw/sd/sdhci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index

[PULL 25/41] hw/i2c/pmbus_device: Fix modifying QOM class internals from instance

2023-08-31 Thread Philippe Mathieu-Daudé
QOM object instance should not modify its class state (because all other objects instanciated from this class get affected). Instead of modifying the PMBusDeviceClass 'device_num_pages' field the first time a instance is initialized (in pmbus_pages_alloc), introduce a new pmbus_pages_num() helper

[PULL 13/41] target/helpers: Remove unnecessary 'exec/cpu_ldst.h' header

2023-08-31 Thread Philippe Mathieu-Daudé
These files don't use the CPU ld/st API, remove the unnecessary "exec/cpu_ldst.h" header. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230828221314.18435-7-phi...@linaro.org> --- target/riscv/pmu.h | 1 - target/cris/op_helper.c

[PULL 09/41] target/riscv/pmu: Restrict 'qemu/log.h' include to source

2023-08-31 Thread Philippe Mathieu-Daudé
Declarations from "riscv/pmu.h" don't need anything from "qemu/log.h", reduce it's inclusion to the source. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230828221314.18435-3-phi...@linaro.org> --- target/riscv/pmu.h | 1 - target/riscv/pmu.c | 1 + 2

[PULL 06/41] hw/dma/etraxfs: Include missing 'exec/memory.h' header

2023-08-31 Thread Philippe Mathieu-Daudé
The 'fs_dma_ctrl' structure has a MemoryRegion 'mmio' field which is initialized in etraxfs_dmac_init() calling memory_region_init_io() and memory_region_add_subregion(). These functions are declared in "exec/memory.h", along with the MemoryRegion structure. Include the missing header.

[PULL 08/41] target/ppc/pmu: Include missing 'qemu/timer.h' header

2023-08-31 Thread Philippe Mathieu-Daudé
Since commit c2eff582a3 ("target/ppc: PMU basic cycle count for pseries TCG") pmu_update_cycles() uses QEMU_CLOCK_VIRTUAL and calls qemu_clock_get_ns(), both defined in "qemu/timer.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id:

[PULL 02/41] accel/tcg: spelling fixes

2023-08-31 Thread Philippe Mathieu-Daudé
From: Michael Tokarev Signed-off-by: Michael Tokarev Message-ID: <20230823065335.1919380-18-...@tls.msk.ru> Reviewed-by: Alex Bennée Message-ID: <20230823065335.1919380-19-...@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/tcg-cpu-ops.h | 2 +-

[PULL 00/41] Misc patches for 2023-08-31

2023-08-31 Thread Philippe Mathieu-Daudé
The following changes since commit 156618d9ea67f2f2e31d9dedd97f2dcccbe6808c: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-08-30 09:20:27 -0400) are available in the Git repository at: https://github.com/philmd/qemu.git tags/misc-20230831 for you

[PULL 05/41] hw/net/i82596: Include missing 'exec/address-spaces.h' header

2023-08-31 Thread Philippe Mathieu-Daudé
hw/net/i82596.c access the global 'address_space_memory' calling the ld/st_phys() API. address_space_memory is declared in "exec/address-spaces.h". Currently this header is indirectly pulled in via another header. Explicitly include it to avoid when refactoring unrelated headers:

[PULL 04/41] bulk: Do not declare function prototypes using 'extern' keyword

2023-08-31 Thread Philippe Mathieu-Daudé
By default, C function prototypes declared in headers are visible, so there is no need to declare them as 'extern' functions. Remove this redundancy in a single bulk commit; do not modify: - meson.build (used to check function availability at runtime) - pc-bios/ - libdecnumber/ - tests/

[PULL 03/41] qemu/uri: Use QueryParams type definition

2023-08-31 Thread Philippe Mathieu-Daudé
Follow QEMU CODING_STYLE, use the type definition, making that prototype match the following two. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-Id: <20230605175647.88395-4-phi...@linaro.org> --- include/qemu/uri.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PULL 01/41] accel: Remove HAX accelerator

2023-08-31 Thread Philippe Mathieu-Daudé
HAX is deprecated since commits 73741fda6c ("MAINTAINERS: Abort HAXM maintenance") and 90c167a1da ("docs/about/deprecated: Mark HAXM in QEMU as deprecated"), released in v8.0.0. Per the latest HAXM release (v7.8 [*]), the latest QEMU supported is v7.2: Note: Up to this release, HAXM supports

Re: [PATCH v2 01/12] build: Only define OS_OBJECT_USE_OBJC with gcc

2023-08-31 Thread Akihiko Odaki
On 2023/08/31 17:59, Alexander Graf wrote: On 31.08.23 10:53, Akihiko Odaki wrote: On 2023/08/31 17:12, Philippe Mathieu-Daudé wrote: On 30/8/23 18:14, Alexander Graf wrote: Recent versions of macOS use clang instead of gcc. The OS_OBJECT_USE_OBJC define is only necessary when building

Re: zlib-ng as a compat replacement for zlib

2023-08-31 Thread Florian Weimer
* Richard W. M. Jones: > On Thu, Aug 31, 2023 at 11:05:55AM +0200, Kevin Wolf wrote: >> Unfortunately, we seem to build the RHEL packages with --disable-zstd >> (I suppose just because we tend to disable everything nobody explicitly >> asked for). Maybe we should check other distros. If zstd is

Re: zlib-ng as a compat replacement for zlib

2023-08-31 Thread Richard W.M. Jones
On Thu, Aug 31, 2023 at 11:05:55AM +0200, Kevin Wolf wrote: > [ Cc: qemu-block ] > > Am 30.08.2023 um 20:26 hat Richard W.M. Jones geschrieben: > > On Tue, Aug 29, 2023 at 05:49:24PM -, Daniel Alley wrote: > > > > The background to this is I've spent far too long trying to optimize > > > >

Re: zlib-ng as a compat replacement for zlib

2023-08-31 Thread Kevin Wolf
[ Cc: qemu-block ] Am 30.08.2023 um 20:26 hat Richard W.M. Jones geschrieben: > On Tue, Aug 29, 2023 at 05:49:24PM -, Daniel Alley wrote: > > > The background to this is I've spent far too long trying to optimize > > > the conversion of qcow2 files to raw files. Most existing qcow2 files > >

Re: [PATCH v2 01/12] build: Only define OS_OBJECT_USE_OBJC with gcc

2023-08-31 Thread Alexander Graf
On 31.08.23 10:53, Akihiko Odaki wrote: On 2023/08/31 17:12, Philippe Mathieu-Daudé wrote: On 30/8/23 18:14, Alexander Graf wrote: Recent versions of macOS use clang instead of gcc. The OS_OBJECT_USE_OBJC define is only necessary when building with gcc. Let's not define it when building

Re: [PATCH v2 01/12] build: Only define OS_OBJECT_USE_OBJC with gcc

2023-08-31 Thread Akihiko Odaki
On 2023/08/31 17:12, Philippe Mathieu-Daudé wrote: On 30/8/23 18:14, Alexander Graf wrote: Recent versions of macOS use clang instead of gcc. The OS_OBJECT_USE_OBJC define is only necessary when building with gcc. Let's not define it when building with clang. With this patch, I can

Re: [PATCH v3 0/8] misc AHCI cleanups

2023-08-31 Thread Philippe Mathieu-Daudé
Hi John, On 7/8/23 19:37, John Snow wrote: Apologies again for the delay. I tested it lightly and it seems fine to me (and in general I trust your commits as they've got meticulous references to the spec, so it'll be easy to fix if something goes wrong) It's my fault we'll miss this release

Re: [PATCH] util/iov: Avoid dynamic stack allocation

2023-08-31 Thread Philippe Mathieu-Daudé
Cc'ing qemu-block@ (I suppose this will go via a block tree) On 24/8/23 18:47, Peter Maydell wrote: From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. The codebase has very few VLAs, and if we can get rid of them all we can make the

Re: [PATCH v2 04/12] hvf: arm: Ignore writes to CNTP_CTL_EL0

2023-08-31 Thread Philippe Mathieu-Daudé
On 30/8/23 18:14, Alexander Graf wrote: MacOS unconditionally disables interrupts of the physical timer on boot and then continues to use the virtual one. We don't really want to support a full physical timer emulation, so let's just ignore those writes. Signed-off-by: Alexander Graf --- v1

Re: [PATCH v2 01/12] build: Only define OS_OBJECT_USE_OBJC with gcc

2023-08-31 Thread Philippe Mathieu-Daudé
On 30/8/23 18:14, Alexander Graf wrote: Recent versions of macOS use clang instead of gcc. The OS_OBJECT_USE_OBJC define is only necessary when building with gcc. Let's not define it when building with clang. With this patch, I can successfully include GCD headers in QEMU when building with

  1   2   >