Re: [PATCH v6 00/14] tcg/riscv: Add support for vector

2024-10-22 Thread LIU Zhiwei
On 2024/10/21 09:42, Alistair Francis wrote: On Thu, Oct 17, 2024 at 5:33 AM Richard Henderson wrote: Introduce support for the RISC-V vector extension in the TCG backend. v5: https://lore.kernel.org/qemu-devel/20241007025700.47259-1-zhiwei_...@linux.alibaba.com/ Changes for v6: - Fix p

Re: [PATCH 1/2] tests/functional: Add a functional test for the collie board

2024-10-22 Thread Daniel P . Berrangé
On Tue, Oct 22, 2024 at 01:11:31AM -0300, Philippe Mathieu-Daudé wrote: > On 17/10/24 13:32, Peter Maydell wrote: > > Add a functional test for the collie board that uses the kernel and > > rootfs provided by Guenter Roeck in the linux-test-downloads repo: > > https://github.com/groeck/linux-test

Re: [PATCH v5 02/19] pc-bios/s390-ccw: Use the libc from SLOF and remove sclp prints

2024-10-22 Thread Jared Rossi
On 10/22/24 1:36 PM, Thomas Huth wrote: On 20/10/2024 03.29, jro...@linux.ibm.com wrote: From: Jared Rossi We are already using the libc from SLOF for the s390-netboot.img, and this libc implementation is way more complete and accurate than the simple implementation that we currently use fo

[PATCH v2] migration: Deprecate query-migrationthreads command

