Re: [PATCH] tests/functional/test_vnc: Reduce raciness in find_free_ports()

2024-09-04 Thread Daniel P . Berrangé
On Wed, Sep 04, 2024 at 08:20:12AM +0200, Thomas Huth wrote: > On 03/09/2024 16.50, Daniel P. Berrangé wrote: > > On Tue, Sep 03, 2024 at 04:35:53PM +0200, Philippe Mathieu-Daudé wrote: > > > Pass the port range as argument. In order to reduce races > > > when looking for free ports, use a per-targ

Re: [SPAM] [PATCH v3 00/11] support I2C for AST2700

2024-09-04 Thread Cédric Le Goater
Hello Jamin, Just want you to know that I and Troy are working on the following tasks for AST2700. 1. Support boot from bootmcu(riscv32) instead of u-boot(Cortex-A35) Oh nice. This is a good topic for heterogeneous machines ! 2. Support GPIO. After we finish above tasks, we will upstream Q

Re: [RFC PATCH v2 1/5] vhost-user: Add VIRTIO Shared Memory map request

2024-09-04 Thread Albert Esteve
On Thu, Jul 11, 2024 at 9:45 AM Stefan Hajnoczi wrote: > On Fri, Jun 28, 2024 at 04:57:06PM +0200, Albert Esteve wrote: > > Add SHMEM_MAP/UNMAP requests to vhost-user to > > handle VIRTIO Shared Memory mappings. > > > > This request allows backends to dynamically map > > fds into a VIRTIO Shared

RE: [SPAM] [PATCH v3 00/11] support I2C for AST2700

2024-09-04 Thread Jamin Lin
Hi Cedric, > Subject: Re: [SPAM] [PATCH v3 00/11] support I2C for AST2700 > > Hello Jamin, > > > Just want you to know that I and Troy are working on the following tasks for > AST2700. > > 1. Support boot from bootmcu(riscv32) instead of u-boot(Cortex-A35) > > Oh nice. This is a good topic for

RE: [PATCH 00/11 v2] RISC-V: support CLIC v0.9 specification

2024-09-04 Thread Ian Brockbank
Hi All, Has anyone had time to look at this patch set yet? Is there anything I can do to help? This implements https://wiki.riscv.org/display/HOME/Fast+Interrupts+TG, bringing the draft implementation listed on that page (almost) up to date with v0.9-draft-20240314. The implementation has been

[PATCH] tests/qtest/meson.build: Add more CONFIG switches checks for the x86 tests

2024-09-04 Thread Thomas Huth
When configuring QEMU with "--without-default-devices", currently a lot of the x86 qtests are failing since they silently assume that a certain device or the i440fx pc machine is available. Add more checks for CONFIG switches here to not run those tests in case the corresponding device is not avail

Re: [PATCH] meson: add 'qemuutil' dependency for block.c

2024-09-04 Thread Fiona Ebner
Am 15.08.24 um 17:58 schrieb Daniel P. Berrangé: > On Wed, Aug 14, 2024 at 12:00:52PM +0200, Fiona Ebner wrote: >> The macro block_module_load() used by block.c is a wrapper around >> module_load(), which is implemented in util/module.c. >> >> Fixes linking for a future binary or downstream binary

Re: [PATCH for-9.2 02/53] hw/input: Drop ADS7846 device

2024-09-04 Thread Thomas Huth
On 03/09/2024 18.07, Peter Maydell wrote: The ADS7846 touchscreen controller device was used only by the XScale-based PDA machine types. Now that they have been removed, this device is not used in the tree and can be deleted. Signed-off-by: Peter Maydell --- MAINTAINERS | 1 - hw/

Re: [PATCH 2/2] tests/unit: always build the pbkdf crypto unit test

2024-09-04 Thread Daniel P . Berrangé
On Mon, Sep 02, 2024 at 09:45:04PM +0200, Philippe Mathieu-Daudé wrote: > On 30/8/24 13:05, Daniel P. Berrangé wrote: > > The meson rules were excluding the pbkdf crypto test when gnutls was the > > crypto backend. It was then excluded again in #if statements in the test > > file. > > > > Rather t

Re: [PATCH] chardev: introduce 'reconnect-ms' and deprecate 'reconnect'

2024-09-04 Thread Vladimir Sementsov-Ogievskiy
On 04.09.24 08:19, Daniil Tatianin wrote: The 'reconnect' option only allows to specify the time in seconds, which is way too long for certain workflows. We have a lightweight disk backend server, which takes about 20ms to live update, but due to this limitation in QEMU, previously the guest dis

Re: [PATCH for-9.2 25/53] hw/arm: Remove 'n800' and 'n810' machines

2024-09-04 Thread Thomas Huth
On 03/09/2024 18.07, Peter Maydell wrote: Remove the 'n800' and 'n810' machine types, which modelled Nokia internet tablets. These were deprecated in 9.0 and so we can remove them for 9.2. Signed-off-by: Peter Maydell --- MAINTAINERS |3 - docs/system/arm/nser

