Re: [PATCH V6 03/14] cpus: stop vm in suspended runstate

2024-01-07 Thread Markus Armbruster
Steven Sistare writes: [...] > With these changes, can I add your Acked-by to the commit? I'm afraid I lost context over the break. Suggest you post v7, and I provide my Acked-by there. Likely easier for me. Happy new year! [...]

[PULL 13/17] vfio/iommufd: Remove the use of stat() to check file existence

2024-01-07 Thread Cédric Le Goater
Using stat() before opening a file or a directory can lead to a time-of-check to time-of-use (TOCTOU) filesystem race, which is reported by coverity as a Security best practices violations. The sequence could be replaced by open and fdopendir but it doesn't add much in this case. Simply use

[PULL 08/17] vfio/iommufd: Introduce a VFIOIOMMU iommufd QOM interface

2024-01-07 Thread Cédric Le Goater
As previously done for the sPAPR and legacy IOMMU backends, convert the VFIOIOMMUOps struct to a QOM interface. The set of of operations for this backend can be referenced with a literal typename instead of a C struct. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le

[PULL 01/17] vfio/spapr: Extend VFIOIOMMUOps with a release handler

2024-01-07 Thread Cédric Le Goater
This allows to abstract a bit more the sPAPR IOMMU support in the legacy IOMMU backend. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-container-base.h | 1 + hw/vfio/container.c | 10 +++- hw/vfio/spapr.c

[PULL 04/17] vfio/container: Introduce a VFIOIOMMU QOM interface

2024-01-07 Thread Cédric Le Goater
VFIOContainerBase was not introduced as an abstract QOM object because it felt unnecessary to expose all the IOMMU backends to the QEMU machine and human interface. However, we can still abstract the IOMMU backend handlers using a QOM interface class. This provides more flexibility when

[PULL 11/17] vfio/container: Replace basename with g_path_get_basename

2024-01-07 Thread Cédric Le Goater
g_path_get_basename() is a portable utility function that has the advantage of not modifing the string argument. It also fixes a compile breakage with the Musl C library reported in [1]. [1] https://lore.kernel.org/all/20231212010228.2701544-1-raj.k...@gmail.com/ Reported-by: Khem Raj

[PULL 06/17] vfio/container: Intoduce a new VFIOIOMMUClass::setup handler

2024-01-07 Thread Cédric Le Goater
This will help in converting the sPAPR IOMMU backend to a QOM interface. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-container-base.h | 1 + hw/vfio/container.c | 1 + 2 files changed, 2 insertions(+) diff

[PULL 15/17] vfio/migration: Add helper function to set state or reset device

2024-01-07 Thread Cédric Le Goater
From: Avihai Horon There are several places where failure in setting the device state leads to a device reset, which is done by setting ERROR as the recover state. Add a helper function that sets the device state and resets the device in case of failure. This will make the code cleaner and

[PULL 16/17] backends/iommufd: Remove check on number of backend users

2024-01-07 Thread Cédric Le Goater
QOM already has a ref count on objects and it will assert much earlier, when INT_MAX is reached. Reviewed-by: Eric Auger Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- backends/iommufd.c | 5 - 1 file changed, 5 deletions(-) diff --git a/backends/iommufd.c

[PULL 17/17] backends/iommufd: Remove mutex

2024-01-07 Thread Cédric Le Goater
Coverity reports a concurrent data access violation because be->users is being accessed in iommufd_backend_can_be_deleted() without holding the mutex. However, these routines are called from the QEMU main thread when a device is created. In this case, the code paths should be protected by the BQL

[PULL 05/17] vfio/container: Introduce a VFIOIOMMU legacy QOM interface

2024-01-07 Thread Cédric Le Goater
Convert the legacy VFIOIOMMUOps struct to the new VFIOIOMMU QOM interface. The set of of operations for this backend can be referenced with a literal typename instead of a C struct. This will simplify support of multiple backends. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman

[PULL 09/17] vfio/spapr: Only compile sPAPR IOMMU support when needed

2024-01-07 Thread Cédric Le Goater
sPAPR IOMMU support is only needed for pseries machines. Compile out support when CONFIG_PSERIES is not set. This saves ~7K of text. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- hw/vfio/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PULL 12/17] hw/vfio: fix iteration over global VFIODevice list

2024-01-07 Thread Cédric Le Goater
From: Volker Rümelin Commit 3d779abafe ("vfio/common: Introduce a global VFIODevice list") introduced a global VFIODevice list, but forgot to update the list element field name when iterating over the new list. Change the code to use the correct list element field. Fixes: 3d779abafe

[PULL 03/17] vfio/container: Initialize VFIOIOMMUOps under vfio_init_container()

2024-01-07 Thread Cédric Le Goater
vfio_init_container() already defines the IOMMU type of the container. Do the same for the VFIOIOMMUOps struct. This prepares ground for the following patches that will deduce the associated VFIOIOMMUOps struct from the IOMMU type. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman

[PULL 00/17] vfio queue

