Re: [PATCH] hw/scsi/lsi53c895a: stop script on phase mismatch

2024-03-03 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] meson: Remove --warn-common ldflag

2024-03-03 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [RFC 0/4] mirror: implement incremental and bitmap modes

2024-03-03 Thread Fiona Ebner
Am 01.03.24 um 16:46 schrieb Vladimir Sementsov-Ogievskiy: > On 01.03.24 18:14, Fiona Ebner wrote: >> Am 01.03.24 um 16:02 schrieb Vladimir Sementsov-Ogievskiy: > About documentation: actually, I never liked that we use for backup > job > "MirrorSyncMode". Now it looks more like "Backup

Re: [PATCH v4 3/7] migration/multifd: Implement ram_save_target_page_multifd to handle multifd version of MigrationOps::ram_save_target_page.

2024-03-03 Thread Peter Xu
On Fri, Mar 01, 2024 at 02:28:25AM +, Hao Xiang wrote: > 1. Add a dedicated handler for MigrationOps::ram_save_target_page in > multifd live migration. > 2. Refactor ram_save_target_page_legacy so that the legacy and multifd > handlers don't have internal functions calling into each other. > >

[PATCH] mac_newworld: change timebase frequency from 100MHz to 25MHz for mac99 machine

2024-03-03 Thread Mark Cave-Ayland
MacOS X uses multiple techniques for calibrating timers depending upon the detected hardware. One of these calibration routines compares the change in the timebase against the KeyLargo timer and uses this to recalculate the clock frequency, timebase frequency and bus frequency if the calibration e

Re: [PATCH v4 7/7] Update maintainer contact for migration multifd zero page checking acceleration.

2024-03-03 Thread Peter Xu
On Fri, Mar 01, 2024 at 02:28:29AM +, Hao Xiang wrote: > Add myself to maintain multifd zero page checking acceleration function. > > Signed-off-by: Hao Xiang > --- > MAINTAINERS | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 65dfdc9677..b547

Re: [PATCH v4 5/7] migration/multifd: Add new migration test cases for legacy zero page checking.

2024-03-03 Thread Peter Xu
On Fri, Mar 01, 2024 at 02:28:27AM +, Hao Xiang wrote: > Now that zero page checking is done on the multifd sender threads by > default, we still provide an option for backward compatibility. This > change adds a qtest migration test case to set the zero-page-detection > option to "legacy" and

Re: [PATCH v4 4/7] migration/multifd: Enable multifd zero page checking by default.

2024-03-03 Thread Peter Xu
On Fri, Mar 01, 2024 at 02:28:26AM +, Hao Xiang wrote: > Set default "zero-page-detection" option to "multifd". Now zero page > checking can be done in the multifd threads and this becomes the > default configuration. We still provide backward compatibility > where zero page checking is done fr

Re: [PATCH 08/19] smbios: don't check type4 structures in legacy mode

2024-03-03 Thread Ani Sinha
On Tue, 27 Feb 2024, Igor Mammedov wrote: > legacy mode doesn't support structures of type 2 and more, > and CLI has a check for '-smbios type' option, however it's > still possible to sneak in type4 as a blob with '-smbios file' > option. However doing the later makes SMBIOS tables broken > si

Re: [PATCH v4 2/7] migration/multifd: Implement zero page transmission on the multifd thread.

2024-03-03 Thread Peter Xu
On Fri, Mar 01, 2024 at 02:28:24AM +, Hao Xiang wrote: > -GlobalProperty hw_compat_8_2[] = {}; > +GlobalProperty hw_compat_8_2[] = { > +{ "migration", "zero-page-detection", "legacy"}, > +}; I hope we can make it for 9.0, then this (and many rest places) can be kept as-is. Let's see.. so

Re: [PATCH v4 1/7] migration/multifd: Add new migration option zero-page-detection.

2024-03-03 Thread Peter Xu
On Fri, Mar 01, 2024 at 02:28:23AM +, Hao Xiang wrote: > This new parameter controls where the zero page checking is running. > 1. If this parameter is set to 'legacy', zero page checking is > done in the migration main thread. > 2. If this parameter is set to 'none', zero page checking is disa

Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations

2024-03-03 Thread Zhao Liu
Hi Prasad, On Mon, Mar 04, 2024 at 11:23:58AM +0530, Prasad Pandit wrote: > Date: Mon, 4 Mar 2024 11:23:58 +0530 > From: Prasad Pandit > Subject: Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" > SMP configurations > > On Mon, 4 Mar 2024 at 10:02, Zhao Liu wrote: > > diff --gi

Does "-object" support structured options now?

