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

2023-03-13 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 v2 06/12] target/s390x: Handle CRL and CGFRL with non-aligned addresses

2023-03-13 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 v2 08/12] target/s390x: Handle CLRL and CLGFRL with non-aligned addresses

2023-03-13 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 v2 11/12] target/s390x: Update do_unaligned_access() comment

2023-03-13 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 v2 02/12] target/s390x: Handle EXECUTE of odd addresses

2023-03-13 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 v2 07/12] target/s390x: Handle CGRL and CLGRL with non-aligned addresses

2023-03-13 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 v2 01/12] target/s390x: Handle branching to odd addresses

2023-03-13 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 Signed-off-by: Ilya Leoshkevich --- target/s390x/cpu.h | 9 + 1 file

Re: [PATCH 0/6] hw/i386/amd_iommu: Orphanize & QDev cleanups

2023-03-13 Thread Philippe Mathieu-Daudé
I forgot to Cc Jason! On 13/3/23 16:30, Philippe Mathieu-Daudé wrote: Following [*]: "Last time I tried AMD vIOMMU it didn't even boot." mark amd_iommu as orphan in preparation of deprecating it (or should we do that directly?). Extract the PCI realize() code from sysbus one in order to

[PATCH 6/6] hw/i386/amd_iommu: Factor amdvi_pci_realize out of amdvi_sysbus_realize

2023-03-13 Thread Philippe Mathieu-Daudé
Aside the Frankenstein model of a SysBusDevice realizing a PCIDevice, QOM parents shouldn't access children internals. In this particular case, amdvi_sysbus_realize() is just open-coding TYPE_AMD_IOMMU_PCI's DeviceRealize() handler. Factor it out. Declare QOM-cast macros with

[PATCH 3/6] hw/i386/amd_iommu: Remove intermediate AMDVIState::devid field

2023-03-13 Thread Philippe Mathieu-Daudé
AMDVIState::devid is only accessed by build_amd_iommu() which has access to the PCIDevice state. Directly get the property calling object_property_get_int() there. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/acpi-build.c | 4 +++- hw/i386/amd_iommu.c | 2 -- hw/i386/amd_iommu.h | 2 --

[PATCH 2/6] hw/i386/amd_iommu: Explicit use of AMDVI_BASE_ADDR in amdvi_init

2023-03-13 Thread Philippe Mathieu-Daudé
By accessing MemoryRegion internals, amdvi_init() gives the false idea that the PCI BAR can be modified. However this isn't true (at least the model isn't ready for that): the device is explicitly maps at the BAR at the fixed AMDVI_BASE_ADDR address in amdvi_sysbus_realize(). Since the SysBus API

[PATCH 5/6] hw/i386/amd_iommu: Set PCI static/const fields via PCIDeviceClass

2023-03-13 Thread Philippe Mathieu-Daudé
Set PCI static/const fields once in amdvi_pci_class_init. They will be propagated via DeviceClassRealize handler via pci_qdev_realize() -> do_pci_register_device() -> pci_config_set*(). Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/amd_iommu.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH 4/6] hw/i386/amd_iommu: Move capab_offset from AMDVIState to AMDVIPCIState

2023-03-13 Thread Philippe Mathieu-Daudé
The 'PCI capability offset' is a *PCI* notion. Since AMDVIPCIState inherits PCIDevice and hold PCI-related fields, move capab_offset from AMDVIState to AMDVIPCIState. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/acpi-build.c | 2 +- hw/i386/amd_iommu.c | 14 +++---

[PATCH 1/6] MAINTAINERS: Mark AMD-Vi emulation as orphan

2023-03-13 Thread Philippe Mathieu-Daudé
hw/i386/amd_iommu.c seems unmaintained: After commit 1c7955c450 ("x86-iommu: introduce parent class", 2016-07-14), almost no feature added, 2 bug fixes, other changes are generic tree-wide API cleanups. Cc: Roman Kapl Cc: Wei Huang Cc: Brijesh Singh Cc: David Kiarie Cc: Jean-Philippe Brucker

[PATCH 0/6] hw/i386/amd_iommu: Orphanize & QDev cleanups

2023-03-13 Thread Philippe Mathieu-Daudé
Following [*]: "Last time I tried AMD vIOMMU it didn't even boot." mark amd_iommu as orphan in preparation of deprecating it (or should we do that directly?). Extract the PCI realize() code from sysbus one in order to remove the single case of calling pci_add_capability() and msi_init() on a

