Re: [PATCH v3] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-04 Thread Greg Kurz
On Fri, 4 Feb 2022 19:19:39 +0300 "Dmitry V. Levin" wrote: > On Fri, Feb 04, 2022 at 02:55:45PM +0100, Philippe Mathieu-Daudé wrote: > > On 4/2/22 06:06, Vitaly Chikunov wrote: > > > `struct dirent' returned from readdir(3) could be shorter (or longer) > > > than `sizeof(struct dirent)', thus

Re: [PATCH v3] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-04 Thread Vitaly Chikunov
On Fri, Feb 04, 2022 at 07:19:39PM +0300, Dmitry V. Levin wrote: > On Fri, Feb 04, 2022 at 02:55:45PM +0100, Philippe Mathieu-Daudé wrote: > > On 4/2/22 06:06, Vitaly Chikunov wrote: > > > `struct dirent' returned from readdir(3) could be shorter (or longer) > > > than `sizeof(struct dirent)',

[PULL 32/32] util/oslib-posix: Fix missing unlock in the error path of os_mem_prealloc()

2022-02-04 Thread Michael S. Tsirkin
From: David Hildenbrand We're missing an unlock in case installing the signal handler failed. Fortunately, we barely see this error in real life. Fixes: a960d6642d39 ("util/oslib-posix: Support concurrent os_mem_prealloc() invocation") Fixes: CID 1468941 Cc: Paolo Bonzini Cc: Michael S.

[PULL 31/32] ACPI ERST: step 6 of bios-tables-test.c

2022-02-04 Thread Michael S. Tsirkin
From: Eric DeVolder Following the guidelines in tests/qtest/bios-tables-test.c, this is step 6. Below is the disassembly of tests/data/acpi/pc/ERST.acpierst. /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20180508 (64-bit version) * Copyright (c) 2000 - 2018

[PULL 30/32] ACPI ERST: bios-tables-test testcase

2022-02-04 Thread Michael S. Tsirkin
From: Eric DeVolder This change implements the test suite checks for the ERST table. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id: <1643402289-22216-10-git-send-email-eric.devol...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL 29/32] ACPI ERST: qtest for ERST

2022-02-04 Thread Michael S. Tsirkin
From: Eric DeVolder This change provides a qtest that locates and then does a simple interrogation of the ERST feature within the guest. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id: <1643402289-22216-9-git-send-email-eric.devol...@oracle.com> Reviewed-by: Michael S. Tsirkin

[PULL 28/32] ACPI ERST: create ACPI ERST table for pc/x86 machines

2022-02-04 Thread Michael S. Tsirkin
From: Eric DeVolder This change exposes ACPI ERST support for x86 guests. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id: <1643402289-22216-8-git-send-email-eric.devol...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

Re: [PATCH] ui/cocoa: Set UI information

2022-02-04 Thread Akihiko Odaki
On Sat, Feb 5, 2022 at 1:19 AM Peter Maydell wrote: > > On Wed, 16 Jun 2021 at 15:19, Akihiko Odaki wrote: > > > > Signed-off-by: Akihiko Odaki > > --- > > ui/cocoa.m | 49 + > > 1 file changed, 49 insertions(+) > > Hi; I was looking at the

[PULL 21/32] qmp: add QMP command x-query-virtio-queue-element