2024-03-03 Thread Chun Feng Wu
Hi, I noticed that throttle-group can be created with “-object”, however, per qemu doc(https://github.com/qemu/qemu/blob/master/docs/throttle.txt), “-object” doesn’t support structured options at that moment: “ A throttle-group can also be created with the -object command line option but at the

Re: [PATCH] Fixed tlb huge page loading issue

2024-03-03 Thread maobibo
Xianglai, Thanks for your patch. On 2024/2/28 下午2:55, Xianglai Li wrote: The lddir and ldpte instruction emulation has a problem with the use of large page processing above level 2. The page size is not correctly calculated, resulting in the wrong page size of the table entry found by tlb. Cou

Re: [PATCH v1 6/6] intel_iommu: Block migration if cap is updated

2024-03-03 Thread Prasad Pandit
On Wed, 28 Feb 2024 at 15:17, Zhenzhong Duan wrote: > When there is VFIO device and vIOMMU cap/ecap is updated based on host * cap/ecap -> capability/extended capability registers are updated ... > IOMMU cap/ecap, migration should be blocked. * It'll help to mention why migration should be bloc

[PULL 07/18] qapi/yank: Tweak @yank's error description for consistency

2024-03-03 Thread Markus Armbruster
Phrase it like "If , ", like we do elsewhere. Signed-off-by: Markus Armbruster Message-ID: <20240227113921.236097-8-arm...@redhat.com> --- qapi/yank.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/yank.json b/qapi/yank.json index fffb39a397..89f2f4d199 100644 --- a/

[PULL 13/18] qapi: Reject "Returns" section when command doesn't return anything

2024-03-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-ID: <20240227113921.236097-14-arm...@redhat.com> --- scripts/qapi/parser.py | 7 ++- tests/qapi-schema/doc-invalid-return2.err | 1 + tests/qapi-schema/doc-invalid-return2.json | 7 +++ tests/qapi-schema/doc-invalid-return2.out

[PULL 08/18] qga/qapi-schema: Move error documentation to new "Errors" sections

2024-03-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-ID: <20240227113921.236097-9-arm...@redhat.com> --- qga/qapi-schema.json | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json index b8efe31897..c5f2ac8f59 100644 --- a/qga/

[PULL 17/18] qapi: New strv_from_str_list()

2024-03-03 Thread Markus Armbruster
From: Steve Sistare Signed-off-by: Steve Sistare Reviewed-by: Marc-André Lureau Message-ID: <20240227153321.467343-3-arm...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster --- include/qapi/type-helpers.h | 8 qapi/qapi-type-helpers.c| 14 +++

[PULL 14/18] docs/devel/writing-monitor-commands: Repair a decade of rot

2024-03-03 Thread Markus Armbruster
The tutorial doesn't match reality since at least 2013. Repairing it involves fixing the following issues: * Update for commit 6d327171551 (aio / timers: Remove alarm timers): replace the broken examples. Instead of having one for returning a struct and another for returning a list of struct

[PULL 16/18] qapi: New QAPI_LIST_LENGTH()

2024-03-03 Thread Markus Armbruster
From: Steve Sistare Signed-off-by: Steve Sistare Reviewed-by: Marc-André Lureau Message-ID: <20240227153321.467343-2-arm...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster --- include/qapi/util.h | 13 + 1 file changed, 13 insertions(+) diff --gi

[PULL 10/18] qga/qapi-schema: Clean up "Returns" sections

2024-03-03 Thread Markus Armbruster
Drop "on success" where it is redundant with "Returns:". Signed-off-by: Markus Armbruster Message-ID: <20240227113921.236097-11-arm...@redhat.com> --- qga/qapi-schema.json | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qga/qapi-schema.json b/qga/qapi-schema.

[PULL 00/18] QAPI patches patches for 2024-03-04

2024-03-03 Thread Markus Armbruster
The following changes since commit e1007b6bab5cf97705bf4f2aaec1f607787355b8: Merge tag 'pull-request-2024-03-01' of https://gitlab.com/thuth/qemu into staging (2024-03-01 10:14:32 +) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2024-03-04 fo

[PULL 12/18] qga/qapi-schema: Fix guest-set-memory-blocks documentation

2024-03-03 Thread Markus Armbruster
Documentation claims the command can "return NULL". "NULL" doesn't exist in JSON. "null" does, but the command returns lists, and null isn't. Correct documentation to "return an empty list". Signed-off-by: Markus Armbruster Message-ID: <20240227113921.236097-13-arm...@redhat.com> --- qga/qapi

[PULL 04/18] qapi: Move error documentation to new "Errors" sections

2024-03-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-ID: <20240227113921.236097-5-arm...@redhat.com> --- qapi/block-core.json | 44 qapi/block-export.json | 23 - qapi/block.json | 8 ++-- qapi/machine-target.json | 35 +

[PULL 03/18] qapi: New documentation section tag "Errors"

2024-03-03 Thread Markus Armbruster
We use section "Returns" for documenting both success and error response of commands. I intend to generate better command success response documentation. Easier when "Returns" documents just he success response. Create new section tag "Errors". The next two commits will move error response docum

[PULL 09/18] qga/qapi-schema: Delete useless "Returns" sections

2024-03-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-ID: <20240227113921.236097-10-arm...@redhat.com> --- qga/qapi-schema.json | 12 1 file changed, 12 deletions(-) diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json index c5f2ac8f59..636c2c5697 100644 --- a/qga/qapi-schema.json +++ b/qga/

[PULL 05/18] qapi: Delete useless "Returns" sections

2024-03-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-ID: <20240227113921.236097-6-arm...@redhat.com> --- qapi/block-core.json | 66 qapi/block.json | 6 qapi/char.json | 6 qapi/dump.json | 2 -- qapi/machine-target.json |

[PULL 18/18] migration: simplify exec migration functions

2024-03-03 Thread Markus Armbruster
From: Steve Sistare Simplify the exec migration code by using list utility functions. As a side effect, this also fixes a minor memory leak. On function return, "g_auto(GStrv) argv" frees argv and each element, which is wrong, because the function does not own the individual elements. To compe

[PULL 06/18] qapi: Clean up "Returns" sections

2024-03-03 Thread Markus Armbruster
Drop list markup, since there's just one item left. Drop "on success" where it is redundant with "Returns:". Signed-off-by: Markus Armbruster Message-ID: <20240227113921.236097-7-arm...@redhat.com> --- qapi/block-core.json | 4 ++-- qapi/machine.json| 4 ++-- qapi/misc.json | 2 +- 3

[PULL 15/18] docs/devel/writing-monitor-commands: Minor improvements

2024-03-03 Thread Markus Armbruster
Avoid "JSON" when talking about the QAPI schema syntax. Capitalize QEMU. Don't claim all HMP commands live in monitor/hmp-cmds.c (this was never true). Fix punctuation and drop inappropriate "the" here and there. Signed-off-by: Markus Armbruster Message-ID: <20240227115617.237875-3-arm...@redh

[PULL 11/18] qga/qapi-schema: Tweak documentation of fsfreeze commands

2024-03-03 Thread Markus Armbruster
"Returns:" sections of guest-fsfreeze-freeze and guest-fsfreeze-freeze-list describe both command behavior and success response. Move behavior out, so "Returns:" is only about success response. Signed-off-by: Markus Armbruster Message-ID: <20240227113921.236097-12-arm...@redhat.com> --- qga/qap

[PULL 01/18] qapi: Memorize since & returns sections

2024-03-03 Thread Markus Armbruster
This is chiefly to make code that looks up these sections easier to read. Signed-off-by: Markus Armbruster Message-ID: <20240227113921.236097-2-arm...@redhat.com> --- scripts/qapi/parser.py | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/scri

[PULL 02/18] qapi: Slightly clearer error message for invalid "Returns" section

2024-03-03 Thread Markus Armbruster
Change "'Returns:' is only valid for commands" to "'Returns' section is only valid for commands". Signed-off-by: Markus Armbruster Message-ID: <20240227113921.236097-3-arm...@redhat.com> --- scripts/qapi/parser.py | 5 +++-- tests/qapi-schema/doc-invalid-return.err | 2 +- 2 fi

RE: [PATCH v1 0/6] Check and sync host IOMMU cap/ecap with vIOMMU

2024-03-03 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH v1 0/6] Check and sync host IOMMU cap/ecap with >vIOMMU > >On Wed, Feb 28, 2024 at 5:46 PM Zhenzhong Duan > wrote: >> >> Hi, >> >> Based on Joao's suggestion, the iommufd nesting prerequisite series [1] >> is further splitted to

