[PATCH 48/53] acpi: arm/virt: build_spcr: fix invalid cast

2021-06-25 Thread Igor Mammedov
implicit cast to structure uint8_t member didn't raise error when assigning value from incorrect enum, but when using build_append_gas() (next patch) it will error out with (clang): implicit conversion from enumeration type 'AmlRegionSpace' to different enumeration type 'AmlAddressSpace' fix

Re: [PATCH 02/53] tests: qtest: add qtest_has_accel() to check if tested binary supports accelerator

2021-06-25 Thread Philippe Mathieu-Daudé
On 6/25/21 11:17 AM, Igor Mammedov wrote: > Currently it is not possible to create tests that have KVM as a hard > requirement on a host that doesn't support KVM for tested target > binary (modulo going through the trouble of compiling out > the offending test case). > > Following scenario makes

[PULL 06/15] target/mips: Move TCG trace events to tcg/ sub directory

2021-06-25 Thread Philippe Mathieu-Daudé
Commit a2b0a27d33e ("target/mips: Move TCG source files under tcg/ sub directory") forgot to move the trace-event file. As it only contains TCG events, move it for consistency. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id:

Re: [PATCH v5 00/11] block: file-posix queue

2021-06-25 Thread Max Reitz
On 25.06.21 10:52, Paolo Bonzini wrote: On 25/06/21 10:37, Max Reitz wrote: Thanks, looks good to me, though I’m afraid I’ll be on PTO the next two weeks so I can’t take this series through my tree... (I don’t really want to send a pull request today when I probably wouldn’t be able to deal

[PATCH 44/53] acpi: build_dsdt_microvm: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- CC: marcel.apfelb...@gmail.com --- hw/i386/acpi-microvm.c | 13 ++--- 1 file changed, 6

[PULL 03/15] target/mips: Fix more TCG temporary leaks in gen_pool32a5_nanomips_insn

2021-06-25 Thread Philippe Mathieu-Daudé
Fix multiple TCG temporary leaks in gen_pool32a5_nanomips_insn(). Fixes: 3285a3e4445 ("target/mips: Add emulation of DSP ASE for nanoMIPS - part 1") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20210617174323.2900831-3-f4...@amsat.org> ---

Re: Difficulties to access guest memory in TCG plugins

2021-06-25 Thread Peter Maydell
On Fri, 25 Jun 2021 at 10:25, Kevin Mambu wrote: > In the scope of my Ph. D subject, I want to model a DMA-like mechanism for > quick prototyping and evaluation, the plugin emulates an MMIO with > Control/Status Registers. I am actually able to pass parameters to the > Control/Status Registers

[PATCH 43/53] acpi: arm/virt: madt: use build_append_int_noprefix() API to compose MADT table

2021-06-25 Thread Igor Mammedov
Drop usage of packed structures and explicit endian conversions when building MADT table for arm/x86 and use endian agnostic build_append_int_noprefix() API to build it. Signed-off-by: Igor Mammedov --- CC: drjo...@redhat.com CC: peter.mayd...@linaro.org CC: shannon.zha...@gmail.com CC:

[PULL 01/15] target/mips: Fix potential integer overflow (CID 1452921)

2021-06-25 Thread Philippe Mathieu-Daudé
Use the BIT_ULL() macro to ensure we use 64-bit arithmetic. This fixes the following Coverity issue (OVERFLOW_BEFORE_WIDEN): CID 1452921: Integer handling issues: Potentially overflowing expression "1 << w" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and

[PULL 15/15] target/mips: Merge msa32/msa64 decodetree definitions

2021-06-25 Thread Philippe Mathieu-Daudé
We don't need to maintain 2 sets of decodetree definitions. Merge them into a single file. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20210617174636.2902654-3-f4...@amsat.org> --- target/mips/tcg/{msa32.decode => msa.decode} | 8 +---

[PULL 14/15] target/mips: Remove pointless gen_msa()

2021-06-25 Thread Philippe Mathieu-Daudé
Only trans_MSA() calls gen_msa(), inline it to simplify. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20210617174636.2902654-2-f4...@amsat.org> --- target/mips/tcg/msa_translate.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git

[PATCH 39/53] acpi: madt: arm/x86: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- CC: marcel.apfelb...@gmail.com CC: shannon.zha...@gmail.com CC: peter.mayd...@linaro.org CC:

[PATCH 49/53] acpi: arm/virt: build_spcr: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. while at it, replace packed structure with endian agnostic build_append_FOO() API. Signed-off-by: Igor Mammedov --- CC: drjo...@redhat.com

[PULL 12/15] target/mips: Constify host_to_mips_errno[]

2021-06-25 Thread Philippe Mathieu-Daudé
Keep host_to_mips_errno[] in .rodata by marking the array const. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20210617174323.2900831-9-f4...@amsat.org> --- target/mips/tcg/sysemu/mips-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL 13/15] target/mips: Optimize regnames[] arrays