2022-02-04 Thread Michael S. Tsirkin
From: Laurent Vivier This new command shows the information of a VirtQueue element. [Note: Up until v10 of this patch series, virtio.json had many (15+) enums defined (e.g. decoded device features, statuses, etc.). In v10 most of these enums were removed and replaced with string literals. By

[PULL 24/32] ACPI ERST: PCI device_id for ERST

2022-02-04 Thread Michael S. Tsirkin
From: Eric DeVolder This change reserves the PCI device_id for the new ACPI ERST device. Signed-off-by: Eric DeVolder Acked-by: Igor Mammedov Acked-by: Ani Sinha Message-Id: <1643402289-22216-4-git-send-email-eric.devol...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael

[PULL 10/32] libvhost-user: Simplify VHOST_USER_REM_MEM_REG

2022-02-04 Thread Michael S. Tsirkin
From: David Hildenbrand Let's avoid having to manually copy all elements. Copy only the ones necessary to close the hole and perform the operation in-place without a second array. Reviewed-by: Stefan Hajnoczi Signed-off-by: David Hildenbrand Signed-off-by: Raphael Norwitz Message-Id:

Re: [PATCH v2 0/6] qtests/libqos: Allow PCI tests to be run with virt-machine

2022-02-04 Thread Michael S. Tsirkin
On Tue, Jan 18, 2022 at 09:38:27PM +0100, Eric Auger wrote: > Up to now the virt-machine node only contains a virtio-mmio > driver node but no driver that eventually produces any pci-bus > interface. > > Hence, PCI libqos tests cannot be run with aarch64 binary. > > This series brings the pieces

[PULL 17/32] qmp: add QMP command x-query-virtio

2022-02-04 Thread Michael S. Tsirkin
From: Laurent Vivier This new command lists all the instances of VirtIODevices with their canonical QOM path and name. [Jonah: @virtio_list duplicates information that already exists in the QOM composition tree. However, extracting necessary information from this tree seems to be a bit

[PULL 25/32] ACPI ERST: header file for ERST

2022-02-04 Thread Michael S. Tsirkin
From: Eric DeVolder This change introduces the public defintions for ACPI ERST. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id: <1643402289-22216-5-git-send-email-eric.devol...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL 26/32] ACPI ERST: support for ACPI ERST feature

2022-02-04 Thread Michael S. Tsirkin
From: Eric DeVolder This implements a PCI device for ACPI ERST. This implements the non-NVRAM "mode" of operation for ERST as it is supported by Linux and Windows. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id: <1643402289-22216-6-git-send-email-eric.devol...@oracle.com>

[PULL 09/32] libvhost-user: Add vu_add_mem_reg input validation

2022-02-04 Thread Michael S. Tsirkin
From: Raphael Norwitz Today if multiple FDs are sent from the VMM to the backend in a VHOST_USER_ADD_MEM_REG message, one FD will be mapped and the remaining FDs will be leaked. Therefore if multiple FDs are sent we report an error and fail the operation, closing all FDs in the message.

[PULL 20/32] qmp: add QMP commands for virtio/vhost queue-status

2022-02-04 Thread Michael S. Tsirkin
From: Laurent Vivier These new commands show the internal status of a VirtIODevice's VirtQueue and a vhost device's vhost_virtqueue (if active). Signed-off-by: Jonah Palmer Message-Id: <1642678168-20447-7-git-send-email-jonah.pal...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by:

[PULL 22/32] hmp: add virtio commands

2022-02-04 Thread Michael S. Tsirkin
From: Laurent Vivier This patch implements the HMP versions of the virtio QMP commands. Signed-off-by: Jonah Palmer Message-Id: <1642678168-20447-9-git-send-email-jonah.pal...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/monitor/hmp.h | 5 +

[PULL 15/32] virtio: drop name parameter for virtio_init()

2022-02-04 Thread Michael S. Tsirkin
From: Jonah Palmer This patch drops the name parameter for the virtio_init function. The pair between the numeric device ID and the string device ID (name) of a virtio device already exists, but not in a way that lets us map between them. This patch lets us do this and removes the need for the

[PULL 13/32] libvhost-user: handle removal of identical regions

2022-02-04 Thread Michael S. Tsirkin
From: Raphael Norwitz Today if QEMU (or any other VMM) has sent multiple copies of the same region to a libvhost-user based backend and then attempts to remove the region, only one instance of the region will be removed, leaving stale copies of the region in dev->regions[]. This change resolves

[PULL 23/32] ACPI ERST: bios-tables-test.c steps 1 and 2

2022-02-04 Thread Michael S. Tsirkin
From: Eric DeVolder Following the guidelines in tests/qtest/bios-tables-test.c, this change adds empty placeholder files per step 1 for the new ERST table, and excludes resulting changed files in bios-tables-test-allowed-diff.h per step 2. Signed-off-by: Eric DeVolder Acked-by: Igor Mammedov

[PULL 03/32] tests: acpi: manually pad OEM_ID/OEM_TABLE_ID for test_oem_fields() test

2022-02-04 Thread Michael S. Tsirkin
From: Igor Mammedov The next commit will revert OEM fields padding with whitespace to padding with '\0' as it was before [1]. As result test_oem_fields() will fail due to unexpectedly smaller ID sizes read from QEMU ACPI tables. Pad OEM_ID/OEM_TABLE_ID manually with spaces so that values the

[PULL 19/32] qmp: decode feature & status bits in virtio-status

2022-02-04 Thread Michael S. Tsirkin
From: Laurent Vivier Display feature names instead of bitmaps for host, guest, and backend for VirtIODevices. Display status names instead of bitmaps for VirtIODevices. Display feature names instead of bitmaps for backend, protocol, acked, and features (hdev->features) for vhost devices.

[PULL 12/32] libvhost-user: prevent over-running max RAM slots

2022-02-04 Thread Michael S. Tsirkin
From: Raphael Norwitz When VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS support was added to libvhost-user, no guardrails were added to protect against QEMU attempting to hot-add too many RAM slots to a VM with a libvhost-user based backed attached. This change adds the missing error handling by

[PULL 08/32] libvhost-user: Add vu_rem_mem_reg input validation

2022-02-04 Thread Michael S. Tsirkin
From: Raphael Norwitz Today if multiple FDs are sent from the VMM to the backend in a VHOST_USER_REM_MEM_REG message, one FD will be unmapped and the remaining FDs will be leaked. Therefore if multiple FDs are sent we report an error and fail the operation, closing all FDs in the message.

[PULL 27/32] ACPI ERST: build the ACPI ERST table

2022-02-04 Thread Michael S. Tsirkin
From: Eric DeVolder This builds the ACPI ERST table to inform OSPM how to communicate with the acpi-erst device. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id: <1643402289-22216-7-git-send-email-eric.devol...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael

[PULL 06/32] tests: acpi: update expected blobs

2022-02-04 Thread Michael S. Tsirkin
From: Igor Mammedov Expected changes caused by previous commit: nvdimm ssdt (q35/pc/virt): - * OEM Table ID "NVDIMM " + * OEM Table ID "NVDIMM" SLIC test FADT (tests/data/acpi/q35/FACP.slic): -[010h 0016 8] Oem Table ID : "ME " +[010h 0016 8]

[PULL 11/32] libvhost-user: fix VHOST_USER_REM_MEM_REG not closing the fd

2022-02-04 Thread Michael S. Tsirkin
From: David Hildenbrand We end up not closing the file descriptor, resulting in leaking one file descriptor for each VHOST_USER_REM_MEM_REG message. Fixes: 875b9fd97b34 ("Support individual region unmap in libvhost-user") Cc: Michael S. Tsirkin Cc: Raphael Norwitz Cc: "Marc-André Lureau" Cc:

[PULL 02/32] hw/i386: Add the possibility to disable the 'isapc' machine

2022-02-04 Thread Michael S. Tsirkin
From: Thomas Huth We already have a CONFIG_ISAPC switch - but we're not using it yet. Add some "#ifdefs" to make it possible to disable this machine now. Signed-off-by: Thomas Huth Message-Id: <20220107160713.235918-1-th...@redhat.com> Acked-by: Paolo Bonzini Reviewed-by: Philippe

[PULL 16/32] virtio: add vhost support for virtio devices

2022-02-04 Thread Michael S. Tsirkin
From: Jonah Palmer This patch adds a get_vhost() callback function for VirtIODevices that returns the device's corresponding vhost_dev structure, if the vhost device is running. This patch also adds a vhost_started flag for VirtIODevices. Previously, a VirtIODevice wouldn't be able to tell if

[PULL 14/32] libvhost-user: Map shared RAM with MAP_NORESERVE to support virtio-mem with hugetlb

2022-02-04 Thread Michael S. Tsirkin
From: David Hildenbrand For fd-based shared memory, MAP_NORESERVE is only effective for hugetlb, otherwise it's ignored. Older Linux versions that didn't support reservation of huge pages ignored MAP_NORESERVE completely. The first client to mmap a hugetlb fd without MAP_NORESERVE will trigger

[PULL 07/32] tests: acpi: test short OEM_ID/OEM_TABLE_ID values in test_oem_fields()

2022-02-04 Thread Michael S. Tsirkin
From: Igor Mammedov Previous patch [1] added explicit whitespace padding to OEM_ID/OEM_TABLE_ID values used in test_oem_fields() testcase to avoid false positive and bisection issues when QEMU is switched to \0' padding. As result testcase ceased to test values that were shorter than max

[PULL 01/32] cpuid: use unsigned for max cpuid

2022-02-04 Thread Michael S. Tsirkin
__get_cpuid_max returns an unsigned value. For consistency, store the result in an unsigned variable. Cc: Paolo Bonzini Cc: Richard Henderson Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé --- configure | 2 +- util/bufferiszero.c | 2 +-

[PULL 05/32] acpi: fix OEM ID/OEM Table ID padding

2022-02-04 Thread Michael S. Tsirkin
From: Igor Mammedov Commit [2] broke original '\0' padding of OEM ID and OEM Table ID fields in headers of ACPI tables. While it doesn't have impact on default values since QEMU uses 6 and 8 characters long values respectively, it broke usecase where IDs are provided on QEMU CLI. It shouldn't

[PULL 18/32] qmp: add QMP command x-query-virtio-status

2022-02-04 Thread Michael S. Tsirkin
From: Laurent Vivier This new command shows the status of a VirtIODevice, including its corresponding vhost device's status (if active). Next patch will improve output by decoding feature bits, including vhost device's feature bits (backend, protocol, acked, and features). Also will decode

[PULL 04/32] tests: acpi: whitelist nvdimm's SSDT and FACP.slic expected blobs

2022-02-04 Thread Michael S. Tsirkin
From: Igor Mammedov The next commit will revert OEM fields whitespace padding to padding with '\0' as it was before [1]. That will change OEM Table ID for: * SSDT.*: where it was padded from 6 characters to 8 * FACP.slic: where it was padded from 2 characters to 8 after reverting whitespace

[PULL 00/32] virtio,pc: features, cleanups, fixes

2022-02-04 Thread Michael S. Tsirkin
The following changes since commit 8f3e5ce773c62bb5c4a847f3a9a5c98bbb3b359f: Merge remote-tracking branch 'remotes/hdeller/tags/hppa-updates-pull-request' into staging (2022-02-02 19:54:30 +) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git

Re: [PATCH v4 1/1] virtio: fix the condition for iommu_platform not supported

2022-02-04 Thread Michael S. Tsirkin
On Sat, Feb 05, 2022 at 01:02:05AM +0100, Halil Pasic wrote: > On Fri, 4 Feb 2022 08:05:25 -0500 > "Michael S. Tsirkin" wrote: > > > On Thu, Feb 03, 2022 at 05:06:35PM +0100, Halil Pasic wrote: > > > On Wed, 2 Feb 2022 20:54:38 +0100 > > > Halil Pasic wrote: > > > > > > > } > > > > @@