Re: [SPAM] [PATCH v3 00/11] support I2C for AST2700

2024-09-04 Thread Troy Lee
Hi Cédric, On Wed, Sep 4, 2024 at 3:29 PM Cédric Le Goater wrote: > > Hello Jamin, > > > Just want you to know that I and Troy are working on the following tasks > > for AST2700. > > 1. Support boot from bootmcu(riscv32) instead of u-boot(Cortex-A35) > > Oh nice. This is a good topic for heterog

Re: [PATCH v5 17/44] tests/functional: Convert some tests that download files via fetch_asset()

2024-09-04 Thread Thomas Huth
On 30/08/2024 15.38, Thomas Huth wrote: Now that we've got the Asset class with pre-caching, we can convert some Avocado tests that use fetch_asset() for downloading their required files. Signed-off-by: Thomas Huth --- MAINTAINERS | 12 ++--- tests/avocado/m

Re: [RFC PATCH v2 2/5] vhost_user: Add frontend command for shmem config

2024-09-04 Thread Albert Esteve
On Thu, Jul 11, 2024 at 10:10 AM Stefan Hajnoczi wrote: > On Fri, Jun 28, 2024 at 04:57:07PM +0200, Albert Esteve wrote: > > The frontend can use this command to retrieve > > VIRTIO Shared Memory Regions configuration from > > the backend. The response contains the number of > > shared memory reg

Re: [PATCH for-9.2 26/53] hw/misc: Remove cbus

2024-09-04 Thread Peter Maydell
On Tue, 3 Sept 2024 at 22:37, Philippe Mathieu-Daudé wrote: > > On 3/9/24 18:07, Peter Maydell wrote: > > The devices in hw/misc/cbus.c were used only by the > > now-removed nseries machine types, so they can be removed. > > > > As this is the last use of the CONFIG_NSERIES define we > > can remov

Re: [PATCH for-9.2 27/53] hw/display: Remove Blizzard display device

2024-09-04 Thread Thomas Huth
On 03/09/2024 18.07, Peter Maydell wrote: Remove the blizzard display device, which was only used with the n800 and n810 machines. Signed-off-by: Peter Maydell --- MAINTAINERS |2 - include/hw/display/blizzard.h | 21 - hw/display/blizzard.c | 1026 --

Re: [PATCH for-9.2 28/53] hw/input: Remove tsc2005 touchscreen controller

2024-09-04 Thread Thomas Huth
On 03/09/2024 18.07, Peter Maydell wrote: Remove the tsc2005 touchscreen controller, which was only used by the n800 and n810 machines. Signed-off-by: Peter Maydell --- MAINTAINERS| 1 - include/hw/input/tsc2xxx.h | 5 - hw/input/tsc2005.c | 571 -

Re: [PATCH for-9.2 29/53] hw/input: Remove tsc210x device

2024-09-04 Thread Thomas Huth
On 03/09/2024 18.07, Peter Maydell wrote: Remove the tsc210x touchscreen controller device, which was only used by the n800 and n810. ... and the cheetah palm machine ... but you removed that earlier in the series already. Anyway: Reviewed-by: Thomas Huth The uWireSlave struct is still us

[PATCH 2/5] amd_iommu: Add support for pass though mode

2024-09-04 Thread Santosh Shukla
From: Suravee Suthikulpanit Introduce 'nodma' shared memory region to support PT mode so that for each device, we only create an alias to shared memory region when DMA-remapping is disabled. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Santosh Shukla --- hw/i386/amd_iommu.c | 49 ++

[PATCH 4/5] amd_iommu: Send notification when invaldate interrupt entry cache

2024-09-04 Thread Santosh Shukla
From: Suravee Suthikulpanit In order to support AMD IOMMU interrupt remapping emulation with PCI pass-through devices, QEMU needs to notify VFIO when guest IOMMU driver updates and invalidate the guest interrupt remapping table (IRT), and communicate information so that the host IOMMU driver can

[PATCH 1/5] amd_iommu: Rename variable mmio to mr_mmio

2024-09-04 Thread Santosh Shukla
From: Suravee Suthikulpanit Rename the MMIO memory region variable 'mmio' to 'mr_mmio' so to correctly name align with struct AMDVIState::variable type. No functional change intended. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Santosh Shukla --- hw/i386/acpi-build.c | 4 ++-- hw/i38

[PATCH 3/5] amd_iommu: Use shared memory region for Interrupt Remapping