2021-06-25 Thread Philippe Mathieu-Daudé
Since all entries are no more than 3/4/6 bytes (including nul terminator), can save space and pie runtime relocations by declaring regnames[] as array of 3/4/6 const char. Inspired-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id:

[PATCH 35/53] acpi: use build_append_int_noprefix() API to compose SRAT table

2021-06-25 Thread Igor Mammedov
Drop usage of packed structures and explicit endian conversions when building SRAT tables for arm/x86 and use endian agnostic build_append_int_noprefix() API to build it. Signed-off-by: Igor Mammedov --- CC: xiaoguangrong.e...@gmail.com CC: shannon.zha...@gmail.com CC: peter.mayd...@linaro.org

[PULL 11/15] target/mips: fix emulation of nanoMIPS BPOSGE32 instruction

2021-06-25 Thread Philippe Mathieu-Daudé
From: Aleksandar Rikalo Per the "MIPS® Architecture Extension: nanoMIPS32 DSP Technical Reference Manual — Revision 0.04" p. 88 "BPOSGE32C", offset argument (imm) should be left-shifted first. This change was tested against test_dsp_r1_bposge32.c DSP test. Reported-by: Philippe Mathieu-Daudé

[PATCH 47/53] acpi: arm/virt: convert build_iort() to endian agnostic build_append_FOO() API

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- CC: drjo...@redhat.com CC: peter.mayd...@linaro.org CC: shannon.zha...@gmail.com CC: qemu-...@nongnu.org --- include/hw/acpi/acpi-defs.h | 71 -- hw/arm/virt-acpi-build.c| 143 +++- 2 files changed, 77

[PULL 04/15] target/mips: Raise exception when DINSV opcode used with DSP disabled

2021-06-25 Thread Philippe Mathieu-Daudé
Per the "MIPS® DSP Module for MIPS64 Architecture" manual, rev. 3.02, Table 5.3 "SPECIAL3 Encoding of Function Field for DSP Module": If the Module/ASE is not implemented, executing such an instruction must cause a Reserved Instruction Exception. The DINSV instruction lists the following

[PATCH 34/53] acpi: arm/x86: build_srat: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- CC: shannon.zha...@gmail.com CC: peter.mayd...@linaro.org CC: marcel.apfelb...@gmail.com CC:

[PULL 07/15] target/mips: Move translate.h to tcg/ sub directory

2021-06-25 Thread Philippe Mathieu-Daudé
We moved various TCG source files in commit a2b0a27d33e ("target/mips: Move TCG source files under tcg/ sub directory") but forgot to move the header declaring their prototypes. Do it now, since all it declares is TCG specific. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson

[PULL 02/15] target/mips: Fix TCG temporary leaks in gen_pool32a5_nanomips_insn()

2021-06-25 Thread Philippe Mathieu-Daudé
Fix a pair of TCG temporary leak when translating nanoMIPS SHILO opcode. Fixes: 3285a3e4445 ("target/mips: Add emulation of DSP ASE for nanoMIPS") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20210530094538.1275329-1-f4...@amsat.org> ---

[PATCH 46/53] acpi: arm: virt: build_iort: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- CC: drjo...@redhat.com CC: peter.mayd...@linaro.org CC: shannon.zha...@gmail.com CC: qemu-...@nongnu.org

[PATCH 33/53] acpi: build_tpm_tcpa: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. While at it switch to build_append_int_noprefix() to build table entries (which also removes some manual offset calculations).

[PATCH 42/53] acpi: x86: madt: use build_append_int_noprefix() API to compose MADT table