[PATCH v2 4/6] target/riscv: Add support for mconfigptr

2022-02-04 Thread Atish Patra
RISC-V privileged specification v1.12 introduced a mconfigptr which will hold the physical address of a configuration data structure. As Qemu doesn't have a configuration data structure, is read as zero which is valid as per the priv spec. Signed-off-by: Atish Patra --- target/riscv/cpu_bits.h

[PATCH v2 1/6] target/riscv: Define simpler privileged spec version numbering

2022-02-04 Thread Atish Patra
Currently, the privileged specification version are defined in a complex manner for no benefit. Simplify it by changing it to a simple enum based on. Suggested-by: Richard Henderson Signed-off-by: Atish Patra --- target/riscv/cpu.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-)

[PATCH v2 5/6] target/riscv: Add *envcfg* CSRs support

2022-02-04 Thread Atish Patra
The RISC-V privileged specification v1.12 defines few execution environment configuration CSRs that can be used enable/disable extensions per privilege levels. Add the basic support for these CSRs. Signed-off-by: Atish Patra --- target/riscv/cpu.h | 6 +++ target/riscv/cpu_bits.h | 39

[PATCH v2 3/6] target/riscv: Introduce privilege version field in the CSR ops.

2022-02-04 Thread Atish Patra
To allow/disallow the CSR access based on the privilege spec, a new field in the csr_ops is introduced. It also adds the privileged specification version (v1.12) for the CSRs introduced in the v1.12. This includes the new ratified extensions such as Vector, Hypervisor and secconfig CSR.

