Re: [PATCH v2 02/10] loongarch: reset vcpu after it's created

2025-02-25 Thread bibo mao
On 2025/2/8 上午12:20, Igor Mammedov wrote: Reseting vcpu before its thread is created, caused various issues in the past for other targets. It doesn't cause issues for loongarch at the moment but to be consistent with the rest of targets, move reset during realize time after qemu_init_vcpu().

Re: [PATCH] hw/i386: introduce x86_firmware_reconfigure api

2025-02-25 Thread Gerd Hoffmann
On Tue, Feb 25, 2025 at 09:10:40AM +0530, Ani Sinha wrote: > On Mon, Feb 24, 2025 at 9:01 PM Gerd Hoffmann wrote: > > > > Hi, > > > > > /* should only be called once */ > > > -if (ovmf_flash_parsed) { > > > +if (ovmf_flash_parsed && !force) { > > > > I think it makes more sense to c

RE: [PATCH v3 00/28] Support AST2700 A1

2025-02-25 Thread Jamin Lin
Hi Cedric, > Cc: Troy Lee > Subject: Re: [PATCH v3 00/28] Support AST2700 A1 > > On 2/20/25 06:11, Jamin Lin wrote: > > Hi Cedric, > > > >> Subject: Re: [PATCH v3 00/28] Support AST2700 A1 > >> > >> Hello Jamin, > >> > >> > >> On 2/13/25 04:35, Jamin Lin wrote: > >>> v1: > >>>1. Refactor IN

Re: [PATCH 09/15] rust: irq: wrap IRQState with Opaque<>

2025-02-25 Thread Zhao Liu
> +/// An opaque wrapper around [`bindings::IRQState`]. > +#[repr(transparent)] > +#[derive(Debug, qemu_api_macros::Wrapper)] > +pub struct IRQState(Opaque); > + > /// Interrupt sources are used by devices to pass changes to a value > (typically > /// a boolean). The interrupt sink is usually a

Re: [PATCH 05/10] qapi/parser: adjust info location for doc body section

2025-02-25 Thread Markus Armbruster
John Snow writes: > Instead of using the info object for the doc block as a whole (which > always points to the very first line of the block), update the info > pointer for each call to ensure_untagged_section when the existing > section is otherwise empty. This way, Sphinx error information will

Re: [PATCH 10/15] rust: qom: wrap Object with Opaque<>

2025-02-25 Thread Zhao Liu
> @@ -621,7 +629,7 @@ pub trait ObjectImpl: ObjectType + IsA { > /// We expect the FFI user of this function to pass a valid pointer that > /// can be downcasted to type `T`. We also expect the device is > /// readable/writeable from one thread at any time. > -unsafe extern "C" fn rust_unparent_

Re: [PATCH 09/15] rust: irq: wrap IRQState with Opaque<>

2025-02-25 Thread Paolo Bonzini
On 2/25/25 09:26, Zhao Liu wrote: +/// An opaque wrapper around [`bindings::IRQState`]. +#[repr(transparent)] +#[derive(Debug, qemu_api_macros::Wrapper)] +pub struct IRQState(Opaque); + /// Interrupt sources are used by devices to pass changes to a value (typically /// a boolean). The inter

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-25 Thread Gerd Hoffman
On Tue, Feb 25, 2025 at 10:51:08AM +0530, Ani Sinha wrote: > On Mon, Feb 24, 2025 at 9:17 PM Gerd Hoffman wrote: > > > > Works nicely for me. Test case: > > https://kraxel.gitlab.io/uefi-tools-rs/seabios.efi > > yeah if I can't get my unit test working we can make this an > integration test. o

Re: [PATCH 12/15] rust: sysbus: wrap SysBusDevice with Opaque<>

2025-02-25 Thread Zhao Liu
On Fri, Feb 21, 2025 at 06:03:39PM +0100, Paolo Bonzini wrote: > Date: Fri, 21 Feb 2025 18:03:39 +0100 > From: Paolo Bonzini > Subject: [PATCH 12/15] rust: sysbus: wrap SysBusDevice with Opaque<> > X-Mailer: git-send-email 2.48.1 > > Signed-off-by: Paolo Bonzini > --- > rust/hw/timer/hpet/src/h

Re: [PATCH v2 0/2] Emulated AMD IOMMU cleanup and fixes

2025-02-25 Thread Michael Tokarev
07.02.2025 07:53, Sairaj Kodilkar wrote: This series provides few bug fixes for emulated AMD IOMMU. The series is based on top of qemu upstream master commit d922088eb4ba. Patch 1: The code was using wrong DTE field to determine interrupt passthrough. Hence replaced it with correct fie

Re: [PATCH v2 0/9] target/loongarch: LoongArch32 fixes 1

2025-02-25 Thread bibo mao
On 2025/2/25 上午8:40, Jiaxun Yang wrote: Hi all, This series is a collection of small fixes I made to TCG for LoongArch32. There are still many thing broken, especially on CSRs. More series following. However this is sufficient to boot 32bit kernel. Is there any product introduction about Loo

Re: [PATCH 11/15] rust: qdev: wrap Clock and DeviceState with Opaque<>

2025-02-25 Thread Zhao Liu
> -unsafe extern "C" fn rust_realize_fn(dev: *mut DeviceState, > _errp: *mut *mut Error) { > +unsafe extern "C" fn rust_realize_fn( > +dev: *mut bindings::DeviceState, > +_errp: *mut *mut Error, > +) { > let state = NonNull::new(dev).unwrap().cast::(); > T::REALIZE.unwrap()(unsaf

Re: [PATCH 13/15] rust: memory: wrap MemoryRegion with Opaque<>

2025-02-25 Thread Zhao Liu
> impl MemoryRegion { > // inline to ensure that it is not included in tests, which only > @@ -174,13 +174,15 @@ pub fn init_io>( > size: u64, > ) { > unsafe { > -Self::do_init_io(&mut self.inner, owner.cast::(), > &ops.0, name, size); > +Self::

Re: [PATCH v7 05/52] i386/tdx: Get tdx_capabilities via KVM_TDX_CAPABILITIES

2025-02-25 Thread Xiaoyao Li
On 2/19/2025 3:21 AM, Francesco Lavra wrote: On Fri, 24 Jan 2025 08:20:01 -0500, Xiaoyao Li wrote: diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c index 4ff94860815d..bd212abab865 100644 --- a/target/i386/kvm/tdx.c +++ b/target/i386/kvm/tdx.c @@ -10,17 +10,122 @@ */ #include "

Re: [RFC 1/2] system/memory: Allow creating IOMMU mappings from RAM discard populate notifiers

2025-02-25 Thread David Hildenbrand
On 25.02.25 03:00, Chenyi Qiang wrote: On 2/21/2025 6:04 PM, Chenyi Qiang wrote: On 2/21/2025 4:09 PM, David Hildenbrand wrote: On 21.02.25 03:25, Chenyi Qiang wrote: On 2/21/2025 3:39 AM, David Hildenbrand wrote: On 20.02.25 17:13, Jean-Philippe Brucker wrote: For Arm CCA we'd like th

Re: [PATCH 09/15] rust: irq: wrap IRQState with Opaque<>

2025-02-25 Thread Zhao Liu
On Tue, Feb 25, 2025 at 09:28:52AM +0100, Paolo Bonzini wrote: > Date: Tue, 25 Feb 2025 09:28:52 +0100 > From: Paolo Bonzini > Subject: Re: [PATCH 09/15] rust: irq: wrap IRQState with Opaque<> > > On 2/25/25 09:26, Zhao Liu wrote: > > > +/// An opaque wrapper around [`bindings::IRQState`]. > > >

Re: [PATCH v3 03/14] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-02-25 Thread Igor Mammedov
On Fri, 21 Feb 2025 07:02:21 +0100 Mauro Carvalho Chehab wrote: > Em Mon, 3 Feb 2025 15:34:23 +0100 > Igor Mammedov escreveu: > > > On Fri, 31 Jan 2025 18:42:44 +0100 > > Mauro Carvalho Chehab wrote: > > > > > There are two pointers that are needed during error injection: > > > > > > 1. Th

Re: [PATCH v2] vhost-user-snd: correct the calculation of config_size

2025-02-25 Thread Michael Tokarev
17.02.2025 17:07, Stefano Garzarella wrote: On Mon, Feb 17, 2025 at 02:12:55PM +0100, Matias Ezequiel Vara Larsen wrote: Use virtio_get_config_size() rather than sizeof(struct virtio_snd_config) for the config_size in the vhost-user-snd frontend. The frontend shall rely on device features for th

[PATCH] chardev: use remoteAddr if the chardev is client

2025-02-25 Thread Haoqian He
If the chardev is client, the socket file path in localAddr may be NULL. This is because the socket path comes from getsockname(), according to man page, getsockname() returns the current address bound by the socket sockfd. If the chardev is client, it's socket is unbound sockfd. Therefore, when c

Re: [PATCH v4] vfio: Add property documentation

2025-02-25 Thread Anthony Krowiak
On 2/17/25 12:34 PM, Cédric Le Goater wrote: Investigate the git history to uncover when and why the VFIO properties were introduced and update the models. This is mostly targeting vfio-pci device, since vfio-platform, vfio-ap and vfio-ccw devices are simpler. Sort the properties based on th

Re: [PATCH v2] vhost-user-snd: correct the calculation of config_size

2025-02-25 Thread Stefano Garzarella
On Tue, 25 Feb 2025 at 10:40, Michael Tokarev wrote: > > 17.02.2025 17:07, Stefano Garzarella wrote: > > On Mon, Feb 17, 2025 at 02:12:55PM +0100, Matias Ezequiel Vara Larsen wrote: > >> Use virtio_get_config_size() rather than sizeof(struct > >> virtio_snd_config) for the config_size in the vhost

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-25 Thread Gerd Hoffman
Hi, > > See > > https://lore.kernel.org/qemu-devel/20250219071431.50626-2-kra...@redhat.com/ > > After looking at it, it seems to me that data will be in host byte order > and guest has no idea what that is. > Probably it should advertise byteorder as part of the structure, > and guest side sh

Re: [PATCH 14/15] rust: chardev: wrap Chardev with Opaque<>

2025-02-25 Thread Zhao Liu
On Fri, Feb 21, 2025 at 06:03:41PM +0100, Paolo Bonzini wrote: > Date: Fri, 21 Feb 2025 18:03:41 +0100 > From: Paolo Bonzini > Subject: [PATCH 14/15] rust: chardev: wrap Chardev with Opaque<> > X-Mailer: git-send-email 2.48.1 > > Signed-off-by: Paolo Bonzini > --- > rust/qemu-api/src/bindings.r

Re: [PATCH 15/15] rust: bindings: remove more unnecessary Send/Sync impls

2025-02-25 Thread Zhao Liu
On Fri, Feb 21, 2025 at 06:03:42PM +0100, Paolo Bonzini wrote: > Date: Fri, 21 Feb 2025 18:03:42 +0100 > From: Paolo Bonzini > Subject: [PATCH 15/15] rust: bindings: remove more unnecessary Send/Sync > impls > X-Mailer: git-send-email 2.48.1 > > Send and Sync are now implemented on the opaque wr

Re: [PATCH] QIOChannelSocket: Flush zerocopy socket error queue on ENOBUF failure for sendmsg

2025-02-25 Thread Daniel P . Berrangé
On Fri, Feb 21, 2025 at 04:44:48AM -0500, Manish Mishra wrote: > We allocate extra metadata SKBs in case of zerocopy send. This metadata memory > is accounted for in the OPTMEM limit. If there is any error with sending > zerocopy data or if zerocopy was skipped, these metadata SKBs are queued in >

Re: [PATCH] hw/virtio/virtio-nsm: Respond with correct length

2025-02-25 Thread Michael Tokarev
13.02.2025 14:45, Alexander Graf wrote: When we return a response packet from NSM, we need to indicate its length according to the content of the response. Prior to this patch, we returned the length of the source buffer, which may confuse guest code that relies on the response size. Fix it by r

Re: [PATCH] hw/virtio/virtio-nsm: Respond with correct length

2025-02-25 Thread Michael Tokarev
25.02.2025 12:32, Michael Tokarev wrote: This looks like qemu-stable material (9.2.x). Ah, it is already Cc'd to qemu-stable@, -- n/m.

Re: Seeking help on implementing sync over ivshmem shared memory

2025-02-25 Thread Alex Bennée
Jayakrishnan A writes: > Hi Team , > > Seeking help on implementing sync over ivshmem shared memory , As part of > internal project we could able to achieve > shared ivshmem with doorbell mechanism ,But in order to achieve shared memory > synchronisation we are trying to add > atomic operation

Re: [PATCH 1/5] hw/pci: Basic support for PCI power management

2025-02-25 Thread Eric Auger
Hi Alex, On 2/25/25 6:24 AM, Alex Williamson wrote: > On Mon, 24 Feb 2025 20:03:56 +0100 > Eric Auger wrote: > >> Hi Alex, >> >> On 2/20/25 11:48 PM, Alex Williamson wrote: >>> The memory and IO BARs for devices are only accessible in the D0 >>> power state. In other power states the PCI spec d

Re: [PATCH v2] vdpa: Fix endian bugs in shadow virtqueue

2025-02-25 Thread Michael Tokarev
12.02.2025 19:49, Konstantin Shkolnyy wrote: VDPA didn't work on a big-endian machine due to missing/incorrect CPU<->LE data format conversions. Signed-off-by: Konstantin Shkolnyy This looks like a qemu-stable material. Please let me know if it is not. Thanks, /mjt

Re: [PATCH 13/15] rust: memory: wrap MemoryRegion with Opaque<>

2025-02-25 Thread Paolo Bonzini
On 2/25/25 10:14, Zhao Liu wrote: impl MemoryRegion { // inline to ensure that it is not included in tests, which only @@ -174,13 +174,15 @@ pub fn init_io>( size: u64, ) { unsafe { -Self::do_init_io(&mut self.inner, owner.cast::(), &ops.0, name, siz

Re: [PATCH v7 08/52] i386/tdx: Initialize TDX before creating TD vcpus

2025-02-25 Thread Xiaoyao Li
On 2/19/2025 6:14 PM, Francesco Lavra wrote: On Fri, 2025-01-24 at 08:20 -0500, Xiaoyao Li wrote: diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 45867dbe0839..e35a9fbd687e 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -540,8 +540,15 @@ int kvm_init_vcpu(CPUState *cp

Re: [PATCH 5/5] ui/console-vc: implement DCH (delete) and ICH (insert) commands

2025-02-25 Thread Roman Penyaev
On Mon, Feb 24, 2025 at 8:25 AM Marc-André Lureau wrote: > > Hi > > On Sun, Feb 23, 2025 at 6:56 PM Roman Penyaev wrote: > > > > This patch implements DCH (delete character) and ICH (insert > > character) commands. > > > > DCH - Delete Character: > >"As characters are deleted, the remaining c

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-25 Thread Ani Sinha
On Tue, Feb 25, 2025 at 2:09 PM Gerd Hoffman wrote: > > On Tue, Feb 25, 2025 at 10:51:08AM +0530, Ani Sinha wrote: > > On Mon, Feb 24, 2025 at 9:17 PM Gerd Hoffman wrote: > > > > > > Works nicely for me. Test case: > > > https://kraxel.gitlab.io/uefi-tools-rs/seabios.efi > > > > yeah if I can'

Re: [PATCH v3 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-25 Thread Igor Mammedov
On Fri, 21 Feb 2025 10:21:27 + Jonathan Cameron wrote: > On Fri, 21 Feb 2025 07:38:23 +0100 > Mauro Carvalho Chehab wrote: > > > Em Mon, 3 Feb 2025 16:22:36 +0100 > > Igor Mammedov escreveu: > > > > > On Mon, 3 Feb 2025 11:09:34 + > > > Jonathan Cameron wrote: > > > > > > > On

Re: Problem with iotest 233

2025-02-25 Thread Kevin Wolf
Am 25.02.2025 um 08:20 hat Thomas Huth geschrieben: > > Hi! > > I'm facing a weird hang in iotest 233 on my Fedora 41 laptop. When running > > ./check -raw 233 > > the test simply hangs. Looking at the log, the last message is "== check > plain client to TLS server fails ==". I added some deb

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-25 Thread Gerd Hoffman
Hi, > > Part of the verification process can be that you already copy the > > firmware to a host buffer. > > I think we decided early on that we would not want to do that - that > is consume extra memory on the host side for boot components. Fine with me, was just an idea, certainly not critic

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-25 Thread Igor Mammedov
On Mon, 24 Feb 2025 16:47:31 +0100 Gerd Hoffman wrote: > On Fri, Feb 14, 2025 at 09:04:07PM +0530, Ani Sinha wrote: > > VM firmware update is a mechanism where the virtual machines can use their > > preferred and trusted firmware image in their execution environment without > > having to depend o

qemu-devel@nongnu.org

2025-02-25 Thread Igor Mammedov
On Fri, 7 Feb 2025 17:20:38 +0100 Igor Mammedov wrote: > Changelog: > * drop wire/unwire hooks patches > * drop unrealize related patches > * include fixed up patches from >[PATCH 0/6] tcg: fix qemu crash when add assert_cpu_is_self() is > enabled > and cleanups related to

[PATCH 08/10] plugins/api: split out the vaddr/hwaddr helpers

2025-02-25 Thread Alex Bennée
These only work for system-mode and are NOPs for user-mode. Signed-off-by: Alex Bennée --- plugins/api-system.c | 58 plugins/api-user.c | 40 + plugins/api.c| 70 plugins/meson.bu

[PATCH 04/10] plugins/api: clean-up the includes

2025-02-25 Thread Alex Bennée
Thanks to re-factoring and clean-up work (especially to exec-all) we no longer need such broad headers for the api. Signed-off-by: Alex Bennée --- plugins/api.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/api.c b/plugins/api.c index 10b258b08d..3e1aac7bfb 100644 --- a/plugins/a

[PATCH 01/10] plugins/api: use tcg_ctx to get TARGET_PAGE_MASK

2025-02-25 Thread Alex Bennée
Requiring TARGET_PAGE_MASK to be defined gets in the way of building this unit once. As tcg_ctx has the value lets use it. Signed-off-by: Alex Bennée --- plugins/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/api.c b/plugins/api.c index cf8cdf076a..10b258b08d 1

[PATCH 10/10] plugins/api: build only once

2025-02-25 Thread Alex Bennée
Now all the softmmu/user-mode stuff has been split out we can build this compilation unit only once. Signed-off-by: Alex Bennée --- plugins/api.c | 11 --- plugins/meson.build | 3 +-- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/plugins/api.c b/plugins/api.c ind

[PATCH 05/10] plugins/plugin.h: include queue.h

2025-02-25 Thread Alex Bennée
Headers should bring in what they need so don't rely on getting queue.h by side effects. This will help with clean-ups in the following patches. Signed-off-by: Alex Bennée --- plugins/plugin.h | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/plugin.h b/plugins/plugin.h index 30e2299a5

[PATCH 00/10] plugins: reduce total number of build objects

2025-02-25 Thread Alex Bennée
As we move towards a more modular build this series converts both loader and api to build once objects. For both objects the only real difference is between user mode and system emulation so those bits have been hived off into those source sets. The remaining core plugin is more intimately aligned

[PATCH 02/10] plugins/loader: populate target_name with target_name()

2025-02-25 Thread Alex Bennée
We have a function we can call for this, lets not rely on macros that stop us building once. Signed-off-by: Alex Bennée --- plugins/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/loader.c b/plugins/loader.c index 99686b5466..827473c8b6 100644 --- a/plugins/l

[PATCH 03/10] include/qemu: plugin-memory.h doesn't need cpu-defs.h

2025-02-25 Thread Alex Bennée
hwaddr is a fixed size on all builds. Signed-off-by: Alex Bennée --- include/qemu/plugin-memory.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/qemu/plugin-memory.h b/include/qemu/plugin-memory.h index 71c1123308..6065ec7aaf 100644 --- a/include/qemu/plugin-memory.h +++ b/include/qe

[PATCH 07/10] plugins/api: split out binary path/start/end/entry code

2025-02-25 Thread Alex Bennée
To move the main api.c to a single build compilation object we need to start splitting out user and system specific code. As we need to grob around host headers we move these particular helpers into the *-user mode directories. The binary/start/end/entry helpers are all NOPs for system mode. Sign

[PATCH 06/10] plugins/loader: compile loader only once

2025-02-25 Thread Alex Bennée
There is very little in loader that is different between builds save for a tiny user/system mode difference in the plugin_info structure. Create two new files, user and system to hold mode specific helpers and move loader into common_ss. Signed-off-by: Alex Bennée --- plugins/plugin.h| 6 ++

[PATCH 09/10] plugins/api: split out time control helpers

2025-02-25 Thread Alex Bennée
These are only usable in system mode where we control the timer. For user-mode make them NOPs. Signed-off-by: Alex Bennée --- plugins/api-system.c | 34 ++ plugins/api-user.c | 17 + plugins/api.c| 41 -

Re: [PATCH v2] hw/misc/macio/gpio.c: Add constants for register bits

2025-02-25 Thread Mark Cave-Ayland
On 24/02/2025 14:10, BALATON Zoltan wrote: Add named constants for register bit values that should make it easier to understand what these mean. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/misc/macio/gpio.c | 19 --- 1 file changed, 12 insertion

[PATCH V4] migration: ram block cpr blockers

2025-02-25 Thread Steve Sistare
Unlike cpr-reboot mode, cpr-transfer mode cannot save volatile ram blocks in the migration stream file and recreate them later, because the physical memory for the blocks is pinned and registered for vfio. Add a blocker for volatile ram blocks. Also add a blocker for RAM_GUEST_MEMFD. Preserving

[PATCH v1] virtio-gpu-virgl: Correct virgl_cmd_context_create()

2025-02-25 Thread liweishi
From: Weishi Li Due to the fact that g->parent_obj.conf only adds VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED setting when VIRGL_VERSION_MAJOR >= 1, virgl_cmd_comtext_create() will always return by error=VIRTIO_GPU_RESP_ERR_UNSPEC when VIRGL_VERSION_MAJOR < 1, resulting in gl context initialization fail

RE: [PATCH v3 01/28] hw/intc/aspeed: Support setting different memory and register size

2025-02-25 Thread Jamin Lin
Hi Cedric, > >> and the register array as: > >> > >> uint32_t regs[ASPEED_INTC_NR_REGS]; > >> > >> The number of regs looks pretty big for me. Are the registers > >> covering the whole MMIO aperture ? > >> > > According to the datasheet, the entire register address space size of > > INTC (CPU

[PATCH v2 2/5] pci: Use PCI PM capability initializer

2025-02-25 Thread Alex Williamson
Switch callers directly initializing the PCI PM capability with pci_add_capability() to use pci_pm_init(). Cc: Dmitry Fleytman Cc: Akihiko Odaki Cc: Jason Wang Cc: Stefan Weil Cc: Sriram Yagnaraman Cc: Keith Busch Cc: Klaus Jensen Cc: Jesper Devantier Cc: Michael S. Tsirkin Cc: Marcel Apf

[PATCH v2 3/5] vfio/pci: Delete local pm_cap

2025-02-25 Thread Alex Williamson
This is now redundant to PCIDevice.pm_cap. Cc: Cédric Le Goater Reviewed-by: Zhenzhong Duan Reviewed-by: Eric Auger Signed-off-by: Alex Williamson --- hw/vfio/pci.c | 9 - hw/vfio/pci.h | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c

Re: [PATCH] hw/misc/macio: Improve trace logs

2025-02-25 Thread Mark Cave-Ayland
On 22/02/2025 12:28, BALATON Zoltan wrote: Add macio_gpio_read trace event and use that in macio_gpio_read() instead of macio_gpio_write. Also change log message to match macio_timer_{read,write}. Signed-off-by: BALATON Zoltan --- hw/misc/macio/gpio.c | 2 +- hw/misc/macio/trace-event

Re: [PATCH] chardev: use remoteAddr if the chardev is client

2025-02-25 Thread Haoqian He
> 2025年2月25日 21:29,Marc-André Lureau 写道: > > Hi Haoqian > > On Tue, Feb 25, 2025 at 5:19 PM Haoqian He wrote: >> >> I use chardev to connect with a vhost-user target, the chardev backend type >> is >> socket, part of QEMU boot parameter: >> -device vhost-user-blk-pci,chardev=my-vhost-blk-0

Re: [PATCH v3 012/162] tcg: Convert or to TCGOutOpBinary

2025-02-25 Thread Philippe Mathieu-Daudé
On 17/2/25 00:07, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/tcg.c| 4 +++ tcg/aarch64/tcg-target.c.inc | 31 - tcg/arm/tcg-target.c.inc | 24 tcg/i386/tcg-target.c.inc| 25 +

Re: [PATCH 03/10] qapi: delete un-needed python static analysis configs

2025-02-25 Thread Markus Armbruster
John Snow writes: > The pylint config is being left in place because the settings differ > enough from the python/ directory settings that we need a chit-chat on > how to merge them O:-) > > Everything else can go. > > Signed-off-by: John Snow > --- > scripts/qapi/.flake8| 3 --- > scripts/

Re: [PATCH v2] qapi: pluggable backend code generators

2025-02-25 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Feb 25, 2025 at 01:31:56PM +0100, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >> > The 'qapi.backend.QAPIBackend' class defines an API contract for code >> > generators. The current generator is put into a new class >> > 'qapi.backend.QAPICBack

Re: [PATCH v5 14/24] hw/uefi: add var-service-json.c + qapi for NV vars.

2025-02-25 Thread Gerd Hoffmann
Hi, > > +# @data: variable value, encoded as hex string. > > I understand this is a blob. We commonly use base64 for that. Why not > here? It's an existing format already supported by other tools. Guess I should add that to the preamble. > > +# @digest: variable certificate digest. Used t

Re: [PATCH v3 017/162] tcg: Convert xor to TCGOutOpBinary

2025-02-25 Thread Philippe Mathieu-Daudé
On 17/2/25 00:07, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/tcg.c| 4 +++ tcg/aarch64/tcg-target.c.inc | 31 +++- tcg/arm/tcg-target.c.inc | 25 +++- tcg/i386/tcg-target.c.inc| 27 --

[PATCH v4 6/6] migration: Add qtest for migration over RDMA

2025-02-25 Thread Li Zhijian via
This qtest requires there is a RDMA(RoCE) link in the host. In order to make the test work smoothly, introduce a scripts/rdma-migration-helper.sh to - setup a new Soft-RoCE(aka RXE) if it's root - detect existing RoCE link Test will be skipped if there is no available RoCE link. # Start of rdma t

[PATCH v4 2/6] migration: check RDMA and capabilities are compatible on both sides

2025-02-25 Thread Li Zhijian via
Depending on the order of starting RDMA and setting capability, the following scenarios can be categorized into the following scenarios: Source: S1: [set capabilities] -> [Start RDMA outgoing] Destination: D1: [set capabilities] -> [Start RDMA incoming] D2: [Start RDMA incoming] -> [set capabili

[PATCH v4 0/6] migration/rdma: fixes, refactor and cleanup

2025-02-25 Thread Li Zhijian via
- It fix the RDMA migration broken issue - disable RDMA + postcopy - some cleanups - Add a qtest for RDMA at last Changes since V3: - check RDMA and capabilities are compatible on both sides # renamed from previous V3's "migration: Add migration_capabilities_and_transport_compatible()" Changes

[PATCH v4 4/6] migration/rdma: Remove redundant migration_in_postcopy checks

2025-02-25 Thread Li Zhijian via
Since we have disabled RDMA + postcopy, it's safe to remove the migration_in_postcopy() that follows the migrate_rdma(). Signed-off-by: Li Zhijian --- V3: reorder: 7th->4th --- migration/rdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/rdma.c b/migrati

[PATCH v4 5/6] migration: Unfold control_save_page()

2025-02-25 Thread Li Zhijian via
control_save_page() is for RDMA only, unfold it to make the code more clear. In addition: - Similar to other branches style in ram_save_target_page(), involve RDMA only if the condition 'migrate_rdma()' is true. - Further simplify the code by removing the RAM_SAVE_CONTROL_NOT_SUPP. Signed-off

[PATCH v4 1/6] migration: Prioritize RDMA in ram_save_target_page()

2025-02-25 Thread Li Zhijian via
Address an error in RDMA-based migration by ensuring RDMA is prioritized when saving pages in `ram_save_target_page()`. Previously, the RDMA protocol's page-saving step was placed after other protocols due to a refactoring in commit bc38dc2f5f3. This led to migration failures characterized by unkn

Re: [PATCH v2 5/8] migration: Add migration_capabilities_and_transport_compatible() helper

2025-02-25 Thread Zhijian Li (Fujitsu)
On 25/02/2025 22:48, Peter Xu wrote: > On Tue, Feb 25, 2025 at 06:37:21AM +, Zhijian Li (Fujitsu) wrote: >> >> >> On 25/02/2025 03:58, Peter Xu wrote: >>> On Fri, Feb 21, 2025 at 02:36:09PM +0800, Li Zhijian wrote: Similar to migration_channels_and_transport_compatible(), introduce a >>>

Re: [PATCH v2 04/18] hw/arm: Add i.MX 8M Plus EVK board

2025-02-25 Thread Bernhard Beschow
Am 25. Februar 2025 17:00:53 UTC schrieb Peter Maydell : >On Tue, 25 Feb 2025 at 15:42, Peter Maydell wrote: >> The C compiler for the OpenSUSE CI job doesn't seem to like this: >> https://gitlab.com/pm215/qemu/-/jobs/9239416833 >> >> ../hw/arm/fsl-imx8mp.c: In function ‘fsl_imx8mp_realize’: >

RE: [PATCH v3 15/28] hw/misc/aspeed_scu: Fix the revision ID cannot be set in the SOC layer for AST2700

2025-02-25 Thread Jamin Lin
Hi Cedric, > > On 2/13/25 04:35, Jamin Lin wrote: > > According to the design of the AST2600, it has a Silicon Revision ID > > Register, specifically SCU004 and SCU014, to set the Revision ID for the > AST2600. > > For the AST2600 A3, SCU004 is set to 0x05030303 and SCU014 is set to > 0x05030303

[PATCH v4 3/6] migration: disable RDMA + postcopy-ram

2025-02-25 Thread Li Zhijian via
It's believed that RDMA + postcopy-ram has been broken for a while. Rather than spending time re-enabling it, let's simply disable it as a trade-off. Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V3: - collect Reviewed tag - reoder: 6th -> 3th --- migration/options.c | 4 1 file

Re: Problem with iotest 233

2025-02-25 Thread Thomas Huth
On 25/02/2025 22.00, Thomas Huth wrote: On 25/02/2025 21.35, Thomas Huth wrote: On 25/02/2025 18.57, Daniel P. Berrangé wrote: On Tue, Feb 25, 2025 at 06:52:43PM +0100, Thomas Huth wrote: On 25/02/2025 18.44, Thomas Huth wrote: On 25/02/2025 11.12, Kevin Wolf wrote: Am 25.02.2025 um 08:20 ha

Re: [PATCH v5 14/24] hw/uefi: add var-service-json.c + qapi for NV vars.

2025-02-25 Thread Markus Armbruster
Gerd Hoffmann writes: > Define qapi schema for the uefi variable store state. > > Use it and the generated visitor helper functions to store persistent > (EFI_VARIABLE_NON_VOLATILE) variables in JSON format on disk. > > Signed-off-by: Gerd Hoffmann [...] > diff --git a/qapi/meson.build b/qapi/

[PATCH] tests/functional: Replace the ppc64 e500 advent calendar test

2025-02-25 Thread Cédric Le Goater
Replace the advent calendar test with a buildroot image built with qemu_ppc64_e5500_defconfig. Boot a ppce500 machine from kernel and disk, test network and poweroff. Add '-no-shutdown' to the command line to avoid exiting from QEMU as it seems to bother the functional framework. Signed-off-by: Cé

[PATCH] tests/functional: Update the ppc64 pseries and pnv tests

2025-02-25 Thread Cédric Le Goater
The tests are using a now archived Fedora29 release. Switch to the most recent Fedora41 release. Signed-off-by: Cédric Le Goater --- tests/functional/test_ppc64_powernv.py | 6 +++--- tests/functional/test_ppc64_pseries.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 4/4] target/arm: Retry pushing CPER error if necessary

2025-02-25 Thread Gavin Shan
On 2/21/25 9:04 PM, Jonathan Cameron wrote: On Fri, 21 Feb 2025 15:27:36 +1000 Gavin Shan wrote: [...] I would say #1 is the ideal model because the read_ack_register is the bottleneck and it should be scaled up to max_cpus. In that way, the bottleneck can be avoided from the bottom. An

Re: [PATCH v5 19/36] vfio/migration: Convert bytes_transferred counter to atomic

2025-02-25 Thread Cédric Le Goater
On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" So it can be safety accessed from multiple threads. This variable type needs to be changed to unsigned long since 32-bit host platforms lack the necessary addition atomics on 64-bit variables. Using 32-bit counters on 32

Re: [PATCH] tests/functional: Update the ppc64 pseries and pnv tests

2025-02-25 Thread Cédric Le Goater
On 2/26/25 08:01, Thomas Huth wrote: On 26/02/2025 07.54, Cédric Le Goater wrote: The tests are using a now archived Fedora29 release. Switch to the most recent Fedora41 release. Signed-off-by: Cédric Le Goater ---   tests/functional/test_ppc64_powernv.py | 6 +++---   tests/functional/test_ppc

Re: [PATCH] hw/gpio: npcm7xx: fixup out-of-bounds access

2025-02-25 Thread Philippe Mathieu-Daudé
On 26/2/25 03:46, Patrick Venture wrote: The reg isn't validated to be a possible register before it's dereferenced for one case. The mmio space registered for the gpio device is 4KiB but there aren't that many registers in the struct. Google-Bug-Id: 397469048 Change-Id: I2fb8d0d3d41422baab22e8

Re: [PATCH] tests/functional: Update the ppc64 pseries and pnv tests

2025-02-25 Thread Thomas Huth
On 26/02/2025 07.54, Cédric Le Goater wrote: The tests are using a now archived Fedora29 release. Switch to the most recent Fedora41 release. Signed-off-by: Cédric Le Goater --- tests/functional/test_ppc64_powernv.py | 6 +++--- tests/functional/test_ppc64_pseries.py | 6 +++--- 2 files cha

Re: [PATCH] tests/functional: Replace the ppc64 e500 advent calendar test

2025-02-25 Thread Thomas Huth
On 26/02/2025 07.50, Cédric Le Goater wrote: Replace the advent calendar test with a buildroot image built with qemu_ppc64_e5500_defconfig. When picking this up, I'll add a "Unlike the advent calendar image, this newer buildroot image supports networking, too, so we can check whether it gets

Re: [PATCH v2 02/10] loongarch: reset vcpu after it's created

2025-02-25 Thread Philippe Mathieu-Daudé
On 7/2/25 17:20, Igor Mammedov wrote: Reseting vcpu before its thread is created, caused various issues in the past for other targets. It doesn't cause issues for loongarch at the moment but to be consistent with the rest of targets, move reset during realize time after qemu_init_vcpu(). That ba

Re: [PATCH v2 03/10] m68k: reset vcpu after it's created

2025-02-25 Thread Philippe Mathieu-Daudé
On 7/2/25 17:20, Igor Mammedov wrote: Reseting vcpu before its thread is created, caused various issues in the past for other targets. It doesn't cause issues for m68k at the moment but to be consistent with the rest of targets, move reset during realize time after qemu_init_vcpu(). That basical

qemu-devel@nongnu.org

2025-02-25 Thread Philippe Mathieu-Daudé
On 7/2/25 17:20, Igor Mammedov wrote: cpu_list_add() was doing 2 distinct things: - assign some index to vCPU - add unrealized (thus in inconsistent state) vCPU to &cpus_queue Code using CPU_FOREACH() macro would iterate over possibly unrealized vCPUs, often dealt with special casing. Instead o

Re: [PATCH 4/4] target/arm: Retry pushing CPER error if necessary

2025-02-25 Thread Gavin Shan
On 2/25/25 9:19 PM, Igor Mammedov wrote: On Fri, 21 Feb 2025 11:04:35 + Jonathan Cameron wrote: Ideally I'd like whatever we choose to look like what a bare metal machine does - mostly because we are less likely to hit untested OS paths. Ack for that but, that would need someone from hw/

Re: [PATCH 03/10] qapi: delete un-needed python static analysis configs

2025-02-25 Thread Markus Armbruster
Markus Armbruster writes: > John Snow writes: > >> The pylint config is being left in place because the settings differ >> enough from the python/ directory settings that we need a chit-chat on >> how to merge them O:-) >> >> Everything else can go. >> >> Signed-off-by: John Snow > > I tried to

[PATCH v3 2/6] migration: Add migration_capabilities_and_transport_compatible() helper

2025-02-25 Thread Li Zhijian via
Similar to migration_channels_and_transport_compatible(), introduce a new helper migration_capabilities_and_transport_compatible() to check if the capabilites is compatible with the transport. Currently, only move the capabilities vs RDMA transport to this function. Reviewed-by: Peter Xu Signed-

[PATCH v3 6/6] migration: Add qtest for migration over RDMA

2025-02-25 Thread Li Zhijian via
This qtest requires there is a RDMA(RoCE) link in the host. In order to make the test work smoothly, introduce a scripts/rdma-migration-helper.sh to - setup a new Soft-RoCE(aka RXE) if it's root - detect existing RoCE link Test will be skipped if there is no available RoCE link. # Start of rdma t

[PATCH v3 5/6] migration: Unfold control_save_page()

2025-02-25 Thread Li Zhijian via
control_save_page() is for RDMA only, unfold it to make the code more clear. In addition: - Similar to other branches style in ram_save_target_page(), involve RDMA only if the condition 'migrate_rdma()' is true. - Further simplify the code by removing the RAM_SAVE_CONTROL_NOT_SUPP. Signed-off

[PATCH v3 1/6] migration: Prioritize RDMA in ram_save_target_page()

2025-02-25 Thread Li Zhijian via
Address an error in RDMA-based migration by ensuring RDMA is prioritized when saving pages in `ram_save_target_page()`. Previously, the RDMA protocol's page-saving step was placed after other protocols due to a refactoring in commit bc38dc2f5f3. This led to migration failures characterized by unkn

[PATCH v3 3/6] migration: disable RDMA + postcopy-ram

2025-02-25 Thread Li Zhijian via
It's believed that RDMA + postcopy-ram has been broken for a while. Rather than spending time re-enabling it, let's simply disable it as a trade-off. Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V3: - collect Reviewed tag - reoder: 6th -> 3th --- migration/migration.c | 4 1 fil

[PATCH v3 0/6] migration/rdma: fixes, refactor and cleanup

2025-02-25 Thread Li Zhijian via
- It fix the RDMA migration broken issue - disable RDMA + postcopy - some cleanups - Add a qtest for RDMA at last Chnages since V2: - squash previous 2/3/4 to '[PATCH v3 5/6] migration: Unfold control_save_page()' - reorder the patch layout to prevent recently added code from being deleted agai

[PATCH v2 5/5] hw/vfio/pci: Re-order pre-reset

2025-02-25 Thread Alex Williamson
We want the device in the D0 power state going into reset, but the config write can enable the BARs in the address space, which are then removed from the address space once we clear the memory enable bit in the command register. Re-order to clear the command bit first, so the power state change do

[PATCH v2 0/5] PCI: Implement basic PCI PM capability backing

2025-02-25 Thread Alex Williamson
v2: Eric noted in v1 that one of the drivers had a redundant wmask setting since pci_pm_init() enabled writes to the power state field. This was added because vfio-pci was not setting wmask for this capability but is allowing writes to the PM state field through to the device. For vfio-pci, QEMU

[PATCH v2 1/5] hw/pci: Basic support for PCI power management

2025-02-25 Thread Alex Williamson
The memory and IO BARs for devices are only accessible in the D0 power state. In other power states the PCI spec defines that the device responds to TLPs and messages with an Unsupported Request response. To approximate this behavior, consider the BARs as unmapped when the device is not in the D0

[PATCH v2 4/5] pcie, virtio: Remove redundant pm_cap

2025-02-25 Thread Alex Williamson
The pm_cap on the PCIExpressDevice object can be distilled down to the new instance on the PCIDevice object. Cc: Michael S. Tsirkin Cc: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Reviewed-by: Zhenzhong Duan Reviewed-by: Eric Auger Signed-off-by: Alex Williamson --- hw/pci-bridge/pcie_

[PATCH v3 4/6] migration/rdma: Remove redundant migration_in_postcopy checks

2025-02-25 Thread Li Zhijian via
Since we have disabled RDMA + postcopy, it's safe to remove the migration_in_postcopy() that follows the migrate_rdma(). Signed-off-by: Li Zhijian --- V3: reorder: 7th->4th --- migration/rdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/rdma.c b/migrati

Re: [PATCH v2 00/11] riscv: IOMMU HPM support

2025-02-25 Thread Alistair Francis
On Tue, Feb 25, 2025 at 5:13 AM Daniel Henrique Barboza wrote: > > Hi, > > In this version no major changes were made. Just a rebase with > alistair/riscv-to-apply.next and acks from Alistair. > > All patches acked. > > v1 link: > https://lore.kernel.org/qemu-riscv/20241205133003.184581-1-dbarb..

  1   2   3   4   >