Re: [PATCH] Fix typo in comment (uin32_t -> uint32_t)

2024-03-03 Thread Cédric Le Goater
On 3/2/24 08:06, Zhao Liu wrote: On Fri, Mar 01, 2024 at 06:55:35PM +, Frediano Ziglio wrote: Date: Fri, 1 Mar 2024 18:55:35 + From: Frediano Ziglio Subject: [PATCH] Fix typo in comment (uin32_t -> uint32_t) Signed-off-by: Frediano Ziglio --- hw/vfio/pci.h | 2 +- 1 file changed, 1

Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations

2024-03-03 Thread Prasad Pandit
On Mon, 4 Mar 2024 at 10:02, Zhao Liu wrote: > diff --git a/hw/core/machine-smp.c b/hw/core/machine-smp.c > index 25019c91ee36..96533886b14e 100644 > --- a/hw/core/machine-smp.c > +++ b/hw/core/machine-smp.c > @@ -105,8 +105,9 @@ void machine_parse_smp_config(MachineState *ms, > (config->

Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations

2024-03-03 Thread Thomas Huth
On 04/03/2024 05.45, Zhao Liu wrote: From: Zhao Liu The "parameter=0" SMP configurations have been marked as deprecated since v6.2. For these cases, -smp currently returns the warning and adjusts the zeroed parameters to 1 by default. Remove the above compatibility logic in v9.0, and return e

Re: [PATCH] migration/multifd: Document two places for mapped-ram

2024-03-03 Thread Prasad Pandit
On Mon, 4 Mar 2024 at 06:00, Peter Xu wrote: > Yes I think you're looking at the right path, it's just that the relevant > patches haven't yet landed upstream but is planned. I normally use > "Based-on" tag for such patch that has a dependency outside master, like: > > Based-on: <20240229153017.2

[PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations

2024-03-03 Thread Zhao Liu
From: Zhao Liu The "parameter=0" SMP configurations have been marked as deprecated since v6.2. For these cases, -smp currently returns the warning and adjusts the zeroed parameters to 1 by default. Remove the above compatibility logic in v9.0, and return error directly if any -smp parameter is

Re: [PATCH v1 0/6] Check and sync host IOMMU cap/ecap with vIOMMU

2024-03-03 Thread Jason Wang
On Wed, Feb 28, 2024 at 5:46 PM Zhenzhong Duan wrote: > > Hi, > > Based on Joao's suggestion, the iommufd nesting prerequisite series [1] > is further splitted to host IOMMU device abstract part [2] and vIOMMU > check/sync part. This series implements the 2nd part. > > This enables vIOMMU to get h

Re: [PATCH 1/1] kvm: add support for guest physical bits

2024-03-03 Thread Tao Su
On Mon, Mar 04, 2024 at 09:54:40AM +0800, Xiaoyao Li wrote: > On 3/1/2024 6:17 PM, Gerd Hoffmann wrote: > > query kvm for supported guest physical address bits using > > KVM_CAP_VM_GPA_BITS. Expose the value to the guest via cpuid > > (leaf 0x8008, eax, bits 16-23). > > > > Signed-off-by: Ger

Re: [PATCH v1 0/1] Improved Memory Tier Creation for CPUless NUMA Nodes

2024-03-03 Thread fan
On Fri, Mar 01, 2024 at 08:22:44AM +, Ho-Ren (Jack) Chuang wrote: > The memory tiering component in the kernel is functionally useless for > CPUless memory/non-DRAM devices like CXL1.1 type3 memory because the nodes > are lumped together in the DRAM tier. > https://lore.kernel.org/linux-mm/ph0p

Re: [PATCH v1 0/1] Improved Memory Tier Creation for CPUless NUMA Nodes

2024-03-03 Thread Huang, Ying
"Ho-Ren (Jack) Chuang" writes: > The memory tiering component in the kernel is functionally useless for > CPUless memory/non-DRAM devices like CXL1.1 type3 memory because the nodes > are lumped together in the DRAM tier. > https://lore.kernel.org/linux-mm/ph0pr08mb7955e9f08ccb64f23963b5c3a8...@ph

Re: [PATCH v1 1/1] memory tier: acpi/hmat: create CPUless memory tiers after obtaining HMAT info

2024-03-03 Thread Huang, Ying
Hi, Jack, "Ho-Ren (Jack) Chuang" writes: > * Introduce `mt_init_with_hmat()` > We defer memory tier initialization for those CPUless NUMA nodes > until acquiring HMAT info. `mt_init_with_hmat()` is introduced to > post-create CPUless memory tiers after obtaining HMAT info. > It iterates through

[PATCH v2] target/loongarch: Add TCG macro in structure CPUArchState

2024-03-03 Thread Bibo Mao
In structure CPUArchState some struct elements are only used in TCG mode, and it is not used in KVM mode. Macro CONFIG_TCG is added to make it simpiler in KVM mode, also there is the same modification in c code when these struct elements are used. When VM runs in KVM mode, TLB entries are not used

Re: [PATCH 1/1] kvm: add support for guest physical bits

2024-03-03 Thread Xiaoyao Li
On 3/1/2024 6:17 PM, Gerd Hoffmann wrote: query kvm for supported guest physical address bits using KVM_CAP_VM_GPA_BITS. Expose the value to the guest via cpuid (leaf 0x8008, eax, bits 16-23). Signed-off-by: Gerd Hoffmann --- target/i386/cpu.h | 1 + target/i386/cpu.c | 1 + ta

RE: [PULL 2/2] aspeed: fix hardcode boot address 0

2024-03-03 Thread Jamin Lin
> -Original Message- > From: Philippe Mathieu-Daudé > Sent: Friday, March 1, 2024 11:49 PM > To: Cédric Le Goater ; qemu-...@nongnu.org; > qemu-devel@nongnu.org > Cc: Jamin Lin ; Troy Lee > > Subject: Re: [PULL 2/2] aspeed: fix hardcode boot address 0 > > Hi Jamin, > > On 27/2/24 13:52,

[PULL 24/27] migration/multifd: Support incoming mapped-ram stream format

2024-03-03 Thread peterx
From: Fabiano Rosas For the incoming mapped-ram migration we need to read the ramblock headers, get the pages bitmap and send the host address of each non-zero page to the multifd channel thread for writing. Usage on HMP is: (qemu) migrate_set_capability multifd on (qemu) migrate_set_capability

[PULL 18/27] migration/multifd: Allow receiving pages without packets

2024-03-03 Thread peterx
From: Fabiano Rosas Currently multifd does not need to have knowledge of pages on the receiving side because all the information needed is within the packets that come in the stream. We're about to add support to mapped-ram migration, which cannot use packets because it expects the ramblock sect

[PULL 07/27] io: implement io_pwritev/preadv for QIOChannelFile

2024-03-03 Thread peterx
From: Nikolay Borisov The upcoming 'mapped-ram' feature will require qemu to write data to (and restore from) specific offsets of the migration file. Add a minimal implementation of pwritev/preadv and expose them via the io_pwritev and io_preadv interfaces. Signed-off-by: Nikolay Borisov Revie

[PULL 12/27] migration/ram: Add outgoing 'mapped-ram' migration

2024-03-03 Thread peterx
From: Fabiano Rosas Implement the outgoing migration side for the 'mapped-ram' capability. A bitmap is introduced to track which pages have been written in the migration file. Pages are written at a fixed location for every ramblock. Zero pages are ignored as they'd be zero in the destination mi

[PULL 03/27] tests/migration: Set compression level in migration tests

2024-03-03 Thread peterx
From: Bryan Zhang Adds calls to set compression level for `zstd` and `zlib` migration tests, just to make sure that the calls work. Signed-off-by: Bryan Zhang Link: https://lore.kernel.org/r/20240301035901.4006936-3-bryan.zh...@bytedance.com Signed-off-by: Peter Xu --- tests/qtest/migration-

[PULL 13/27] migration/ram: Add incoming 'mapped-ram' migration

2024-03-03 Thread peterx
From: Fabiano Rosas Add the necessary code to parse the format changes for the 'mapped-ram' capability. One of the more notable changes in behavior is that in the 'mapped-ram' case ram pages are restored in one go rather than constantly looping through the migration stream. Signed-off-by: Nikol

[PULL 21/27] migration/multifd: Add incoming QIOChannelFile support

2024-03-03 Thread peterx
From: Fabiano Rosas On the receiving side we don't need to differentiate between main channel and threads, so whichever channel is defined first gets to be the main one. And since there are no packets, use the atomic channel count to index into the params array. Reviewed-by: Peter Xu Signed-off

[PULL 27/27] migration/multifd: Document two places for mapped-ram

2024-03-03 Thread peterx
From: Peter Xu Add two documentations for mapped-ram migration on two spots that may not be extremely clear. Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20240301091524.39900-1-pet...@redhat.com Cc: Prasad Pandit [peterx: fix two English errors per Prasad] Signed-off-by: Peter Xu

[PULL 22/27] migration/multifd: Prepare multifd sync for mapped-ram migration

2024-03-03 Thread peterx
From: Fabiano Rosas The mapped-ram migration can be performed live or non-live, but it is always asynchronous, i.e. the source machine and the destination machine are not migrating at the same time. We only need some pieces of the multifd sync operations. multifd_send_sync_main() ---

[PULL 23/27] migration/multifd: Support outgoing mapped-ram stream format

2024-03-03 Thread peterx
From: Fabiano Rosas The new mapped-ram stream format uses a file transport and puts ram pages in the migration file at their respective offsets and can be done in parallel by using the pwritev system call which takes iovecs and an offset. Add support to enabling the new format along with multifd

[PULL 25/27] migration/multifd: Add mapped-ram support to fd: URI

2024-03-03 Thread peterx
From: Fabiano Rosas If we receive a file descriptor that points to a regular file, there's nothing stopping us from doing multifd migration with mapped-ram to that file. Enable the fd: URI to work with multifd + mapped-ram. Note that the fds passed into multifd are duplicated because we want to

[PULL 10/27] migration/ram: Introduce 'mapped-ram' migration capability

2024-03-03 Thread peterx
From: Fabiano Rosas Add a new migration capability 'mapped-ram'. The core of the feature is to ensure that RAM pages are mapped directly to offsets in the resulting migration file instead of being streamed at arbitrary points. The reasons why we'd want such behavior are: - The resulting file

[PULL 17/27] migration/multifd: Allow multifd without packets

2024-03-03 Thread peterx
From: Fabiano Rosas For the upcoming support to the new 'mapped-ram' migration stream format, we cannot use multifd packets because each write into the ramblock section in the migration file is expected to contain only the guest pages. They are written at their respective offsets relative to the

[PULL 20/27] migration/multifd: Add outgoing QIOChannelFile support

2024-03-03 Thread peterx
From: Fabiano Rosas Allow multifd to open file-backed channels. This will be used when enabling the mapped-ram migration stream format which expects a seekable transport. The QIOChannel read and write methods will use the preadv/pwritev versions which don't update the file offset at each call so

[PULL 26/27] tests/qtest/migration: Add a multifd + mapped-ram migration test

2024-03-03 Thread peterx
From: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Link: https://lore.kernel.org/r/20240229153017.2221-24-faro...@suse.de Signed-off-by: Peter Xu --- tests/qtest/migration-test.c | 68 1 file changed, 68 insertions(+) diff --git a/test

[PULL 19/27] migration/multifd: Add a wrapper for channels_created

2024-03-03 Thread peterx
From: Fabiano Rosas We'll need to access multifd_send_state->channels_created from outside multifd.c, so introduce a helper for that. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Link: https://lore.kernel.org/r/20240229153017.2221-17-faro...@suse.de Signed-off-by: Peter Xu --- migratio

[PULL 14/27] tests/qtest/migration: Add tests for mapped-ram file-based migration

2024-03-03 Thread peterx
From: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Link: https://lore.kernel.org/r/20240229153017.2221-12-faro...@suse.de Signed-off-by: Peter Xu --- tests/qtest/migration-test.c | 59 1 file changed, 59 insertions(+) diff --git a/test

[PULL 04/27] migration/multifd: Cleanup multifd_recv_sync_main

2024-03-03 Thread peterx
From: Fabiano Rosas Some minor cleanups and documentation for multifd_recv_sync_main. Use thread_count as done in other parts of the code. Remove p->id from the multifd_recv_state sync, since that is global and not tied to a channel. Add documentation for the sync steps. Reviewed-by: Peter Xu

[PULL 15/27] migration/multifd: Rename MultiFDSend|RecvParams::data to compress_data

2024-03-03 Thread peterx
From: Fabiano Rosas Use a more specific name for the compression data so we can use the generic for the multifd core code. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Link: https://lore.kernel.org/r/20240229153017.2221-13-faro...@suse.de Signed-off-by: Peter Xu --- migration/multifd.h

[PULL 16/27] migration/multifd: Decouple recv method from pages

2024-03-03 Thread peterx
From: Fabiano Rosas Next patches will abstract the type of data being received by the channels, so do some cleanup now to remove references to pages and dependency on 'normal_num'. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Link: https://lore.kernel.org/r/20240229153017.2221-14-faro...

[PULL 00/27] Migration next patches

2024-03-03 Thread peterx
From: Peter Xu The following changes since commit c0c6a0e3528b88aaad0b9d333e295707a195587b: Merge tag 'migration-next-pull-request' of https://gitlab.com/peterx/qemu into staging (2024-02-28 17:27:10 +) are available in the Git repository at: https://gitlab.com/peterx/qemu.git tags/mi

[PULL 08/27] io: fsync before closing a file channel

2024-03-03 Thread peterx
From: Fabiano Rosas Make sure the data is flushed to disk before closing file channels. This is to ensure data is on disk and not lost in the event of a host crash. This is currently being implemented to affect the migration code when migrating to a file, but all QIOChannelFile users should bene

[PULL 02/27] migration: Properly apply migration compression level parameters

2024-03-03 Thread peterx
From: Bryan Zhang Some glue code was missing, so that using `qmp_migrate_set_parameters` to set `multifd-zstd-level` or `multifd-zlib-level` did not work. This commit adds the glue code to fix that. Signed-off-by: Bryan Zhang Link: https://lore.kernel.org/r/20240301035901.4006936-2-bryan.zh...

[PULL 06/27] io: Add generic pwritev/preadv interface

2024-03-03 Thread peterx
From: Nikolay Borisov Introduce basic pwritev/preadv support in the generic channel layer. Specific implementation will follow for the file channel as this is required in order to support migration streams with fixed location of each ram page. Signed-off-by: Nikolay Borisov Reviewed-by: "Daniel

[PULL 11/27] migration: Add mapped-ram URI compatibility check

2024-03-03 Thread peterx
From: Fabiano Rosas The mapped-ram migration format needs a channel that supports seeking to be able to write each page to an arbitrary offset in the migration stream. Reviewed-by: "Daniel P. Berrangé" Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Link: https://lore.kernel.org/r/20240229

[PULL 01/27] migration: massage cpr-reboot documentation

2024-03-03 Thread peterx
From: Steve Sistare Re-wrap the cpr-reboot documentation to 70 columns, use '@' for cpr-reboot references, capitalize COLO and VFIO, and tweak the wording. Suggested-by: Markus Armbruster Signed-off-by: Steve Sistare Link: https://lore.kernel.org/r/1709218462-3640-1-git-send-email-steven.sist

[PULL 05/27] io: add and implement QIO_CHANNEL_FEATURE_SEEKABLE for channel file

2024-03-03 Thread peterx
From: Nikolay Borisov Add a generic QIOChannel feature SEEKABLE which would be used by the qemu_file* apis. For the time being this will be only implemented for file channels. Signed-off-by: Nikolay Borisov Reviewed-by: "Daniel P. Berrangé" Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas

[PULL 09/27] migration/qemu-file: add utility methods for working with seekable channels

2024-03-03 Thread peterx
From: Fabiano Rosas Add utility methods that will be needed when implementing 'mapped-ram' migration capability. Signed-off-by: Fabiano Rosas Reviewed-by: "Daniel P. Berrangé" Link: https://lore.kernel.org/r/20240229153017.2221-7-faro...@suse.de Signed-off-by: Peter Xu --- include/migration/

Re: [PATCH] migration/multifd: Document two places for mapped-ram

2024-03-03 Thread Peter Xu
On Fri, Mar 01, 2024 at 05:50:24PM +, Daniel P. Berrangé wrote: > On Fri, Mar 01, 2024 at 11:17:10PM +0530, Prasad Pandit wrote: > > Hello Petr, Hey Prasad! Thanks for taking a look. > > > > On Fri, 1 Mar 2024 at 14:46, wrote: > > > + * An explicitly close() on the channel here is

Why does the vmovdqu works for passthrough device but crashes for emulated device with "illegal operand" error (in x86_64 QEMU, -accel = kvm) ?

2024-03-03 Thread Xu Liu
Hello, Recently I am running my programs in QEMU (x86_64) with “-accel=kvm”. The QEMU version is 6.0.0. I run my programs in two ways: 1. I pass through my device through vfio-pci to QEMU, this way works well. 2. I write an emulated PCI device for QEMU, and run my programs on the emulat

[PATCH 2/2] tests/tcg: Add multiarch test for Xfer:siginfo:read stub

2024-03-03 Thread Gustavo Romero
Add multiarch test for testing if Xfer:siginfo:read query is properly handled by gdbstub. Signed-off-by: Gustavo Romero --- tests/tcg/multiarch/Makefile.target | 10 ++- .../gdbstub/test-qxfer-siginfo-read.py| 26 +++ tests/tcg/multiarch/segfault.c

[PATCH 1/2] gdbstub: Add Xfer:siginfo:read stub

2024-03-03 Thread Gustavo Romero
Add stub to handle Xfer:siginfo:read query that requests the machine's siginfo data. This is used when GDB users execute 'print $_siginfo' and when the machine stops due to a signal, like on a SIGSEGV. The information in siginfo allows GDB to determine further details on the signal, like the fault

Re: [PATCH] hw/misc: zynq_slcr: set SLC_RST bit in REBOOT_STATUS register

2024-03-03 Thread Gregory Anders
On Fri Mar 1, 2024 at 5:55 PM CST, Edgar E. Iglesias wrote: > Hi, > > I don't have great answers unfortunately... > > We haven't been super consistent with these things but on the ZynqMP we > sometimes require the user to apply ROM behaviour using -device loader on > the command-line (not great for

Re: lsi53c895a assert with AmigaOS

2024-03-03 Thread BALATON Zoltan
On Sun, 3 Mar 2024, BALATON Zoltan wrote: On Sun, 3 Mar 2024, Sven Schnelle wrote: BALATON Zoltan writes: Hello, AmigaOS4 also has a driver for this card so I've tried to test it but it trips an assert. Does anybody have an idea why and how it could be fixed? Sven's recent patches don't seem

[PATCH v3 4/4] hw/i386/pc: Inline pc_cmos_init() into pc_cmos_init_late() and remove it

2024-03-03 Thread Bernhard Beschow
Now that pc_cmos_init() doesn't populate the X86MachineState::rtc attribute any longer, its duties can be merged into pc_cmos_init_late() which is called within machine_done notifier. This frees pc_piix and pc_q35 from explicit CMOS initialization. Signed-off-by: Bernhard Beschow --- include/hw/

[PATCH v3 0/4] Simplify initialization of PC machines

2024-03-03 Thread Bernhard Beschow
The series aims to simplify the initialization process of all PC-based machines by streamlining redundant code. Since I haven't seen patches on the list so far for folding CMOS data generation into pc.c, which frees all PC machines from performing this duty explicitly, I've appended this cleanup a

[PATCH v3 1/4] hw/i386/pc: Remove "rtc_state" link again

2024-03-03 Thread Bernhard Beschow
Commit 99e1c1137b6f "hw/i386/pc: Populate RTC attribute directly" made linking the "rtc_state" property unnecessary and removed it. Commit 84e945aad2d0 "vl, pc: turn -no-fd-bootchk into a machine property" accidently reintroduced the link. Remove it again since it is not needed. Fixes: 84e945aad2d

[PATCH v3 3/4] hw/i386/pc: Set "normal" boot device order in pc_basic_device_init()

2024-03-03 Thread Bernhard Beschow
The boot device order may change during the lifetime of a VM. Usually, the "normal" order is set once during machine init(). However, if a user specifies `-boot once=...`, the "normal" order is overwritten by the "once" order just before machine_done, and a reset handler is registered which restore

[PATCH v3 2/4] hw/i386/pc: Avoid one use of the current_machine global

2024-03-03 Thread Bernhard Beschow
The RTC can be accessed through the X86 machine instance, so rather than passing the RTC it's possible to pass the machine state instead. This avoids pc_boot_set() from having to access the current_machine global. Signed-off-by: Bernhard Beschow --- hw/i386/pc.c | 7 --- 1 file changed, 4 in

Re: [PATCH v3 10/12] plugins: add range list API

2024-03-03 Thread Bernhard Beschow
Am 1. März 2024 17:46:07 UTC schrieb Sven Schnelle : >Export range_list_from_string(), range_contains() and range_list_free() >to allow plugins to parse filter ranges and match them to avoid >reimplementing this functionality. > >Signed-off-by: Sven Schnelle >--- > include/qemu/qemu-plugin.h

Re: [PATCH] Make some structure static

2024-03-03 Thread Michael Tokarev
01.03.2024 21:56, Frediano Ziglio : Not used outside C module. Applied to trivial-patches (with subject fixup) /mjt

[PATCH] meson: Remove --warn-common ldflag

2024-03-03 Thread Akihiko Odaki
--warn-common ldflag causes warnings for multiple definitions of ___asan_globals_registered when enabling AddressSanitizer with clang. The warning is somewhat obsolete so just remove it. The common block is used to allow duplicate definitions of uninitialized global variables. In the past, GCC and

Re: [Stable-8.2.1 61/71] linux-user/riscv: Adjust vdso signal frame cfa offsets

2024-03-03 Thread Andreas Schwab
Also tested with master, same result. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

[PATCH v6 7/8] hw/arm/stm32l4x5_soc.c: Use the RCC Sysclk

2024-03-03 Thread Arnaud Minier
Now that we can generate reliable clock frequencies from the RCC, remove the hacky definition of the sysclk in the b_l475e_iot01a initialisation code and use the correct RCC clock. Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol Acked-by: Alistair Francis Reviewed-by: Peter Maydell ---

[PATCH v6 8/8] tests/qtest/stm32l4x5_rcc-test.c: Add tests for the STM32L4x5_RCC

2024-03-03 Thread Arnaud Minier
Tests: - the ability to change the sysclk of the device - the ability to enable/disable/configure the PLLs - if the clock multiplexers work - the register flags and the generation of irqs Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol Acked-by: Thomas Huth --- tests/qtest/meson.build

[PATCH v6 6/8] hw/misc/stm32l4x5_rcc: Add write protections to CR register

2024-03-03 Thread Arnaud Minier
Add write protections for the fields in the CR register. PLL configuration write protections (among others) have not been handled yet. This is planned in a future patch set. Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol --- hw/misc/stm32l4x5_rcc.c | 164 ---

[PATCH v6 4/8] hw/misc/stm32l4x5_rcc: Initialize PLLs and clock multiplexers

2024-03-03 Thread Arnaud Minier
Instanciate the whole clock tree and using the Clock multiplexers and the PLLs defined in the previous commits. This allows to statically define the clock tree and easily follow the clock signal from one end to another. Also handle three-phase reset now that we have defined a known base state for

[PATCH v6 5/8] hw/misc/stm32l4x5_rcc: Handle Register Updates

2024-03-03 Thread Arnaud Minier
Update the RCC state and propagate frequency changes when writing to the RCC registers. Currently, ICSCR, CIER, the reset registers and the stop mode registers are not implemented. Some fields have not been implemented due to uncertainty about how to handle them (Like the clock security system or

[PATCH v6 3/8] hw/misc/stm32l4x5_rcc: Add an internal PLL Clock object

2024-03-03 Thread Arnaud Minier
This object represents the PLLs and their channels. The PLLs allow for a more fine-grained control of the clocks frequency. The migration handling is based on hw/misc/zynq_sclr.c. Three phase reset will be handled in a later commit. Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol --- h

[PATCH v6 2/8] hw/misc/stm32l4x5_rcc: Add an internal clock multiplexer object

2024-03-03 Thread Arnaud Minier
This object is used to represent every multiplexer in the clock tree as well as every clock output, every presecaler, frequency multiplier, etc. This allows to use a generic approach for every component of the clock tree (except the PLLs). The migration handling is based on hw/misc/zynq_sclr.c. Th

[PATCH v6 0/8] Add device STM32L4x5 RCC

2024-03-03 Thread Arnaud Minier
This patch adds the STM32L4x5 RCC (Reset and Clock Control) device and is part of a series implementing the STM32L4x5 with a few peripherals. Due to the high number of lines, I tried to split the patch into several independent commits. Each commit compiles on its own but I had to add temporary wo

[PATCH v6 1/8] hw/misc/stm32l4x5_rcc: Implement STM32L4x5_RCC skeleton

2024-03-03 Thread Arnaud Minier
Add the necessary files to add a simple RCC implementation with just reads from and writes to registers. Also instantiate the RCC in the STM32L4x5_SoC. It is needed for accurate emulation of all the SoC clocks and timers. Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol Acked-by: Alistair

  1   2   >