[PATCH v2 2/6] target/riscv: Add the privileged spec version 1.12.0

2022-02-04 Thread Atish Patra
Add the definition for ratified privileged specification version v1.12 Signed-off-by: Atish Patra --- target/riscv/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index e5ff4c134c86..60b847141db2 100644 --- a/target/riscv/cpu.h +++

[PATCH v2 6/6] target/riscv: Enable privileged spec version 1.12

2022-02-04 Thread Atish Patra
Virt machine uses privileged specification version 1.12 now. All other machine continue to use the default one defined for that machine unless changed to 1.12 by the user explicitly. Signed-off-by: Atish Patra --- target/riscv/cpu.c | 8 +--- target/riscv/csr.c | 5 + 2 files changed,

[PATCH v2 0/6] Privilege version update

2022-02-04 Thread Atish Patra
RISC-V International (RVI) has ratified many RISC-V ISA extensions recently[1]. The privileged specification version is also upgraded to v1.12. It means certain CSRs introduced in v1.12 should only be accessible only if the priv specification version supported is equal or greater than v1.12. Doing

Re: [PATCH v2 1/2] python: introduce qmp-shell-wrap convenience tool

2022-02-04 Thread John Snow
On Fri, Jan 28, 2022, 11:08 AM Daniel P. Berrangé wrote: > On Tue, Jan 18, 2022 at 08:07:32PM -0500, John Snow wrote: > > On Tue, Jan 18, 2022 at 5:01 AM Daniel P. Berrangé > wrote: > > > > > > With the current 'qmp-shell' tool developers must first spawn QEMU with > > > a suitable -qmp arg and

Re: [PATCH v4 1/1] virtio: fix the condition for iommu_platform not supported