2021-06-25 Thread Igor Mammedov
Drop usage of packed structures and explicit endian conversions when building MADT table for arm/x86 and use endian agnostic build_append_int_noprefix() API to build it. Signed-off-by: Igor Mammedov --- CC: marcel.apfelb...@gmail.com --- include/hw/acpi/acpi-defs.h | 64 --

[PATCH 52/53] acpi: remove no longer used build_header()

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/hw/acpi/acpi-defs.h | 25 - include/hw/acpi/aml-build.h | 4 hw/acpi/aml-build.c | 23 --- 3 files changed, 52 deletions(-) diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h

[PATCH 50/53] acpi: arm/virt: build_gtdt: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. while at it, replace packed structure with endian agnostic build_append_FOO() API. Signed-off-by: Igor Mammedov --- CC: drjo...@redhat.com

[PATCH 32/53] acpi: build_hpet: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. while at it convert build_hpet() to endian agnostic build_append_FOO() API Signed-off-by: Igor Mammedov --- CC: marcel.apfelb...@gmail.com

[PATCH 41/53] acpi: x86: set enabled when composing _MAT entries

2021-06-25 Thread Igor Mammedov
Instead of composing disabled _MAT entry and then later on patching it to enabled for hotpluggbale CPUs in DSDT, set it to enabled at the time _MAT entry is built. It will allow to drop usage of packed structures in following patches when build_madt() is switched to use

[PATCH 45/53] acpi: arm: virt: build_dsdt: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- CC: peter.mayd...@linaro.org CC: shannon.zha...@gmail.com CC: qemu-...@nongnu.org CC: drjo...@redhat.com

[PATCH 27/53] acpi: build_hmat: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Also since acpi_init_table() reserves space only for standard header while previous acpi_data_push() reserved the header + 4 bytes field,

[PATCH 28/53] acpi: nvdimm_build_nfit: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Also since acpi_init_table() reserves space only for standard header while previous acpi_data_push() reserved the header + 4 bytes field,

[PATCH 36/53] acpi: build_dmar_q35: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. While at it switch to build_append_int_noprefix() to build table entries tables. Signed-off-by: Igor Mammedov --- CC:

[PATCH 40/53] acpi: x86: remove dead code

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/hw/acpi/acpi-defs.h | 13 - 1 file changed, 13 deletions(-) diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h index c7fa5caa06..af4fa412a5 100644 --- a/include/hw/acpi/acpi-defs.h +++ b/include/hw/acpi/acpi-defs.h @@

[PATCH 20/53] acpi: build_rsdt: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offests magic from API user. While at it switch to build_append_int_noprefix() to build entries to other tables (which also removes some manual offset calculations).

[PATCH 31/53] acpi: x86: build_dsdt: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- CC: marcel.apfelb...@gmail.com --- hw/i386/acpi-build.c | 10 -- 1 file changed, 4 insertions(+),

[PATCH 38/53] acpi: build_amd_iommu: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- CC: marcel.apfelb...@gmail.com --- hw/i386/acpi-build.c | 11 --- 1 file changed, 4

[PATCH 30/53] acpi: vmgenid_build_acpi: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- hw/acpi/vmgenid.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git

[PATCH 29/53] acpi: nvdimm_build_ssdt: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- CC: xiaoguangrong.e...@gmail.com --- hw/acpi/nvdimm.c | 18 ++ 1 file changed, 10

[PATCH 14/53] tests: acpi: arm/virt: use kvm to test IORT table

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- - v2: switch to qtest_has_accel() API CC: th...@redhat.com CC: lviv...@redhat.com CC: drjo...@redhat.com CC: qemu-...@nongnu.org --- tests/qtest/bios-tables-test.c | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PATCH 37/53] acpi: build_waet: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- CC: marcel.apfelb...@gmail.com --- hw/i386/acpi-build.c | 10 -- 1 file changed, 4 insertions(+),

[PATCH 24/53] acpi: build_tpm2: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- CC: stef...@linux.vnet.ibm.com --- hw/acpi/aml-build.c | 11 +-- 1 file changed, 5 insertions(+),

[PATCH 26/53] acpi: build_mcfg: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- hw/acpi/pci.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH 16/53] tests: arm-cpu-features: use qtest_has_kvm() API