Re: [PATCH v4] target/arm: Add Neoverse-N1 registers

2023-03-13 Thread Peter Maydell
On Mon, 13 Mar 2023 at 03:39, Chen Baozi wrote: > > Add implementation defined registers for neoverse-n1 which > would be accessed by TF-A. Since there is no DSU in Qemu, > CPUCFR_EL1.SCU bit is set to 1 to avoid DSU registers definition. > > Signed-off-by: Chen Baozi > --- > target/arm/cpu64.c

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

2023-03-13 Thread Strahinja Jankovic
Hi, On Mon, Mar 13, 2023 at 8:53 AM Philippe Mathieu-Daudé wrote: > > Hi, > > On 11/3/23 15:41, Strahinja Jankovic wrote: > > 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 > > --- >

[PATCH v9 01/10] target/arm: Move cortex sysregs into a separate file

2023-03-13 Thread Fabiano Rosas
The file cpu_tcg.c is about to be moved into the tcg/ directory, so move the register definitions into a new file. Also move the function declaration to the more appropriate cpregs.h. Reviewed-by: Richard Henderson Signed-off-by: Fabiano Rosas --- target/arm/cortex-regs.c | 69

[PATCH v9 02/10] target/arm: Move 64-bit TCG CPUs into tcg/

2023-03-13 Thread Fabiano Rosas
Move the 64-bit CPUs that are TCG-only: - cortex-a35 - cortex-a55 - cortex-a72 - cortex-a76 - a64fx - neoverse-n1 Keep the CPUs that can be used with KVM: - cortex-a57 - cortex-a53 - max - host For the special case "max" CPU, there's a nuance that while KVM/HVF use the "host" model instead, we

[PATCH v9 00/10] target/arm: Allow CONFIG_TCG=n builds

2023-03-13 Thread Fabiano Rosas
Changes since v8: - reverted back to keeping -cpu max code for TCG in tcg/cpu64.c; - pauth: used tcg_enabled instead of CONFIG_TCG in gdbstub.c. However we still need to keep the ifdef around the function definition in gdbstub64.c; - moved all the regression and test fixes after the patches

[PATCH v9 03/10] target/arm: move cpu_tcg to tcg/cpu32.c

2023-03-13 Thread Fabiano Rosas
From: Claudio Fontana move the module containing cpu models definitions for 32bit TCG-only CPUs to tcg/ and rename it for clarity. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Acked-by: Thomas Huth --- hw/arm/virt.c | 2

[PATCH v9 04/10] target/arm: gdbstub: Guard M-profile code with CONFIG_TCG

2023-03-13 Thread Fabiano Rosas
This code is only relevant when TCG is present in the build. We're about to enable the build with --disable-tcg, so avoid the error: libqemu-aarch64-softmmu.fa.p/target_arm_gdbstub.c.o: in function `m_sysreg_ptr': ../target/arm/gdbstub.c:356: undefined reference to `arm_v7m_get_sp_ptr'

[PATCH v9 05/10] target/arm: gdbstub: Guard pauth code with CONFIG_TCG

2023-03-13 Thread Fabiano Rosas
We currently don't have the reading of pauth regs implemented for KVM so wrap the pauth registration with CONFIG_TCG. This avoids the build error when using --disable-tcg: libqemu-aarch64-softmmu.fa.p/target_arm_gdbstub64.c.o: in function `aarch64_gdb_get_pauth_reg':

[PATCH v9 08/10] arm/Kconfig: Always select SEMIHOSTING when TCG is present

2023-03-13 Thread Fabiano Rosas
We are about to enable the build without TCG, so CONFIG_SEMIHOSTING and CONFIG_ARM_COMPATIBLE_SEMIHOSTING cannot be unconditionally set in default.mak anymore. So reflect the change in a Kconfig. Instead of using semihosting/Kconfig, use a target-specific file, so that the change doesn't affect

[PATCH v9 10/10] gitlab-ci: Check building KVM-only aarch64 target

2023-03-13 Thread Fabiano Rosas
From: Philippe Mathieu-Daudé Add a manual new job to cross-build the aarch64 target with only the KVM accelerator enabled (in particular, no TCG). Re-enable running the similar job on the project Aarch64 custom runner. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas

[PATCH v9 06/10] tests/qtest: Fix tests when no KVM or TCG are present