2022-02-04 Thread Halil Pasic
On Fri, 4 Feb 2022 08:05:25 -0500 "Michael S. Tsirkin" wrote: > On Thu, Feb 03, 2022 at 05:06:35PM +0100, Halil Pasic wrote: > > On Wed, 2 Feb 2022 20:54:38 +0100 > > Halil Pasic wrote: > > > > > } > > > @@ -82,9 +78,14 @@ void virtio_bus_device_plugged(VirtIODevice *vdev, > > > Error

Re: [PATCH 4/4] qapi/meson: Restrict machine-specific objects to sysemu

2022-02-04 Thread Philippe Mathieu-Daudé via
On 4/2/22 18:00, Paolo Bonzini wrote: On 2/4/22 16:29, Philippe Mathieu-Daudé via wrote: machine/ and net/ are only useful to machines; block/ and migration/ to machine or tools. Note we need to keep building machine.json generated sources on all targets because some want to access

[PATCH] scripts/qapi: minor delinting

2022-02-04 Thread John Snow
Just cleaning up some cobwebs. Signed-off-by: John Snow --- scripts/qapi/commands.py | 2 +- scripts/qapi/events.py | 6 +++--- scripts/qapi/types.py| 6 +- scripts/qapi/visit.py| 6 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/qapi/commands.py

[PATCH v3 2/2] [DO-NOT-MERGE]: Add some ad-hoc linting helpers.

2022-02-04 Thread John Snow
These aren't ready for upstream inclusion, because they do not properly manage version dependencies, execution environment and so on. These are just the tools I use in my Own Special Environment :tm: for testing and debugging. I *think*, but can't exhaustively guarantee, that these should work:

[PATCH v3 0/2] [DO-NOT-MERGE] qapi: static typing conversion, "pt0"

2022-02-04 Thread John Snow
This is a manual testing pre-requisite for other QAPI cleanup patches. It isn't meant for inclusion, it's included here as an informative basis for ongoing work only. sphinx-autodoc is enabled for the scripts/qapi package so that docstring formatting can be validated and inspected to make sure

[PATCH v3 1/2] [DO-NOT-MERGE] docs: enable sphinx-autodoc for scripts/qapi

2022-02-04 Thread John Snow
This is just POC to prove that the docstrings, where they are written, are correct to some minimum standard. It is included here for reviewing/testing convenience. Signed-off-by: John Snow --- docs/conf.py | 3 ++- docs/devel/index.rst | 1 +

Re: [PATCH v3 23/26] tests/plugin: allow libinsn.so per-CPU counts

2022-02-04 Thread Philippe Mathieu-Daudé via
On 4/2/22 21:43, Alex Bennée wrote: We won't go fully flexible but for most system emulation 8 vCPUs resolution should be enough for anybody ;-) Signed-off-by: Alex Bennée Message-Id: <20220124201608.604599-20-alex.ben...@linaro.org> --- tests/plugin/insn.c | 39

Re: [PATCH v3 24/26] tests/plugins: add instruction matching to libinsn.so

2022-02-04 Thread Philippe Mathieu-Daudé via
On 4/2/22 21:43, Alex Bennée wrote: This adds simple instruction matching to the libinsn.so plugin which is useful for examining the execution distance between instructions. For example to track how often we flush in ARM due to TLB updates: -plugin ./tests/plugin/libinsn.so,match=tlbi which

Re: [PATCH v3 03/26] Makefile: also remove .gcno files when cleaning

2022-02-04 Thread Philippe Mathieu-Daudé via
On 4/2/22 21:43, Alex Bennée wrote: Left over .gcno files from old builds can really confuse gcov and the user expects a clean slate after "make clean". Make clean mean clean. Signed-off-by: Alex Bennée Message-Id: <20220124201608.604599-4-alex.ben...@linaro.org> --- v2 - fix whitespace

Re: [PATCH v4 3/5] tcg/sparc: Use the constant pool for 64-bit constants

2022-02-04 Thread Peter Maydell
On Fri, 4 Feb 2022 at 20:41, Richard Henderson wrote: > > On 2/5/22 05:18, Peter Maydell wrote: > > On Fri, 4 Feb 2022 at 07:53, Richard Henderson > > wrote: > >> > >> Signed-off-by: Richard Henderson > >> --- > >> tcg/sparc/tcg-target.c.inc | 15 +++ > >> 1 file changed, 15

Re: [PATCH v3 26/26] plugins: move reset of plugin data to tb_start

2022-02-04 Thread Philippe Mathieu-Daudé via
On 4/2/22 21:43, Alex Bennée wrote: We can't always guarantee we get to the end of a translator loop. Although this can happen for a variety of reasons it does happen more often on x86 system emulation when an instruction spans across to an un-faulted page. This caused confusion of the

[PATCH v2 0/2] Python: setuptools v60+ workaround

2022-02-04 Thread John Snow
Long story short: Python 3.7/3.8 on Fedora with setuptools v60.0.0+ together create a bug that ultimately causes pylint to fail. See the first commit message for more detail. I sent out a hotfix two weeks ago to fix this behavior on our CI, but there's a better workaround. This adds the better

[PATCH v2 2/2] Revert "python: pin setuptools below v60.0.0"

2022-02-04 Thread John Snow
This reverts commit 1e4d8b31be35e54b6429fea54f5ecaa0083f91e7. Signed-off-by: John Snow --- python/Makefile | 2 -- python/setup.cfg | 1 - 2 files changed, 3 deletions(-) diff --git a/python/Makefile b/python/Makefile index 949c472624..3334311362 100644 --- a/python/Makefile +++

[PATCH v2 1/2] Python: add setuptools v60.0 workaround

2022-02-04 Thread John Snow
Setuptools v60 and later include a bundled version of distutils, a deprecated standard library scheduled for removal in future versions of Python. Setuptools v60 is only possible to install for Python 3.7 and later. Python has a distutils.sysconfig.get_python_lib() function that returns

Re: [PATCH-for-6.2 0/2] hw/block/fdc: Fix CVE-2021-3507

2022-02-04 Thread John Snow
On Thu, Jan 27, 2022 at 3:11 PM Jon Maloy wrote: > > > On 11/18/21 06:57, Philippe Mathieu-Daudé wrote: > > Trivial fix for CVE-2021-3507. > > > > Philippe Mathieu-Daudé (2): > >hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507) > >tests/qtest/fdc-test: Add a regression test for