2021-06-25 Thread Igor Mammedov
and drop custom function that were doing the job Signed-off-by: Igor Mammedov --- CC: th...@redhat.com CC: lviv...@redhat.com CC: drjo...@redhat.com CC: peter.mayd...@linaro.org CC: pbonz...@redhat.com CC: qemu-...@nongnu.org --- tests/qtest/arm-cpu-features.c | 29 +

[PATCH 21/53] acpi: build_xsdt: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. While at it switch to build_append_int_noprefix() to build entries to other tables (which also removes some manual offset calculations).

[PATCH 25/53] acpi: acpi_build_hest: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- CC: qemu-...@nongnu.org CC: drjo...@redhat.com CC: gengdongj...@gmail.com --- hw/acpi/ghes.c | 10

[PATCH 23/53] acpi: build_fadt: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- hw/acpi/aml-build.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH 13/53] tests: acpi: whitelist expected tables for acpi/virt/iort testcase

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + tests/data/acpi/virt/IORT.iort | 0 2 files changed, 1 insertion(+) create mode 100644 tests/data/acpi/virt/IORT.iort diff --git a/tests/qtest/bios-tables-test-allowed-diff.h

[PATCH 19/53] acpi: add helper routines to initialize ACPI tables

2021-06-25 Thread Igor Mammedov
acpi_init_table(): initializes table header and keeps track of table data/offsets acpi_table_composed(): sets actual table length and tells bios loader where it's for later initialization on guest side. Signed-off-by: Igor Mammedov --- include/hw/acpi/aml-build.h |

[PATCH 11/53] tests: acpi: update expected blobs