2023-03-13 Thread Fabiano Rosas
It is possible to have a build with both TCG and KVM disabled due to Xen requiring the i386 and x86_64 binaries to be present in an aarch64 host. If we build with --disable-tcg on the aarch64 host, we will end-up with a QEMU binary (x86) that does not support TCG nor KVM. Skip tests that crash

[PATCH v9 09/10] arm/Kconfig: Do not build TCG-only boards on a KVM-only build

2023-03-13 Thread Fabiano Rosas
Move all the CONFIG_FOO=y from default.mak into "default y if TCG" statements in Kconfig. That way they won't be selected when CONFIG_TCG=n. I'm leaving CONFIG_ARM_VIRT in default.mak because it allows us to keep the two default.mak files not empty and keep aarch64-default.mak including

[PATCH v9 07/10] tests/avocado: Pass parameters to migration test

2023-03-13 Thread Fabiano Rosas
The migration tests are currently broken for an aarch64 host because the tests pass no 'machine' and 'cpu' options on the QEMU command line. Add a separate class to each architecture so that we can specify 'machine' and 'cpu' options instead of relying on defaults. Add a skip decorator to keep

Re: [PATCH v3 0/9] virtio-gpu: Support Venus Vulkan driver

2023-03-13 Thread Dmitry Osipenko
On 3/13/23 17:51, Alex Bennée wrote: > If gfxstream is the android pipe based transport I think it's a legacy from > before the switch to pure VirtIO for the new Cuttlefish models. Right, so older Android versions will only work using gfxstream. Good point, thanks. -- Best regards, Dmitry

Re: [PATCH v7 0/6] memory: prevent dma-reentracy issues

2023-03-13 Thread Alexander Bulekov
On 230313 1502, Thomas Huth wrote: > On 13/03/2023 09.24, Alexander Bulekov wrote: > > v6 -> v7: > > - Fix bad qemu_bh_new_guarded calls found by Thomas (Patch 4) > > - Add an MR-specific flag to disable reentrancy (Patch 5) > > - Disable reentrancy checks for lsi53c895a's RAM-like

Re: [PATCH v3 0/9] virtio-gpu: Support Venus Vulkan driver

2023-03-13 Thread Alex Bennée
If gfxstream is the android pipe based transport I think it's a legacy from before the switch to pure VirtIO for the new Cuttlefish models. On Mon, 13 Mar 2023, 13:27 Dmitry Osipenko, wrote: > On 3/13/23 15:58, Marc-André Lureau wrote: > ... > >> 2) Additional context type: gfxstream [i]? > >>

Re: [PATCH] ui/cocoa: user friendly characters for release mouse

2023-03-13 Thread Philippe Mathieu-Daudé
On 13/3/23 14:53, Christian Schoenebeck wrote: On Monday, March 13, 2023 2:42:36 PM CET BALATON Zoltan wrote: On Mon, 13 Mar 2023, Christian Schoenebeck wrote: On Monday, February 27, 2023 12:28:02 PM CET Christian Schoenebeck wrote: On Tuesday, December 27, 2022 5:15:31 PM CET Christian

[PULL 4/5] target/s390x: Fix emulation of C(G)HRL

2023-03-13 Thread Thomas Huth
From: Nina Schoetterl-Glausch The second operand of COMPARE HALFWORD RELATIVE LONG is a signed halfword, it does not have the same size as the first operand. Fixes: a7e836d5eb ("target-s390: Convert COMPARE, COMPARE LOGICAL") Signed-off-by: Nina Schoetterl-Glausch Reviewed-by: Richard

[PULL 1/5] tests/migration: Tweek auto converge limits check

2023-03-13 Thread Thomas Huth
From: "Dr. David Alan Gilbert" Thomas found an autoconverge test failure where the migration completed before the autoconverge had kicked in. To try and avoid this again: a) Reduce the usleep in test_migrate_auto_converge so that it should exit quicker when autoconverge kicks in b) Make

[PULL 5/5] tests/tcg/s390x: Add C(G)HRL test

2023-03-13 Thread Thomas Huth
From: Nina Schoetterl-Glausch Test COMPARE HALFWORD RELATIVE LONG instructions. Test that the bytes following the second operand do not affect the instruction. Test the sign extension performed on the second operand. Signed-off-by: Nina Schoetterl-Glausch Reviewed-by: Richard Henderson