2024-09-04 Thread Santosh Shukla
From: Suravee Suthikulpanit Use shared memory region for interrupt remapping which can be aliased by all devices. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Santosh Shukla --- hw/i386/amd_iommu.c | 22 ++ hw/i386/amd_iommu.h | 1 + 2 files changed, 15 insertions(

Re: [PATCH for-9.2 30/53] hw/rtc: Remove twl92230 device

2024-09-04 Thread Thomas Huth
On 03/09/2024 18.07, Peter Maydell wrote: Remove the TWL92230 RTC device, which was used only by the n800 and n810. Signed-off-by: Peter Maydell --- MAINTAINERS| 1 - hw/rtc/twl92230.c | 882 - hw/rtc/Kconfig | 4 - hw/rtc/meson.

[PATCH 5/5] amd_iommu: Check APIC ID > 255 for XTSup

2024-09-04 Thread Santosh Shukla
From: Suravee Suthikulpanit The XTSup mode enables x2APIC support for AMD IOMMU, which is needed to support vcpu w/ APIC ID > 255. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Santosh Shukla --- hw/i386/amd_iommu.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/i38

Re: [PATCH for-9.2 31/53] hw/input: Remove lm832x device

2024-09-04 Thread Thomas Huth
On 03/09/2024 18.07, Peter Maydell wrote: Remove the lm832x keyboard-and-pwm i2c device model. This was only used by the n800 and n810 machines. (Although this is an i2c device and so in theory available to create on the command line, in practice it has an outbound IRQ line that the machine mode

Re: [PATCH for-9.2 32/53] hw/block: Remove OneNAND device

2024-09-04 Thread Thomas Huth
On 03/09/2024 18.07, Peter Maydell wrote: The OneNAND devices were only used by n800/n810, so they can be removed now. Signed-off-by: Peter Maydell --- include/hw/block/flash.h | 3 - hw/block/onenand.c | 872 --- hw/block/Kconfig | 3 -

[PATCH 0/5] Interrupt Remap support for emulated amd viommu

2024-09-04 Thread Santosh Shukla
Series adds following feature support for emulated amd vIOMMU 1) Pass Through(PT) mode 2) Interrupt Remapping(IR) mode 1) PT mode Introducing the shared 'nodma' memory region that can be aliased by all the devices in the PT mode. Shared memory with aliasing approach will help run VM faster when lo

Re: [PATCH for-9.2 33/53] hw/usb: Remove tusb6010 USB controller

2024-09-04 Thread Thomas Huth
On 03/09/2024 18.07, Peter Maydell wrote: The tusb6010 was only used by the n800/n810 machines, so it can be removed now. Signed-off-by: Peter Maydell --- hw/usb/tusb6010.c | 850 - hw/usb/Kconfig | 4 - hw/usb/meson.build | 1 - 3 files

Re: [PATCH for-9.2 34/53] hw/usb: Remove MUSB USB host controller

2024-09-04 Thread Thomas Huth
On 03/09/2024 18.07, Peter Maydell wrote: Remove the MUSB USB2.0 OTG-compliant USB host controller device model. This was only used by the tusb6010 USB controller in the n800/n810 machines. Signed-off-by: Peter Maydell --- include/hw/usb/hcd-musb.h | 49 -- hw/usb/hcd-musb.c | 1553

[PULL 0/2] Hppa v9.1 fixes patches

2024-09-04 Thread deller
From: Helge Deller The following changes since commit fd1952d814da738ed107e05583b3e02ac11e88ff: Update version for v9.1.0 release (2024-09-03 09:18:26 -0700) are available in the Git repository at: https://github.com/hdeller/qemu-hppa.git tags/hppa-v9.1-fixes-pull-request for you to fetch

[PULL 2/2] target/hppa: Fix random 32-bit linux-user crashes

2024-09-04 Thread deller
From: Helge Deller The linux-user hppa target crashes randomly for me since commit 081a0ed188d8 ("target/hppa: Do not mask in copy_iaoq_entry"). That commit dropped the masking of the IAOQ addresses while copying them from other registers and instead keeps them with all 64 bits up until the full

[PULL 1/2] target/hppa: Fix PSW V-bit packaging in cpu_hppa_get for hppa64

2024-09-04 Thread deller
From: Helge Deller While adding hppa64 support, the psw_v variable got extended from 32 to 64 bits. So, when packaging the PSW-V bit from the psw_v variable for interrupt processing, check bit 31 instead the 63th (sign) bit. This fixes a hard to find Linux kernel boot issue where the loss of th

[PATCH v3] escc: convert Sun mouse to use QemuInputHandler

2024-09-04 Thread Mark Cave-Ayland
Update the Sun mouse implementation to use QemuInputHandler instead of the legacy qemu_add_mouse_event_handler() function. Note that this conversion adds extra sunmouse_* members to ESCCChannelState but they are not added to the migration stream (similar to the Sun keyboard members). If this were

Are floating-point exceptions usable on AArch64?

2024-09-04 Thread Sebastian Huber
Hello, I tried to provoke a division-by-zero exception on AArch64 using: uint64_t value; __asm__ volatile ( "mrs %0, FPCR\n" "orr %0, %0, 0x200\n" "msr FPCR, %0" : "=&r" ( value ) : : "memory" ); volatile double x = 0x0; volatile double y = 0x0; x /= y;

