Re: [PATCH 4/5] dump: Improve some dump-guest-memory error messages

2023-10-30 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Markus, > > On 30/10/23 14:37, Markus Armbruster wrote: >> Zero @length is rejected with "Invalid parameter 'length'". Improve >> to "Parameter 'length' expects a non-zero length". >> >> @protocol values not starting with "fd:" or "file:" are rejected with >>

[PATCH 4/4] tests/tcg/s390x: Test LAALG with negative cc_src

2023-10-30 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/laalg.c | 27 +++ 2 files changed, 28 insertions(+) create mode 100644 tests/tcg/s390x/laalg.c diff --git

[PATCH 1/4] target/s390x: Fix CLC corrupting cc_src

2023-10-30 Thread Ilya Leoshkevich
CLC updates cc_src before accessing the second operand; if the latter is inaccessible, the former ends up containing a bogus value. Fix by reading cc_src into a temporary first. Fixes: 4f7403d52b1c ("target-s390: Convert CLC") Closes: https://gitlab.com/qemu-project/qemu/-/issues/1865 Cc:

[PATCH 0/4] target/s390x: CC fixes

2023-10-30 Thread Ilya Leoshkevich
Hi, This series fixes two issues with updating CC. David was suggesting a bigger rewrite [1], but I did not dare do this (yet). Instead, these are targeted fixes: patch 1 helps with installing Fedora, and patch 3 addresses something I noticed when reviewing the code. Patches 2 and 4 are tests.

[PATCH 3/4] target/s390x: Fix LAALG not updating cc_src

2023-10-30 Thread Ilya Leoshkevich
LAALG uses op_laa() and cout_addu64(). The latter expects cc_src to be set, but the former does not do it. This can lead to assertion failures if something sets cc_src to neither 0 nor 1 before. Fix by setting cc_src in op_laa(). Fixes: 4dba4d6fef61 ("target/s390x: Use atomic operations for LOAD

[PATCH 2/4] tests/tcg/s390x: Test CLC with inaccessible second operand

2023-10-30 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/clc.c | 48 + 2 files changed, 49 insertions(+) create mode 100644 tests/tcg/s390x/clc.c diff --git

Re: [PATCH v6 05/21] tap: Remove tap_receive()

2023-10-30 Thread Akihiko Odaki
On 2023/10/31 3:52, Zhang, Chen wrote: -Original Message- From: qemu-devel-bounces+chen.zhang=intel@nongnu.org On Behalf Of Akihiko Odaki Sent: Monday, October 30, 2023 1:12 PM Cc: qemu-devel@nongnu.org; Yuri Benditovich ; Andrew Melnychenko ; Michael S . Tsirkin ; Jason Wang ;

Re: [PATCH v6 13/21] virtio-net: Always set populate_hash

2023-10-30 Thread Akihiko Odaki
On 2023/10/31 4:02, Zhang, Chen wrote: -Original Message- From: qemu-devel-bounces+chen.zhang=intel@nongnu.org On Behalf Of Akihiko Odaki Sent: Monday, October 30, 2023 1:13 PM Cc: qemu-devel@nongnu.org; Yuri Benditovich ; Andrew Melnychenko ; Michael S . Tsirkin ; Jason Wang ;

[PATCH v4 13/14] tests: acpi: updated expected blobs for TPM CRB

2023-10-30 Thread Joelle van Dyne
Signed-off-by: Joelle van Dyne --- tests/qtest/bios-tables-test-allowed-diff.h | 4 tests/data/acpi/q35/DSDT.crb.tpm2 | Bin 0 -> 8355 bytes tests/data/acpi/q35/TPM2.crb.tpm2 | Bin 0 -> 76 bytes tests/data/acpi/virt/DSDT.crb-device.tpm2 | Bin 0 -> 5276 bytes

[PATCH v4 07/14] hw/arm/virt: connect TPM to platform bus

2023-10-30 Thread Joelle van Dyne
Signed-off-by: Joelle van Dyne Reviewed-by: Stefan Berger --- hw/arm/virt.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 529f1c089c..f1a161b0ea 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2806,6 +2806,13 @@ static void

[PATCH v4 01/14] tpm_crb: refactor common code

2023-10-30 Thread Joelle van Dyne
In preparation for the SysBus variant, we move common code styled after the TPM TIS devices. To maintain compatibility, we do not rename the existing tpm-crb device. Signed-off-by: Joelle van Dyne Reviewed-by: Stefan Berger --- docs/specs/tpm.rst | 1 + hw/tpm/tpm_crb.h| 76

[PATCH v4 06/14] tpm-sysbus: add plug handler for TPM on SysBus

2023-10-30 Thread Joelle van Dyne
TPM needs to know its own base address in order to generate its DSDT device entry. Signed-off-by: Joelle van Dyne --- include/sysemu/tpm.h | 4 hw/tpm/tpm-sysbus.c | 47 hw/tpm/meson.build | 1 + 3 files changed, 52 insertions(+) create

[PATCH v4 08/14] hw/loongarch/virt: connect TPM to platform bus

2023-10-30 Thread Joelle van Dyne
Signed-off-by: Joelle van Dyne Reviewed-by: Stefan Berger --- hw/loongarch/virt.c | 7 +++ hw/loongarch/Kconfig | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 4b7dc67a2d..feed0f8bbf 100644 --- a/hw/loongarch/virt.c +++

[PATCH v4 05/14] tpm_crb: move ACPI table building to device interface

2023-10-30 Thread Joelle van Dyne
This logic is similar to TPM TIS ISA device. Since TPM CRB can only support TPM 2.0 backends, we check for this in realize. Signed-off-by: Joelle van Dyne Reviewed-by: Stefan Berger --- hw/tpm/tpm_crb.h| 2 ++ hw/i386/acpi-build.c| 23 --- hw/tpm/tpm_crb.c

[PATCH v4 10/14] tests: acpi: prepare for TPM CRB tests

2023-10-30 Thread Joelle van Dyne
Signed-off-by: Joelle van Dyne Reviewed-by: Stefan Berger --- tests/qtest/bios-tables-test-allowed-diff.h | 4 tests/data/acpi/q35/DSDT.crb.tpm2 | 0 tests/data/acpi/q35/TPM2.crb.tpm2 | 0 tests/data/acpi/virt/DSDT.crb-device.tpm2 | 0

[PATCH v4 00/14] tpm: introduce TPM CRB SysBus device

2023-10-30 Thread Joelle van Dyne
The impetus for this patch set is to get TPM 2.0 working on Windows 11 ARM64. Windows' tpm.sys does not seem to work on a TPM TIS device (as verified with VMWare's implementation). However, the current TPM CRB device uses a fixed system bus address that is reserved for RAM in ARM64 Virt machines.