[PULL 2/5] gitlab-ci: Remove job building EDK2 firmware binaries

2023-03-13 Thread Thomas Huth
From: Philippe Mathieu-Daudé When we introduced this Gitlab-CI job in commit 71920809ce ("gitlab-ci.yml: Add jobs to build EDK2 firmware binaries"), the naive plan was to have reproducible binaries by downloading what this job would build, testing it and eventually committing it. With

[PULL 3/5] gitlab-ci.d/buildtest: Rework the target list of build-system-alpine

2023-03-13 Thread Thomas Huth
The target list of the build-system-alpine job is pretty much a copy of the build-system-ubuntu job (apart from "aarch64-softmmu" which has recently been removed from the ubuntu job in commit 6eda5ef5f8f4, but aarch64-softmmu is still also tested in the opensuse jobs, so we don't need to keep it

[PULL 0/5] s390x and test fixes for 8.0-rc0

2023-03-13 Thread Thomas Huth
Hi Peter! The following changes since commit 29c8a9e31a982874ce4e2c15f2bf82d5f8dc3517: Merge tag 'linux-user-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2023-03-12 10:57:00 +) are available in the Git repository at: https://gitlab.com/thuth/qemu.git

Re: [PATCH v7 0/6] memory: prevent dma-reentracy issues

2023-03-13 Thread Thomas Huth
On 13/03/2023 09.24, Alexander Bulekov wrote: v6 -> v7: - Fix bad qemu_bh_new_guarded calls found by Thomas (Patch 4) - Add an MR-specific flag to disable reentrancy (Patch 5) - Disable reentrancy checks for lsi53c895a's RAM-like MR (Patch 6) Patches 5 and 6 need

Re: [PATCH] ui/cocoa: user friendly characters for release mouse

2023-03-13 Thread Christian Schoenebeck
On Monday, March 13, 2023 2:42:36 PM CET BALATON Zoltan wrote: > On Mon, 13 Mar 2023, Christian Schoenebeck wrote: > > On Monday, February 27, 2023 12:28:02 PM CET Christian Schoenebeck wrote: > >> On Tuesday, December 27, 2022 5:15:31 PM CET Christian Schoenebeck wrote: > >>> While mouse is

Re: [PULL 00/18] UI patches

2023-03-13 Thread Peter Maydell
On Mon, 13 Mar 2023 at 11:01, wrote: > > From: Marc-André Lureau > > The following changes since commit 29c8a9e31a982874ce4e2c15f2bf82d5f8dc3517: > > Merge tag 'linux-user-for-8.0-pull-request' of > https://gitlab.com/laurent_vivier/qemu into staging (2023-03-12 10:57:00 > +) > > are

Re: [PATCH] ui/cocoa: user friendly characters for release mouse

2023-03-13 Thread BALATON Zoltan
On Mon, 13 Mar 2023, Christian Schoenebeck wrote: On Monday, February 27, 2023 12:28:02 PM CET Christian Schoenebeck wrote: On Tuesday, December 27, 2022 5:15:31 PM CET Christian Schoenebeck wrote: While mouse is grabbed, window title contains a hint for the user what keyboard keys to press to

Re: [PATCH v7] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-03-13 Thread Christian Schoenebeck
On Monday, March 13, 2023 2:11:11 PM CET Dorinda Bassey wrote: > Hi Volker, > > > > To hear this, > > start QEMU with qemu-system-x86_64 -machine pcspk-audiodev=audio0 > > -device ich9-intel-hda -device hda-duplex,audiodev=audio0 -audiodev > > pipewire,id=audio0,out.mixing-engine=off ... > > > I

Re: [PATCH v3 0/9] virtio-gpu: Support Venus Vulkan driver

2023-03-13 Thread Dmitry Osipenko
On 3/13/23 15:58, Marc-André Lureau wrote: ... >> 2) Additional context type: gfxstream [i]? >> >> One of the major motivations for adding context types in the >> virtio-gpu spec was supporting gfxstream. gfxstream is used in the >> Android Studio emulator (a variant of QEMU) [ii], among other

Re: [PATCH v7] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-03-13 Thread Dorinda Bassey
Hi Volker, > To hear this, > start QEMU with qemu-system-x86_64 -machine pcspk-audiodev=audio0 > -device ich9-intel-hda -device hda-duplex,audiodev=audio0 -audiodev > pipewire,id=audio0,out.mixing-engine=off ... > I hear the clipped audio stream with these options. IMO, I don't think memset is