[PULL 02/42] tests/avocado/boot_xen.py: fetch kernel during test setUp()

2024-09-04 Thread Thomas Huth
From: Cleber Rosa The kernel is a common blob used in all tests. By moving it to the setUp() method, the "fetch asset" plugin will recognize the kernel and attempt to fetch it and cache it before the tests are started. Signed-off-by: Cleber Rosa Message-ID: <20240806173119.582857-7-cr...@redha

[PULL 07/42] python: Install pycotap in our venv if necessary

2024-09-04 Thread Thomas Huth
The upcoming functional tests will require pycotap for providing TAP output from the python-based tests. Since we want to be able to run some of the tests offline by default, too, let's install it along with meson in our venv if necessary (it's size is only 5 kB, so adding the wheel here should not

[PULL 04/42] Bump avocado to 103.0

2024-09-04 Thread Thomas Huth
From: Cleber Rosa This bumps Avocado to latest the LTS release. An LTS release is one that can receive bugfixes and guarantees stability for a much longer period and has incremental minor releases made. Even though the 103.0 LTS release is pretty a rewrite of Avocado when compared to 88.1, the

[PULL 00/42] Introduce new functional test framework

2024-09-04 Thread Thomas Huth
Hi! The following changes since commit e638d685ec2a0700fb9529cbd1b2823ac4120c53: Open 9.2 development tree (2024-09-03 09:18:43 -0700) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2024-09-04 for you to fetch changes up to c3e24cff2b27d63ac4b5

[PULL 31/42] tests/functional: Convert ARM Integrator/CP avocado tests

2024-09-04 Thread Thomas Huth
From: Philippe Mathieu-Daudé Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. $ QEMU_TEST_ALLOW_UNTRUSTED_CODE=1 make check-functional-arm ... 6/6 qemu:func-thorough+func-arm-thorough+thorough / func-arm-arm_integratorcp

[PULL 26/42] tests/functional: Convert the ppc_hv avocado test into a standalone test

2024-09-04 Thread Thomas Huth
A straight forward conversion, we just also have to remove the decorator @skipUnless(os.getenv('SPEED')) since all non-trivial functional tests are running in SPEED=thorough mode now. Also make sure that the extracted assets are writable, so that the test does not fail if it gets re-run and there a

[PULL 09/42] tests/functional: Set up logging

2024-09-04 Thread Thomas Huth
Create log files for each test separately, one file that contains the basic logging and one that contains the console output. Reviewed-by: Daniel P. Berrangé Message-ID: <20240830133841.142644-10-th...@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/qemu_test/testcase.py | 27 ++

[PULL 21/42] tests/functional: Convert the x86_cpu_model_versions test

2024-09-04 Thread Thomas Huth
Nothing thrilling in here, it's just a straight forward conversion. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-ID: <20240830133841.142644-22-th...@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/functiona

[PULL 29/42] tests/functional: Convert the rx_gdbsim avocado test into a standalone test

2024-09-04 Thread Thomas Huth
Provide a "gzip_uncompress" function based on the standard "gzip" module to avoid the usage of avocado.utils here. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-ID: <20240830133841.142644-31-th...@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS

[PULL 05/42] tests/avocado/avocado_qemu: Fix the "from" statements in linuxtest.py

2024-09-04 Thread Thomas Huth
Without this change, the new Avocado v103 fails to find the tests that are based on the LinuxTest class. Suggested-by: Cleber Rosa Tested-by: Philippe Mathieu-Daudé Message-ID: <20240830133841.142644-6-th...@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/avocado_qemu/linuxtest.py | 4

[PULL 15/42] tests/functional: enable pre-emptive caching of assets

2024-09-04 Thread Thomas Huth
From: Daniel P. Berrangé Many tests need to access assets stored on remote sites. We don't want to download these during test execution when run by meson, since this risks hitting test timeouts when data transfers are slow. Add support for pre-emptive caching of assets by setting the env var QEM

[PULL 14/42] tests/functional: add a module for handling asset download & caching

2024-09-04 Thread Thomas Huth
From: Daniel P. Berrangé The 'Asset' class is a simple module that declares a downloadable asset that can be cached locally. Downloads are stored in the user's home dir at ~/.cache/qemu/download, using a sha256 sum of the URL. [thuth: Drop sha1 support, use hash on file content for naming instea

[PULL 42/42] docs/devel/testing: Add documentation for functional tests

2024-09-04 Thread Thomas Huth
Document the new functional testing framework. The text is originally based on the Avocado documentation, but heavily modified to match the new framework. Message-ID: <20240830133841.142644-45-th...@redhat.com> Signed-off-by: Thomas Huth --- docs/devel/testing/functional.rst | 338 ++

[PULL 06/42] tests/avocado/boot_linux_console: Remove the s390x subtest