[PATCH v4 03/14] tpm_ppi: refactor memory space initialization

2023-10-30 Thread Joelle van Dyne
Instead of calling `memory_region_add_subregion` directly, we defer to the caller to do it. This allows us to re-use the code for a SysBus device. Signed-off-by: Joelle van Dyne Reviewed-by: Stefan Berger --- hw/tpm/tpm_ppi.h| 10 +++--- hw/tpm/tpm_crb.c| 4 ++--

[PATCH v4 11/14] tpm_crb_sysbus: introduce TPM CRB SysBus device

2023-10-30 Thread Joelle van Dyne
This SysBus variant of the CRB interface supports dynamically locating the MMIO interface so that Virt machines can use it. This interface is currently the only one supported by QEMU that works on Windows 11 ARM64 as 'tpm-tis-device' does not work with current Windows drivers. We largely follow

[PATCH v4 04/14] tpm_crb: use a single read-as-mem/write-as-mmio mapping

2023-10-30 Thread Joelle van Dyne
On Apple Silicon, when Windows performs a LDP on the CRB MMIO space, the exception is not decoded by hardware and we cannot trap the MMIO read. This led to the idea from @agraf to use the same mapping type as ROM devices: namely that reads should be seen as memory type and writes should trap as

[PATCH v4 14/14] tests: add TPM-CRB sysbus tests for aarch64

2023-10-30 Thread Joelle van Dyne
- Factor out common test code from tpm-crb-test.c -> tpm-tests.c - Store device addr in `tpm_device_base_addr` (unify with TIS tests) - Add new tests for aarch64 Signed-off-by: Joelle van Dyne --- tests/qtest/tpm-tests.h | 2 + tests/qtest/tpm-util.h | 4 +-

[PATCH v4 02/14] tpm_crb: CTRL_RSP_ADDR is 64-bits wide

2023-10-30 Thread Joelle van Dyne
The register is actually 64-bits but in order to make this more clear than the specification, we define two 32-bit registers: CTRL_RSP_LADDR and CTRL_RSP_HADDR to match the CTRL_CMD_* naming. This deviates from the specs but is way more clear. Previously, the only CRB device uses a fixed system

[PATCH v4 09/14] tpm_tis_sysbus: move DSDT AML generation to device

2023-10-30 Thread Joelle van Dyne
This reduces redundant code in different machine types with ACPI table generation. Additionally, this will allow us to support different TPM interfaces with the same AML logic. Finally, this matches up with the TPM TIS ISA implementation. Ideally, we would be able to call `qbus_build_aml` and

[PATCH v4 12/14] tests: acpi: implement TPM CRB tests for ARM virt

2023-10-30 Thread Joelle van Dyne
Signed-off-by: Joelle van Dyne Reviewed-by: Stefan Berger --- tests/qtest/bios-tables-test.c | 43 -- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 9f4bc15aab..c63bad0205

Re: [PATCH v3 13/14] tests: acpi: updated expected blobs for TPM CRB

2023-10-30 Thread Joelle van Dyne
I think I actually messed up and committed an older version of the expected blobs. Since these are newly added for the new tests, they should be passing without any additional work. On Mon, Oct 30, 2023 at 5:35 PM Stefan Berger wrote: > > > On 10/30/23 18:42, Stefan Berger wrote: > > > > On

Re: [PATCH v3 11/14] tpm_crb_sysbus: introduce TPM CRB SysBus device

