Re: [PATCH v3 6/7] qapi/block-core: deprecate block-job-change

2024-11-06 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > That's a first step to move on newer job-* APIs. > > The difference between block-job-change and job-change is in > find_block_job_locked() vs find_job_locked() functions. What's > different? > > 1. find_block_job_locked() finds only block jobs, whereas >

Re: [PATCH 0/3] qemu_domain: Automagically add IOMMU if needed

2024-11-06 Thread Ján Tomko
On a Wednesday in 2024, Michal Privoznik wrote: *** BLURB HERE *** Michal Prívozník (3): libvirt_private.syms: Export virDomainIOMMUDefNew() qemu: Turn EIM IOMMU on automagically qemu_domain: Automagically add IOMMU if needed src/libvirt_private.syms | 1 + src/qemu/qemu

[PATCH v2 15/16] tests/functional: Explicit endianness of microblaze assets

2024-11-06 Thread Philippe Mathieu-Daudé
The archive used in test_microblaze_s3adsp1800.py (testing a big-endian target) contains a big-endian kernel. Rename using the _BE suffix. Similarly, the archive in test_microblazeel_s3adsp1800 (testing a little-endian target) contains a little-endian kernel. Rename using _LE suffix. These change

[PATCH v2 09/16] hw/ssi/xilinx_spips: Make device endianness configurable

2024-11-06 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine using the device. Signed-off-by: Philippe Mathieu-D

[PATCH v2 16/16] tests/functional: Add microblaze cross-endianness tests

2024-11-06 Thread Philippe Mathieu-Daudé
Copy/paste the current tests, but call the opposite endianness machines, testing: - petalogix-s3adsp1800-le machine (little-endian CPU) on the qemu-system-microblaze binary (big-endian) - petalogix-s3adsp1800-be machine (big-endian CPU) on the qemu-system-microblazeel binary (little-endian). S

[PATCH v2 14/16] hw/microblaze: Support various endianness for s3adsp1800 machines

2024-11-06 Thread Philippe Mathieu-Daudé
Introduce an abstract machine parent class which defines the 'little_endian' property. Duplicate the current machine, which endian is tied to the binary endianness, to one big endian and a little endian machine; updating the machine description. Keep the current default machine for each binary. 'p

[PATCH v2 13/16] target/microblaze: Consider endianness while translating code

2024-11-06 Thread Philippe Mathieu-Daudé
Consider the CPU ENDI bit, swap instructions when the CPU endianness doesn't match the binary one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/microblaze/cpu.h | 7 +++ target/microblaze/translate.c | 5 +++-- 2 files changed, 10 insertions(+), 2 de

[PATCH v2 12/16] target/microblaze: Introduce mo_endian() helper

2024-11-06 Thread Philippe Mathieu-Daudé
mo_endian() returns the target endianness, currently static. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/microblaze/translate.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/target/microblaze/translate.c b/target/microbla

[PATCH v2 11/16] target/microblaze: Set MO_TE once in do_load() / do_store()

2024-11-06 Thread Philippe Mathieu-Daudé
All callers of do_load() / do_store() set MO_TE flag. Set it once in the callees. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/microblaze/translate.c | 36 +++ 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/targ

[PATCH v2 10/16] target/microblaze: Explode MO_TExx -> MO_TE | MO_xx

2024-11-06 Thread Philippe Mathieu-Daudé
Extract the implicit MO_TE definition in order to replace it by runtime variable in the next commit. Mechanical change using: $ for n in UW UL UQ UO SW SL SQ; do \ sed -i -e "s/MO_TE$n/MO_TE | MO_$n/" \ $(git grep -l MO_TE$n target/microblaze); \ done Signed-off-by: Philip

[PATCH v2 08/16] hw/ssi/xilinx_spi: Make device endianness configurable

2024-11-06 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine using the device. Signed-off-by: Philippe Mathieu-D

[PATCH v2 07/16] hw/char/xilinx_uartlite: Make device endianness configurable

2024-11-06 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine using the device. Signed-off-by: Philippe Mathieu-D