2024-01-07 Thread Cédric Le Goater
The following changes since commit 0c1eccd368af8805ec0fb11e6cf25d0684d37328: Merge tag 'hw-cpus-20240105' of https://github.com/philmd/qemu into staging (2024-01-05 16:08:58 +) are available in the Git repository at: https://github.com/legoater/qemu/ tags/pull-vfio-20240107 for you

[PULL 14/17] vfio/container: Rename vfio_init_container to vfio_set_iommu

2024-01-07 Thread Cédric Le Goater
From: Zhenzhong Duan vfio_container_init() and vfio_init_container() names are confusing especially when we see vfio_init_container() calls vfio_container_init(). vfio_container_init() operates on base container which is consistent with all routines handling 'VFIOContainerBase *' ops.

[PULL 02/17] vfio/container: Introduce vfio_legacy_setup() for further cleanups

2024-01-07 Thread Cédric Le Goater
This will help subsequent patches to unify the initialization of type1 and sPAPR IOMMU backends. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- hw/vfio/container.c | 63 + 1 file changed, 35 insertions(+), 28

[PULL 07/17] vfio/spapr: Introduce a sPAPR VFIOIOMMU QOM interface

2024-01-07 Thread Cédric Le Goater
Move vfio_spapr_container_setup() to a VFIOIOMMUClass::setup handler and convert the sPAPR VFIOIOMMUOps struct to a QOM interface. The sPAPR QOM interface inherits from the legacy QOM interface because because both have the same basic needs. The sPAPR interface is then extended with the handlers

[PULL 10/17] vfio/iommufd: Remove CONFIG_IOMMUFD usage

2024-01-07 Thread Cédric Le Goater
Availability of the IOMMUFD backend can now be fully determined at runtime and the ifdef check was a build time protection (for PPC not supporting it mostly). Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- hw/vfio/common.c | 3 --- 1 file changed, 3

Re: [PATCH] tcg/tci: Fix TCI on hppa host and update TCI test matrix

2024-01-07 Thread Akihiko Odaki
On 2024/01/07 19:54, Philippe Mathieu-Daudé wrote: Cc'ing Akihiko for commit a1eaa6281f. On 7/1/24 08:19, Helge Deller wrote: Update the TCI interpreter test matrix for big-endian hosts with big- (hppa, hppa64) and little-endian (x86,x96-64) targets. I used native ppc64 and hppa hosts for

Re: [PATCH 3/3] tests/qtest: Re-enable multifd cancel test

2024-01-07 Thread Peter Xu
On Wed, Jun 07, 2023 at 10:27:15AM +0200, Juan Quintela wrote: > Fabiano Rosas wrote: > > We've found the source of flakiness in this test, so re-enable it. > > > > Signed-off-by: Fabiano Rosas > > --- > > tests/qtest/migration-test.c | 10 ++ > > 1 file changed, 2 insertions(+), 8

RE: [External] Re: [PATCH 3/5] migration: Introduce unimplemented 'qatzip' compression method

2024-01-07 Thread Liu, Yuan1
> -Original Message- > From: Hao Xiang > Sent: Saturday, January 6, 2024 7:53 AM > To: Fabiano Rosas > Cc: Bryan Zhang ; qemu-devel@nongnu.org; > marcandre.lur...@redhat.com; pet...@redhat.com; quint...@redhat.com; > peter.mayd...@linaro.org; Liu, Yuan1 ; > berra...@redhat.com > Subject:

RE: [PATCH 3/5] migration: Introduce unimplemented 'qatzip' compression method

2024-01-07 Thread Liu, Yuan1
> -Original Message- > From: Fabiano Rosas > Sent: Saturday, January 6, 2024 4:07 AM > To: Bryan Zhang ; qemu-devel@nongnu.org; > marcandre.lur...@redhat.com; pet...@redhat.com; quint...@redhat.com; > peter.mayd...@linaro.org; hao.xi...@bytedance.com > Cc: bryan.zh...@bytedance.com; Liu,

Re: [PULL 00/26] Migration 20240104 patches

2024-01-07 Thread Peter Xu
On Mon, Jan 08, 2024 at 10:10:24AM +0800, Peter Xu wrote: > On Sun, Jan 07, 2024 at 11:28:25AM -0500, Stefan Hajnoczi wrote: > > On Sun, 7 Jan 2024 at 10:23, Peter Maydell wrote: > > > > > > On Sun, 7 Jan 2024 at 12:41, Stefan Hajnoczi wrote: > > > > > > > > On Sun, 7 Jan 2024 at 07:34, Peter Xu

Re: [PULL 00/26] Migration 20240104 patches

2024-01-07 Thread Peter Xu
On Sun, Jan 07, 2024 at 11:28:25AM -0500, Stefan Hajnoczi wrote: > On Sun, 7 Jan 2024 at 10:23, Peter Maydell wrote: > > > > On Sun, 7 Jan 2024 at 12:41, Stefan Hajnoczi wrote: > > > > > > On Sun, 7 Jan 2024 at 07:34, Peter Xu wrote: > > > > > > > > On Fri, Jan 05, 2024 at 04:08:40PM +,