[PATCH v3 1/1] hw/riscv: Fix max size limit when put initrd to RAM

2023-03-13 Thread Hang Xu
Because the starting address of ram is not necessarily 0, the remaining free space in ram is ram_size - (start - ram_base) instead of ram_size-start. Signed-off-by: Hang Xu --- hw/riscv/boot.c| 19 +-- hw/riscv/microchip_pfsoc.c | 5 - hw/riscv/opentitan.c

[PATCH v3 0/1] Fix max initrd size limit when put initrd to RAM

2023-03-13 Thread Hang Xu
Because the starting address of ram is not necessarily 0, the remaining free space in ram is ram_size - (start - ram_base) instead of ram_size-start. v3: * Declare 'max_initrd' at the start of the function * Fix title typo v2: * Rebase * Considering that the ram block may be discontinuous Hang

[Capstone] TriCore support in Capstone

2023-03-13 Thread _ *
Hi! My name is billow, I currently work on TriCore support in Capstone. Maybe later on it could be used in QEMU as a disassembly engine for that architecture? It's in an early stage, but some feedback would be welcome. Any suggestions or improvements would be greatly appreciated! The draft PR:

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-13 Thread Paolo Bonzini
On 3/13/23 13:29, Fiona Ebner wrote: In fact, shouldn't request queuing was enabled at the _end_ of bdrv_drained_begin (once the BlockBackend has reached a quiescent state on its own terms), rather than at the beginning (which leads to deadlocks like this one)? Couldn't this lead to scenarios

Re: [RFC PATCH] qapi: net: fix -set parameter with modern style

2023-03-13 Thread Markus Armbruster
Laurent Vivier writes: > With netdev modern style, parameters cannot be found using > qemu_find_opts_err() and then qemu_set_option() cannot find > them to update them with the new option. > > To fix that, update the code to manage the modern style by > searching the parameter in nd_queue, and

Re: [PULL 30/73] tests: acpi: update expected blobs