2023-10-30 Thread Joelle van Dyne
On Mon, Oct 30, 2023 at 2:09 PM Stefan Berger wrote: > > > On 10/29/23 02:03, Joelle van Dyne wrote: > > This SysBus variant of the CRB interface supports dynamically locating > > the MMIO interface so that Virt machines can use it. This interface > > is currently the only one supported by QEMU

来自Leo Hou的邮件

2023-10-30 Thread Leo Hou
hi , all Does qemu plan to support CPU heterogeneity?

RE: [PATCH v3 30/37] vfio/pci: Extract out a helper vfio_pci_get_pci_hot_reset_info

2023-10-30 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Monday, October 30, 2023 10:00 PM >Subject: Re: [PATCH v3 30/37] vfio/pci: Extract out a helper >vfio_pci_get_pci_hot_reset_info > >On 10/26/23 12:30, Zhenzhong Duan wrote: >> This helper will be used by both legacy and iommufd

RE: [PATCH v3 31/37] vfio/pci: Adapt vfio pci hot reset support with iommufd BE

2023-10-30 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Monday, October 30, 2023 10:05 PM >Subject: Re: [PATCH v3 31/37] vfio/pci: Adapt vfio pci hot reset support with >iommufd BE > >On 10/26/23 12:30, Zhenzhong Duan wrote: >> As pci hot reset path need to reference pci specific functions

RE: [PATCH v3 29/37] vfio/iommufd: Bypass EEH if iommufd backend

2023-10-30 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Monday, October 30, 2023 9:57 PM >Subject: Re: [PATCH v3 29/37] vfio/iommufd: Bypass EEH if iommufd backend > >On 10/26/23 12:30, Zhenzhong Duan wrote: >> IBM EEH is only supported by legacy backend currently, bypass it >> for IOMMUFD

Re: [PATCH] hw/ufs: Modify lu.c to share codes with SCSI subsystem

2023-10-30 Thread Jeuk Kim
On 10/30/2023 1:11 PM, Philippe Mathieu-Daudé wrote: Hi Jeuk, On 20/10/23 03:51, Jeuk Kim wrote: This patch removes the code that ufs-lu was duplicating from scsi-hd and allows them to share code. It makes ufs-lu have a virtual scsi-bus and scsi-hd internally. This allows scsi related

RE: [PATCH v3 27/37] vfio/iommufd: Switch to manual hwpt allocation

2023-10-30 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Monday, October 30, 2023 9:52 PM >Subject: Re: [PATCH v3 27/37] vfio/iommufd: Switch to manual hwpt allocation > >On 10/26/23 12:30, Zhenzhong Duan wrote: >> IOMMUFD supports auto allocated hwpt and manually allocated one. >> Manually

RE: [PATCH v3 25/37] util/char_dev: Add open_cdev()

2023-10-30 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Monday, October 30, 2023 10:54 PM >Subject: Re: [PATCH v3 25/37] util/char_dev: Add open_cdev() > >On 10/26/23 12:30, Zhenzhong Duan wrote: >> From: Yi Liu >> >> /dev/vfio/devices/vfioX may not exist. In that case it is still possible

Re: [PATCH] ppc: qtest already exports qtest_rtas_call()

2023-10-30 Thread David Gibson
On Mon, Oct 30, 2023 at 05:41:36PM +0100, Cédric le Goater wrote: > On 10/30/23 17:38, Juan Quintela wrote: > > Having two functions with the same name is a bad idea. As spapr only > > uses the function locally, made it static. > > > > When you compile with clang, you get this compilation error:

[PATCH] virtio-gpu-rutabaga: Add empty interface to fix arm64 crash

2023-10-30 Thread Cong Liu
Add an empty element to the interfaces array, which is consistent with the behavior of other devices in qemu and fixes the crash on arm64. 0 0xf5c18550 in () at /usr/lib64/libc.so.6 1 0xf6c9cd6c in g_strdup () at /usr/lib64/libglib-2.0.so.0 2 0xab4945d8 in

Re: [External] Re: [PATCH 00/16] Use Intel DSA accelerator to offload zero page checking in multifd live migration.

2023-10-30 Thread Hao Xiang
On Mon, Oct 30, 2023 at 8:26 AM Fabiano Rosas wrote: > > Hao Xiang writes: > > > * Background: > > I posted an RFC about DSA offloading in QEMU: > > https://patchew.org/QEMU/20230529182001.2232069-1-hao.xi...@bytedance.com/ > > > > This patchset implements the DSA offloading on zero page

Re: [PATCH] linux-user/elfload: Add missing arm64 hwcap values

2023-10-30 Thread Marielle Novastrider
> On 30 Oct 2023, at 09:52, Peter Maydell wrote: > > ...but we don't implement FEAT_MTE3 yet. We would add this feature test > function, and the GET_FEATURE_ID() line, when we do, but we don't > need it until then. Understood. I made this patch as I noticed the discrepancy between cpuid and

Re: [PATCH v5 1/4] docs/qcow2: add the zoned format feature