!qemu_in_coroutine() assert on ARM64 XEN

2024-01-07 Thread Peng Fan
Hi All, When enabling virtio disk and virtio net on Xen, I could see qemu blk assert and being killed sometimes, This is not 100% reproducible. I am using qemu master branch 7425b6277f12e82952cede1f531bfc689bf77fb1 (HEAD -> dummy, origin/staging, origin/master, origin/HEAD, master) Merge tag

Re: [PATCH v9 0/9] Unified CPU type check

2024-01-07 Thread Gavin Shan
Hi Phil, On 1/6/24 08:12, Philippe Mathieu-Daudé wrote: On 13/12/23 11:54, Gavin Shan wrote: On 12/13/23 20:08, Philippe Mathieu-Daudé wrote: On 12/12/23 05:55, Gavin Shan wrote: On 12/4/23 10:47, Gavin Shan wrote: This series bases on Phil's repository because the prepatory commits have

Re: [PATCH v9 3/9] machine: Improve is_cpu_type_supported()

2024-01-07 Thread Gavin Shan
On 1/6/24 08:09, Philippe Mathieu-Daudé wrote: On 4/12/23 01:47, Gavin Shan wrote: It's no sense to check the CPU type when mc->valid_cpu_types[0] is NULL, which is a program error. Raise an assert on this. A precise hint for the error message is given when mc->valid_cpu_types[0] is the only

Re: [PATCH v9 1/9] machine: Use error handling when CPU type is checked

2024-01-07 Thread Gavin Shan
On 1/5/24 21:00, Philippe Mathieu-Daudé wrote: On 4/12/23 01:47, Gavin Shan wrote: Functions that use an Error **errp parameter to return errors should not also report them to the user, because reporting is the caller's job. The principle is violated by machine_run_board_init() because it calls

Re: [PATCH v2 1/2] target/riscv: FIX xATP_MODE validation

2024-01-07 Thread Alistair Francis
On Tue, Dec 12, 2023 at 9:04 PM Irina Ryapolova wrote: > > [Changes since v1] > used satp_mode.map instead of satp_mode.supported The changelog needs to go > > [Original cover] > The SATP register is an SXLEN-bit read/write WARL register. It means that CSR > fields are only defined > for a

Re: [PATCH 1/1] target/riscv: pmp: Ignore writes when RW=01 and MML=0

2024-01-07 Thread Alistair Francis
On Thu, Dec 21, 2023 at 1:32 AM Ivan Klokov wrote: > > This patch changes behavior on writing RW=01 to pmpcfg with MML=0. > RWX filed is form of collective WARL with the combination of > pmpcfg.RW=01 remains reserved for future standard use. > > According to definition of WARL writing the CSR has

Re: [PATCH 1/1] target/riscv: pmp: Ignore writes when RW=01 and MML=0

2024-01-07 Thread Alistair Francis
On Thu, Dec 21, 2023 at 1:32 AM Ivan Klokov wrote: > > This patch changes behavior on writing RW=01 to pmpcfg with MML=0. > RWX filed is form of collective WARL with the combination of > pmpcfg.RW=01 remains reserved for future standard use. > > According to definition of WARL writing the CSR has

Re: [PATCH] roms/opensbi: Upgrade from v1.3.1 to v1.4

2024-01-07 Thread Alistair Francis
On Wed, Jan 3, 2024 at 1:13 AM Bin Meng wrote: > > Upgrade OpenSBI from v1.3.1 to v1.4 and the pre-built bios images. > > The v1.4 release includes the following commits: > > 1a398d9 lib: sbi: Add Zicntr as a HART ISA extension > 669089c lib: sbi: Add Zihpm as a HART ISA extension > 72b9c8f lib:

Re: [PATCH v3 6/6] target/riscv: Enable updates for pointer masking variables and thus enable pointer masking extension

2024-01-07 Thread Alistair Francis
On Fri, Jan 5, 2024 at 5:23 PM Alexey Baturo wrote: > > I might be wrong here, but right now J in MISA is unused. I suspect you are right, it would be worth confirming though. > I think the J-letter extension is still a thing, but current extensions like > Zjpm and Zjid follow the Z ext

Re: [PATCH] roms/opensbi: Upgrade from v1.3.1 to v1.4

2024-01-07 Thread Alistair Francis
On Wed, Jan 3, 2024 at 1:13 AM Bin Meng wrote: > > Upgrade OpenSBI from v1.3.1 to v1.4 and the pre-built bios images. > > The v1.4 release includes the following commits: > > 1a398d9 lib: sbi: Add Zicntr as a HART ISA extension > 669089c lib: sbi: Add Zihpm as a HART ISA extension > 72b9c8f lib:

[PATCH 2/3] target/riscv: Don't adjust vscause for exceptions