2023-03-13 Thread Michael S. Tsirkin
On Mon, Mar 13, 2023 at 11:57:52AM +0100, Philippe Mathieu-Daudé wrote: > On 8/3/23 02:12, Michael S. Tsirkin wrote: > > From: Igor Mammedov > > > > expected changes: > > Basically adds devices present on root bus in form: > >Device (SXX) > >{ > > Name (_ADR, 0x) // _ADR:

Re: [PATCH v3 0/9] virtio-gpu: Support Venus Vulkan driver

2023-03-13 Thread Marc-André Lureau
Hi Gurchetan On Tue, Mar 7, 2023 at 2:41 AM Gurchetan Singh wrote: > > On Tue, Jan 31, 2023 at 3:15 PM Dmitry Osipenko > wrote: > > > > Hello, > > > > On 1/30/23 20:00, Alex Bennée wrote: > > > > > > Antonio Caggiano writes: > > > > > >> This series of patches enables support for the Venus

Re: [PATCH v3 1/1] hw/riscv: Fix max size limit when put initrd to RAM

2023-03-13 Thread Daniel Henrique Barboza
On 3/12/23 23:18, Hang Xu wrote: Because the starting address of ram is not necessarily 0, the remaining free space in ram is ram_size - (start - ram_base) instead of ram_size-start. Signed-off-by: Hang Xu --- Reviewed-by: Daniel Henrique Barboza hw/riscv/boot.c| 19

Re: [PATCH v5 16/16] meson.build: Turn on virtfs for Windows

2023-03-13 Thread Christian Schoenebeck
On Monday, February 20, 2023 11:08:15 AM CET Bin Meng wrote: > From: Guohuai Shi > > Enable virtfs configuration option for Windows host. > > Signed-off-by: Guohuai Shi > Signed-off-by: Bin Meng > --- > > meson.build | 10 +- > fsdev/meson.build | 1 + >

Re: [PATCH] DO-NOT-MERGE: pipewire sample code

2023-03-13 Thread Dorinda Bassey
Hi Volker, Thanks for the patch, I've tested the patch and it works. I don't hear the choppy audio with this option "qemu-system-x86_64 -device ich9-intel-hda -device hda-duplex,audiodev=audio0 -audiodev pipewire,id=audio0,out.frequency=96000,in.frequency=96000 " I don't understand how the

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-13 Thread Fiona Ebner
Am 10.03.23 um 16:13 schrieb Paolo Bonzini: > On Fri, Mar 10, 2023 at 3:25 PM Kevin Wolf wrote: >>> 1. The TRIM operation should be completed on the IDE level before >>> draining ends. >>> 2. Block layer requests issued after draining has begun are queued. >>> >>> To me, the conclusion seems to

Re: [PATCH] ui/cocoa: user friendly characters for release mouse

2023-03-13 Thread Christian Schoenebeck
On Monday, February 27, 2023 12:28:02 PM CET Christian Schoenebeck wrote: > On Tuesday, December 27, 2022 5:15:31 PM CET Christian Schoenebeck wrote: > > While mouse is grabbed, window title contains a hint for the user what > > keyboard keys to press to release the mouse. Make that hint text a

Re: [PATCH v7 6/6] lsi53c895a: disable reentrancy detection for script RAM

2023-03-13 Thread Darren Kenny
On Monday, 2023-03-13 at 04:24:17 -04, Alexander Bulekov wrote: > As the code is designed to use the memory APIs to access the script ram, > disable reentrancy checks for the pseudo-RAM ram_io MemoryRegion. > > In the future, ram_io may be converted from an IO to a proper RAM > MemoryRegion. > >

Re: [PATCH v7 5/6] memory: Allow disabling re-entrancy checking per-MR

2023-03-13 Thread Darren Kenny
On Monday, 2023-03-13 at 04:24:16 -04, Alexander Bulekov wrote: > Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny > --- > include/exec/memory.h | 3 +++ > softmmu/memory.c | 2 +- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/include/exec/memory.h

Qemu-storage-daemon crash with 8ab8140 or later

2023-03-13 Thread Lukáš Doktor
Hello folks, I found a functional regression in qemu which is making qemu-storage-daemon to crash when using /dev/ram0 as the host device. I bisected it up to: commit 8ab8140a04cf771d63e9754d6ba6c1e676bfe507 Author: Kevin Wolf Date: Fri Feb 3 16:22:02 2023 +0100 block: Mark

[PULL 18/25] tests/docker: fix a win32 error due to portability

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau docker.py is run during configure, and produces an error: No module named 'pwd'. Use a more portable and recommended alternative to lookup the user "login name". Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 19/25] osdep: implement qemu_socketpair() for win32

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Manually implement a socketpair() function, using UNIX sockets and simple peer credential checking. QEMU doesn't make much use of socketpair, beside vhost-user which is not available for win32 at this point. However, I intend to use it for writing some new portable

[PULL 25/25] QMP/HMP: only actually implement getfd on CONFIG_POSIX

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Currently, the function will simply fail if ancillary fds are not provided, for ex on unsupported platforms. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-Id: <20230306122751.2355515-12-marcandre.lur...@redhat.com> --- qapi/misc.json | 2

[PULL 22/25] qmp: add 'get-win32-socket'

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau A process with enough capabilities can duplicate a socket to QEMU. Add a QMP command to import it and add it to the monitor fd list, so it can be later used by other commands. Signed-off-by: Marc-André Lureau Acked-by: Markus Armbruster Message-Id:

[PULL v2 07/25] win32/socket: introduce qemu_socket_unselect() helper

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau A more explicit version of qemu_socket_select() with no events. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-8-marcandre.lur...@redhat.com> --- include/sysemu/os-win32.h | 2 ++ io/channel-socket.c | 4 ++--

[PULL 12/25] slirp: open-code qemu_socket_(un)select()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau We are about to make the QEMU socket API use file-descriptor space only, but libslirp gives us SOCKET as fd, still. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-14-marcandre.lur...@redhat.com> --- net/slirp.c | 10

[PULL v2 00/25] Win socket patches

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 29c8a9e31a982874ce4e2c15f2bf82d5f8dc3517: Merge tag 'linux-user-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2023-03-12 10:57:00 +) are available in the Git repository at:

[PULL v2 21/25] monitor: release the lock before calling close()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau As per comment, presumably to avoid syscall in critical section. Fixes: 0210c3b39bef08 ("monitor: Use LOCK_GUARD macros") Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230306122751.2355515-7-marcandre.lur...@redhat.com> ---

[PULL v2 08/25] aio: make aio_set_fd_poll() static to aio-posix.c

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-9-marcandre.lur...@redhat.com> --- include/block/aio.h | 8 util/aio-posix.c| 6 +++--- util/aio-win32.c| 7 --- 3 files changed, 3 insertions(+), 18