2021-06-25 Thread Igor Mammedov
DSDT: +Device (S10) +{ +Name (_ADR, 0x0002) // _ADR: Address +} New IVRS table: [000h 4]Signature : "IVRS"[I/O Virtualization Reporting Structure] [004h 0004 4] Table Length : 0068

[PATCH 22/53] acpi: build_slit: use acpi_init_table()/acpi_table_composed() instead of build_header()

2021-06-25 Thread Igor Mammedov
it replaces error-prone pointer arithmetic for build_header() API, with 2 calls to start and finish table creation, which hides offsets magic from API user. Signed-off-by: Igor Mammedov --- hw/acpi/aml-build.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git

[PATCH 12/53] tests: acpi: arm/virt: drop redudant test_acpi_one() in test_acpi_virt_tcg()

2021-06-25 Thread Igor Mammedov
follow up call test_acpi_one() with smbios options generates the same ACPI tables, so there is no need to run smbios-less variant at all. Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/qtest/bios-tables-test.c

[PATCH 17/53] tests: migration-test: use qtest_has_accel() API

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Suggested-by: Thomas Huth --- CC: dgilb...@redhat.com CC: pbonz...@redhat.com CC: th...@redhat.com CC: lviv...@redhat.com --- tests/qtest/migration-test.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git

[PATCH 10/53] tests: acpi: add testcase for amd-iommu (IVRS table)

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- CC: th...@redhat.com CC: lviv...@redhat.com --- tests/qtest/bios-tables-test.c | 13 + 1 file changed, 13 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 7ba208a6cc..9b36a49f96 100644 ---

[PATCH 15/53] tests: acpi: add expected IORT table blob

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 - tests/data/acpi/virt/IORT.iort | Bin 0 -> 124 bytes 2 files changed, 1 deletion(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index

[PATCH 12/53] tests: acpi: arm/virt: drop redundant test_acpi_one() in test_acpi_virt_tcg()

2021-06-25 Thread Igor Mammedov
follow up call with smbios options generates the same ACPI tables, so there is no need to run smbios-less variant at all. Signed-off-by: Igor Mammedov --- CC: drjo...@redhat.com CC: qemu-...@nongnu.org CC: th...@redhat.com CC: lviv...@redhat.com --- tests/qtest/bios-tables-test.c | 3 --- 1

[PATCH 09/53] tests: acpi: whitelist expected blobs for new acpi/q35/ivrs testcase

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ tests/data/acpi/q35/IVRS.ivrs | 0 2 files changed, 2 insertions(+) create mode 100644 tests/data/acpi/q35/IVRS.ivrs diff --git a/tests/qtest/bios-tables-test-allowed-diff.h

[PATCH 18/53] tests: bios-tables-test: use qtest_has_accel() API to register TCG only tests

2021-06-25 Thread Igor Mammedov
.. only if TCG is available Signed-off-by: Igor Mammedov --- CC: th...@redhat.com CC: lviv...@redhat.com CC: f4...@amsat.org --- tests/qtest/bios-tables-test.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/tests/qtest/bios-tables-test.c

[PATCH 06/53] tests: acpi: whitelist new expected table tests/data/acpi/q35/DMAR.dmar

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + tests/data/acpi/q35/DMAR.dmar | 0 2 files changed, 1 insertion(+) create mode 100644 tests/data/acpi/q35/DMAR.dmar diff --git a/tests/qtest/bios-tables-test-allowed-diff.h

[PATCH 05/53] tests: acpi: update expected tables blobs

2021-06-25 Thread Igor Mammedov
Update adds CPU entries to MADT/SRAT/FACP and DSDT to cover 288 CPUs. Notable changes are that CPUs with APIC ID 255 and higher use 'Processor Local x2APIC Affinity' structure in SRAT and "Device" element in DSDT. FACP: - Use APIC Cluster Model (V4) : 0 + Use APIC

[PATCH 08/53] tests: acpi: add expected blob for DMAR table

2021-06-25 Thread Igor Mammedov
[000h 4]Signature : "DMAR"[DMA Remapping table] [004h 0004 4] Table Length : 0050 [008h 0008 1] Revision : 01 [009h 0009 1] Checksum : F4 [00Ah 0010 6] Oem

[PATCH 07/53] tests: acpi: add testcase for intel_iommu (DMAR table)

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- CC: th...@redhat.com CC: lviv...@redhat.com --- tests/qtest/bios-tables-test.c | 13 + 1 file changed, 13 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index ca496819fa..7ba208a6cc 100644 ---

[PATCH 03/53] tests: acpi: whitelist expected tables for acpi/q35/numamem testcase

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 4 1 file changed, 4 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..9db598f9fe 100644 ---

[PATCH 02/53] tests: qtest: add qtest_has_accel() to check if tested binary supports accelerator

2021-06-25 Thread Igor Mammedov
Currently it is not possible to create tests that have KVM as a hard requirement on a host that doesn't support KVM for tested target binary (modulo going through the trouble of compiling out the offending test case). Following scenario makes test fail when it's run on non x86 host:

[PATCH 04/53] tests: acpi: q35: test for x2APIC entries in SRAT

2021-06-25 Thread Igor Mammedov
Set -smp 1,maxcpus=288 to test for ACPI code that deal with CPUs with large APIC ID (>255). PS: Test requires KVM and in-kernel irqchip support, so skip test if KVM is not available. Signed-off-by: Igor Mammedov --- v2: - switch to qtest_has_accel() API CC: th...@redhat.com CC:

[PATCH 00/53] acpi: refactor error prone build_header() and packed structures usage in ACPI tables

2021-06-25 Thread Igor Mammedov
Highlights: * drop pointer arithmetic in ACPI tables code * use endian agnostic API * simplifies review of tables. /in most cases just line by line comparision with spec/ Series replaces build_header() with acpi_init_table()/acpi_table_composed() API that hides pointer/offset arithmetic

[PATCH 01/53] tests: acpi: dump table with failed checksum

2021-06-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- CC: m...@redhat.com CC: th...@redhat.com CC: lviv...@redhat.com --- tests/qtest/acpi-utils.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tests/qtest/acpi-utils.c b/tests/qtest/acpi-utils.c index d2a202efca..766c48e3a6 100644 ---

[PULL 6/7] tests/tcg: skip the signals test for hppa/s390x for now

2021-06-25 Thread Alex Bennée
There are fixes currently in flight but as this is getting in the way of a green CI we might as well skip for now. For reference the fix series are: linux-user: Move signal trampolines to new page 20210616011209.1446045-1-richard.hender...@linaro.org and linux-user: Load a vdso for x86_64

[PULL 7/7] plugins/api: expose symbol lookup to plugins

2021-06-25 Thread Alex Bennée
This is a quality of life helper for plugins so they don't need to re-implement symbol lookup when dumping an address. The strings are constant so don't need to be duplicated. One minor tweak is to return NULL instead of a zero length string to show lookup failed. Signed-off-by: Alex Bennée

[PULL 0/7] misc fixes (docs, plugins, tests)

2021-06-25 Thread Alex Bennée
The following changes since commit ecba223da6215d6f6ce2d343b70b2e9a19bfb90b: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210624' into staging (2021-06-24 15:00:34 +0100) are available in the Git repository at: https://github.com/stsquad/qemu.git

[PULL 5/7] GitLab: Add "Feature Request" issue template.

2021-06-25 Thread Alex Bennée
From: John Snow Based on Peter Krempa's libvirt template, feature.md. Signed-off-by: John Snow Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée CC: Peter Krempa Message-Id: <20210607153155.1760158-3-js...@redhat.com> Message-Id:

[PULL 4/7] GitLab: Add "Bug" issue reporting template

2021-06-25 Thread Alex Bennée
From: John Snow Based loosely on libvirt's template, written by Peter Krempa. Signed-off-by: John Snow Signed-off-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Stefan Hajnoczi CC: Peter Krempa Message-Id: <20210607153155.1760158-2-js...@redhat.com> Message-Id:

[PULL 3/7] scripts/checkpatch: roll diff tweaking into checkpatch itself

2021-06-25 Thread Alex Bennée
Rather than relying on external tweaks lets just do it inside checkpatch's direct commitish handling which is QEMU specific code anyway. Suggested-by: Daniel P. Berrangé Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Reviewed-by: Willian

[PULL 2/7] docs/devel: Add a single top-level header to MTTCG's doc

2021-06-25 Thread Alex Bennée
From: Luis Pires Without a single top-level header in the .rst file, the index ended up linking to all of the top-level headers separately. Now the index links to the top-level header at the beginning of the document and any inner headers are correctly linked as sub-items in the index.

[PULL 1/7] tests/acceptance: tweak the tcg/kvm tests for virt

2021-06-25 Thread Alex Bennée
Really it's only TCG that can select which GIC model you want, KVM guests should always be using the "host" version of the GIC for which QEMU already provides a handy shortcut. Make the KVM test use this and split the TCG test into it's two versions. Signed-off-by: Alex Bennée Reviewed-by:

[PATCH v0] vhost: make SET_VRING_ADDR, SET_[PROTOCOL_]FEATEURES send replies

2021-06-25 Thread Denis Plotnikov
On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES to enable buffers logging and VHOST_USER_SET_FEATURES per each started ring to enable "used ring" data logging. The issue is

Re: [PATCH v5 00/11] block: file-posix queue

2021-06-25 Thread Paolo Bonzini
On 25/06/21 10:37, Max Reitz wrote: Thanks, looks good to me, though I’m afraid I’ll be on PTO the next two weeks so I can’t take this series through my tree... (I don’t really want to send a pull request today when I probably wouldn’t be able to deal with potential problems) I can take it

Re: [PATCH v2 10/10] hw/mips/jazz: specify correct endian for dp8393x device

2021-06-25 Thread Philippe Mathieu-Daudé
On 6/25/21 8:54 AM, Mark Cave-Ayland wrote: > The MIPS magnum machines are available in both big endian (mips64) and little > endian (mips64el) configurations. Ensure that the dp893x big_endian property > is set accordingly using logic similar to that used for the MIPS malta > machines. > >

Re: [PULL 09/12] configure, meson: convert libusb detection to meson

2021-06-25 Thread Paolo Bonzini
On 25/06/21 04:09, 罗勇刚(Yonggang Luo) wrote: > +if not get_option('libusb').auto() or have_system > +  libusb = dependency('libusb-1.0', required: get_option('libusb'), > +                      version: '>=1.0.13', method: 'pkg-config', > +                      kwargs: static_kwargs) >  

Re: [PULL 00/12] Misc, mostly meson patches for 2021-06-23

2021-06-25 Thread Paolo Bonzini
On 25/06/21 10:09, Peter Maydell wrote: Looks like a missing #include in the test code, rather than anything specifically libpam related. Yes, indeed. More generally, I think if meson probes for some library and can't find it, the correct response is that it should just print "Library

[PATCH v5] ui/gtk: New -display gtk option 'full-screen-on-monitor'.

2021-06-25 Thread Khor, Swee Aun
This lets user select monitor number to display QEMU in full screen with -display gtk,full-screen-on-monitor=. v2: - https://patchew.org/QEMU/20210617020609.18089-1-swee.aun.k...@intel.com/. - Added documentation for new member. - Renamed member name from monitor-num to monitor. v3: - Changed

Re: [PATCH v2 02/10] dp8393x: convert to trace-events

2021-06-25 Thread Philippe Mathieu-Daudé
On 6/25/21 8:53 AM, Mark Cave-Ayland wrote: > Signed-off-by: Mark Cave-Ayland > --- > hw/net/dp8393x.c| 55 + > hw/net/trace-events | 17 ++ > 2 files changed, 37 insertions(+), 35 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC PATCH] audio: Make the AudiodevDriver enum conditional

2021-06-25 Thread Thomas Huth
On 25/06/2021 10.30, Daniel P. Berrangé wrote: On Thu, Jun 24, 2021 at 08:37:16PM +0200, Thomas Huth wrote: This way, the upper layers like libvirt could have the possibility to use QAPI to find out which audio drivers have been enabled during compile-time of QEMU. Signed-off-by: Thomas Huth

Re: [PATCH v2 01/10] dp8393x: checkpatch fixes

2021-06-25 Thread Philippe Mathieu-Daudé
On 6/25/21 8:53 AM, Mark Cave-Ayland wrote: > Also fix a simple comment typo of "constrainst" to "constraints". > > Signed-off-by: Mark Cave-Ayland > --- > hw/net/dp8393x.c | 231 +-- > 1 file changed, 122 insertions(+), 109 deletions(-) Reviewed-by:

Re: [PATCH 2/2] g364fb: add VMStateDescription for G364SysBusState

2021-06-25 Thread Philippe Mathieu-Daudé
On 6/25/21 9:38 AM, Mark Cave-Ayland wrote: > Currently when QEMU attempts to migrate the MIPS magnum machine it crashes due > to a mistake in the g364fb VMStateDescription configuration which expects a > G364SysBusState and not a G364State. > > Resolve the issue by adding a new

Re: [PATCH v5 00/11] block: file-posix queue

2021-06-25 Thread Max Reitz
On 24.06.21 20:04, Paolo Bonzini wrote: New patches: - 3/4 (for review comments), - 9 (split for ease of review), - 11 (new bugfix) v1->v2: add missing patch v2->v3: add max_hw_transfer to BlockLimits v3->v4: fix compilation after patch 1, tweak commit messages according to

Re: [PATCH 1/2] g364fb: use RAM memory region for framebuffer

2021-06-25 Thread Philippe Mathieu-Daudé
On 6/25/21 9:38 AM, Mark Cave-Ayland wrote: > Since the migration stream is already broken, we can use this opportunity to > change the framebuffer so that it is migrated as a RAM memory region rather > than as an array of bytes. > > In particular this helps the output of the analyze-migration.py

Re: [PATCH] arm/aspeed: rainier: Add i2c eeproms and muxes

2021-06-25 Thread Cédric Le Goater
On 6/25/21 7:06 AM, Joel Stanley wrote: > These are the devices documented by the Rainier device tree. With this > we can see the guest discovering the multiplexers and probing the eeprom > devices: > > i2c i2c-2: Added multiplexed i2c bus 16 > i2c i2c-2: Added multiplexed i2c bus 17 > i2c

Re: [PATCH 11/11] file-posix: handle EINTR during ioctl

2021-06-25 Thread Max Reitz
On 24.06.21 20:04, Paolo Bonzini wrote: Similar to other handle_aiocb_* functions, handle_aiocb_ioctl needs to cater for the possibility that ioctl is interrupted by a signal. Otherwise, the I/O is incorrectly reported as a failure to the guest. Reported-by: Gordon Watson Signed-off-by: Paolo

Re: [PATCH 10/11] block: detect DKIOCGETBLOCKCOUNT/SIZE before use

2021-06-25 Thread Max Reitz
On 24.06.21 20:04, Paolo Bonzini wrote: From: Joelle van Dyne iOS hosts do not have these defined so we fallback to the default behaviour. Co-authored-by: Warner Losh Signed-off-by: Joelle van Dyne Signed-off-by: Paolo Bonzini --- block/file-posix.c | 2 +- 1 file changed, 1

Re: [PATCH 11/11] file-posix: handle EINTR during ioctl

2021-06-25 Thread Philippe Mathieu-Daudé
On 6/24/21 8:04 PM, Paolo Bonzini wrote: > Similar to other handle_aiocb_* functions, handle_aiocb_ioctl needs to cater > for the possibility that ioctl is interrupted by a signal. Otherwise, the > I/O is incorrectly reported as a failure to the guest. > > Reported-by: Gordon Watson >

Re: [RFC PATCH] audio: Make the AudiodevDriver enum conditional

2021-06-25 Thread Daniel P . Berrangé
On Thu, Jun 24, 2021 at 08:37:16PM +0200, Thomas Huth wrote: > This way, the upper layers like libvirt could have the possibility > to use QAPI to find out which audio drivers have been enabled during > compile-time of QEMU. > > Signed-off-by: Thomas Huth > --- > Note: Marked as RFC since it's

Re: [PATCH 09/11] block: try BSD disk size ioctls one after another

2021-06-25 Thread Max Reitz
On 24.06.21 20:04, Paolo Bonzini wrote: Try all the possible ioctls for disk size as long as they are supported, to keep the #if ladder simple. Extracted and cleaned up from a patch by Joelle van Dyne and Warner Losh. Signed-off-by: Paolo Bonzini --- block/file-posix.c | 34

Re: [PATCH 03/11] osdep: provide ROUND_DOWN macro

2021-06-25 Thread Philippe Mathieu-Daudé
On 6/24/21 8:04 PM, Paolo Bonzini wrote: > osdep.h provides a ROUND_UP macro to hide bitwise operations for the > purpose of rounding a number up to a power of two; add a ROUND_DOWN > macro that does the same with truncation towards zero. > > While at it, change the formatting of some comments. >

Re: [PATCH 07/11] block: feature detection for host block support

2021-06-25 Thread Max Reitz
On 24.06.21 20:04, Paolo Bonzini wrote: From: Joelle van Dyne On Darwin (iOS), there are no system level APIs for directly accessing host block devices. We detect this at configure time. Signed-off-by: Joelle van Dyne Message-Id: <20210315180341.31638-...@getutm.app> Signed-off-by: Paolo

Re: [PATCH 06/11] file-posix: try BLKSECTGET on block devices too, do not round to power of 2

2021-06-25 Thread Max Reitz
On 24.06.21 20:04, Paolo Bonzini wrote: bs->sg is only true for character devices, but block devices can also be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET returns bytes in an int for /dev/sgN devices, and sectors in a short for block devices, so account for that in the

Re: [PATCH 0/2] pc: acpi: revert back to 5.2 PCI slot enumeration

2021-06-25 Thread John Sucaet
Tested-by: John Sucaet On 6/24/21 10:42 PM, Igor Mammedov wrote: Commit b7f23f62e40 (pci: acpi: add _DSM method to PCI devices), regressed network interface naming for Linux guests in some cases. This reverts PCI slot enumeration to its state before 6.0. For details see 2/3 patch. Thanks

Re: [PULL 00/12] Misc, mostly meson patches for 2021-06-23

2021-06-25 Thread Peter Maydell
On Thu, 24 Jun 2021 at 22:05, Paolo Bonzini wrote: > > On 24/06/21 21:09, Peter Maydell wrote: > > This generates a new warning on one of my boxes: > > > > [...] > > Has header "sasl/sasl.h" : YES (cached) > > Library sasl2 found: YES > > Has header "security/pam_appl.h" : YES > > Library pam

Re: [PATCH 05/11] block: add max_hw_transfer to BlockLimits

2021-06-25 Thread Max Reitz
On 24.06.21 20:04, Paolo Bonzini wrote: For block host devices, I/O can happen through either the kernel file descriptor I/O system calls (preadv/pwritev, io_submit, io_uring) or the SCSI passthrough ioctl SG_IO. In the latter case, the size of each transfer can be limited by the HBA, while for

Re: [PATCH 04/11] block-backend: align max_transfer to request alignment

2021-06-25 Thread Max Reitz
On 24.06.21 20:04, Paolo Bonzini wrote: Block device requests must be aligned to bs->bl.request_alignment. It makes sense for drivers to align bs->bl.max_transfer the same way; however when there is no specified limit, blk_get_max_transfer just returns INT_MAX. Since the contract of the

<    1   2   3   4   >