2024-09-04 Thread Thomas Huth
We've got a much more sophisticated, Fedora-based test for s390x ("test_s390x_fedora" in another file) already, so the test in boot_linux_console.py seems to be rather a waste of precious test cycles. Thus move the command line check and delete the s390x test in boot_linux_console.py. Reviewed-by:

[PULL 27/42] tests/functional: Convert the m68k nextcube test with tesseract

2024-09-04 Thread Thomas Huth
The code that handles running of tesseract needs to be tweaked a little bit to be able to run without the functions from avocado.utils, and while we're at it, drop some legacy stuff that was still there due to Tesseract 3 support that we already dropped a while ago. Reviewed-by: Philippe Mathieu-D

[PULL 38/42] gitlab-ci: Add "check-functional" to the build tests

2024-09-04 Thread Thomas Huth
Now that we converted many tests from the "check-avocado" test suite to the "check-functional" test suite, we should make sure that these also get tested in the CI. Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240830133841.142644-41-th...@redhat.com> Signed-

[PULL 11/42] tests/functional: Prepare the meson build system for the functional tests

2024-09-04 Thread Thomas Huth
Provide a meson.build file for the upcoming python-based functional tests, and add some wrapper glue targets to the tests/Makefile.include file. We are going to use two "speed" modes for the functional tests: The "quick" tests can be run at any time (i.e. also during "make check"), while the "thoro

[PULL 01/42] tests/avocado: machine aarch64: standardize location and RO access

2024-09-04 Thread Thomas Huth
From: Cleber Rosa The tests under machine_aarch64_virt.py and machine_aarch64_sbsaref.py should not be writing to the ISO files. By adding "media=cdrom" the "ro" is automatically set. While at it, let's use a single code style and hash for the ISO url. Signed-off-by: Cleber Rosa Tested-by: Ma

[PULL 32/42] tests/functional: Convert Aarch64 SBSA-Ref avocado tests

2024-09-04 Thread Thomas Huth
From: Philippe Mathieu-Daudé Straight forward conversion. Since SBSA_FLASH files are not tarballs, use lzma_uncompress() method. Avocado used to set a timeout of 11 tests * 180s = 1980s. Hopefully 600s should be sufficient. Running on macOS Sonoma / Apple silicon M1: $ QEMU_TEST_TIMEOUT_EXPE

[PULL 13/42] tests/functional: Convert avocado tests that just need a small adjustment

2024-09-04 Thread Thomas Huth
These simple tests can be converted to stand-alone tests quite easily, e.g. by just setting the machine to 'none' now manually or by adding "-cpu" command line parameters, since we don't support the corresponding avocado tags in the new python test framework. Reviewed-by: Daniel P. Berrangé Teste

[PULL 20/42] tests/functional: Convert the s390x avocado tests into standalone tests

2024-09-04 Thread Thomas Huth
These tests use archive.lzma_uncompress() from the Avocado utils, so provide a small helper function for this, based on the standard lzma module from Python instead. And while we're at it, replace the MD5 hashes in the topology test with proper SHA256 hashes, since MD5 should not be used anymore n

[PULL 35/42] tests/functional: Add QemuUserTest class

2024-09-04 Thread Thomas Huth
From: Philippe Mathieu-Daudé Per commit 5334df4822 ("tests/avocado: Introduce QemuUserTest base class"): Similarly to the 'System' Test base class with methods for testing system emulation, the QemuUserTest class contains methods useful to test user-mode emulation. Signed-off-by: Philippe

[PULL 25/42] tests/functional: Convert the ppc_amiga avocado test into a standalone test

2024-09-04 Thread Thomas Huth
Use the Python standard zipfile module instead of avocado.utils for extracting the ZIP file that we download here, and use the standard subprocess module for running the "tail" command. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-ID: <20240830133841.142644-27-th

[PULL 16/42] tests/functional: Allow asset downloading with concurrent threads

2024-09-04 Thread Thomas Huth
When running "make -j$(nproc) check-functional", tests that use the same asset might be running in parallel. Improve the downloading to detect this situation and wait for the other thread to finish the download. Message-ID: <20240830133841.142644-17-th...@redhat.com> Signed-off-by: Thomas Huth --

[PULL 41/42] docs/devel/testing: Rename avocado_qemu.Test class

2024-09-04 Thread Thomas Huth
The avocado_qemu.Test class has been renamed a while back in commit 2283b627bc ("tests/avocado: Rename avocado_qemu.Test -> QemuSystemTest"), so we should reflect this now in the documentation, too. Reviewed-by: Daniel P. Berrangé Message-ID: <20240830133841.142644-44-th...@redhat.com> Signed-off

[PULL 28/42] tests/functional: Convert the acpi-bits test into a standalone test