[PATCH v3 7/8] s390x/pci: use dtsm provided from vfio capabilities for interpreted devices

2022-02-04 Thread Matthew Rosato
When using the IOAT assist via interpretation, we should advertise what the host driver supports, not QEMU. Reviewed-by: Pierre Morel Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-vfio.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/s390x/s390-pci-vfio.c

[PATCH v3 8/8] s390x/pci: let intercept devices have separate PCI groups

2022-02-04 Thread Matthew Rosato
Let's use the reserved pool of simulated PCI groups to allow intercept devices to have separate groups from interpreted devices as some group values may be different. If we run out of simulated PCI groups, subsequent intercept devices just get the default group. Furthermore, if we encounter any

[PATCH v3 1/8] Update linux headers

2022-02-04 Thread Matthew Rosato
This is a placeholder that pulls in 5.17-rc2 + unmerged kernel changes required by this item. A proper header sync can be done once the associated kernel code merges. Signed-off-by: Matthew Rosato --- include/standard-headers/asm-x86/kvm_para.h | 1 +

[PATCH v3 6/8] s390x/pci: use I/O Address Translation assist when interpreting

2022-02-04 Thread Matthew Rosato
Allow the underlying kvm host to handle the Refresh PCI Translation instruction intercepts. Reviewed-by: Pierre Morel Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-bus.c | 6 ++-- hw/s390x/s390-pci-inst.c | 51 ++-- hw/s390x/s390-pci-vfio.c

Re: [PATCH v4 4/4] python/aqmp: add socket bind step to legacy.py

2022-02-04 Thread John Snow
On Thu, Feb 3, 2022 at 4:19 AM Kevin Wolf wrote: > > Am 02.02.2022 um 20:08 hat John Snow geschrieben: > > > I guess the relevant question in the context of this patch is whether > > > sync.py will need a similar two-phase setup as legacy.py. Do you think > > > you can do without it when you have

[PATCH v3 5/8] s390x/pci: enable adapter event notification for interpreted devices

2022-02-04 Thread Matthew Rosato
Use the associated vfio feature ioctl to enable adapter event notification and forwarding for devices when requested. This feature will be set up with or without firmware assist based upon the 'forwarding_assist' setting. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-bus.c | 25

[PATCH v3 0/8] s390x/pci: zPCI interpretation support

2022-02-04 Thread Matthew Rosato
For QEMU, the majority of the work in enabling instruction interpretation is handled via new VFIO ioctls to SET the appropriate interpretation and interrupt forwarding modes, and to GET the function handle to use for interpretive execution. This series implements these new ioctls, as well as

[PATCH v3 3/8] s390x/pci: enable for load/store intepretation

2022-02-04 Thread Matthew Rosato
Use the associated vfio feature ioctl to enable interpretation for devices when requested. As part of this process, we must use the host function handle rather than a QEMU-generated one -- this is provided as part of the ioctl payload. By default, unless interpret=off is specified, interpretation

[PATCH v3 4/8] s390x/pci: don't fence interpreted devices without MSI-X

2022-02-04 Thread Matthew Rosato
Lack of MSI-X support is not an issue for interpreted passthrough devices, so let's let these in. This will allow, for example, ISM devices to be passed through -- but only when interpretation is available and being used. Reviewed-by: Thomas Huth Reviewed-by: Pierre Morel Signed-off-by:

[PATCH v3 2/8] target/s390x: add zpci-interp to cpu models

2022-02-04 Thread Matthew Rosato
The zpci-interp feature is used to specify whether zPCI interpretation is to be used for this guest. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 1 + target/s390x/cpu_features_def.h.inc | 1 + target/s390x/gen-features.c | 2 ++ target/s390x/kvm/kvm.c

[PATCH v3 17/26] docs: remove references to TCG tracing

2022-02-04 Thread Alex Bennée
Users wanting this sort of functionality should turn to TCG plugins instead. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Cc: Luis Vilanova Cc: Stefan Hajnoczi Message-Id: <20220124201608.604599-14-alex.ben...@linaro.org> --- docs/about/removed-features.rst | 13 +

Re: [PATCH v4 5/5] tcg/sparc: Support unaligned access for user-only

2022-02-04 Thread Richard Henderson
On 2/5/22 06:07, Peter Maydell wrote: +/* + * Overalignment: When we're asking for really large alignment, + * the actual access is always done above and all we need to do + * here is invoke the handler for SIGBUS. + */ I thought the access was in an annulled delay slot and