2023-10-30 Thread Damien Le Moal
On 10/30/23 23:04, Eric Blake wrote: >> + >> + .. option:: zone_size >> + >> +The size of a zone in bytes. The device is divided into zones of this >> +size with the exception of the last zone, which may be smaller. >> + >> + .. option:: zone_capacity >> + >> +The initial capacity

Re: [PATCH v3 13/14] tests: acpi: updated expected blobs for TPM CRB

2023-10-30 Thread Stefan Berger
On 10/30/23 18:42, Stefan Berger wrote: On 10/29/23 02:03, Joelle van Dyne wrote: Signed-off-by: Joelle van Dyne I see this error here with the test cases: | 364/377 ERROR:../tests/qtest/bios-tables-test.c:535:test_acpi_asl: assertion failed: (all_tables_match) ERROR 364/377

Re: [PATCH v3 08/14] hw/loongarch/virt: connect TPM to platform bus

2023-10-30 Thread Stefan Berger
On 10/29/23 02:03, Joelle van Dyne wrote: Signed-off-by: Joelle van Dyne Reviewed-by: Stefan Berger --- hw/loongarch/virt.c | 7 +++ hw/loongarch/Kconfig | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 4b7dc67a2d..feed0f8bbf

Re: [PATCH v3 07/14] hw/arm/virt: connect TPM to platform bus

2023-10-30 Thread Stefan Berger
On 10/29/23 02:03, Joelle van Dyne wrote: Signed-off-by: Joelle van Dyne Reviewed-by: Stefan Berger --- hw/arm/virt.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 529f1c089c..f1a161b0ea 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-30 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Wed, Oct 25, 2023 at 11:32:00AM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> >> > On Tue, Oct 24, 2023 at 04:32:10PM -0300, Fabiano Rosas wrote: >> >> Markus Armbruster writes: >> >> >> >> > Fabiano Rosas writes: >> >> > >> >> >> Add the

Re: [PATCH v3 13/14] tests: acpi: updated expected blobs for TPM CRB

2023-10-30 Thread Stefan Berger
On 10/29/23 02:03, Joelle van Dyne wrote: Signed-off-by: Joelle van Dyne I see this error here with the test cases: | 364/377 ERROR:../tests/qtest/bios-tables-test.c:535:test_acpi_asl: assertion failed: (all_tables_match) ERROR 364/377 qemu:qtest+qtest-x86_64 /

Re: [PATCH v3 12/14] tests: acpi: implement TPM CRB tests for ARM virt

2023-10-30 Thread Stefan Berger
On 10/29/23 02:03, Joelle van Dyne wrote: Signed-off-by: Joelle van Dyne Reviewed-by: Stefan Berger --- tests/qtest/bios-tables-test.c | 43 -- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/tests/qtest/bios-tables-test.c

Re: [PATCH v3 10/14] tests: acpi: prepare for TPM CRB tests

2023-10-30 Thread Stefan Berger
On 10/29/23 02:03, Joelle van Dyne wrote: Signed-off-by: Joelle van Dyne Reviewed-by: Stefan Berger --- tests/qtest/bios-tables-test-allowed-diff.h | 4 tests/data/acpi/q35/DSDT.crb.tpm2 | 0 tests/data/acpi/q35/TPM2.crb.tpm2 | 0

Re: [PULL 00/41] target-arm queue

2023-10-30 Thread Stefan Hajnoczi
On Mon, 30 Oct 2023 at 19:09, Peter Maydell wrote: > > On Sun, 29 Oct 2023 at 23:15, Stefan Hajnoczi wrote: > > > > On Fri, 27 Oct 2023 at 23:41, Peter Maydell > > wrote: > > > > > > Hi; here's the latest target-arm queue. Mostly this is refactoring > > > and cleanup type patches. > > > Hi

Re: [PATCH 0/4] Fix IRQ routing in via south bridge

2023-10-30 Thread BALATON Zoltan
On Mon, 30 Oct 2023, Mark Cave-Ayland wrote: On 29/10/2023 13:45, BALATON Zoltan wrote: On Sun, 29 Oct 2023, Mark Cave-Ayland wrote: On 29/10/2023 00:56, BALATON Zoltan wrote: This is going back to my otiginal proposal in https://patchew.org/QEMU/cover.1677004414.git.bala...@eik.bme.hu/

Re: [PATCH 24/24] block: Protect bs->file with graph_lock

2023-10-30 Thread Eric Blake
On Fri, Oct 27, 2023 at 05:53:33PM +0200, Kevin Wolf wrote: > Almost all functions that access bs->file already take the graph > lock now. Add locking to the remaining users and finally annotate the > struct field itself as protected by the graph lock. > > Signed-off-by: Kevin Wolf > --- >

Re: [PATCH 23/24] block: Take graph lock for most of .bdrv_open