[PULL v2 19/25] osdep: implement qemu_socketpair() for win32

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Manually implement a socketpair() function, using UNIX sockets and simple peer credential checking. QEMU doesn't make much use of socketpair, beside vhost-user which is not available for win32 at this point. However, I intend to use it for writing some new portable

[PULL v2 20/25] qmp: 'add_client' actually expects sockets

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Whether it is SPICE, VNC, D-Bus, or the socket chardev, they all actually expect a socket kind or will fail in different ways at runtime. Throw an error early if the given 'add_client' fd is not a socket, and close it to avoid leaks. This allows to replace the close()

[PULL v2 03/25] io: use closesocket()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Because they are actually sockets... Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-Id: <20230221124802.4103554-4-marcandre.lur...@redhat.com> --- io/channel-socket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PULL 00/25] Win socket patches

2023-03-13 Thread Marc-André Lureau
Hi On Mon, Mar 13, 2023 at 3:44 PM wrote: > > From: Marc-André Lureau > > The following changes since commit 29c8a9e31a982874ce4e2c15f2bf82d5f8dc3517: > > Merge tag 'linux-user-for-8.0-pull-request' of > https://gitlab.com/laurent_vivier/qemu into staging (2023-03-12 10:57:00 > +) > >

[PULL v2 14/25] os-posix: remove useless ioctlsocket() define

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau The API is specific to win32. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230221124802.4103554-16-marcandre.lur...@redhat.com> --- include/sysemu/os-posix.h | 1 - 1 file changed, 1 deletion(-) diff --git

[PULL v2 09/25] aio/win32: aio_set_fd_handler() only supports SOCKET

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Let's check if the argument is actually a SOCKET, else report an error and return. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-10-marcandre.lur...@redhat.com> --- util/aio-win32.c | 7 ++- 1 file changed, 6

[PULL v2 12/25] slirp: open-code qemu_socket_(un)select()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau We are about to make the QEMU socket API use file-descriptor space only, but libslirp gives us SOCKET as fd, still. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-14-marcandre.lur...@redhat.com> --- net/slirp.c | 10

[PULL v2 24/25] qtest: enable vnc-display test on win32

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Now that qtest_qmp_add_client() works on win32, we can enable the VNC test. Signed-off-by: Marc-André Lureau Acked-by: Thomas Huth Message-Id: <20230306122751.2355515-11-marcandre.lur...@redhat.com> --- tests/qtest/vnc-display-test.c | 12 +++- 1 file changed,

[PULL v2 15/25] win32: replace closesocket() with close() wrapper

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Use a close() wrapper instead, so that we don't need to worry about closesocket() vs close() anymore, let's hope. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-17-marcandre.lur...@redhat.com> ---

[PULL v2 01/25] util: drop qemu_fork()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Fortunately, qemu_fork() is no longer used since commit a95570e3e4d6 ("io/command: use glib GSpawn, instead of open-coding fork/exec"). (GSpawn uses posix_spawn() whenever possible instead) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id:

[PULL v2 02/25] tests: use closesocket()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Because they are actually sockets... Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-Id: <20230221124802.4103554-3-marcandre.lur...@redhat.com> --- tests/unit/socket-helpers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PULL v2 22/25] qmp: add 'get-win32-socket'

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau A process with enough capabilities can duplicate a socket to QEMU. Add a QMP command to import it and add it to the monitor fd list, so it can be later used by other commands. Signed-off-by: Marc-André Lureau Acked-by: Markus Armbruster Message-Id:

[PULL v2 11/25] slirp: unregister the win32 SOCKET

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Presumably, this is what should happen when the SOCKET is to be removed. (it probably worked until now because closesocket() does it implicitly, but we never now how the slirp library could use the SOCKET later) Signed-off-by: Marc-André Lureau Reviewed-by: Stefan

[PULL 15/25] win32: replace closesocket() with close() wrapper

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Use a close() wrapper instead, so that we don't need to worry about closesocket() vs close() anymore, let's hope. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-17-marcandre.lur...@redhat.com> ---

[PULL 21/25] monitor: release the lock before calling close()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau As per comment, presumably to avoid syscall in critical section. Fixes: 0210c3b39bef08 ("monitor: Use LOCK_GUARD macros") Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230306122751.2355515-7-marcandre.lur...@redhat.com> ---