[PATCH v3 19/26] tracing: remove the trace-tcg includes from the build

2022-02-04 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Cc: Luis Vilanova Cc: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220124201608.604599-16-alex.ben...@linaro.org> --- include/exec/helper-proto.h | 1 - include/exec/helper-tcg.h | 1 - include/trace-tcg.h

[PATCH v3 20/26] tracing: excise the tcg related from tracetool

2022-02-04 Thread Alex Bennée
Now we have no TCG trace events and no longer handle them in the code we can remove the handling from the tracetool to generate them. vcpu tracing is still available although the existing syscall event is an exercise in redundancy (plugins and -strace can also get the information). Signed-off-by:

[PATCH v3 25/26] target/i386: use CPU_LOG_INT for IRQ servicing

2022-02-04 Thread Alex Bennée
I think these have been wrong since f193c7979c (do not depend on thunk.h - more log items). Fix them so as not to confuse other debugging. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20220124201608.604599-22-alex.ben...@linaro.org>

[PATCH v3 16/26] tests/tcg/sh4: disable another unreliable test

2022-02-04 Thread Alex Bennée
Given the other failures it looks like general thread handling on sh4 is sketchy. It fails more often on CI than on my developer machine though. See https://gitlab.com/qemu-project/qemu/-/issues/856 for more details. Signed-off-by: Alex Bennée Cc: Yoshinori Sato Cc: Laurent Vivier ---

[PATCH v3 22/26] contrib/plugins: add a drcov plugin