2024-01-07 Thread Alistair Francis
We have been incorrectly adjusting both the interrupt and exception cause when using the hypervisor extension and trapping to VS-mode. This patch changes the conditional to ensure we only adjust the cause for interrupts and not exceptions. Resolves:

[PATCH 3/3] target/riscv: Ensure mideleg is set correctly on reset

2024-01-07 Thread Alistair Francis
Bits 10, 6, 2 and 12 of mideleg are read only 1 when the Hypervisor is enabled. We currently only set them on accesses to mideleg, but they aren't correctly set on reset. Let's ensure they are always the correct value. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1617 Signed-off-by:

[PATCH 1/3] target/riscv: Assert that the CSR numbers will be correct

2024-01-07 Thread Alistair Francis
The CSRs will always be between either CSR_MHPMCOUNTER3 and CSR_MHPMCOUNTER31 or CSR_MHPMCOUNTER3H and CSR_MHPMCOUNTER31H. So although ctr_index can't be negative, Coverity doesn't know this and it isn't obvious to human readers either. Let's add an assert to ensure that Coverity knows the values

[PATCH 0/3] target/riscv: A few bug fixes and Coverity fix

2024-01-07 Thread Alistair Francis
A few bug fixes for some Gitlab issues and a Coverity fix Alistair Francis (3): target/riscv: Assert that the CSR numbers will be correct target/riscv: Don't adjust vscause for exceptions target/riscv: Ensure mideleg is set correctly on reset target/riscv/cpu.c| 8

Re: [PATCH] docs/system/riscv: sifive_u: Update S-mode U-Boot image build instructions

2024-01-07 Thread Alistair Francis
On Thu, Jan 4, 2024 at 5:18 PM Bin Meng wrote: > > Currently, the documentation outlines the process for building the > S-mode U-Boot image using `make menuconfig` and manual actions within > the menuconfig UI. However, this approach is fragile due to Kconfig > options potentially changing across

[PATCH] hw/i386/pc_piix: Make piix_intx_routing_notifier_xen() more device independent

2024-01-07 Thread Bernhard Beschow
This is a follow-up on commit 89965db43cce "hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config()" which introduced piix_intx_routing_notifier_xen(). This function is implemented in board code but accesses the PCI configuration space of the PIIX ISA function to determine the PCI

Re: [PATCH] net/vmnet: Pad short Ethernet frames

2024-01-07 Thread Bin Meng
On Sun, Jan 7, 2024 at 7:19 AM William Hooper wrote: > > At least on macOS 12.7.2, vmnet doesn't pad Ethernet frames, such as the > host's ARP replies, to the minimum size (60 bytes before the frame check > sequence) defined in IEEE Std 802.3-2022, so guests' Ethernet device > drivers may drop

Re: [PATCH] tcg/tci: Fix TCI on hppa host and update TCI test matrix

2024-01-07 Thread Helge Deller
On 1/7/24 16:22, Peter Maydell wrote: On Sun, 7 Jan 2024 at 07:20, Helge Deller wrote: Update the TCI interpreter test matrix for big-endian hosts with big- (hppa, hppa64) and little-endian (x86,x96-64) targets. I used native ppc64 and hppa hosts for those tests. Starting TCI on a hppa host

[PATCH 1/2] nubus-device: round Declaration ROM memory region address to qemu_target_page_size()

2024-01-07 Thread Mark Cave-Ayland
Declaration ROM binary images can be any arbitrary size, however if a host ROM memory region is not aligned to qemu_target_page_size() then we fail the "assert(!(iotlb & ~TARGET_PAGE_MASK))" check in tlb_set_page_full(). Ensure that the host ROM memory region is aligned to qemu_target_page_size()

[PATCH 2/2] nubus: add nubus-virtio-mmio device

2024-01-07 Thread Mark Cave-Ayland
The nubus-virtio-mmio device is a Nubus card that contains a set of 32 virtio-mmio devices and a goldfish PIC similar to the m68k virt machine that can be plugged into the m68k q800 machine. There are currently a number of drivers under development that can be used in conjunction with this

[PATCH 0/2] nubus: add nubus-virtio-mmio device

2024-01-07 Thread Mark Cave-Ayland
This series introduces a new nubus-virtio-mmio device which can be plugged into the q800 machine to enable a 68k Classic MacOS guest to access virtio devices such as virtio-9p-device (host filesharing), virtio-gpu (extended framebuffer support) and virtio-tablet-device (absolute positioning).

Re: [PATCH] target/ppc: Fix crash on machine check caused by ifetch

2024-01-07 Thread BALATON Zoltan
On Mon, 8 Jan 2024, Nicholas Piggin wrote: is_prefix_insn_excp() loads the first word of the instruction address which caused an exception, to determine whether or not it was prefixed so the prefix bit can be set in [H]SRR1. In case it was the instruction fetch itself that caused the exception,

[PATCH] target/ppc: Fix crash on machine check caused by ifetch

2024-01-07 Thread Nicholas Piggin
is_prefix_insn_excp() loads the first word of the instruction address which caused an exception, to determine whether or not it was prefixed so the prefix bit can be set in [H]SRR1. In case it was the instruction fetch itself that caused the exception, the [H]SRR1 prefix bit is not required to be