[PULL v2 13/25] win32: avoid mixing SOCKET and file descriptor space

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Until now, a win32 SOCKET handle is often cast to an int file descriptor, as this is what other OS use for sockets. When necessary, QEMU eventually queries whether it's a socket with the help of fd_is_socket(). However, there is no guarantee of conflict between the fd and

[PULL 04/25] tests: add test-error-report

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-5-marcandre.lur...@redhat.com> --- tests/unit/test-error-report.c | 121 + tests/unit/meson.build | 1 + 2 files changed, 122

[PULL 24/25] qtest: enable vnc-display test on win32

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Now that qtest_qmp_add_client() works on win32, we can enable the VNC test. Signed-off-by: Marc-André Lureau Acked-by: Thomas Huth Message-Id: <20230306122751.2355515-11-marcandre.lur...@redhat.com> --- tests/qtest/vnc-display-test.c | 12 +++- 1 file changed,

[PULL v2 23/25] libqtest: make qtest_qmp_add_client work on win32

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Use the "get-win32-socket" function to pass an opened socket to QEMU, instead of using "getfd", which relies on socket ancillary FD message passing. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id:

[PULL v2 17/25] char: do not double-close fd when failing to add client

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau The caller is already closing the fd on failure. Fixes: c3054a6e6a ("char: Factor out qmp_add_client() parts and move to chardev/") Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id:

Re: [PATCH 09/11] tests/tcg: disable pauth for aarch64 gdb tests

2023-03-13 Thread Luis Machado
On 3/13/23 11:22, Peter Maydell via Gdb wrote: On Fri, 10 Mar 2023 at 18:20, Alex Bennée wrote: (adding some more gdb types to CC) Fabiano Rosas writes: Peter Maydell writes: On Fri, 10 Mar 2023 at 10:31, Alex Bennée wrote: You need a very new gdb to be able to run with pauth

[PULL v2 18/25] tests/docker: fix a win32 error due to portability

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau docker.py is run during configure, and produces an error: No module named 'pwd'. Use a more portable and recommended alternative to lookup the user "login name". Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL v2 25/25] monitor: restrict command getfd to POSIX hosts

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Currently, the function will simply fail if ancillary fds are not provided, for ex on unsupported platforms. This changes the failure from: {"error": {"class": "GenericError", "desc": "No file descriptor supplied via SCM_RIGHTS"}} to: {"error": {"class":

[PULL v2 06/25] win32/socket: introduce qemu_socket_select() helper

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau This is a wrapper for WSAEventSelect, with Error handling. By default, it will produce a warning, so callers don't have to be modified now, and yet we can spot potential mis-use. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id:

[PULL v2 04/25] tests: add test-error-report

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-5-marcandre.lur...@redhat.com> --- tests/unit/test-error-report.c | 121 + tests/unit/meson.build | 1 + 2 files changed, 122

[PULL 07/25] win32/socket: introduce qemu_socket_unselect() helper

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau A more explicit version of qemu_socket_select() with no events. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-8-marcandre.lur...@redhat.com> --- include/sysemu/os-win32.h | 2 ++ io/channel-socket.c | 4 ++--

[PULL v2 16/25] tests: fix path separator, use g_build_filename()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20230306122751.2355515-2-marcandre.lur...@redhat.com> --- tests/unit/test-io-channel-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL v2 10/25] main-loop: remove qemu_fd_register(), win32/slirp/socket specific

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Open-code the socket registration where it's needed, to avoid artificially used or unclear generic interface. Furthermore, the following patches are going to make socket handling use FD-only inside QEMU, but we need to handle win32 SOCKET from libslirp. Signed-off-by:

[PULL 16/25] tests: fix path separator, use g_build_filename()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20230306122751.2355515-2-marcandre.lur...@redhat.com> --- tests/unit/test-io-channel-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL 08/25] aio: make aio_set_fd_poll() static to aio-posix.c

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-9-marcandre.lur...@redhat.com> --- include/block/aio.h | 8 util/aio-posix.c| 6 +++--- util/aio-win32.c| 7 --- 3 files changed, 3 insertions(+), 18

[PULL v2 05/25] error: add global _warn destination

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau This can help debugging issues or develop, when error handling is introduced. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-6-marcandre.lur...@redhat.com> --- include/qapi/error.h | 6 ++

<    1   2   3   4   >