2022-02-04 Thread Alex Bennée
From: Ivanov Arkady This patch adds the ability to generate files in drcov format. Primary goal this script is to have coverage logfiles thatwork in Lighthouse. Signed-off-by: Ivanov Arkady Message-Id: <163491884553.304355.13246023070235438959.stgit@pc-System-Product-Name> [AJB: use

[PATCH v3 13/26] gitlab: fall back to commit hash in qemu-setup filename

2022-02-04 Thread Alex Bennée
From: Stefan Hajnoczi Personal repos may not have release tags (v6.0.0, v6.1.0, etc) and this causes cross_system_build_job to fail when pretty-printing a unique qemu-setup-*.exe name: version="$(git describe --match v[0-9]*)"; ^^ fails ^^^ mv -v qemu-setup*.exe

[PATCH v3 24/26] tests/plugins: add instruction matching to libinsn.so

2022-02-04 Thread Alex Bennée
This adds simple instruction matching to the libinsn.so plugin which is useful for examining the execution distance between instructions. For example to track how often we flush in ARM due to TLB updates: -plugin ./tests/plugin/libinsn.so,match=tlbi which leads to output like this:

[PATCH v3 21/26] plugins: add helper functions for coverage plugins

2022-02-04 Thread Alex Bennée
From: Ivanov Arkady Which provide information about: - start_code. - end_code. - entry. - path to the executable binary. Signed-off-by: Ivanov Arkady Message-Id: <163491883461.304355.8210754161847179432.stgit@pc-System-Product-Name> [AJB: reword title, better descriptions, defaults, rm

[PATCH v3 18/26] tracing: remove TCG memory access tracing

2022-02-04 Thread Alex Bennée
If you really want to trace all memory operations TCG plugins gives you a more flexible interface for doing so. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220124201608.604599-15-alex.ben...@linaro.org> Cc: Luis Vilanova Cc:

[PATCH v3 15/26] tests: Update CentOS 8 container to CentOS Stream 8

2022-02-04 Thread Alex Bennée
From: Thomas Huth Support for CentOS 8 has stopped at the end of 2021, so let's switch to the Stream variant instead. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20220201101911.97900-1-th...@redhat.com> Signed-off-by: Alex

[PATCH v3 23/26] tests/plugin: allow libinsn.so per-CPU counts

2022-02-04 Thread Alex Bennée
We won't go fully flexible but for most system emulation 8 vCPUs resolution should be enough for anybody ;-) Signed-off-by: Alex Bennée Message-Id: <20220124201608.604599-20-alex.ben...@linaro.org> --- tests/plugin/insn.c | 39 +++ 1 file changed, 31

[PATCH v3 26/26] plugins: move reset of plugin data to tb_start

2022-02-04 Thread Alex Bennée
We can't always guarantee we get to the end of a translator loop. Although this can happen for a variety of reasons it does happen more often on x86 system emulation when an instruction spans across to an un-faulted page. This caused confusion of the instruction tracking data resulting in apparent

[PATCH v3 11/26] tests/lcitool: Install libibumad to cover RDMA on Debian based distros

2022-02-04 Thread Alex Bennée
From: Philippe Mathieu-Daudé On Debian we also need libibumad to enable RDMA: $ ../configure --enable-rdma ERROR: OpenFabrics librdmacm/libibverbs/libibumad not present. Your options: (1) Fast: Install infiniband packages (devel) from your distro. (2)

Re: [PATCH v4 4/5] tcg/sparc: Add tcg_out_jmpl_const for better tail calls

2022-02-04 Thread Richard Henderson
On 2/5/22 05:34, Peter Maydell wrote: On Fri, 4 Feb 2022 at 07:54, Richard Henderson wrote: Due to mapping changes, we now rarely place the code_gen_buffer near the main executable. Which means that direct calls will now rarely be in range. So, always use indirect calls for tail calls,

[PATCH v3 14/26] tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too

2022-02-04 Thread Alex Bennée
From: Thomas Huth When running "make lcitool-refresh" in an out-of-tree build, it currently fails with an error message from git like this: fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). Fix it by

[PATCH v3 10/26] tests: Manually remove libxml2 on MSYS2 runners

2022-02-04 Thread Alex Bennée
From: Philippe Mathieu-Daudé lcitool doesn't support MSYS2 targets, so manually remove this now unnecessary library. Reviewed-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id:

[PATCH v3 12/26] docs/devel: mention our .editorconfig

2022-02-04 Thread Alex Bennée
Ideally we should keep all our automatic formatting gubins in here. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220127150159.1489286-1-alex.ben...@linaro.org> --- docs/devel/style.rst | 4

[PATCH v3 08/26] drop libxml2 checks since libxml is not actually used (for parallels)

2022-02-04 Thread Alex Bennée
From: Michael Tokarev For a long time, we assumed that libxml2 is necessary for parallels block format support (block/parallels*). However, this format actually does not use libxml [*]. Since this is the only user of libxml2 in whole QEMU tree, we can drop all libxml2 checks and dependencies

[PATCH v3 02/26] tests/qtest: enable more vhost-user tests by default

2022-02-04 Thread Alex Bennée
If this starts causing failures again we should probably fix that. Signed-off-by: Alex Bennée Tested-by: Thomas Huth Message-Id: <20220124201608.604599-3-alex.ben...@linaro.org> --- tests/qtest/vhost-user-test.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff

[PATCH v3 09/26] tests/lcitool: Refresh submodule and remove libxml2

2022-02-04 Thread Alex Bennée
From: Philippe Mathieu-Daudé The previous commit removed all uses of libxml2. Refresh lcitool submodule, update qemu.yml and refresh the generated files by running: $ make lcitool-refresh Note: This refreshment also removes libudev dependency on Fedora and CentOS due to libvirt-ci commit

[PATCH v3 07/26] tests/lcitool: Include local qemu.yml when refreshing cirrus-ci files

2022-02-04 Thread Alex Bennée
From: Philippe Mathieu-Daudé The script only include the local qemu.yml for Dockerfiles. Since we want to keep the Cirrus-CI generated files in sync, also use the --data-dir option in generate_cirrus(). Fixes: c45a540f4bd (".gitlab-ci.d/cirrus: auto-generate variables with lcitool")

[PATCH v3 06/26] gitmodules: Correct libvirt-ci submodule URL

2022-02-04 Thread Alex Bennée
From: Philippe Mathieu-Daudé Correct the libvirt-ci repository URL to avoid this warning when cloning / refreshing the submodule: warning: redirecting to https://gitlab.com/libvirt/libvirt-ci.git/ Fixes: 4ebb040f1fd ("tests: integrate lcitool for generating build env manifests")

[PATCH v3 00/26] testing and plugins pre-PR

2022-02-04 Thread Alex Bennée
Hi, I plan to generate the PR for this next week so it's the last chance for any review comments. I've added one additional commit which disables the threadcount test for sh4-linux-user which is still pretty shaky for anything thread related. The following could still do with review: - plugins:

[PATCH v3 05/26] MAINTAINERS: Cover lcitool submodule with build test / automation

2022-02-04 Thread Alex Bennée
From: Philippe Mathieu-Daudé lcitool is used by build test / automation, we want maintainers to get notified if the submodule is updated. Reviewed-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id:

[PATCH v3 04/26] .gitignore: add .gcov pattern

2022-02-04 Thread Alex Bennée
The gcovr tool is very messy and can leave a lot of crap in the source tree even when using build directories. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220124201608.604599-5-alex.ben...@linaro.org> --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff

Re: [PATCH v4 1/5] tcg/sparc: Add scratch argument to tcg_out_movi_int

2022-02-04 Thread Richard Henderson
On 2/5/22 04:35, Peter Maydell wrote: On Fri, 4 Feb 2022 at 07:53, Richard Henderson wrote: This will allow us to control exactly what scratch register is used for loading the constant. Also, fix a theoretical problem in recursing through tcg_out_movi, which may provide a different value for

Re: [PATCH v4 3/5] tcg/sparc: Use the constant pool for 64-bit constants

2022-02-04 Thread Richard Henderson
On 2/5/22 05:18, Peter Maydell wrote: On Fri, 4 Feb 2022 at 07:53, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c.inc | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tcg/sparc/tcg-target.c.inc b/tcg/sparc/tcg-target.c.inc index

  1   2   3   >