[PATCH 9/9] tests/avocado: Add FreeBSD distro boot tests for ppc

2024-01-07 Thread Nicholas Piggin
FreeBSD project provides qcow2 images that work well for testing QEMU. Add pseries tests for HPT and Radix, KVM and TCG. This uses a short term VM image, because FreeBSD has not set up long term builds for ppc64 at present. Other architectures could be added so this does not get a ppc_ prefix but

[PATCH 7/9] tests/avocado: Add pseries KVM boot_linux test

2024-01-07 Thread Nicholas Piggin
ppc has no avocado tests for the KVM backend. Add a KVM boot_linux.py test for pseries. Signed-off-by: Nicholas Piggin --- tests/avocado/boot_linux.py | 8 1 file changed, 8 insertions(+) diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py index

[PATCH 6/9] tests/avocado: Add ppc pseries and powernv hash MMU tests

2024-01-07 Thread Nicholas Piggin
POWER CPUs support hash and radix MMU modes. Linux supports running in either mode, but defaults to radix. To keep up testing of QEMU's hash MMU implementation, add some Linux hash boot tests. Signed-off-by: Nicholas Piggin --- tests/avocado/ppc_powernv.py | 23 +++

[PATCH 2/9] tests/avocado: mark boot_linux.py long runtime instead of flaky

2024-01-07 Thread Nicholas Piggin
The ppc64 and s390x tests were first marked skipIf GITLAB_CI by commit c0c8687ef0f ("tests/avocado: disable BootLinuxPPC64 test in CI"), and commit 0f26d94ec9e ("tests/acceptance: skip s390x_ccw_vrtio_tcg on GitLab") due to being very heavy-weight for gitlab CI. Commit 9b45cc99318 ("docs/devel:

[PATCH 8/9] tests/avocado: ppc add hypervisor tests

2024-01-07 Thread Nicholas Piggin
The powernv and pseries machines both provide hypervisor facilities that are supported by KVM. This is a large and complicated set of features that don't get much system-level testing in ppc tests. Add a new test case for these which runs QEMU KVM inside the target. This downloads an Alpine VM

[PATCH 4/9] tests/avocado: Enable replay_linux.py on ppc64 pseries

2024-01-07 Thread Nicholas Piggin
Add a ppc64 pseries test. This tends to hang in the replay phase near the end of the trace due to a missing event, so it is marked flaky. spapr-vscsi IO is extremely slow when running in record-replay modes, particularly when driven by SLOF. This causes tests to time-out even after an hour, so

[PATCH 1/9] gitlab: fix s390x tag for avocado-system-centos

2024-01-07 Thread Nicholas Piggin
The 390x tag should be s390x. Signed-off-by: Nicholas Piggin --- .gitlab-ci.d/buildtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 91663946de..cfe737aca2 100644 --- a/.gitlab-ci.d/buildtest.yml +++

[PATCH 5/9] tests/avocado: ppc add powernv10 boot_linux_console test

2024-01-07 Thread Nicholas Piggin
Add test for POWER10. Signed-off-by: Nicholas Piggin --- tests/avocado/boot_linux_console.py | 8 1 file changed, 8 insertions(+) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 3f0180e1f8..4f05bb7441 100644 ---

[PATCH 0/9] tests/avocado: ppc additions and other fixes

2024-01-07 Thread Nicholas Piggin
This is a set of ppc avocado tests that I have posted before, but it has also grown a few misc changes, and patch 2 creates a dependency with the added ppc tests that use the AVOCADO_ALLOW_LONG_RUNTIME it introduces. I could take patches 2-3 via the ppc tree if they get acked, but happy to rebase

[PATCH 3/9] tests/avocado: Mark x86-64 boot_linux.py TCG tests as long runtime

2024-01-07 Thread Nicholas Piggin
Re-testing gitlab CI shows the x86-64 TCG tests take ~100s each, are the longest-running tests. They are close to the ~150s taken by the disabled ppc64 and s390x tests. From avocado-system-centos: boot_linux.py:BootLinuxX8664.test_pc_i440fx_tcg: PASS (112.34 s)

[PATCH] hw/arm: add PCIe to Freescale i.MX6

2024-01-07 Thread Nikita Ostrenkov
Signed-off-by: Nikita Ostrenkov --- hw/arm/Kconfig| 3 +++ hw/arm/fsl-imx6.c | 25 ++ include/hw/arm/fsl-imx6.h | 44 --- 3 files changed, 51 insertions(+), 21 deletions(-) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig

Re: [PULL 00/26] Migration 20240104 patches

2024-01-07 Thread Stefan Hajnoczi
On Sun, 7 Jan 2024 at 10:23, Peter Maydell wrote: > > On Sun, 7 Jan 2024 at 12:41, Stefan Hajnoczi wrote: > > > > On Sun, 7 Jan 2024 at 07:34, Peter Xu wrote: > > > > > > On Fri, Jan 05, 2024 at 04:08:40PM +, Peter Maydell wrote: > > > > I notice that your gpg key doesn't seem to be signed

Re: acpiBitsTest.test_acpi_smbios_bits test intermittently times out

2024-01-07 Thread Ani Sinha
On Sat, Jan 6, 2024 at 5:39 PM Peter Maydell wrote: > > On Sat, 6 Jan 2024 at 05:41, Ani Sinha wrote: > > > > On Sat, Jan 6, 2024 at 10:05 AM Ani Sinha wrote: > > > > > > On Sat, Jan 6, 2024 at 12:11 AM Peter Maydell > > > wrote: > > > > > > > > The avocado test

Re: [PULL 00/26] Migration 20240104 patches

2024-01-07 Thread Peter Maydell
On Sun, 7 Jan 2024 at 12:41, Stefan Hajnoczi wrote: > > On Sun, 7 Jan 2024 at 07:34, Peter Xu wrote: > > > > On Fri, Jan 05, 2024 at 04:08:40PM +, Peter Maydell wrote: > > > I notice that your gpg key doesn't seem to be signed by anybody > > > else; you might look at whether it's easy to get

Re: [PATCH] tcg/tci: Fix TCI on hppa host and update TCI test matrix

2024-01-07 Thread Peter Maydell
On Sun, 7 Jan 2024 at 07:20, Helge Deller wrote: > > Update the TCI interpreter test matrix for big-endian hosts with > big- (hppa, hppa64) and little-endian (x86,x96-64) targets. > I used native ppc64 and hppa hosts for those tests. > > Starting TCI on a hppa host crashed immediately, because

Re: [PATCH v4 00/11] hw/isa/vt82c686: Implement relocation and toggling of SuperI/O functions

2024-01-07 Thread Mark Cave-Ayland
On 06/01/2024 21:05, Bernhard Beschow wrote: This series implements relocation of the SuperI/O functions of the VIA south bridges which resolves some FIXME's. It is part of my via-apollo-pro-133t branch [1] which is an extension of bringing the VIA south bridges to the PC machine [2]. This

[PATCH v4 3/4] tests/qtest/pvpanic: use centralized definition of supported events

2024-01-07 Thread Thomas Weißschuh
Avoid the necessity to update all tests when new events are added to the device. Acked-by: Thomas Huth Signed-off-by: Thomas Weißschuh --- tests/qtest/pvpanic-pci-test.c | 5 +++-- tests/qtest/pvpanic-test.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git

[PATCH v4 4/4] hw/misc/pvpanic: add support for normal shutdowns

2024-01-07 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Signed-off-by: Thomas Weißschuh --- docs/specs/pvpanic.rst| 2 ++ hw/misc/pvpanic.c |

[PATCH v4 2/4] hw/misc/pvpanic: centralize definition of supported events

2024-01-07 Thread Thomas Weißschuh
The different components of pvpanic duplicate the list of supported events. Move it to the shared header file to minimize changes when new events are added. Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c | 2 +- hw/misc/pvpanic-pci.c | 2 +- hw/misc/pvpanic.c | 2 +-

[PATCH v4 1/4] linux-headers: drop pvpanic.h

2024-01-07 Thread Thomas Weißschuh
misc/pvpanic.h from the Linux UAPI does not define a Linux UAPI but a qemu device API. This leads to a weird process when updates to the interface are needed: 1) Change to the specification in the qemu tree 2) Change to the header in the Linux tree 3) Re-import of the header into Qemu. The