2024-10-22 Thread Peter Xu
Per previous discussion [1,2], this patch deprecates query-migrationthreads command. To summarize, the major reason of the deprecation is due to no sensible way to consume the API properly: (1) The reported list of threads are incomplete (ignoring destination threads and non-multifd threa

Re: [PATCH v2 09/13] rust: clean up define_property macro

2024-10-22 Thread Kevin Wolf
Am 21.10.2024 um 18:35 hat Paolo Bonzini geschrieben: > Use the "struct update" syntax to initialize most of the fields to zero, > and simplify the handmade type-checking of $name. > > Reviewed-by: Junjie Mao > Signed-off-by: Paolo Bonzini > --- > rust/qemu-api/src/device_class.rs | 29 ++--

Re: [PATCH v2 01/20] tests/docker: Fix microblaze atomics

2024-10-22 Thread Pierrick Bouvier
On 10/22/24 03:55, Alex Bennée wrote: From: Ilya Leoshkevich GCC produces invalid code for microblaze atomics. The fix is unfortunately not upstream, so fetch it from an external location and apply it locally. Suggested-by: Peter Maydell Signed-off-by: Ilya Leoshkevich Message-Id: <20240919

Re: [PATCH v2 02/20] tests/docker: add NOFETCH env variable for testing

2024-10-22 Thread Pierrick Bouvier
On 10/22/24 03:55, Alex Bennée wrote: Testing non-auto built docker containers (i.e. custom built compilers) is a bit fiddly as you couldn't continue a build with a previously locally built container. While you can play games with REGISTRY its simpler to allow a NOFETCH that will go through the c

Re: [PATCH v2 08/13] rust: cleanup module_init!, use it from #[derive(Object)]

2024-10-22 Thread Kevin Wolf
Am 22.10.2024 um 08:00 hat Junjie Mao geschrieben: > > Paolo Bonzini writes: > > > On Tue, Oct 22, 2024 at 4:12 AM Junjie Mao wrote: > >> > +($type:ident => $body:block) => { > >> > +const _: () = { > >> > +#[used] > >> > +#[cfg_attr( > >> > +

Re: [PATCH v2 06/20] scripts/ci: remove architecture checks for build-environment updates

2024-10-22 Thread Pierrick Bouvier
On 10/22/24 03:56, Alex Bennée wrote: We were missing s390x here. There isn't much point testing for the architecture here as we will fail anyway if the appropriate package list is missing. Signed-off-by: Alex Bennée --- scripts/ci/setup/ubuntu/build-environment.yml | 2 -- 1 file changed, 2

[PATCH 1/1] target/arm: Add cortex-m0+ support

2024-10-22 Thread Matthieu Castet
Signed-off-by: Matthieu Castet --- hw/intc/armv7m_nvic.c| 38 +- target/arm/cpu.c | 4 ++-- target/arm/ptw.c | 23 +++ target/arm/tcg/cpu-v7m.c | 21 - 4 files changed, 74 insertions(+), 12 deletions(-

[PATCH 0/1] Add cortex-m0+ support

2024-10-22 Thread Matthieu Castet
Hello, I have a patch that should allow to support cortex-m0+. I used it in a special arm virtual machine that is still in progress (and not submitted). I think this can be usefull. Matthieu Castet (1): target/arm: Add cortex-m0+ support hw/intc/armv7m_nvic.c| 38

Re: [PATCH v2 07/20] tests/tcg/x86_64: Add cross-modifying code test

2024-10-22 Thread Pierrick Bouvier
On 10/22/24 03:56, Alex Bennée wrote: From: Ilya Leoshkevich commit f025692c992c ("accel/tcg: Clear PAGE_WRITE before translation") fixed cross-modifying code handling, but did not add a test. The changed code was further improved recently [1], and I was not sure whether these modifications wer

Re: [PATCH v1] linux-user: Add option to run `execve`d programs through QEMU

2024-10-22 Thread Noah Goldstein
On Fri, Oct 11, 2024 at 1:14 PM Noah Goldstein wrote: > > On Wed, Oct 2, 2024 at 11:42 AM Noah Goldstein > wrote: > > > > On Wed, Oct 2, 2024 at 11:39 AM Ilya Leoshkevich wrote: > > > > > > On Wed, 2024-10-02 at 09:05 -0500, Noah Goldstein wrote: > > > > On Wed, Oct 2, 2024 at 3:08 AM Ilya Leos

Re: [PATCH v2 13/20] tests/tcg: enable basic testing for aarch64_be-linux-user

2024-10-22 Thread Philippe Mathieu-Daudé
On 22/10/24 07:56, Alex Bennée wrote: We didn't notice breakage of aarch64_be because we don't have any TCG tests for it. However while the existing aarch64 compiler can target big-endian builds no one packages a BE libc. Instead we bang some rocks together to do the most basic of hello world wit

RE: [PATCH V1 2/4] hw/acpi: Update ACPI CPU Status `is_{present, enabled}` during vCPU hot(un)plug

2024-10-22 Thread Salil Mehta via
Hi Igor, > From: Igor Mammedov > Sent: Friday, October 18, 2024 3:18 PM > To: Salil Mehta > > On Mon, 14 Oct 2024 20:22:03 +0100 > Salil Mehta wrote: > > > Update the `AcpiCpuStatus` for `is_enabled` and `is_present` > > accordingly when vCPUs are hot-plugged or hot-unplugged, taking

Re: [QEMU PATCH v8] xen/passthrough: use gsi to map pirq when dom0 is PVH

2024-10-22 Thread Marek Marczykowski-Górecki
On Wed, Oct 16, 2024 at 02:28:27PM +0800, Jiqian Chen wrote: > --- a/hw/xen/xen_pt.h > +++ b/hw/xen/xen_pt.h > @@ -36,6 +36,7 @@ void xen_pt_log(const PCIDevice *d, const char *f, ...) > G_GNUC_PRINTF(2, 3); > # define XEN_PT_LOG_CONFIG(d, addr, val, len) > #endif > > +#define DOMID_RUN_QEMU

Re: [PATCH v2 16/20] MAINTAINERS: mention my plugins/next tree

2024-10-22 Thread Pierrick Bouvier
On 10/22/24 03:56, Alex Bennée wrote: Make it easier to find where plugin patches are being staged. Signed-off-by: Alex Bennée --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 81396c9f15..02b8b2dfd6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

Re: [PATCH v2 12/20] config/targets: update aarch64_be-linux-user gdb XML list

2024-10-22 Thread Pierrick Bouvier
On 10/22/24 03:56, Alex Bennée wrote: Attempting to run the binary asserts when it can't find the XML entry. We can fix it so we don't although I suspect other stuff is broken. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2580 Signed-off-by: Alex Bennée --- configs/targets/aarch64_be-

Re: [PATCH v2 13/20] tests/tcg: enable basic testing for aarch64_be-linux-user

2024-10-22 Thread Pierrick Bouvier
On 10/22/24 03:56, Alex Bennée wrote: We didn't notice breakage of aarch64_be because we don't have any TCG tests for it. However while the existing aarch64 compiler can target big-endian builds no one packages a BE libc. Instead we bang some rocks together to do the most basic of hello world wit

Re: [PATCH v2 15/20] testing: Enhance gdb probe script

2024-10-22 Thread Pierrick Bouvier
On 10/22/24 03:56, Alex Bennée wrote: From: Gustavo Romero Use list and set comprehension to simplify code. Also, gently handle invalid gdb filenames. Signed-off-by: Gustavo Romero Message-Id: <20241015145848.387281-1-gustavo.rom...@linaro.org> Signed-off-by: Alex Bennée --- scripts/probe-

Re: [PATCH v2 17/20] plugins: add ability to register a GDB triggered callback

2024-10-22 Thread Pierrick Bouvier
On 10/22/24 03:56, Alex Bennée wrote: Now gdbstub has gained the ability to extend its command tables we can allow it to trigger plugin callbacks. This is probably most useful for QEMU developers debugging plugins themselves but might be useful for other stuff. Trigger the callback by sending:

Re: [PATCH v2 00/13] rust: miscellaneous cleanups + QOM integration tests

2024-10-22 Thread Kevin Wolf
Am 21.10.2024 um 18:35 hat Paolo Bonzini geschrieben: > This series integrates some of the observations from the MSRV patches at > https://lore.kernel.org/qemu-devel/20241015131735.518771-1-pbonz...@redhat.com/. > > The main changes here are two: first, build an integration test that > actually tr

[PATCH 1/1] target/arm: Add cortex-m0+ support

2024-10-22 Thread Matthieu Castet
Signed-off-by: Matthieu Castet --- hw/intc/armv7m_nvic.c| 38 +- target/arm/cpu.c | 4 ++-- target/arm/ptw.c | 23 +++ target/arm/tcg/cpu-v7m.c | 21 - 4 files changed, 74 insertions(+), 12 deletions(-

[PATCH] qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo (addtl)

2024-10-22 Thread Cal Peake
Hello, This is a follow up to commit 8f525028bc6f52e4af3f737928d16c3f39a6ea54 to take care of a few remaining QCryptoAFAlg -> QCryptoAFAlgo renames. Signed-off-by: Cal Peake diff --git a/crypto/hash-afalg.c b/crypto/hash-afalg.c index 06e1e4699c..8c0ce5b520 100644 --- a/crypto/hash-afalg.c +++

Re: [RFC PATCH v2 0/7] tcg-plugins: add hooks for interrupts, exceptions and traps

2024-10-22 Thread Pierrick Bouvier
On 10/22/24 01:21, Julian Ganz wrote: Hi, Pierrick, October 21, 2024 at 11:59 PM, "Pierrick Bouvier" wrote: On 10/21/24 14:02, Julian Ganz wrote: The motivation for this API is a plugin that simulates a RISC-V tracing unit (and produces a trace). For that we actually also needed to track

Re: [PATCH 1/2] vfio/helpers: Refactor vfio_region_mmap() error handling

2024-10-22 Thread Peter Xu
On Tue, Oct 22, 2024 at 02:08:28PM -0600, Alex Williamson wrote: > Move error handling code to the end of the function so that it can more > easily be shared by new mmap failure conditions. No functional change > intended. > > Signed-off-by: Alex Williamson > --- > hw/vfio/helpers.c | 34 ++

Re: [PATCH v2 10/13] qdev: make properties array "const"

2024-10-22 Thread Philippe Mathieu-Daudé
On 22/10/24 02:23, Paolo Bonzini wrote: On Tue, Oct 22, 2024 at 6:31 AM Philippe Mathieu-Daudé wrote: -void qdev_property_add_static(DeviceState *dev, Property *prop) +void qdev_property_add_static(DeviceState *dev, const Property *prop) { Object *obj = OBJECT(dev); ObjectPrope

Re: [PATCH 1/2] tests/functional: Add a functional test for the collie board

2024-10-22 Thread Philippe Mathieu-Daudé
On 22/10/24 06:02, Peter Maydell wrote: On Tue, 22 Oct 2024 at 08:09, Daniel P. Berrangé wrote: On Tue, Oct 22, 2024 at 01:11:31AM -0300, Philippe Mathieu-Daudé wrote: On 17/10/24 13:32, Peter Maydell wrote: Add a functional test for the collie board that uses the kernel and rootfs provided

Re: [PATCH 2/2] vfio/helpers: Align mmaps

2024-10-22 Thread Peter Xu
On Tue, Oct 22, 2024 at 02:08:29PM -0600, Alex Williamson wrote: > Thanks to work by Peter Xu, support is introduced in Linux v6.12 to > allow pfnmap insertions at PMD and PUD levels of the page table. This > means that provided a properly aligned mmap, the vfio driver is able > to map MMIO at sig

Re: [PATCH 1/2] migration: Make all helpers in misc.h safe to use without migration

2024-10-22 Thread Peter Xu
On Tue, Oct 22, 2024 at 06:11:19PM +0200, Cédric Le Goater wrote: > On 10/22/24 18:07, Peter Xu wrote: > > Migration object can be freed before some other device codes run, while we > > do have a bunch of migration helpers exported in migration/misc.h that > > logically can be invoked at any time o

Re: [PATCH v2 13/20] tests/tcg: enable basic testing for aarch64_be-linux-user

2024-10-22 Thread Richard Henderson
On 10/22/24 03:56, Alex Bennée wrote: We didn't notice breakage of aarch64_be because we don't have any TCG tests for it. However while the existing aarch64 compiler can target big-endian builds no one packages a BE libc. Instead we bang some rocks together to do the most basic of hello world wit

Re: [PULL 08/17] crypto/hash: Implement and use new hash API

2024-10-22 Thread Thomas Huth
On 10/10/2024 18.20, Daniel P. Berrangé wrote: From: Alejandro Zeise Changes the public hash API implementation to support accumulative hashing. Implementations for the public functions are added to call the new driver functions that implement context creation, updating, finalization, and dest

Re: [PATCH 1/1] target/arm: Add cortex-m0+ support

2024-10-22 Thread castet . matthieu
Hello, Please ignore this mail, I was doing some test and didn't realise real email was added. I will resend the real one. Thanks. - Mail original - De: "Matthieu Castet" À: "castet matthieu" Cc: "Peter Maydell" , "open list:ARM cores" , "open list:All patches CC here"

[PATCH 2/2] vfio/helpers: Align mmaps

2024-10-22 Thread Alex Williamson
Thanks to work by Peter Xu, support is introduced in Linux v6.12 to allow pfnmap insertions at PMD and PUD levels of the page table. This means that provided a properly aligned mmap, the vfio driver is able to map MMIO at significantly larger intervals than PAGE_SIZE. For example on x86_64 (the o

[PATCH 0/2] vfio: Align mmaps

2024-10-22 Thread Alex Williamson
As described in patch /2, newer kernels may support pfnmap with PMD or PUD sized mappings. Mappings must be aligned in order to see the full benefit of this support. We're largely able to get PMD alignment for free from mmap, but PUD alignment requires some effort. Further, we don't actually hav

[PATCH 1/2] vfio/helpers: Refactor vfio_region_mmap() error handling

2024-10-22 Thread Alex Williamson
Move error handling code to the end of the function so that it can more easily be shared by new mmap failure conditions. No functional change intended. Signed-off-by: Alex Williamson --- hw/vfio/helpers.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-)

Re: [RFC PATCH v2 0/7] tcg-plugins: add hooks for interrupts, exceptions and traps

2024-10-22 Thread Julian Ganz
Hi, Alex, October 22, 2024 at 10:58 AM, "Alex Bennée" wrote: > How easy would it be to expose a Rust API? I'm curious because now we > are looking to integrate Rust into QEMU we could consider transitioning > to a Rust API for plugins. It has been done before: > > https://github.com/novafacing/q

[PATCH v1 2/4] accel/kvm: Keep track of the HWPoisonPage page_size

2024-10-22 Thread “William Roche
From: William Roche Add the page size information to the hwpoison_page_list elements. As the kernel doesn't always report the actual poisoned page size, we adjust this size from the backend real page size. We take into account the recorded page size to adjust the size and location of the memory h

[PATCH v1 1/4] accel/kvm: SIGBUS handler should also deal with si_addr_lsb

2024-10-22 Thread “William Roche
From: William Roche The SIGBUS signal siginfo reporting a HW memory error provides a si_addr_lsb field with an indication of the impacted memory page size. This information should be used to track the hwpoisoned page sizes. Signed-off-by: William Roche --- accel/kvm/kvm-all.c| 6 -- ac

Re: [PATCH v2 11/20] MAINTAINERS: mention my gdbstub/next tree

2024-10-22 Thread Philippe Mathieu-Daudé
On 22/10/24 07:56, Alex Bennée wrote: Make it easy for people to see what is already queued. Signed-off-by: Alex Bennée --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Philippe Mathieu-Daudé

[PATCH v1 0/4] hugetlbfs memory HW error fixes

2024-10-22 Thread “William Roche
From: William Roche This set of patches fixes several problems with hardware memory errors impacting hugetlbfs memory backed VMs. When using hugetlbfs large pages, any large page location being impacted by an HW memory error results in poisoning the entire page, suddenly making a large chunk of t

[PATCH v1 4/4] accel/kvm: Report the loss of a large memory page

2024-10-22 Thread “William Roche
From: William Roche On HW memory error, we need to report better what the impact of this error is. So when an entire large page is impacted by an error (like the hugetlbfs case), we give a warning message when this page is first hit: Memory error: Loosing a large page (size: X) at QEMU addr Y and

[PATCH v1 3/4] system/physmem: Largepage punch hole before reset of memory pages

2024-10-22 Thread “William Roche
From: William Roche When the VM reboots, a memory reset is performed calling qemu_ram_remap() on all hwpoisoned pages. While we take into account the recorded page sizes to repair the memory locations, a large page also needs to punch a hole in the backend file to regenerate a usable memory, clea

RE: [PATCH V1 4/4] hw/acpi: Populate vCPU Hotplug VMSD to migrate `is_{present,enabled}` states

2024-10-22 Thread Salil Mehta via
Hi Igor, > From: Igor Mammedov > Sent: Friday, October 18, 2024 3:31 PM > To: Salil Mehta > > On Mon, 14 Oct 2024 20:22:05 +0100 > Salil Mehta wrote: > > > The ACPI CPU hotplug states `is_{present, enabled}` must be migrated > > alongside other vCPU hotplug states to the destination

RE: [PATCH V1 3/4] hw/acpi: Reflect ACPI vCPU {present,enabled} states in ACPI _STA.{PRES,ENA} Bits

2024-10-22 Thread Salil Mehta via
Hi Zhao, Sorry, for the late reply. I was away last week with only intermittent access to the mails. > From: Zhao Liu > Sent: Friday, October 18, 2024 6:13 AM > To: Salil Mehta > > Hi Salil, > > On Mon, Oct 14, 2024 at 08:22:04PM +0100, Salil Mehta wrote: > > Date: Mon, 14 Oct 2024 20

RE: [PATCH V1 3/4] hw/acpi: Reflect ACPI vCPU {present,enabled} states in ACPI _STA.{PRES,ENA} Bits

2024-10-22 Thread Salil Mehta via
Hi Igor, > From: Igor Mammedov > Sent: Friday, October 18, 2024 3:25 PM > To: Salil Mehta > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; m...@redhat.com; > m...@kernel.org; jean-phili...@linaro.org; Jonathan Cameron > ; lpieral...@kernel.org; > peter.mayd...@linaro.org; richard.hender.

[PATCH 0/2] target/s390x: Fix the floating-point multiply-and-add NaN rules

2024-10-22 Thread Ilya Leoshkevich
Hi, Peter reported on IRC that FMA NaN handling was likely broken on s390x. Patch 1 of this series fixes the issue, patch 2 adds a test. For the sake of readability, the test sacrifices the 90-character line length rule. Best regards, Ilya Ilya Leoshkevich (2): target/s390x: Fix the floating-p

[PATCH 2/2] tests/tcg/s390x: Add the floating-point multiply-and-add test

2024-10-22 Thread Ilya Leoshkevich
Add a test to prevent regressions. Share some useful pieces with the vfminmax test. Remove the duplicates from the floating point class values. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 5 +- tests/tcg/s390x/float.h | 104 ++ tests/tcg/s390x/fma.

[PATCH 1/2] target/s390x: Fix the floating-point multiply-and-add NaN rules

2024-10-22 Thread Ilya Leoshkevich
Order the helper arguments to match the Principles of Operation. Implement the "Results: MULTIPLY AND ADD" table in pickNaNMulAdd(). Reported-by: Peter Maydell Signed-off-by: Ilya Leoshkevich --- fpu/softfloat-specialize.c.inc| 19 +++ target/s390x/tcg/fpu_helper.c | 8

RE: [PATCH V1 3/4] hw/acpi: Reflect ACPI vCPU {present,enabled} states in ACPI _STA.{PRES,ENA} Bits

2024-10-22 Thread Salil Mehta via
> From: Igor Mammedov > Sent: Friday, October 18, 2024 3:19 PM > To: Zhao Liu > Cc: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org; m...@redhat.com; m...@kernel.org; jean- > phili...@linaro.org; Jonathan Cameron > ; lpieral...@kernel.org; > peter.mayd...@linaro.org; richard.h

Re: [PATCH v2 07/20] tests/tcg/x86_64: Add cross-modifying code test

2024-10-22 Thread Ilya Leoshkevich
On Tue, 2024-10-22 at 13:36 -0700, Pierrick Bouvier wrote: > On 10/22/24 03:56, Alex Bennée wrote: > > From: Ilya Leoshkevich > > > > commit f025692c992c ("accel/tcg: Clear PAGE_WRITE before > > translation") > > fixed cross-modifying code handling, but did not add a test. The > > changed code wa

[PATCH v2] linux-user: Tolerate CONFIG_LSM_MMAP_MIN_ADDR

2024-10-22 Thread Ilya Leoshkevich
Running qemu-i386 on a system running with SELinux in enforcing mode (more precisely: s390x trixie container on Fedora 40) fails with: qemu-i386: tests/tcg/i386-linux-user/sigreturn-sigmask: Unable to find a guest_base to satisfy all guest address mapping requirements -

Re: [PATCH v2 07/20] tests/tcg/x86_64: Add cross-modifying code test

2024-10-22 Thread Pierrick Bouvier
On 10/22/24 17:16, Ilya Leoshkevich wrote: On Tue, 2024-10-22 at 13:36 -0700, Pierrick Bouvier wrote: On 10/22/24 03:56, Alex Bennée wrote: From: Ilya Leoshkevich commit f025692c992c ("accel/tcg: Clear PAGE_WRITE before translation") fixed cross-modifying code handling, but did not add a test

Re: [PATCH 2/3] vfio/migration: Refactor vfio_vmstate_change/_prepare() error reporting

2024-10-22 Thread Peter Xu
On Tue, Oct 22, 2024 at 04:42:14PM +0200, Cédric Le Goater wrote: > > So let me send a small patch later to hopefully make all these exported > > functions (including migration_file_set_error() in this case, logically > > anything in migration/misc.h) safe to be called without migration. > > OK.

[PATCH] linux-user/riscv: Fix definition of RISCV_HWPROBE_EXT_ZVFHMIN

2024-10-22 Thread Yao Zi
Current definition yields a negative 32bits value, messing up hwprobe result when Zvfhmin extension presents. Replace it by using a 1ULL bit shift value as done in kernel upstream. Link: https://github.com/torvalds/linux/commit/5ea6764d9095e234b024054f75ebbccc4f0eb146 Fixes: a3432cf227 ("linux-us

Re: [PATCH 1/2] migration: Make all helpers in misc.h safe to use without migration

2024-10-22 Thread Cédric Le Goater
On 10/22/24 18:07, Peter Xu wrote: Migration object can be freed before some other device codes run, while we do have a bunch of migration helpers exported in migration/misc.h that logically can be invoked at any time of QEMU, even during destruction of a VM. Make all these functions safe to be

Re: [PATCH 2/2] migration: Unexport dirty_bitmap_mig_init() in misc.h

2024-10-22 Thread Cédric Le Goater
On 10/22/24 18:07, Peter Xu wrote: It's only used within migration/, so it shouldn't be exported. Signed-off-by: Peter Xu Reviewed-by: Cédric Le Goater Thanks, C. --- include/migration/misc.h | 3 --- migration/migration.h| 4 2 files changed, 4 insertions(+), 3 deletions(

[PULL 7/9] qapi: add qom-path to BLOCK_IO_ERROR event

2024-10-22 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy We need something more reliable than "device" (which absent in modern interfaces) and "node-name" (which may absent, and actually don't specify the device, which is a source of error) to make a per-device throttling for the event in the following commit. Signed

[PULL 4/9] block/vdi.c: Make SECTOR_SIZE constant 64-bits

2024-10-22 Thread Kevin Wolf
From: Peter Maydell Make the VDI SECTOR_SIZE define be a 64-bit constant; this matches how we define BDRV_SECTOR_SIZE. The benefit is that it means that we don't need to carefully cast to 64-bits when doing operations like "n_sectors * SECTOR_SIZE" to avoid doing a 32x32->32 multiply, which migh

Re: [PATCH] migration: Deprecate query-migrationthreads command

2024-10-22 Thread Peter Xu
On Tue, Oct 22, 2024 at 01:40:37PM +0200, Markus Armbruster wrote: > If we want such warnings for QMP, they should be automated just like the > -compat actions. Any existing warnings rendered redundant should then > be taken out. I considered that when I did -compat, and rejected it as > not wort

[PULL 3/9] tests/qemu-iotests/211.out: Update to expect MapEntry 'compressed' field

2024-10-22 Thread Kevin Wolf
From: Peter Maydell In commit 52b10c9c0c68e90f in 2023 the QAPI MapEntry struct was updated to add a 'compressed' field. That commit updated a number of iotest expected-output files, but missed 211, which is vdi specific. The result is that ./check -vdi and more specifically ./check -vdi 211 fa

[PULL 5/9] iotests/backup-discard-source: convert size variable to be int

2024-10-22 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Make variable reusable in code for checks. Don't care to change "512 * 1024" invocations as they will be dropped in the next commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-ID: <20240620144402.65896-2-vsement...@yandex-team.ru> Reviewed-by: Kevin W

[PULL 8/9] block-backend: per-device throttling of BLOCK_IO_ERROR reports

2024-10-22 Thread Kevin Wolf
From: Leonid Kaplan BLOCK_IO_ERROR events comes from guest, so we must throttle them. We still want per-device throttling, so let's use device id as a key. Signed-off-by: Leonid Kaplan Signed-off-by: Vladimir Sementsov-Ogievskiy Message-ID: <20241002151806.592469-3-vsement...@yandex-team.ru> R

[PULL 9/9] raw-format: Fix error message for invalid offset/size

2024-10-22 Thread Kevin Wolf
s->offset and s->size are only set at the end of the function and still contain the old values when formatting the error message. Print the parameters with the new values that we actually checked instead. Fixes: 500e2434207d ('raw-format: Split raw_read_options()') Signed-off-by: Kevin Wolf Messa

[PULL 6/9] iotests/backup-discard-source: don't use actual-size

2024-10-22 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Relying on disk usage is bad thing, and test just doesn't work on XFS. Let's instead add a dirty bitmap to track writes to test image. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-ID: <20240620144402.65896-3-vsement...@yandex-team.ru> Reviewed-by: Kevi

[PULL 2/9] block/ssh.c: Don't double-check that characters are hex digits

2024-10-22 Thread Kevin Wolf
From: Peter Maydell In compare_fingerprint() we effectively check whether the characters in the fingerprint are valid hex digits twice: first we do so with qemu_isxdigit(), but then the hex2decimal() function also has a code path where it effectively detects an invalid digit and returns -1. This

[PULL 0/9] Block layer patches

2024-10-22 Thread Kevin Wolf
The following changes since commit 6f625ce2f21d6a1243065d236298277c56f972d5: Merge tag 'pull-request-2024-10-21' of https://gitlab.com/thuth/qemu into staging (2024-10-21 17:12:59 +0100) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-upstream for you to

[PULL 1/9] block/gluster: Use g_autofree for string in qemu_gluster_parse_json()

2024-10-22 Thread Kevin Wolf
From: Peter Maydell In the loop in qemu_gluster_parse_json() we do: char *str = NULL; for(...) { str = g_strdup_printf(...); ... if (various errors) { goto out; } ... g_free(str); str = NULL; } return 0; out:

Re: [PATCH v2 03/13] meson: pass rustc_args when building all crates

2024-10-22 Thread Zhao Liu
On Mon, Oct 21, 2024 at 06:35:28PM +0200, Paolo Bonzini wrote: > Date: Mon, 21 Oct 2024 18:35:28 +0200 > From: Paolo Bonzini > Subject: [PATCH v2 03/13] meson: pass rustc_args when building all crates > X-Mailer: git-send-email 2.46.2 > > rustc_args is needed to smooth the difference in warnings

[PULL 06/14] include/crypto: clarify @result/@result_len for hash/hmac APIs

2024-10-22 Thread Daniel P . Berrangé
The @result parameter passed to hash/hmac APIs may either contain a pre-allocated buffer, or a buffer can be allocated on the fly. Clarify these two different usage models in the API docs. Reviewed-by: Dorjoy Chowdhury Signed-off-by: Daniel P. Berrangé --- include/crypto/hash.h | 47 +++

[PULL 01/14] crypto: Remove unused DER string functions

2024-10-22 Thread Daniel P . Berrangé
From: "Dr. David Alan Gilbert" qcrypto_der_encode_octet_str_begin and _end have been unused since they were added in 3b34ccad66 ("crypto: Support DER encodings") Remove them. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrangé Signed-off-by: Daniel P. Berrangé --- crypto

[PULL 07/14] crypto/hash-afalg: Fix broken build

2024-10-22 Thread Daniel P . Berrangé
From: Markus Armbruster Fux build broken by semantic conflict with commit 8f525028bc6 (qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo). Fixes: 90c3dc60735a (crypto/hash-afalg: Implement new hash API) Signed-off-by: Markus Armbruster Signed-off-by: Daniel P. Berrangé --- crypto/hash-afalg.c

[PULL 04/14] crypto/hash: avoid overwriting user supplied result pointer

2024-10-22 Thread Daniel P . Berrangé
If the user provides a pre-allocated buffer for the hash result, we must use that rather than re-allocating a new buffer. Reported-by: Dorjoy Chowdhury Signed-off-by: Daniel P. Berrangé --- crypto/hash-gcrypt.c | 15 --- crypto/hash-glib.c | 11 +-- crypto/hash-gnutls.c |

Re: [PATCH v5 02/19] pc-bios/s390-ccw: Use the libc from SLOF and remove sclp prints

2024-10-22 Thread Thomas Huth
On 20/10/2024 03.29, jro...@linux.ibm.com wrote: From: Jared Rossi We are already using the libc from SLOF for the s390-netboot.img, and this libc implementation is way more complete and accurate than the simple implementation that we currently use for the s390-ccw.img binary. Since we are now

RE: [PATCH V1 3/4] hw/acpi: Reflect ACPI vCPU {present,enabled} states in ACPI _STA.{PRES,ENA} Bits

2024-10-22 Thread Salil Mehta via
Hi Gustavo, > From: Gustavo Romero > Sent: Monday, October 21, 2024 3:10 AM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org; m...@redhat.com > > Hi Salil, > > On 10/14/24 16:22, Salil Mehta wrote: > > Reflect the ACPI CPU hotplug `is_{present, enabled}` states in the >

Re: [PATCH] target/loongarch: Use physical cpu id about CSR CPUID for sysemu

2024-10-22 Thread maobibo
On 2024/10/23 上午2:54, Richard Henderson wrote: On 10/22/24 05:42, Bibo Mao wrote: For user tcg, there is no physical cpu id provided and logic cpuid is used. For system emulation, physical cpu id is provided, initial value of register CSR CPUID can be set from physical cpu id. Signed-off-by:

is there a guide on how to add command line options?

2024-10-22 Thread Sam Price
I would like a command line option to set register R5 for the microblaze on boot. -- Sincerely, Sam Price

[PATCH 1/2] migration: Make all helpers in misc.h safe to use without migration

2024-10-22 Thread Peter Xu
Migration object can be freed before some other device codes run, while we do have a bunch of migration helpers exported in migration/misc.h that logically can be invoked at any time of QEMU, even during destruction of a VM. Make all these functions safe to be called, especially, not crashing afte

[PATCH 0/2] Migration: Make misc.h helpers available for whole VM lifecycle

2024-10-22 Thread Peter Xu
This is a follow up of below patch from Avihai as a replacement: https://lore.kernel.org/qemu-devel/20241020130108.27148-3-avih...@nvidia.com/ It allows all misc.h exported helpers to be used for the whole VM lifecycle, so as to never crash QEMU with freed migration objects. I did also add some

[PATCH 2/2] migration: Unexport dirty_bitmap_mig_init() in misc.h

2024-10-22 Thread Peter Xu
It's only used within migration/, so it shouldn't be exported. Signed-off-by: Peter Xu --- include/migration/misc.h | 3 --- migration/migration.h| 4 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/migration/misc.h b/include/migration/misc.h index 8d6812b8c7..e0e

Re: [PATCH v2] linux-user: Trace rt_sigprocmask's sigsets

2024-10-22 Thread Richard Henderson
On 10/22/24 03:26, Ilya Leoshkevich wrote: Add a function for formatting target sigsets. It can be useful for other syscalls in the future, so put it into the beginning of strace.c. For simplicity, do not implement the strace's ~[] output syntax. Add a rt_sigprocmask return handler. Example out

[PULL 03/14] util: don't set SO_REUSEADDR on client sockets

2024-10-22 Thread Daniel P . Berrangé
Setting the SO_REUSEADDR property on a socket allows binding to a port number that is in the TIMED_WAIT state. This is usually done on listener sockets, to enable a server to restart itself without having to wait for the completion of TIMED_WAIT on the port. It is also possible, but highly unusual

[PULL 12/14] ui: fix handling of NULL SASL server data

2024-10-22 Thread Daniel P . Berrangé
The code is supposed to distinguish between SASL server data that is NULL, vs non-NULL but zero-length. It was incorrectly checking the 'serveroutlen' variable, rather than 'serverout' though, so failing to distinguish the cases. Fortunately we can fix this without breaking compatibility with clie

[PULL 02/14] sockets: Remove deadcode

2024-10-22 Thread Daniel P . Berrangé
From: "Dr. David Alan Gilbert" socket_remote_address hasn't been used since it was added in 17c55decec ("sockets: add helpers for creating SocketAddress from a socket") inet_connect hasn't been used since 2017's 8ecc2f9eab ("sheepdog: Use SocketAddress and socket_connect()") Remove them. S

[PULL 13/14] ui: validate NUL byte padding in SASL client data more strictly

2024-10-22 Thread Daniel P . Berrangé
When the SASL data is non-NULL, the SASL protocol spec requires that it is padded with a trailing NUL byte. QEMU discards the trailing byte, but does not currently validate that it was in fact a NUL. Apply strict validation to better detect any broken clients. Reviewed-by: Marc-André Lureau Signe

Re: [PATCH] gitlab: enable afalg tests in fedora system test

2024-10-22 Thread Cédric Le Goater
On 10/21/24 19:02, Daniel P. Berrangé wrote: The AF_ALG crypto integration for Linux is not being tested in any CI scenario. It always requires an explicit configure time flag to be passed to turn it on. The Fedora system test is arbitrarily picked as the place to test it. Signed-off-by: Daniel

Re: [PATCH] tcg/ppc/tcg-target.c.inc: Fix tcg_out_rlw_rc

2024-10-22 Thread Richard Henderson
On 10/22/24 06:34, Dani Szebenyi wrote: The previous message I sent was corrupted, sending again. The TCG IR sequence: mov_i32 tmp97,$0xc424dead: 1 pref=0x mov_i32 tmp98,$0x0 pref=0x rotr_i32 tmp97,tmp97,tmp98 dead: 1 2 pr

Re: [PATCH] linux-user: Fix build failure caused by missing __u64 on musl

2024-10-22 Thread Richard Henderson
On 10/22/24 05:29, Yao Zi wrote: Commit 9651cead2f ("linux-user: add openat2 support in linux-user") ships a definition of struct open_how_ver0 while assuming type __u64 is available in code, which is not the case when building QEMU on musl. Let's replaces __u64 with uint64_t. Fixes: 9651cead2f

Re: [PATCH] linux-user/riscv: Fix definition of RISCV_HWPROBE_EXT_ZVFHMIN

2024-10-22 Thread Richard Henderson
On 10/22/24 09:01, Yao Zi wrote: Current definition yields a negative 32bits value, messing up hwprobe result when Zvfhmin extension presents. Replace it by using a 1ULL bit shift value as done in kernel upstream. Link: https://github.com/torvalds/linux/commit/5ea6764d9095e234b024054f75ebbccc4f

[PULL 11/14] ui/vnc: don't check for SSF after SASL authentication on UNIX sockets

2024-10-22 Thread Daniel P . Berrangé
Although we avoid requesting an SSF when querying SASL mechanisms for a UNIX socket client, we still mistakenly checked for availability of an SSF once the SASL auth process is complete. Reviewed-by: Marc-André Lureau Signed-off-by: Daniel P. Berrangé --- ui/vnc-auth-sasl.c | 2 +- 1 file chang

[PULL 14/14] gitlab: enable afalg tests in fedora system test

2024-10-22 Thread Daniel P . Berrangé
The AF_ALG crypto integration for Linux is not being tested in any CI scenario. It always requires an explicit configure time flag to be passed to turn it on. The Fedora system test is arbitrarily picked as the place to test it. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed

[PULL 05/14] tests: correctly validate result buffer in hash/hmac tests

2024-10-22 Thread Daniel P . Berrangé
Validate that the pre-allocated buffer pointer was not overwritten by the hash/hmac APIs. Reviewed-by: Dorjoy Chowdhury Signed-off-by: Daniel P. Berrangé --- tests/unit/test-crypto-hash.c | 7 --- tests/unit/test-crypto-hmac.c | 6 -- 2 files changed, 8 insertions(+), 5 deletions(-) di

[PULL 09/14] ui/vnc: don't raise error formatting socket address for non-inet

2024-10-22 Thread Daniel P . Berrangé
The SASL library requires the connection's local & remote IP address to be passed in, since some mechanism may use this information. Currently QEMU raises an error for non-inet sockets, but it is valid to pass NULL to the SASL library. Doing so makes SASL work on UNIX sockets. Reviewed-by: Marc-An

[PULL 10/14] ui/vnc: fix skipping SASL SSF on UNIX sockets

2024-10-22 Thread Daniel P . Berrangé
The 'is_unix' flag is set on the VNC server during startup, however, a regression in: commit 8bd22f477f68bbd7a9c88e926e7a58bf65605e39 Author: Daniel P. Berrangé Date: Fri Feb 3 12:06:46 2017 + ui: extract code to connect/listen from vnc_display_open meant we stopped setting the

[PULL 08/14] ui/vnc: don't return an empty SASL mechlist to the client

2024-10-22 Thread Daniel P . Berrangé
The SASL initialization phase may determine that there are no valid mechanisms available to use. This may be because the host OS admin forgot to install some packages, or it might be because the requested SSF level is incompatible with available mechanisms, or other unknown reasons. If we return a

Re: [PATCH v6 0/3] Add support for the RAPL MSRs series

2024-10-22 Thread Igor Mammedov
On Tue, 22 Oct 2024 14:15:44 +0100 Daniel P. Berrangé wrote: > On Tue, Oct 22, 2024 at 02:46:15PM +0200, Igor Mammedov wrote: > > On Fri, 18 Oct 2024 13:59:34 +0100 > > Daniel P. Berrangé wrote: > > > > > On Fri, Oct 18, 2024 at 02:25:26PM +0200, Igor Mammedov wrote: > > > > On Wed, 16 Oct

Re: [PATCH v2] migration/dirtyrate: Silence warning about strcpy() on OpenBSD

2024-10-22 Thread Peter Xu
On Tue, Oct 22, 2024 at 08:34:02AM +0200, Thomas Huth wrote: > The linker on OpenBSD complains: > > ld: warning: dirtyrate.c:447 (../src/migration/dirtyrate.c:447)(...): > warning: strcpy() is almost always misused, please use strlcpy() > > It's currently not a real problem in this case since b

Re: [PATCH v6] hw/misc/aspeed_hace: Fix SG Accumulative hashing

2024-10-22 Thread Cédric Le Goater
On 10/22/24 13:54, Joel Stanley wrote: On Wed, 16 Oct 2024 at 01:23, Jamin Lin wrote: 3. Test HACE model with u-boot hash command a. load test file to address 8300 via tftp ast# tftp 8300 jamin_lin/32MB b. get sha256 ast# hash sha256 8300 200 sha256 for 8300 ... 84ff ==

Re: [PATCH 2/2] tests/tcg: Test that sigreturn() does not corrupt the signal mask

2024-10-22 Thread Richard Henderson
On 10/17/24 05:54, Ilya Leoshkevich wrote: Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/sigreturn-sigmask.c | 51 + 1 file changed, 51 insertions(+) create mode 100644 tests/tcg/multiarch/sigreturn-sigmask.c This

Re: [PATCH 0/2] linux-user/ppc: Fix sigmask endianness issue in sigreturn

2024-10-22 Thread Richard Henderson
On 10/17/24 05:54, Ilya Leoshkevich wrote: Hi, This series fixes an issue where an emulated ppc64le process running on s390x attempting to wake up a sigwait()ing thread would instead terminate itself. Patch 1 is the fix, patch 2 is a testcase extracted from the real-world scenario. Best regards

  1   2   3   4   >