2023-10-30 Thread Eric Blake
On Fri, Oct 27, 2023 at 05:53:32PM +0200, Kevin Wolf wrote: > Most implementations of .bdrv_open first open their file child (which is > an operation that internally takes the write lock and therefore we > shouldn't hold the graph lock while calling it), and afterwards many > operations that

Re: [PATCH 22/24] vhdx: Take locks for accessing bs->file

2023-10-30 Thread Eric Blake
On Fri, Oct 27, 2023 at 05:53:31PM +0200, Kevin Wolf wrote: > This updates the vhdx code to add GRAPH_RDLOCK annotations for all > places that read bs->file. > > Signed-off-by: Kevin Wolf > --- > block/vhdx.h | 9 ++--- > block/vhdx-log.c | 40 ++-- >

Re: [PATCH 21/24] qcow2: Take locks for accessing bs->file

2023-10-30 Thread Eric Blake
On Fri, Oct 27, 2023 at 05:53:30PM +0200, Kevin Wolf wrote: > This updates the qcow2 code to add GRAPH_RDLOCK annotations for all > places that read bs->file. > > Signed-off-by: Kevin Wolf > --- > block/qcow2.h | 48 ++- > block/qcow2-bitmap.c |

[PULL 15/21] linux-user/riscv: Add vdso

2023-10-30 Thread Richard Henderson
Acked-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/riscv/vdso-asmoffset.h | 9 ++ linux-user/elfload.c | 2 + linux-user/riscv/signal.c | 8 ++ linux-user/meson.build| 1 +

Re: [PATCH v3 11/14] tpm_crb_sysbus: introduce TPM CRB SysBus device

2023-10-30 Thread Stefan Berger
On 10/30/23 17:08, Stefan Berger wrote: On 10/29/23 02:03, Joelle van Dyne wrote: diff --git a/hw/tpm/tpm_crb_sysbus.c b/hw/tpm/tpm_crb_sysbus.c new file mode 100644 index 00..c10a8b5639 --- /dev/null +++ b/hw/tpm/tpm_crb_sysbus.c @@ -0,0 +1,161 @@ +/* + * tpm_crb_sysbus.c - QEMU's

[PULL 01/21] linux-user: Fix guest signal remapping after adjusting SIGABRT

2023-10-30 Thread Richard Henderson
The arithmetic within the loop was not adjusted properly after SIGRTMIN was stolen for the guest SIGABRT. The effect was that the guest libc could not send itself __SIGRTMIN to wake sleeping threads. Fixes: 38ee0a7dfb4b ("linux-user: Remap guest SIGABRT") Resolves:

[PULL 19/21] linux-user/s390x: Add vdso

2023-10-30 Thread Richard Henderson
Acked-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/s390x/vdso-asmoffset.h | 2 + linux-user/elfload.c | 2 + linux-user/s390x/signal.c | 4 +- linux-user/s390x/Makefile.vdso| 11 +

[PULL 16/21] linux-user/loongarch64: Add vdso

2023-10-30 Thread Richard Henderson
Requires a relatively recent binutils version in order to avoid spurious R_LARCH_NONE relocations. The presence of these relocs are diagnosed by our gen-vdso tool. Tested-by: Song Gao Reviewed-by: Song Gao Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson ---

[PULL 03/21] linux-user: Tidy loader_exec

2023-10-30 Thread Richard Henderson
Reorg the if cases to reduce indentation. Test for 4 bytes in the file before checking the signatures. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/linuxload.c | 42 +- 1 file changed, 21

Re: [PATCH 20/24] block: Add missing GRAPH_RDLOCK annotations

2023-10-30 Thread Eric Blake
On Fri, Oct 27, 2023 at 05:53:29PM +0200, Kevin Wolf wrote: > This adds GRAPH_RDLOCK to some driver callbacks that are already called > with the graph lock held, and which will need the annotation because > they access bs->file, but don't have it yet. > > This also covers a few callbacks that

[PULL 02/21] linux-user: Introduce imgsrc_read, imgsrc_read_alloc

2023-10-30 Thread Richard Henderson
Introduced and initialized, but not yet really used. These will tidy the current tests vs BPRM_BUF_SIZE. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/loader.h| 61 +++- linux-user/linuxload.c | 90

[PULL 10/21] linux-user/i386: Add vdso

2023-10-30 Thread Richard Henderson
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1267 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/i386/vdso-asmoffset.h | 6 ++ linux-user/elfload.c | 19 +++- linux-user/i386/signal.c | 11 +++ linux-user/i386/Makefile.vdso

[PULL 04/21] linux-user: Do not clobber bprm_buf swapping ehdr

2023-10-30 Thread Richard Henderson
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: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson ---

[PULL 07/21] linux-user: Replace bprm->fd with bprm->src.fd

2023-10-30 Thread Richard Henderson
There are only a couple of uses of bprm->fd remaining. Migrate to the other field. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/loader.h| 1 - linux-user/flatload.c | 8 linux-user/linuxload.c | 5 ++--- 3 files changed, 6 insertions(+), 8

[PULL 21/21] build: Add update-linux-vdso makefile rule

2023-10-30 Thread Richard Henderson
This is not ideal, since it requires all cross-compilers to be present rather than a simple subset. But since it is only run manually, should be good enough for now. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- Makefile | 10 ++ 1 file changed, 10

[PULL 12/21] linux-user/aarch64: Add vdso

2023-10-30 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/elfload.c | 6 +++ linux-user/aarch64/Makefile.vdso | 15 +++ linux-user/aarch64/meson.build | 11 + linux-user/aarch64/vdso-be.so| Bin 0 -> 3216 bytes

[PULL 09/21] linux-user: Add gen-vdso tool

2023-10-30 Thread Richard Henderson
This tool will be used for post-processing the linked vdso image, turning it into something that is easy to include into elfload.c. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/gen-vdso.c | 223

[PULL 08/21] linux-user: Load vdso image if available

2023-10-30 Thread Richard Henderson
The vdso image will be pre-processed into a C data array, with a simple list of relocations to perform, and identifying the location of signal trampolines. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/elfload.c | 90

[PULL 20/21] linux-user: Show vdso address in /proc/pid/maps

2023-10-30 Thread Richard Henderson
Tested-by: Helge Deller Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- linux-user/qemu.h| 1 + linux-user/elfload.c | 1 + linux-user/syscall.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 12f638336a..4de9ec783f

[PULL 05/21] linux-user: Use ImageSource in load_elf_image

2023-10-30 Thread Richard Henderson
Change parse_elf_properties as well, as the bprm_buf argument ties the two functions closely. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/elfload.c | 128 +-- 1 file changed, 49 insertions(+), 79 deletions(-) diff

[PULL 11/21] linux-user/x86_64: Add vdso

2023-10-30 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/elfload.c| 4 +- linux-user/x86_64/Makefile.vdso | 11 + linux-user/x86_64/meson.build | 4 ++ linux-user/x86_64/vdso.S| 78

[PULL 06/21] linux-user: Use ImageSource in load_symbols

2023-10-30 Thread Richard Henderson
Aside from the section headers, we're unlikely to hit the ImageSource cache on guest executables. But the interface for imgsrc_read_* is better. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/elfload.c | 87 1

[PULL 13/21] linux-user/arm: Add vdso

2023-10-30 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/arm/vdso-asmoffset.h | 3 + linux-user/arm/signal.c | 55 ++ linux-user/elfload.c| 3 +- linux-user/arm/Makefile.vdso| 17 linux-user/arm/meson.build | 12 +++ linux-user/arm/vdso-be.so | Bin 0

[PULL 00/21] linux-user patch queue

2023-10-30 Thread Richard Henderson
The following changes since commit fd9a38fd437c4c31705071c240f4be11394ca1f8: Merge tag 'pull-hex-20231018' of https://github.com/quic/qemu into staging (2023-10-30 13:42:29 +0900) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-lu-20231030 for you

[PULL 17/21] linux-user/ppc: Add vdso

2023-10-30 Thread Richard Henderson
Add support in gen-vdso-elfn.c.inc for the DT_PPC64_OPT dynamic tag: this is an integer, so does not need relocation. Signed-off-by: Richard Henderson --- linux-user/ppc/vdso-asmoffset.h | 20 +++ linux-user/elfload.c| 8 ++ linux-user/ppc/signal.c | 31 +++--

[PULL 14/21] linux-user/hppa: Add vdso

2023-10-30 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/hppa/vdso-asmoffset.h | 12 +++ linux-user/elfload.c | 2 + linux-user/hppa/signal.c | 24 +++-- linux-user/hppa/Makefile.vdso| 11 +++ linux-user/hppa/meson.build | 5 +

[PULL 18/21] linux-user/s390x: Rename __SIGNAL_FRAMESIZE to STACK_FRAME_OVERHEAD

2023-10-30 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/s390x/signal.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c index f72165576f..0f8b8e04bf 100644 --- a/linux-user/s390x/signal.c

Re: [PATCH 0/3] Misc ati-vga patches

2023-10-30 Thread BALATON Zoltan
On Mon, 30 Oct 2023, Mark Cave-Ayland wrote: On 30/10/2023 10:37, BALATON Zoltan wrote: On Mon, 23 Oct 2023, BALATON Zoltan wrote: On Tue, 10 Oct 2023, BALATON Zoltan wrote: Some misc patches I had laying around that could be upstreamed just to clean up my tree a bit. Ping? Is Gerd still

Re: [PATCH v3 11/14] tpm_crb_sysbus: introduce TPM CRB SysBus device

2023-10-30 Thread Stefan Berger
On 10/29/23 02:03, Joelle van Dyne wrote: This SysBus variant of the CRB interface supports dynamically locating the MMIO interface so that Virt machines can use it. This interface is currently the only one supported by QEMU that works on Windows 11 ARM64 as 'tpm-tis-device' does not work with

Re: [PATCH v3 09/14] tpm_tis_sysbus: move DSDT AML generation to device

2023-10-30 Thread Stefan Berger
On 10/29/23 02:03, Joelle van Dyne wrote: This reduces redundent code in different machine types with ACPI table s/redundent/redundant generation. Additionally, this will allow us to support different TPM interfaces with the same AML logic. Finally, this matches up with the TPM TIS ISA

Re: [PATCH v2 12/12] qdev: Rework array properties based on list visitor

2023-10-30 Thread Mark Cave-Ayland
On 30/10/2023 14:26, Kevin Wolf wrote: Until now, array properties are actually implemented with a hack that uses multiple properties on the QOM level: a static "foo-len" property and after it is set, dynamically created "foo[i]" properties. In external interfaces (-device on the command line

Re: [PATCH 0/3] Misc ati-vga patches

2023-10-30 Thread Mark Cave-Ayland
On 30/10/2023 10:37, BALATON Zoltan wrote: On Mon, 23 Oct 2023, BALATON Zoltan wrote: On Tue, 10 Oct 2023, BALATON Zoltan wrote: Some misc patches I had laying around that could be upstreamed just to clean up my tree a bit. Ping? Is Gerd still the maintainer of gfx or who else should be

Re: [PATCH v2 5/6] hw/input/stellaris_input: Convert to qdev

2023-10-30 Thread Mark Cave-Ayland
On 30/10/2023 11:48, Peter Maydell wrote: Convert the hw/input/stellaris_input device to qdev. The interface uses an array property for the board to specify the keycodes to use, so the s->keycodes memory is now allocated by the array-property machinery. Signed-off-by: Peter Maydell

[PATCH qemu v2] Fixing the basic functionality of STM32 timers

2023-10-30 Thread ~lbryndza
From: Lucjan Bryndza The current implementation of timers does not work properly even in basic functionality. A counter configured to report an interrupt every 10ms reports the first interrupts after a few seconds. There are also no properly implemented count up and count down modes. This

Re: [PATCH 0/4] Fix IRQ routing in via south bridge

2023-10-30 Thread Mark Cave-Ayland
On 29/10/2023 13:45, BALATON Zoltan wrote: On Sun, 29 Oct 2023, Mark Cave-Ayland wrote: On 29/10/2023 00:56, BALATON Zoltan wrote: This is going back to my otiginal proposal in https://patchew.org/QEMU/cover.1677004414.git.bala...@eik.bme.hu/ implementing routing of interrupts from device

Re: Patch to fix malfunctioning of T2-T5 timers on the STM32 platform

2023-10-30 Thread Lucjan Bryndza
Hi Alistair > Wiadomość napisana przez Alistair Francis w dniu > 30.10.2023, o godz. 05:26: > > On Sat, Oct 28, 2023 at 5:55 AM Lucjan Bryndza > wrote: >> >> >> Current implementation of T2 - T5 times on the STM32 platform does not work >> properly. >> After configuring the timer-counter

Re: [PATCH] linux-user: Fix guest signal remapping after adjusting SIGABRT

2023-10-30 Thread Alex Bennée
Richard Henderson writes: > The arithmetic within the loop was not adjusted properly after SIGRTMIN > was stolen for the guest SIGABRT. The effect was that the guest libc > could not send itself __SIGRTMIN to wake sleeping threads. > > Fixes: 38ee0a7dfb4b ("linux-user: Remap guest SIGABRT") >

Re: [PATCH v3] tests/docker: move sh4 to use debian-legacy-test-cross

2023-10-30 Thread Richard Henderson
On 10/30/23 06:57, Alex Bennée wrote: sh4 is another target which doesn't work with bookworm compilers. To keep on buster move across to the debian-legacy-test-cross image and update accordingly. Signed-off-by: Alex Bennée Message-Id: <20231029145033.592566-8-alex.ben...@linaro.org> ---

Re: Patch to fix malfunctioning of T2-T5 timers on the STM32 platform

2023-10-30 Thread Lucjan Bryndza
Hi Philippe > Wiadomość napisana przez Philippe Mathieu-Daudé w dniu > 30.10.2023, o godz. 05:18: > > Hi Lucjan, > > On 27/10/23 21:37, Lucjan Bryndza wrote: >> Current implementation of T2 - T5 times on the STM32 platform does not work >> properly. >> After configuring the timer-counter

Re: [PATCH] target/arm: Fix SVE STR increment

2023-10-30 Thread Alex Bennée
Richard Henderson writes: > The previous change missed updating one of the increments. > > Cc: qemu-sta...@nongnu.org > Fixes: e6dd5e782be ("target/arm: Use tcg_gen_qemu_{ld, st}_i128 in > gen_sve_{ld, st}r") > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

[PATCH] target/arm: Fix SVE STR increment

2023-10-30 Thread Richard Henderson
The previous change missed updating one of the increments. Cc: qemu-sta...@nongnu.org Fixes: e6dd5e782be ("target/arm: Use tcg_gen_qemu_{ld, st}_i128 in gen_sve_{ld, st}r") Signed-off-by: Richard Henderson --- target/arm/tcg/translate-sve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

RE: [PATCH v6 13/21] virtio-net: Always set populate_hash

2023-10-30 Thread Zhang, Chen
> -Original Message- > From: qemu-devel-bounces+chen.zhang=intel@nongnu.org devel-bounces+chen.zhang=intel@nongnu.org> On Behalf Of Akihiko > Odaki > Sent: Monday, October 30, 2023 1:13 PM > Cc: qemu-devel@nongnu.org; Yuri Benditovich > ; Andrew Melnychenko > ; Michael S .

RE: [PATCH v6 05/21] tap: Remove tap_receive()

2023-10-30 Thread Zhang, Chen
> -Original Message- > From: qemu-devel-bounces+chen.zhang=intel@nongnu.org devel-bounces+chen.zhang=intel@nongnu.org> On Behalf Of Akihiko > Odaki > Sent: Monday, October 30, 2023 1:12 PM > Cc: qemu-devel@nongnu.org; Yuri Benditovich > ; Andrew Melnychenko > ; Michael S .

Re: [PATCH v2 5/6] hw/input/stellaris_input: Convert to qdev

2023-10-30 Thread Philippe Mathieu-Daudé
On 30/10/23 15:41, Peter Maydell wrote: On Mon, 30 Oct 2023 at 13:52, Philippe Mathieu-Daudé wrote: Hi Peter, Cc'ing Markus for QObject. On 30/10/23 12:48, Peter Maydell wrote: Convert the hw/input/stellaris_input device to qdev. The interface uses an array property for the board to

Re: [PATCH 0/3] target/arm: Fix various FEAT_MOPS bugs

2023-10-30 Thread Richard Henderson
On 10/30/23 10:39, Peter Maydell wrote: This patchset fixes some bugs in FEAT_MOPS that were encountered by somebody trying to use it in qemu user-mode: * we forgot to set the SCTLR bit in CPU reset, so all the insns UNDEF * we weren't reporting the hwcap bit because of a uint32_t vs

Re: Getting qemu plugins working on windows

2023-10-30 Thread Richard Henderson
On 10/30/23 09:48, Greg Manning wrote: Hello, Currently, qemu plugin support only works in Linux and I would like to get qemu plugins working on Windows. I have had some success experimenting with this locally (based on some previous work by Yonggang Luo, see below), but would like to gauge

[PATCH 2/3] linux-user: Report AArch64 hwcap2 fields above bit 31

2023-10-30 Thread Peter Maydell
The AArch64 ELF hwcap2 field is 64 bits, but our get_elf_hwcap2() works with uint32_t, so it accidentally fails to report any hwcaps over bit 31. Use uint64_t here. The Arm hwcap2 is only 32 bits (because the ELF format makes these fields be the size of "long" in the ABI), but since it shares

[PATCH 0/3] target/arm: Fix various FEAT_MOPS bugs

2023-10-30 Thread Peter Maydell
This patchset fixes some bugs in FEAT_MOPS that were encountered by somebody trying to use it in qemu user-mode: * we forgot to set the SCTLR bit in CPU reset, so all the insns UNDEF * we weren't reporting the hwcap bit because of a uint32_t vs uint64_t mixup * we didn't handle the case

[PATCH 3/3] target/arm: Make FEAT_MOPS SET* insns handle Xs == XZR correctly

2023-10-30 Thread Peter Maydell
Most of the registers used by the FEAT_MOPS instructions cannot use 31 as a register field value; this is CONSTRAINED UNPREDICTABLE to NOP or UNDEF (we UNDEF). However, it is permitted for the "source value" register for the memset insns SET* to be 31, which (as usual for most data-processing

[PATCH 1/3] target/arm: Enable FEAT_MOPS insns in user-mode emulation

2023-10-30 Thread Peter Maydell
In user-mode emulation, we need to set the SCTLR_EL1.MSCEn bit to avoid all the FEAT_MOPS insns UNDEFing. Signed-off-by: Peter Maydell --- target/arm/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index aa4e006f21a..cdb37ce5512 100644 ---

Re: [PATCH 5/6] qga: Add timeout for fsfreeze

2023-10-30 Thread Konstantin Kostiuk
On Mon, Oct 30, 2023 at 6:32 PM Alexander Ivanov < alexander.iva...@virtuozzo.com> wrote: > > > On 10/26/23 11:16, Konstantin Kostiuk wrote: > > > > I think it is better to check that timeout <= 10 sec in the case of > > Windows. > > Anyway this is a VSS limitation and FS will be unfrozen earlier

Re: [PATCH v2 10/14] target/riscv: Move vector crypto extensions to riscv_cpu_extensions

2023-10-30 Thread Daniel Henrique Barboza
On 10/26/23 12:18, Max Chou wrote: Because the vector crypto specification is ratified, so move theses extensions from riscv_cpu_experimental_exts to riscv_cpu_extensions. Signed-off-by: Max Chou --- Reviewed-by: Daniel Henrique Barboza target/riscv/cpu.c | 36

Re: [PATCH v2 09/14] target/riscv: Expose Zvks[c|g] extnesion properties

2023-10-30 Thread Daniel Henrique Barboza
On 10/26/23 12:18, Max Chou wrote: Expose the properties of ShangMi Algorithm Suite related extensions (Zvks, Zvksc, Zvksg). Signed-off-by: Max Chou --- Reviewed-by: Daniel Henrique Barboza target/riscv/cpu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

  1   2   3   >