Re: [PATCH v5 2/3] tests/qtest: Add STM32L4x5 EXTI QTest testcase

2024-01-07 Thread Mark Cave-Ayland
On 05/01/2024 10:13, Philippe Mathieu-Daudé wrote: (+Mark & Eduardo) On 4/1/24 14:37, inesvarhol wrote: Le jeudi 4 janvier 2024 à 14:05, Philippe Mathieu-Daudé a écrit : Hello, +static void test_edge_selector(void) +{ + enable_nvic_irq(EXTI0_IRQ); + + / Configure EXTI line 0 irq on

[PATCH v4 0/4] hw/misc/pvpanic: add support for normal shutdowns

2024-01-07 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. The background is the usage of minimal Linux kernels with different architectures for testing

[PATCH v2 0/2] linux-user: two fixes to coredump generation

2024-01-07 Thread Thomas Weißschuh
Signed-off-by: Thomas Weißschuh --- Changes in v2: - Rebase on 8.2 master - Resend after closed tree and holidays - Link to v1: https://lore.kernel.org/r/20231115-qemu-user-dumpable-v1-0-edbe7f0fb...@t-8ch.de --- Thomas Weißschuh (2): linux-user/elfload: test return value of getrlimit

[PATCH v2 2/2] linux-user/elfload: check PR_GET_DUMPABLE before creating coredump

2024-01-07 Thread Thomas Weißschuh
A process can opt-out of coredump creation by calling prctl(PR_SET_DUMPABLE, 0). linux-user passes this call from the guest through to the operating system. >From there it can be read back again to avoid creating coredumps from qemu-user itself if the guest chose so. Signed-off-by: Thomas

[PATCH v2 1/2] linux-user/elfload: test return value of getrlimit

2024-01-07 Thread Thomas Weißschuh
Should getrlimit() fail the value of dumpsize.rlimit_cur may not be initialized. Avoid reading garbage data by checking the return value of getrlimit. Signed-off-by: Thomas Weißschuh --- linux-user/elfload.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [PATCH v4 11/11] hw/isa/vt82c686: Implement relocation and toggling of SuperI/O functions

2024-01-07 Thread BALATON Zoltan
On Sat, 6 Jan 2024, Bernhard Beschow wrote: The VIA south bridges are able to relocate and toggle (enable or disable) their SuperI/O functions. So far this is hardcoded such that all functions are always enabled and are located at fixed addresses. Some PC BIOSes seem to probe for I/O occupancy

Re: [PATCH v4 10/11] hw/ppc/pegasos2: Let pegasos2 machine configure SuperI/O functions

2024-01-07 Thread BALATON Zoltan
On Sat, 6 Jan 2024, Bernhard Beschow wrote: This is a preparation for implementing relocation and toggling of SuperI/O functions in the VT8231 device model. Upon reset, all SuperI/O functions will be deactivated, so in case if no -bios is given, let the machine configure those functions the same

Re: [PATCH v2 0/9] target/hppa qemu v8.2 regression fixes

2024-01-07 Thread Bruno Haible
> The whole series can be pulled from the "hppa-fixes-8.2" branch from: > https://github.com/hdeller/qemu-hppa.githppa-fixes-8.2 Tested-by: Bruno Haible

Re: [PATCH v11 0/7] Support x2APIC mode with TCG accelerator

2024-01-07 Thread Michael S. Tsirkin
On Sat, Jan 06, 2024 at 11:33:29PM +0700, Bui Quang Minh wrote: > On 12/28/23 22:44, Bui Quang Minh wrote: > > On 12/26/23 16:21, Michael S. Tsirkin wrote: > > > On Mon, Dec 25, 2023 at 11:40:54PM +0700, Bui Quang Minh wrote: > > > > Hi everyone, > > > > > > > > This series implements x2APIC mode

[PATCH v2 2/9] hw/hppa/machine: Disable default devices with --nodefaults option

2024-01-07 Thread deller
From: Helge Deller Add support for the qemu --nodefaults option, which will disable the following default devices: - lsi53c895a SCSI controller, - artist graphics card, - LASI 82596 NIC, - tulip PCI NIC, - second serial PCI card, - USB OHCI controller. Adding this option is very useful to allow

[PATCH v2 3/9] hw/pci-host/astro: Add missing astro & elroy registers for NetBSD

2024-01-07 Thread deller
From: Helge Deller NetBSD accesses some astro and elroy registers which aren't accessed by Linux yet. Add emulation for those registers to allow NetBSD to boot further. Please note that this patch is not sufficient to completely boot up NetBSD on the 64-bit C3700 machine yet. Signed-off-by:

[PATCH v2 1/9] hw/hppa/machine: Allow up to 3840 MB total memory

2024-01-07 Thread deller
From: Helge Deller The physical hardware allows DIMMs of 4 MB size and above, allowing up to 3840 MB of memory, but is restricted by setup code to 3 GB. Increase the limit to allow up to the maximum amount of memory. Btw. the memory area from 0xf000. to 0x. is reserved by the

[PATCH v2 8/9] target/hppa: Avoid accessing %gr0 when raising exception

2024-01-07 Thread deller
From: Helge Deller The value of unwind_breg may reference register %r0, but we need to avoid accessing gr0 directly and use the value 0 instead. At runtime I've seen unwind_breg being zero with the Linux kernel when rfi is used to jump to smp_callin(). Signed-off-by: Helge Deller ---

[PATCH v2 5/9] target/hppa: Strip upper 32-bits of IOR on error in probe

2024-01-07 Thread deller
From: Helge Deller Limit IOR to the lower 32-bits on failure. Keep patch short for easier backporting. Signed-off-by: Helge Deller --- target/hppa/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index

[PATCH v2 7/9] hw/hppa: Move software power button address back into PDC

2024-01-07 Thread deller
From: Helge Deller The various operating systems (e.g. Linux, NetBSD) have issues mapping the power button when it's stored in page zero. NetBSD even crashes, because it fails to map that page and then accesses unmapped memory. Since we now have a consistent memory mapping of PDC in 32-bit and

[PATCH v2 4/9] target/hppa: Fix PDC address translation on PA2.0 with PSW.W=0

2024-01-07 Thread deller
From: Helge Deller Fix the address translation for PDC space on PA2.0 if PSW.W=0. Basically, for any address in the 32-bit PDC range from 0xf000 to 0xf100 keep the lower 32-bits and just set the upper 32-bits to 0xfff0. This mapping fixes the emulated power button in PDC space for

[PATCH v2 0/9] target/hppa qemu v8.2 regression fixes

2024-01-07 Thread deller
From: Helge Deller There were some regressions introduced with Qemu v8.2 on the hppa/hppa64 target, e.g.: - 32-bit HP-UX crashes on B160L (32-bit) machine - NetBSD boot failure due to power button in page zero - NetBSD FPU detection failure - OpenBSD 7.4 boot failure This small patch series

[PATCH v2 6/9] target/hppa: Strip upper 32-bits of IOR on unaligned access error

2024-01-07 Thread deller
From: Helge Deller Limit IOR to the lower 32-bits on failure. Keep patch short for easier backporting. Signed-off-by: Helge Deller --- target/hppa/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 04de1689d7..3c384d5855

Re: [PULL 00/26] Migration 20240104 patches

2024-01-07 Thread Stefan Hajnoczi
On Sun, 7 Jan 2024 at 07:34, Peter Xu wrote: > > On Fri, Jan 05, 2024 at 04:08:40PM +, Peter Maydell wrote: > > I notice that your gpg key doesn't seem to be signed by anybody > > else; you might look at whether it's easy to get it signed > > by somebody else (eg some of your redhat

Re: [PULL 00/26] Migration 20240104 patches

2024-01-07 Thread Peter Xu
On Fri, Jan 05, 2024 at 04:08:40PM +, Peter Maydell wrote: > I notice that your gpg key doesn't seem to be signed by anybody > else; you might look at whether it's easy to get it signed > by somebody else (eg some of your redhat colleagues). Hmm, I think I have signed with at least Juan and

Re: [PATCH RESEND v3 04/10] crypto: Introduce creation option and structure for detached LUKS header

2024-01-07 Thread Yong Huang
On Thu, Jan 4, 2024 at 10:51 PM Daniel P. Berrangé wrote: > On Mon, Dec 25, 2023 at 01:45:06PM +0800, Hyman Huang wrote: > > Introduce 'header' field in BlockdevCreateOptionsLUKS to support > > detached LUKS header creation. Meanwhile, introduce header-related > > field in QCryptoBlock. > > > >

Re: [PATCH RESEND v3 02/10] crypto: Support generic LUKS encryption

2024-01-07 Thread Yong Huang
On Thu, Jan 4, 2024 at 10:40 PM Daniel P. Berrangé wrote: > On Mon, Dec 25, 2023 at 01:45:04PM +0800, Hyman Huang wrote: > > By enhancing the LUKS driver, it is possible to enable > > the detachable LUKS header and, as a result, achieve > > general encryption for any disk format that QEMU has >

[PATCH v2 1/2] i386/sev: Sort the error message

2024-01-07 Thread Hyman Huang
Prior to giving the caller the return number(in the next commit), sorting the error message: 1. report the error number on the ram_block_discard_disable failure path 2. report the error number on the syscall "open" failure path 3. report EINVAL when a prerequisite check fails or the command

[PATCH v2 0/2] Nitpick at the error message's output

2024-01-07 Thread Hyman Huang
v2: - rebase on master - add a commit to sort the error message so that an explanation error number can be returned on all failure paths Hyman Huang (2): i386/sev: Sort the error message i386/sev: Nitpick at the error message's output target/i386/sev.c | 10 +++--- 1 file changed, 7

[PATCH v2 2/2] i386/sev: Nitpick at the error message's output

2024-01-07 Thread Hyman Huang
The incorrect error message was produced as a result of the return number being disregarded on the sev_kvm_init failure path. For instance, when a user's failure to launch a SEV guest is caused by an incorrect IOCTL, the following message is reported: kvm: sev_kvm_init: failed to initialize

Re: [PATCH] i386/sev: Nitpick at the error message's output

2024-01-07 Thread Yong Huang
On Sat, Jan 6, 2024 at 12:43 AM Alex Bennée wrote: > Hyman Huang writes: > > > The incorrect error message was produced as a result of > > the return number being disregarded on the sev_kvm_init > > failure path. > > > > For instance, when a user's failure to launch a SEV guest > > is caused by

[PATCH trivial] colo: examples: remove mentions of script= and (wrong) downscript=

2024-01-07 Thread Michael Tokarev
There's no need to repeat script=/etc/qemu-ifup in examples, as it is already in there. More, all examples uses incorrect "down script=" (which should be "downscript="). --- I'm not sure we need so many identical examples, and why it uses vnet=off, - it looks like vnet= should also be dropped.

Re: [PATCH] tcg/tci: Fix TCI on hppa host and update TCI test matrix

2024-01-07 Thread Philippe Mathieu-Daudé
Cc'ing Akihiko for commit a1eaa6281f. On 7/1/24 08:19, Helge Deller wrote: Update the TCI interpreter test matrix for big-endian hosts with big- (hppa, hppa64) and little-endian (x86,x96-64) targets. I used native ppc64 and hppa hosts for those tests. Starting TCI on a hppa host crashed