[PATCH v2 06/16] hw/timer/xilinx_timer: Make device endianness configurable

2024-11-06 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness for each machine using the device. Signed-off-by: Philippe Mathieu-Daudé

[RFC PATCH v2 05/16] hw/timer/xilinx_timer: Allow down to 8-bit memory access

2024-11-06 Thread Philippe Mathieu-Daudé
Allow down to 8-bit access, per the datasheet (reference added in previous commit): "Timer Counter registers are accessed as one of the following types: • Byte (8 bits) • Half word (2 bytes) • Word (4 bytes)" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Acked-by: Al

[RFC PATCH v2 04/16] hw/net/xilinx_ethlite: Simplify by having configurable endianness

2024-11-06 Thread Philippe Mathieu-Daudé
The Xilinx 'ethlite' device was added in commit b43848a100 ("xilinx: Add ethlite emulation"), being only built back then for a big-endian MicroBlaze target (see commit 72b675caac "microblaze: Hook into the build-system"). I/O endianness access was then clarified in commit d48751ed4f ("xilinx-ethli

[PATCH v2 03/16] hw/intc/xilinx_intc: Make device endianness configurable

2024-11-06 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness for each machine using the device. Signed-off-by: Philippe Mathieu-Daudé

[PATCH v2 02/16] hw/microblaze: Propagate CPU endianness to microblaze_load_kernel()

2024-11-06 Thread Philippe Mathieu-Daudé
Pass vCPU endianness as argument so we can load kernels with different endianness (different from the qemu-system-binary builtin one). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Message-Id: <20241105130431.225

[PATCH v2 01/16] hw/microblaze: Restrict MemoryRegionOps are implemented as 32-bit

2024-11-06 Thread Philippe Mathieu-Daudé
All these MemoryRegionOps read() and write() handlers are implemented expecting 32-bit accesses. Clarify that setting .impl.min/max_access_size fields. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Message-Id: <20241105130431.22564-8-phi...@linaro.org> --- hw/char/xilinx_ua

[PATCH v2 00/16] hw/microblaze: Allow running cross-endian vCPUs

2024-11-06 Thread Philippe Mathieu-Daudé
Since v1: - Make device endianness configurable (Edgar) - Convert more Xilinx devices - Avoid preprocessor #if (Richard) - Add R-b tags Make machines endianness-agnostic, allowing to run a big-endian vCPU on the little-endian 'qemu-system-microblazeel' binary, and a little endian one on the big-en

[PATCH 1/3] libvirt_private.syms: Export virDomainIOMMUDefNew()

2024-11-06 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 5fb4df3513..62c729d7ff 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -490,6 +490,7 @@ virDomainInput

[PATCH 3/3] qemu_domain: Automagically add IOMMU if needed

2024-11-06 Thread Michal Privoznik
If a Q35 domain has huge number of vCPUS (over 255, currently), then it needs IOMMU with Extended Interrupt Mode enabled (see check in qemuValidateDomainVCpuTopology()). Well, we already add some devices and to other tricks when parsing new domain XML. Might as well add IOMMU device if above condi

[PATCH 2/3] qemu: Turn EIM IOMMU on automagically

2024-11-06 Thread Michal Privoznik
If a Q35 domain has huge number of vCPUS (over 255, currently), then it needs IOMMU with Extended Interrupt Mode enabled (see check in qemuValidateDomainVCpuTopology()). Well, we already add some devices and to other tricks when parsing new domain XML. Might as well turn the EIM on for IOMMU devic

[PATCH 0/3] qemu_domain: Automagically add IOMMU if needed

2024-11-06 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (3): libvirt_private.syms: Export virDomainIOMMUDefNew() qemu: Turn EIM IOMMU on automagically qemu_domain: Automagically add IOMMU if needed src/libvirt_private.syms | 1 + src/qemu/qemu_domain.c| 56 +++

Re: [libvirt PATCH 0/3] coverity fixes

2024-11-06 Thread Peter Krempa
On Wed, Nov 06, 2024 at 14:59:24 +0100, Ján Tomko wrote: > Ján Tomko (3): > qemu: chardev: avoid impossible overflow > util: json: check return value of virJSONValueFromJsonC > ch: check return value of virJSONValueArrayAppend Reviewed-by: Peter Krempa

[PATCH 3/3] qemu: command: add multi boot device support on s390x

2024-11-06 Thread Boris Fiuczynski
If QEMU supports multi boot device make use of it instead of using the single boot device machine parameter. Signed-off-by: Boris Fiuczynski --- src/qemu/qemu_command.c | 40 --- src/qemu/qemu_command.h | 6 ++- src/qemu/qemu_hotplug.c

[PATCH 1/3] qemu: capabilities: Add QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM

2024-11-06 Thread Boris Fiuczynski
Add capability QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM to detect multi boot device support in QEMU by checking the virtio-blk-ccw device property existence of loadparm. Signed-off-by: Boris Fiuczynski --- src/qemu/qemu_capabilities.c | 8 + src/qemu/qemu_capabilities.h

[PATCH 2/3] tests: add capabilities for QEMU 9.2.0 on s390x

2024-11-06 Thread Boris Fiuczynski
Let us introduce the xml and reply files for QEMU 9.2.0 on s390x. Signed-off-by: Shalini Chellathurai Saroja Signed-off-by: Boris Fiuczynski --- tests/domaincapsdata/qemu_9.2.0.s390x.xml | 311 + .../caps_9.2.0_s390x.replies | 36741 .../qemucapabilitiesd

[PATCH 0/3] Full boot order support on s390x

2024-11-06 Thread Boris Fiuczynski
This series adds on s390x full boot order support which has been introduced recently in QEMU with the PR https://lore.kernel.org/qemu-devel/20241023131710.906748-1-th...@redhat.com/ The replies and xml files are removed from the patch in this series and are available in https://gitlab.com/fiuczy/l

[libvirt PATCH 3/3] ch: check return value of virJSONValueArrayAppend

2024-11-06 Thread Ján Tomko
It only errors out when presented with a non-array, but we do check it everywhere else. Signed-off-by: Ján Tomko --- src/ch/ch_monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index 3e49902791..ccd04cfbd1 100644 --- a/src/c

[libvirt PATCH 2/3] util: json: check return value of virJSONValueFromJsonC

2024-11-06 Thread Ján Tomko
In virJSONValueFromJsonC, the return value of virJSONValueFromJsonC was not checked in one case. Signed-off-by: Ján Tomko --- src/util/virjson.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/util/virjson.c b/src/util/virjson.c index 18a4585e7b..a799707c16 100644 --- a/src/util/vir

[libvirt PATCH 1/3] qemu: chardev: avoid impossible overflow

2024-11-06 Thread Ján Tomko
In the rare case where int and long long are not the same size, the multiplication of an int variable and an int constant might overflow. Cast the constant to long long to avoid this. Signed-off-by: Ján Tomko Fixes: baa4edfb79d5ee861a08b5ec11416c5c156d8cd2 --- src/qemu/qemu_chardev.c | 2 +- 1 f

[libvirt PATCH 0/3] coverity fixes

2024-11-06 Thread Ján Tomko
Ján Tomko (3): qemu: chardev: avoid impossible overflow util: json: check return value of virJSONValueFromJsonC ch: check return value of virJSONValueArrayAppend src/ch/ch_monitor.c | 3 ++- src/qemu/qemu_chardev.c | 2 +- src/util/virjson.c | 5 + 3 files changed, 8 insertions

Re: [PATCH 12/19] hw/net/xilinx_ethlite: Only expect big-endian accesses

2024-11-06 Thread Philippe Mathieu-Daudé
On 5/11/24 13:30, Richard Henderson wrote: On 11/5/24 13:04, Philippe Mathieu-Daudé wrote: The Xilinx 'ethlite' device was added in commit b43848a100 ("xilinx: Add ethlite emulation"), being only built back then for a big-endian MicroBlaze target (see commit 72b675caac "microblaze: Hook into the