2024-09-04 Thread Thomas Huth
Mostly a straight-forward conversion. Looks like we can simply drop the avocado datadrainer stuff when not using the avocado framework anymore. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-ID: <20240830133841.142644-30-th...@redhat.com> Signed-off-by: Thomas Huth

[PULL 34/42] tests/functional: Convert mips64el Fuloong2e avocado test (1/2)

2024-09-04 Thread Thomas Huth
From: Philippe Mathieu-Daudé Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Since the asset is expected locally and the test is guarded with RESCUE_YL_PATH, keep it under the 'quick' category. $ RESCUE_YL_PATH=/path/to/resc

[PULL 39/42] docs/devel: Split testing docs from the build docs and move to separate folder

2024-09-04 Thread Thomas Huth
Building and testing are two separate topics, so let's split the testing into a separate category and move the related files into a separate folder. Message-ID: <20240830133841.142644-42-th...@redhat.com> Signed-off-by: Thomas Huth --- docs/devel/index-build.rst | 14 ---

[PULL 18/42] tests/functional: Add a function for extracting files from an archive

2024-09-04 Thread Thomas Huth
Some Avocado-based tests use the "archive" module from avocado.utils to extract files from an archive. To be able to use these tests without Avocado, we have to provide our own function for extracting files. Fortunately, there is already the tarfile module that will provide us with this functionali

[PATCH v3 0/4] virtio-mem: Implement support for suspend+wake-up with plugged memory

2024-09-04 Thread Juraj Marcin
Currently, the virtio-mem device would unplug all the memory with any reset request, including when the machine wakes up from a suspended state (deep sleep). This would lead to a loss of the contents of the guest memory and therefore is disabled by the virtio-mem Linux Kernel driver unless the VIRT

[PULL 33/42] tests/functional: Convert Aarch64 Virt machine avocado tests

2024-09-04 Thread Thomas Huth
From: Philippe Mathieu-Daudé Straight forward conversion. Update the SHA1 hash to SHA256 since SHA1 should not be used anymore nowadays. Provide get_qemu_img() helper in qemu_test. $ make check-functional-aarch64 V=1 ▶ 1/4 test_aarch64_virt.Aarch64VirtMachine.test_aarch64_virt_gicv2

[PULL 24/42] tests/functional: Convert most ppc avocado tests into standalone tests

2024-09-04 Thread Thomas Huth
Nothing thrilling in here, just straight forward conversions. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-ID: <20240830133841.142644-26-th...@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 9 +-- tests/functional/me

[PULL 03/42] tests/avocado/machine_aarch64_sbsaref.py: allow for rw usage of image

2024-09-04 Thread Thomas Huth
From: Cleber Rosa When the OpenBSD based tests are run in parallel, the previously single instance of the image would become corrupt. Let's give each test its own snapshot. Signed-off-by: Cleber Rosa Suggested-by: Alex Bennée Message-ID: <20240806173119.582857-9-cr...@redhat.com> Reviewed-by:

[PULL 08/42] tests/functional: Add base classes for the upcoming pytest-based tests

2024-09-04 Thread Thomas Huth
The files are mostly a copy of the tests/avocado/avocado_qemu/__init__.py file with some adjustments to get rid of the Avocado dependencies (i.e. we also have to drop the LinuxSSHMixIn and LinuxTest for now). The emulator binary and build directory are now passed via environment variables that wil

[PULL 19/42] tests/functional: Convert some avocado tests that needed avocado.utils.archive

2024-09-04 Thread Thomas Huth
Instead of using the "archive" module from avocado.utils, switch these tests to use the new wrapper function that is based on the "tarfile" module instead. Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-ID: <20240830133841.142644-20

[PATCH v3 2/4] reset: Add RESET_TYPE_WAKEUP

2024-09-04 Thread Juraj Marcin
Some devices need to distinguish cold start reset from waking up from a suspended state. This patch adds new value to the enum, and updates the i386 wakeup method to use this new reset type. Signed-off-by: Juraj Marcin Reviewed-by: David Hildenbrand --- docs/devel/reset.rst| 11 +++

[PULL 23/42] tests/functional: Convert the virtio_gpu avocado test into a standalone test

2024-09-04 Thread Thomas Huth
Nothing thrilling in here, it's just a straight forward conversion. Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240830133841.142644-25-th...@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/meson.build | 1 + .../test_virtio_gpu.py} | 64

[PULL 30/42] tests/functional: Convert the linux_initrd avocado test into a standalone test

2024-09-04 Thread Thomas Huth
While we're at it, update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Message-ID: <20240830133841.142644-32-th...@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/meson.build | 1 + .../test_linux_initrd.py} |

[PATCH v3 1/4] reset: Use ResetType for qemu_devices_reset() and MachineClass::reset()

2024-09-04 Thread Juraj Marcin
Currently, both qemu_devices_reset() and MachineClass::reset() use ShutdownCause for the reason of the reset. However, the Resettable interface uses ResetState, so ShutdownCause needs to be translated to ResetType somewhere. Translating it qemu_devices_reset() makes adding new reset types harder, a

[PULL 17/42] tests/functional: Convert some tests that download files via fetch_asset()

2024-09-04 Thread Thomas Huth
Now that we've got the Asset class with pre-caching, we can convert some Avocado tests that use fetch_asset() for downloading their required files. Message-ID: <20240830133841.142644-18-th...@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 10 ++-- test

[PATCH] adb-mouse: convert to use QemuInputHandler

2024-09-04 Thread Mark Cave-Ayland
Update the ADB mouse implementation to use QemuInputHandler instead of the legacy qemu_add_mouse_event_handler() function. Signed-off-by: Mark Cave-Ayland --- hw/input/adb-mouse.c | 56 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/h

[PULL 10/42] tests/Makefile.include: Increase the level of indentation in the help text

2024-09-04 Thread Thomas Huth
The next patch is going to add some entries that need more space between the command and the help text, so let's increase the indentation here first. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Message-ID: <20240830133841.142644-11-th...@redhat

[PULL 22/42] tests/functional: Convert the microblaze avocado tests into standalone tests

2024-09-04 Thread Thomas Huth
The machine_microblaze.py file contained two tests, one for each endianness. Since we only support one QEMU target binary per file in the new functional test environment, we have to split this file up into two files now. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Messa

[PATCH v3 3/4] virtio-mem: Use new Resettable framework instead of LegacyReset

2024-09-04 Thread Juraj Marcin
LegacyReset does not pass ResetType to the reset callback method, which the new Resettable framework uses. Due to this, virtio-mem cannot use the new RESET_TYPE_WAKEUP to skip the reset during wake-up from a suspended state. This patch adds overrides Resettable interface methods in VirtIOMEMClass

[PULL 40/42] docs/devel/testing: Split the Avocado documentation into a separate file

2024-09-04 Thread Thomas Huth
The main testing documentation file got very overloaded already. Thus let's split the Avocado information into a separate file. Reviewed-by: Daniel P. Berrangé Message-ID: <20240830133841.142644-43-th...@redhat.com> Signed-off-by: Thomas Huth --- docs/devel/testing/avocado.rst | 581 +++

[PULL 37/42] tests/avocado: Remove unused QemuUserTest class

2024-09-04 Thread Thomas Huth
From: Philippe Mathieu-Daudé The single test that was using the QemuUserTest class has been converted to the functional test framework. This class is now unused, remove it. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240822104238.75045-4-phi...@linaro.org> Reviewed-by: Thomas Huth Mes

[PATCH v3 4/4] virtio-mem: Add support for suspend+wake-up with plugged memory

2024-09-04 Thread Juraj Marcin
Before, the virtio-mem device would unplug all the memory with any reset of the device, including during the wake-up of the guest from a suspended state. Due to this, the virtio-mem driver in the Linux kernel disallowed suspend-to-ram requests in the guest when the VIRTIO_MEM_F_PERSISTENT_SUSPEND f

[PULL 12/42] tests/functional: Convert simple avocado tests into standalone python tests

2024-09-04 Thread Thomas Huth
These test are rather simple and don't need any modifications apart from adjusting the "from avocado_qemu" line. To ease debugging, make the files executable and add a shebang line and Python '__main__' handling, too, so that these tests can now be run by executing them directly. Reviewed-by: Dani

[PULL 36/42] tests/functional: Convert ARM bFLT linux-user avocado test

2024-09-04 Thread Thomas Huth
From: Philippe Mathieu-Daudé Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Expose cpio_extract() in qemu_test.utils for possible reuse. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240822104238.75045-3-phi...@linaro.

Re: [PATCH v3] escc: convert Sun mouse to use QemuInputHandler

2024-09-04 Thread Philippe Mathieu-Daudé
On 4/9/24 12:23, Mark Cave-Ayland wrote: Update the Sun mouse implementation to use QemuInputHandler instead of the legacy qemu_add_mouse_event_handler() function. Note that this conversion adds extra sunmouse_* members to ESCCChannelState but they are not added to the migration stream (similar

Re: [PATCH RESEND v9 7/9] rust: add crate to expose bindings and interfaces

2024-09-04 Thread Paolo Bonzini
On Wed, Aug 28, 2024 at 6:12 AM Manos Pitsidianakis wrote: > > Add rust/qemu-api, which exposes rust-bindgen generated FFI bindings and > provides some declaration macros for symbols visible to the rest of > QEMU. The only comment I have is that I would drop the allocator support completely. It a

Re: [PATCH RESEND v9 3/9] configure, meson: detect Rust toolchain

2024-09-04 Thread Paolo Bonzini
On Wed, Aug 28, 2024 at 2:28 PM Daniel P. Berrangé wrote: > > +if test "$rust" != disabled && test -z "$rust_target_triple"; then > > + rust_target_triple=$rust_host_triple > > +fi > > Defaulting to the $rust_host_triple is incorrect when QEMU has been > told to build for a non-host target. > > E

Re: [PATCH RESEND v9 9/9] rust: add PL011 device model

2024-09-04 Thread Paolo Bonzini
On Wed, Aug 28, 2024 at 6:12 AM Manos Pitsidianakis wrote: > subprojects/packagefiles/either-1-rs/meson.build | 24 + > .../packagefiles/itertools-0.11-rs/meson.build | 30 ++ > .../packagefiles/proc-macro-error-1-rs/meson.build | 40 ++ > .../proc-macro-error-attr-1-rs/meson.build

Re: [PATCH v3] escc: convert Sun mouse to use QemuInputHandler

2024-09-04 Thread Mark Cave-Ayland
On 04/09/2024 11:53, Philippe Mathieu-Daudé wrote: On 4/9/24 12:23, Mark Cave-Ayland wrote: Update the Sun mouse implementation to use QemuInputHandler instead of the legacy qemu_add_mouse_event_handler() function. Note that this conversion adds extra sunmouse_* members to ESCCChannelState but

Re: [RFC PATCH v2 3/5] vhost-user-dev: Add cache BAR

2024-09-04 Thread Albert Esteve
On Thu, Jul 11, 2024 at 10:25 AM Stefan Hajnoczi wrote: > On Fri, Jun 28, 2024 at 04:57:08PM +0200, Albert Esteve wrote: > > Add a cache BAR in the vhost-user-device > > into which files can be directly mapped. > > > > The number, shmid, and size of the VIRTIO Shared > > Memory subregions is retr

[PATCH v2 19/19] qapi/vfio: Rename VfioMigrationState to Qapi*, and drop prefix

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. VfioMigrationState has a 'prefix' that overrides the generated enumeration constants' prefix to QAPI_VFIO_MIGRATION_STATE. We could simply drop 'prefix', b

[PATCH v2 08/19] qapi/ui: Drop temporary 'prefix'

2024-09-04 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves DisplayGLMode's generated enumeration constant prefix from DISPLAYGL_MODE to DISPLAY_GL_MODE. Signed-off-by: Markus Armbruster ---

[PATCH v2 01/19] qapi: Smarter camel_to_upper() to reduce need for 'prefix'

2024-09-04 Thread Markus Armbruster
camel_to_upper() converts its argument from camel case to upper case with '_' between words. Used for generated enumeration constant prefixes. When some of the words are spelled all caps, where exactly to insert '_' is guesswork. camel_to_upper()'s guesses are bad enough in places to make people

[PATCH v2 02/19] tests/qapi-schema: Drop temporary 'prefix'

2024-09-04 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This changes TestUnionEnumA's generated enumeration constant prefix from TEST_UNION_ENUMA to TEST_UNION_ENUM_A. Signed-off-by: Markus Armbruster

[PATCH v2 16/19] qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo

2024-09-04 Thread Markus Armbruster
For consistency with other types names *Algo. Signed-off-by: Markus Armbruster Acked-by: Daniel P. Berrangé --- crypto/afalgpriv.h| 14 +++--- crypto/hmacpriv.h | 2 +- crypto/afalg.c| 8 crypto/cipher-afalg.c | 12 ++-- crypto/hash-afalg.c | 14

[PATCH v2 09/19] qapi/machine: Rename CpuS390* to S390Cpu*, and drop 'prefix'

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. CpuS390Entitlement has a 'prefix' to change the generated enumeration constants' prefix from CPU_S390_ENTITLEMENT to S390_CPU_ENTITLEMENT. Rename the type t

[PATCH v2 17/19] qapi/cryptodev: Drop unwanted 'prefix'

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptodevBackendServiceType has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTODEV_BACKEND_SERVICE. Drop it. The prefix

[PATCH v2 00/19] qapi: Reduce use of 'prefix'

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. We use 'prefix' for a number of reasons: * To override an ugly default. * To shorten the prefix. * To work around name clashes. This series attacks the

[PATCH v2 13/19] qapi/crypto: Rename QCryptoIVGenAlgorithm to *Algo, and drop prefix

2024-09-04 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptoIVGenAlgorithm has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTO_IVGEN_ALG. We could simply drop 'prefix', but th

[PATCH v2 05/19] qapi/crypto: Drop temporary 'prefix'

2024-09-04 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added two temporary 'prefix' to delay changing the generated code. Revert them. This improves QCryptoBlockFormat's generated enumeration constant prefix from Q_CRYPTO_BLOCK_FORMAT to QCRYPTO_BLOCK_FORMAT, and QCryptoBlockL

[PATCH v2 06/19] qapi/ebpf: Drop temporary 'prefix'

2024-09-04 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves EbpfProgramID's generated enumeration constant prefix from EBPF_PROGRAMID to EBPF_PROGRAM_ID. Signed-off-by: Markus Armbruster ---

  1   2   3   >