Re: [RFC PATCH] gitlab: call ninja directly and reduce build noise

2023-02-02 Thread Thomas Huth
On 02/02/2023 19.59, Alex Bennée wrote: Alex Bennée writes: A significant portion of our CI logs are just enumerating each successfully built object file. The current widespread versions of ninja don't have a quiet option so we use NINJA_STATUS to add a fixed string to the ninja output which

[PATCH V2 2/2] migration: save/delete migration thread info

2023-02-02 Thread Jiang Jiacheng via
To support query migration thread infomation, save and delete thread(live_migration and multifdsend) information at thread creation and finish. Signed-off-by: Jiang Jiacheng --- migration/migration.c | 5 + migration/multifd.c | 5 + 2 files changed, 10 insertions(+) diff --git a/migr

[PATCH V2 1/2] migration: Introduce interface query-migrationthreads

2023-02-02 Thread Jiang Jiacheng via
Introduce interface query-migrationthreads. The interface is used to query information about migration threads and returns with migration thread's name and its id. Introduce threadinfo.c to manage threads with migration. Signed-off-by: Jiang Jiacheng --- migration/meson.build | 1 + migration/

[RFC PATCH V2 0/2] migration: support query migration thread information

2023-02-02 Thread Jiang Jiacheng via
We need get more migration thread information to support migration pin, especially thread name and its pid. Add an qmp interface to query migration threads information. v2 of: https://lists.nongnu.org/archive/html/qemu-devel/2023-01/msg04618.html diff to v2: * remove the event that report thread

Re: [PATCH 1/1] target/loongarch: LL.{W/D} need writes val to dest register after sign extension

2023-02-02 Thread gaosong
在 2023/2/2 下午1:51, Richard Henderson 写道: On 2/1/23 17:16, Song Gao wrote: The Manual 2.2.7.2: 'The LL.{W/D} instruction retrieves a word/double-word data from the specified address of the memory and writes it to the general register rd after sign extension.' Signed-off-by: Song

Re: [PATCH v3 0/2] hw/arm/virt: Handle HVF in finalize_gic_version()

2023-02-02 Thread Philippe Mathieu-Daudé
Hi Peter, On 2/2/23 18:57, Peter Maydell wrote: On Fri, 23 Dec 2022 at 09:01, Alexander Graf wrote: The finalize_gic_version() function tries to determine which GIC version the current accelerator / host combination supports. During the initial HVF porting efforts, I didn't realize that I als

Re: [PATCH v2] qemu-options.hx: remove stray quote

2023-02-02 Thread Philippe Mathieu-Daudé
On 2/2/23 23:31, John Snow wrote: Signed-off-by: John Snow --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index d59d19704bc..52d477547f5 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1606,7 +1606,7 @@ SRST

Re: [PATCH] hostmem-file: add offset option

2023-02-02 Thread Markus Armbruster
Alexander Graf writes: > Add an option for hostmem-file to start the memory object at an offset > into the target file. This is useful if multiple memory objects reside > inside the same target file, such as a device node. > > In particular, it's useful to map guest memory directly into /dev/mem

[PATCH v10 5/5] riscv: Correctly set the device-tree entry 'mmu-type'

2023-02-02 Thread Alexandre Ghiti
The 'mmu-type' should reflect what the hardware is capable of so use the new satp_mode field in RISCVCPUConfig to do that. Signed-off-by: Alexandre Ghiti Reviewed-by: Andrew Jones Reviewed-by: Alistair Francis Reviewed-by: Bin Meng Reviewed-by: Frank Chang --- hw/riscv/virt.c | 19 ++

[PATCH v10 4/5] riscv: Introduce satp mode hw capabilities

2023-02-02 Thread Alexandre Ghiti
Currently, the max satp mode is set with the only constraint that it must be implemented in QEMU, i.e. set in valid_vm_1_10_[32|64]. But we actually need to add another level of constraint: what the hw is actually capable of, because currently, a linux booting on a sifive-u54 boots in sv57 mode wh

Re: [PATCH v3 6/6] i386: Add new CPU model SapphireRapids

2023-02-02 Thread Wang, Lei
On 2/2/2023 6:40 PM, Igor Mammedov wrote: > On Fri, 6 Jan 2023 00:38:26 -0800 > Lei Wang wrote: > >> The new CPU model mostly inherits features from Icelake-Server, while >> adding new features: >> - AMX (Advance Matrix eXtensions) >> - Bus Lock Debug Exception >> and new instructions: >> - A

[PATCH v10 3/5] riscv: Allow user to set the satp mode

2023-02-02 Thread Alexandre Ghiti
RISC-V specifies multiple sizes for addressable memory and Linux probes for the machine's support at startup via the satp CSR register (done in csr.c:validate_vm). As per the specification, sv64 must support sv57, which in turn must support sv48...etc. So we can restrict machine support by simply

[PATCH v10 2/5] riscv: Change type of valid_vm_1_10_[32|64] to bool

2023-02-02 Thread Alexandre Ghiti
This array is actually used as a boolean so swap its current char type to a boolean and at the same time, change the type of validate_vm to bool since it returns valid_vm_1_10_[32|64]. Suggested-by: Andrew Jones Signed-off-by: Alexandre Ghiti Reviewed-by: Andrew Jones Reviewed-by: Alistair Fran

[PATCH v10 1/5] riscv: Pass Object to register_cpu_props instead of DeviceState

2023-02-02 Thread Alexandre Ghiti
One can extract the DeviceState pointer from the Object pointer, so pass the Object for future commits to access other fields of Object. No functional changes intended. Signed-off-by: Alexandre Ghiti Reviewed-by: Alistair Francis Reviewed-by: Frank Chang Reviewed-by: Andrew Jones Reviewed-by:

[PATCH v10 0/5] riscv: Allow user to set the satp mode

2023-02-02 Thread Alexandre Ghiti
This introduces new properties to allow the user to set the satp mode, see patch 3 for full syntax. In addition, it prevents cpus to boot in a satp mode they do not support (see patch 4). base-commit: commit 75cc28648574 ("configure: remove backwards-compatibility code" v10: - Fix user mode build

Re: [PATCH v10 1/3] hw/riscv: handle 32 bit CPUs kernel_addr in riscv_load_kernel()

2023-02-02 Thread Bin Meng
On Thu, Feb 2, 2023 at 9:58 PM Daniel Henrique Barboza wrote: > > load_elf_ram_sym() will sign-extend 32 bit addresses. If a 32 bit QEMU > guest happens to be running in a hypervisor that are using 64 bits to > encode its address, kernel_entry can be padded with '1's and create > problems [1]. St

Re: [PATCH v5 01/14] RISC-V: Adding XTheadCmo ISA extension

2023-02-02 Thread Alistair Francis
On Wed, Feb 1, 2023 at 6:21 AM Christoph Muellner wrote: > > From: Christoph Müllner > > This patch adds support for the XTheadCmo ISA extension. > To avoid interfering with standard extensions, decoder and translation > are in its own xthead* specific files. > Future patches should be able to ea

Re: [PATCH v10 1/3] hw/riscv: handle 32 bit CPUs kernel_addr in riscv_load_kernel()

2023-02-02 Thread Alistair Francis
On Thu, Feb 2, 2023 at 11:58 PM Daniel Henrique Barboza wrote: > > load_elf_ram_sym() will sign-extend 32 bit addresses. If a 32 bit QEMU > guest happens to be running in a hypervisor that are using 64 bits to > encode its address, kernel_entry can be padded with '1's and create > problems [1]. >

Re: [RFC v2 00/13] Dinamycally switch to vhost shadow virtqueues at vdpa net migration

2023-02-02 Thread Si-Wei Liu
On 2/2/2023 3:27 AM, Eugenio Perez Martin wrote: On Thu, Feb 2, 2023 at 2:00 AM Si-Wei Liu wrote: On 1/12/2023 9:24 AM, Eugenio Pérez wrote: It's possible to migrate vdpa net devices if they are shadowed from the start. But to always shadow the dataplane is effectively break its host p

Re: [PATCH 1/9] Updated the FSF address in file hw/sh4/sh7750_regs.h

2023-02-02 Thread Khadija Kamran
Thank you so much. I will get back to you after looking into this and resend the email. This is great help. :) On Thu, Feb 2, 2023, 11:37 AM Markus Armbruster wrote: > I guess this is your attempt to implement my suggestion to squash your > series into one patch. It came out as a concatenation

Re: [RFC PATCH] gitlab: call ninja directly and reduce build noise

2023-02-02 Thread Richard Henderson
On 2/2/23 08:59, Alex Bennée wrote: +- env NINJA_STATUS="[ninja][%f/%t] " ninja | fgrep -v "[ninja]" - if test -n "$MAKE_CHECK_ARGS"; then make -j"$JOBS" $MAKE_CHECK_ARGS ; This is too much for gitlab as it trips up on no output at all. What we really need is someth

Re: [PATCH 06/39] target/riscv: Add vrol.[vv, vx] and vror.[vv, vx, vi] decoding, translation and execution support

2023-02-02 Thread Richard Henderson
On 2/2/23 08:07, Philipp Tomsich wrote: tcg_gen_gvec_rotls(vece, dofs, aofs, tmp, oprsz, maxsz); We can add rotls generically. I hadn't done this so far because there were no users. I read this such that your preference is to have a generic gvec rotrs? If this is correct, I can drop a p

[PATCH] hostmem-file: add offset option

2023-02-02 Thread Alexander Graf
Add an option for hostmem-file to start the memory object at an offset into the target file. This is useful if multiple memory objects reside inside the same target file, such as a device node. In particular, it's useful to map guest memory directly into /dev/mem for experimentation. Signed-off-b

[PATCH v2] qemu-options.hx: remove stray quote

2023-02-02 Thread John Snow
Signed-off-by: John Snow --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index d59d19704bc..52d477547f5 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1606,7 +1606,7 @@ SRST .. parsed-literal:: -|qe

[PATCH v2 2/3] migration: Add a semaphore to count PONGs

2023-02-02 Thread Peter Xu
This is mostly useless, but useful for us to know whether the main channel is correctly established without changing the migration protocol. Signed-off-by: Peter Xu --- migration/migration.c | 3 +++ migration/migration.h | 6 ++ 2 files changed, 9 insertions(+) diff --git a/migration/migra

[PATCH v2 3/3] migration: Postpone postcopy preempt channel to be after main

2023-02-02 Thread Peter Xu
Postcopy with preempt-mode enabled needs two channels to communicate. The order of channel establishment is not guaranteed. It can happen that the dest QEMU got the preempt channel connection request before the main channel is established, then the migration may make no progress even during preco

[PATCH v2 1/3] migration: Rework multi-channel checks on URI

2023-02-02 Thread Peter Xu
The whole idea of multi-channel checks was not properly done, IMHO. Currently we check multi-channel in a lot of places, but actually that's not needed because we only need to check it right after we get the URI and that should be it. If the URI check succeeded, we should never need to check it a

[PATCH v2 0/3] migration: Fix disorder of channel creations

2023-02-02 Thread Peter Xu
This patchset is rebased to Juan's latest pull request: Based-on: <20230202160640.2300-1-quint...@redhat.com> I can trigger disordered connections with preempt mode postcopy (1 out of a few attemps), which can cause migration to hang during precopy phase, if e.g. I set the NIC packet loss rate to

[PATCH 6/7] target/arm: Implement v8.3 FPAC and FPACCOMBINE

2023-02-02 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/pauth_helper.c | 26 ++ target/arm/syndrome.h | 6 ++ 2 files changed, 32 insertions(+) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index 66dc90a289..3a2772de0e 100644 --- a/target/arm/pauth_helpe

[PATCH 4/7] target/arm: Implement v8.3 Pauth2

2023-02-02 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/pauth_helper.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index a83956652f..6ebf6df75c 100644 --- a/target/arm/pauth_helper.c +++ b/target/arm

[PATCH 2/7] target/arm: Implement v8.3 QARMA3 PAC cipher

2023-02-02 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/pauth_helper.c | 48 +++ 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index a0c9bea06b..f525ef7fad 100644 --- a/target/arm/pauth_helper.c +++ b/t

[PATCH 1/7] target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection

2023-02-02 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 57 --- target/arm/helper.c | 4 +-- target/arm/pauth_helper.c | 4 +-- 3 files changed, 58 insertions(+), 7 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 8cf70693be..9b

[PATCH 7/7] target/arm: Add CPU properties for most v8.3 PAC features

2023-02-02 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 5 +++ target/arm/cpu64.c | 81 ++ 2 files changed, 72 insertions(+), 14 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 9be59163ff..a9420bae67 100644 --- a/target/arm/cpu.h +++

[PATCH 0/7] Implement Most ARMv8.3 Pointer Authentication Features

2023-02-02 Thread Aaron Lindsay
Hello, I've taken a first pass at implementing many of the ARMv8.3 Pointer Authentication features and welcome your review. Thanks! -Aaron Aaron Lindsay (7): target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection target/arm: Implement v8.3 QARMA3 PAC cipher target/arm: Implement v8.3 Enha

[PATCH 5/7] targer/arm: Inform helpers whether a PAC instruction is 'combined'

2023-02-02 Thread Aaron Lindsay
An instruction is a 'combined' Pointer Authentication instruction if it does something in addition to PAC - for instance, branching to or loading an address from the authenticated pointer. Knowing whether a PAC operation is 'combined' is needed to implement the FPACCOMBINE feature for ARMv8.3. Sig

[PATCH 3/7] target/arm: Implement v8.3 EnhancedPAC

2023-02-02 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/pauth_helper.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index f525ef7fad..a83956652f 100644 --- a/target/arm/pauth_helper.c +++ b/target/arm/pauth_helper.c @

Re: [PATCH v2 3/3] util/userfaultfd: Support /dev/userfaultfd

2023-02-02 Thread Peter Xu
On Thu, Feb 02, 2023 at 11:52:21AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > Teach QEMU to use /dev/userfaultfd when it existed and fallback to the > > system call if either it's not there or doesn't have enough permission. > > > > Firstly, as long as the app has permission to access /dev/

Re: [PATCH 2/2] multifd: Fix flush of zero copy page send request

2023-02-02 Thread Juan Quintela
Zhenzhong Duan wrote: > Make IO channel flush call after the inflight request has been drained > in multifd thread, or else we may missed to flush the inflight request. > > Signed-off-by: Zhenzhong Duan Good catch! Reviewed-by: Juan Quintela queued the whole series.

Re: [PATCH 1/2] multifd: Fix a race on reading MultiFDPages_t.block

2023-02-02 Thread Juan Quintela
Zhenzhong Duan wrote: > In multifd_queue_page() MultiFDPages_t.block is checked twice. > Between the two checks, MultiFDPages_t.block may be reset to NULL > by multifd thread. This lead to the 2nd check always true then a > redundant page submitted to multifd thread again. > > Signed-off-by: Zhenz

Re: Candidate patches for Debian's 7.2 release (and backports)

2023-02-02 Thread Michael Tokarev
02.02.2023 18:10, Alex Bennée wrote: Hi Michael, As I mentioned on IRC the LKFT team use Debian's backported version of QEMU to test a wide range of kernel configurations in the cloud. Unfortunately 7.2 shipped out with a few regressions which has halted some of the testing when they upgraded f

Re: [PATCH v2 1/3] linux-headers: Update to v6.1

2023-02-02 Thread Peter Xu
On Thu, Feb 02, 2023 at 11:53:34AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > Signed-off-by: Peter Xu > > How does this change gets into the tree? > > I know that it is "automagically" generated, but who decides when that > goes into the tree? > > As we need that for the following patch

Re: [PATCH] hbitmap: fix hbitmap_status() return value for first dirty bit case

2023-02-02 Thread Eric Blake
On Thu, Feb 02, 2023 at 09:15:23PM +0300, Andrey Zhadchenko via wrote: > The last return statement should return true, as we already evaluated that > start == next_dirty > > Also, fix hbitmap_status() description in header > > Cc: qemu-sta...@nongnu.org > Fixes: a6426475a75 ("block/dirty-bitmap:

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-02 Thread H. Peter Anvin
On February 2, 2023 7:17:01 AM PST, James Bottomley wrote: >On Thu, 2023-02-02 at 07:03 -0800, H. Peter Anvin wrote: >[...] >> NAK. We need to fix the actual problem of the kernel stomping on >> memory it shouldn't, not paper around it. > >This is a first boot situation, not kexec (I just updated

ASan reports use-after-free when running munmap-pthread

2023-02-02 Thread Anton Johansson via
Hi, I was running check-tcg with ASan enabled on master, and ran into the following use-after-free. There appears to be a race between jump cache invalidation and thread destruction (?) I thought I'd post here since I noticed some previous discussion on the topic, and I'm not sure myself what a

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-02 Thread H. Peter Anvin
On February 2, 2023 7:17:01 AM PST, James Bottomley wrote: >On Thu, 2023-02-02 at 07:03 -0800, H. Peter Anvin wrote: >[...] >> NAK. We need to fix the actual problem of the kernel stomping on >> memory it shouldn't, not paper around it. > >This is a first boot situation, not kexec (I just updated

Re: [RFC PATCH] gitlab: call ninja directly and reduce build noise

2023-02-02 Thread Alex Bennée
Alex Bennée writes: > A significant portion of our CI logs are just enumerating each > successfully built object file. The current widespread versions of > ninja don't have a quiet option so we use NINJA_STATUS to add a fixed > string to the ninja output which we then filter with fgrep. If ther

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-02 Thread H. Peter Anvin
On February 2, 2023 7:17:01 AM PST, James Bottomley wrote: >On Thu, 2023-02-02 at 07:03 -0800, H. Peter Anvin wrote: >[...] >> NAK. We need to fix the actual problem of the kernel stomping on >> memory it shouldn't, not paper around it. > >This is a first boot situation, not kexec (I just updated

Re: [PATCH v10 0/3] hw/riscv: handle kernel_entry high bits with 32bit CPUs

2023-02-02 Thread Daniel Henrique Barboza
On 2/2/23 15:46, Conor Dooley wrote: On Thu, Feb 02, 2023 at 03:37:17PM -0300, Daniel Henrique Barboza wrote: On 2/2/23 14:25, Conor Dooley wrote: On Thu, Feb 02, 2023 at 10:58:07AM -0300, Daniel Henrique Barboza wrote: This new version removed the translate_fn() from patch 1 because it was

Re: [PATCH v10 0/3] hw/riscv: handle kernel_entry high bits with 32bit CPUs

2023-02-02 Thread Conor Dooley
On Thu, Feb 02, 2023 at 03:37:17PM -0300, Daniel Henrique Barboza wrote: > On 2/2/23 14:25, Conor Dooley wrote: > > On Thu, Feb 02, 2023 at 10:58:07AM -0300, Daniel Henrique Barboza wrote: > > > This new version removed the translate_fn() from patch 1 because it > > > wasn't removing the sign-exten

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-02-02 Thread Eugenio Perez Martin
On Thu, Feb 2, 2023 at 4:45 AM Jason Wang wrote: > > > 在 2023/2/1 19:48, Eugenio Perez Martin 写道: > > On Wed, Feb 1, 2023 at 12:20 PM Michael S. Tsirkin wrote: > >> On Wed, Feb 01, 2023 at 12:14:18PM +0100, Maxime Coquelin wrote: > >>> Thanks Eugenio for working on this. > >>> > >>> On 1/31/23 20

Re: [PATCH v10 0/3] hw/riscv: handle kernel_entry high bits with 32bit CPUs

2023-02-02 Thread Daniel Henrique Barboza
On 2/2/23 14:25, Conor Dooley wrote: On Thu, Feb 02, 2023 at 10:58:07AM -0300, Daniel Henrique Barboza wrote: Hi, This new version removed the translate_fn() from patch 1 because it wasn't removing the sign-extension for pentry as we thought it would. A more detailed explanation is given in

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-02-02 Thread Eugenio Perez Martin
On Thu, Feb 2, 2023 at 4:41 AM Jason Wang wrote: > > > 在 2023/2/1 15:49, Eugenio Perez Martin 写道: > > On Wed, Feb 1, 2023 at 4:29 AM Jason Wang wrote: > >> On Wed, Feb 1, 2023 at 3:11 AM Eugenio Perez Martin > >> wrote: > >>> On Tue, Jan 31, 2023 at 8:10 PM Eugenio Perez Martin > >>> wrote: >

[PATCH] hbitmap: fix hbitmap_status() return value for first dirty bit case

2023-02-02 Thread Andrey Zhadchenko via
The last return statement should return true, as we already evaluated that start == next_dirty Also, fix hbitmap_status() description in header Cc: qemu-sta...@nongnu.org Fixes: a6426475a75 ("block/dirty-bitmap: introduce bdrv_dirty_bitmap_status()") Signed-off-by: Andrey Zhadchenko --- include

Re: [PATCH 06/39] target/riscv: Add vrol.[vv, vx] and vror.[vv, vx, vi] decoding, translation and execution support

2023-02-02 Thread Philipp Tomsich
On Thu, 2 Feb 2023 at 18:35, Richard Henderson wrote: > > On 2/2/23 04:30, Philipp Tomsich wrote: > > On the second pass over these patches, here's how we can use gvec > > support for both vror and vrol: > > > > /* Synthesize a rotate-right from a negate(shift-amount) + rotate-left */ > > static v

Re: [PULL 00/27] qtest and misc patches

2023-02-02 Thread Peter Maydell
On Tue, 31 Jan 2023 at 10:12, Thomas Huth wrote: > > Hi Peter! > > The following changes since commit 13356edb87506c148b163b8c7eb0695647d00c2a: > > Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into > staging (2023-01-24 09:45:33 +) > > are available in the Git reposit

[RFC PATCH] gitlab: call ninja directly and reduce build noise

2023-02-02 Thread Alex Bennée
A significant portion of our CI logs are just enumerating each successfully built object file. The current widespread versions of ninja don't have a quiet option so we use NINJA_STATUS to add a fixed string to the ninja output which we then filter with fgrep. If there are any errors in the output w

Re: [PATCH] sbsa-ref: remove cortex-a76 from list of supported cpus

2023-02-02 Thread Peter Maydell
On Thu, 26 Jan 2023 at 11:44, Marcin Juszkiewicz wrote: > > Cortex-A76 supports 40bits of address space. sbsa-ref's memory > starts above this limit. > > Signed-off-by: Marcin Juszkiewicz > --- > hw/arm/sbsa-ref.c | 1 - > 1 file changed, 1 deletion(-) > Applied to target-arm.next, thanks. -

Re: [PATCH v3 0/2] hw/arm/virt: Handle HVF in finalize_gic_version()

2023-02-02 Thread Peter Maydell
On Fri, 23 Dec 2022 at 09:01, Alexander Graf wrote: > > The finalize_gic_version() function tries to determine which GIC version > the current accelerator / host combination supports. During the initial > HVF porting efforts, I didn't realize that I also had to touch this > function. Then Zenghui

Re: [PATCH v2] hvf: arm: Add support for GICv3

2023-02-02 Thread Peter Maydell
On Sat, 28 Jan 2023 at 22:45, Alexander Graf wrote: > > We currently only support GICv2 emulation. To also support GICv3, we will > need to pass a few system registers into their respective handler functions. > > This patch adds support for HVF to call into the TCG callbacks for GICv3 > system reg

Re: [PATCH v4 0/5] Series of fixes for PL011 char device

2023-02-02 Thread Peter Maydell
On Mon, 23 Jan 2023 at 16:23, Evgeny Iakovlev wrote: > > v4: > * Fixed post_load hook to be backwards-migratable > * Refactored some code in 5/5 as per review comments > > v3: > * Introduced a post_load hook for PL011State migration for > backwards-compatibility due to some input state fragility

Re: [PATCH 06/39] target/riscv: Add vrol.[vv, vx] and vror.[vv, vx, vi] decoding, translation and execution support

2023-02-02 Thread Richard Henderson
On 2/2/23 04:30, Philipp Tomsich wrote: On the second pass over these patches, here's how we can use gvec support for both vror and vrol: /* Synthesize a rotate-right from a negate(shift-amount) + rotate-left */ static void tcg_gen_gvec_rotrs(unsigned vece, uint32_t dofs, uint32_t aofs,

Re: [PATCH v10 0/3] hw/riscv: handle kernel_entry high bits with 32bit CPUs

2023-02-02 Thread Conor Dooley
On Thu, Feb 02, 2023 at 10:58:07AM -0300, Daniel Henrique Barboza wrote: > Hi, > > This new version removed the translate_fn() from patch 1 because it > wasn't removing the sign-extension for pentry as we thought it would. > A more detailed explanation is given in the commit msg of patch 1. > > W

Re: [PULL 00/35] Testing, docs, semihosting and plugin updates

2023-02-02 Thread Alex Bennée
Peter Maydell writes: > On Wed, 1 Feb 2023 at 18:07, Alex Bennée wrote: >> Peter Maydell writes: >> > I think this is "you can't put labels in qemu-options.hx, >> > because it gets included in two .rst files (invocation.rst >> > and qemu-manpage.rst), and Sphinx complains about the >> > dupli

Re: [PATCH 35/39] crypto: Move SM4_SBOXWORD from target/riscv

2023-02-02 Thread Richard Henderson
On 2/2/23 02:42, Lawrence Hunter wrote: From: Max Chou - Share SM4_SBOXWORD between target/riscv and target/arm. Signed-off-by: Max Chou Reviewed-by: Frank Chang --- include/crypto/sm4.h | 7 +++ target/arm/crypto_helper.c | 10 ++ 2 files changed, 9 insertions(+)

Re: [PATCH 2/2] tests/migration: add support for ppc64le for guestperf.py

2023-02-02 Thread Juan Quintela
Murilo Opsfelder Araujo wrote: > Add support for ppc64le for guestperf.py. On ppc, console is usually > hvc0 and serial device for pseries machine is spapr-vty. > > Signed-off-by: Murilo Opsfelder Araujo Reviewed-by: Juan Quintela

Re: [RFC v2 12/13] vdpa: preemptive kick at enable

2023-02-02 Thread Eugenio Perez Martin
On Mon, Jan 16, 2023 at 8:02 AM Jason Wang wrote: > > > 在 2023/1/13 17:06, Eugenio Perez Martin 写道: > > On Fri, Jan 13, 2023 at 4:39 AM Jason Wang wrote: > >> On Fri, Jan 13, 2023 at 11:25 AM Zhu, Lingshan > >> wrote: > >>> > >>> > >>> On 1/13/2023 10:31 AM, Jason Wang wrote: > On Fri, Jan

Re: [PATCH 1/2] tests/migration: add sysprof-capture-4 as dependency for stress binary

2023-02-02 Thread Juan Quintela
Murilo Opsfelder Araujo wrote: > `make tests/migration/stress` fails with: > > FAILED: tests/migration/stress > cc -m64 -mlittle-endian -o tests/migration/stress > tests/migration/stress.p/stress.c.o -Wl,--as-needed -Wl,--no-undefined -pie > -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -fs

Re: [PATCH 04/39] target/riscv: Add vclmulh.vv decoding, translation and execution support

2023-02-02 Thread Richard Henderson
On 2/2/23 02:41, Lawrence Hunter wrote: +static void do_vclmulh_vv(void *vd, void *vs1, void *vs2, int i) +{ +__uint128_t result = 0; In passing, you may not use __uint128_t directly, as it is not supported on all hosts. Philipp has given you good advice on adjusting the computation. r~

Re: [RFC v2 12/13] vdpa: preemptive kick at enable

2023-02-02 Thread Eugenio Perez Martin
On Thu, Feb 2, 2023 at 1:57 AM Si-Wei Liu wrote: > > > > On 1/13/2023 1:06 AM, Eugenio Perez Martin wrote: > > On Fri, Jan 13, 2023 at 4:39 AM Jason Wang wrote: > >> On Fri, Jan 13, 2023 at 11:25 AM Zhu, Lingshan > >> wrote: > >>> > >>> > >>> On 1/13/2023 10:31 AM, Jason Wang wrote: > On F

Re: [PATCH v15 02/11] s390x/cpu topology: add topology entries on CPU hotplug

2023-02-02 Thread Nina Schoetterl-Glausch
On Wed, 2023-02-01 at 14:20 +0100, Pierre Morel wrote: > The topology information are attributes of the CPU and are > specified during the CPU device creation. > > On hot plug we: > - calculate the default values for the topology for drawers, > books and sockets in the case they are not specifie

Re: [QEMU][PATCH v5 09/10] hw/arm: introduce xenpvh machine

2023-02-02 Thread Stefano Stabellini
On Thu, 2 Feb 2023, Paul Durrant wrote: > On 01/02/2023 18:22, Vikram Garhwal wrote: > > Hi Paul, > > > > Thanks for reviewing this and other patches in series. > > > > Please see my reply below. > > > > On 2/1/23 12:30 AM, Paul Durrant wrote: > > > On 31/01/2023 22:51, Vikram Garhwal wrote: > >

[PULL 22/26] migration: Add canary to VMSTATE_END_OF_LIST

2023-02-02 Thread Juan Quintela
From: "Dr. David Alan Gilbert" We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions; given that the current check is only for ->name being NULL, sometimes we get unlucky and the code apparently works and no one spots the error. Explicitly add a flag, VMS_END that should be set

[PULL 20/26] migration: Show downtime during postcopy phase

2023-02-02 Thread Juan Quintela
From: Peter Xu The downtime should be displayed during postcopy phase because the switchover phase is done. OTOH it's weird to show "expected downtime" which can confuse what does that mean if the switchover has already happened anyway. This is a slight ABI change on QMP, but I assume it should

[PULL 17/26] virtio-mem: Fail if a memory backend with "prealloc=on" is specified

2023-02-02 Thread Juan Quintela
From: David Hildenbrand "prealloc=on" for the memory backend does not work as expected, as virtio-mem will simply discard all preallocated memory immediately again. In the best case, it's an expensive NOP. In the worst case, it's an unexpected allocation error. Instead, "prealloc=on" should be s

[PULL 19/26] virtio-mem: Proper support for preallocation with migration

2023-02-02 Thread Juan Quintela
From: David Hildenbrand Ordinary memory preallocation runs when QEMU starts up and creates the memory backends, before processing the incoming migration stream. With virtio-mem, we don't know which memory blocks to preallocate before migration started. Now that we migrate the virtio-mem bitmap ea

[PULL 23/26] migration: Perform vmsd structure check during tests

2023-02-02 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Perform a check on vmsd structures during test runs in the hope of catching any missing terminators and other simple screwups. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Maydell Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migratio

[PULL 14/26] migration/savevm: Allow immutable device state to be migrated early (i.e., before RAM)

2023-02-02 Thread Juan Quintela
From: David Hildenbrand For virtio-mem, we want to have the plugged/unplugged state of memory blocks available before migrating any actual RAM content, and perform sanity checks before touching anything on the destination. This information is immutable on the migration source while migration is a

[PULL 07/26] migration/ram: Fix populate_read_range()

2023-02-02 Thread Juan Quintela
From: David Hildenbrand Unfortunately, commit f7b9dcfbcf44 broke populate_read_range(): the loop end condition is very wrong, resulting in that function not populating the full range. Lets' fix that. Fixes: f7b9dcfbcf44 ("migration/ram: Factor out populating pages readable in ram_block_populate

[PULL 26/26] migration: check magic value for deciding the mapping of channels

2023-02-02 Thread Juan Quintela
From: "manish.mishra" Current logic assumes that channel connections on the destination side are always established in the same order as the source and the first one will always be the main channel followed by the multifid or post-copy preemption channel. This may not be always true, as even if a

[PULL 21/26] migration/rdma: fix return value for qio_channel_rdma_{readv, writev}

2023-02-02 Thread Juan Quintela
From: Fiona Ebner upon errors. As the documentation in include/io/channel.h states, only -1 and QIO_CHANNEL_ERR_BLOCK should be returned upon error. Other values have the potential to confuse the call sites. error_setg is used rather than error_setg_errno, because there are certain code paths wh

[PULL 11/26] migration/ram: Optimize ram_write_tracking_start() for RamDiscardManager

2023-02-02 Thread Juan Quintela
From: David Hildenbrand ram_block_populate_read() already optimizes for RamDiscardManager. However, ram_write_tracking_start() will still try protecting discarded memory ranges. Let's optimize, because discarded ranges don't map any pages and (1) For anonymous memory, trying to protect using uf

[PULL 24/26] migration/dirtyrate: Show sample pages only in page-sampling mode

2023-02-02 Thread Juan Quintela
From: Zhenzhong Duan The value of "Sample Pages" is confusing in mode other than page-sampling. See below: (qemu) calc_dirty_rate -b 10 520 (qemu) info dirty_rate Status: measuring Start Time: 11646834 (ms) Sample Pages: 520 (per GB) Period: 10 (sec) Mode: dirty-bitmap Dirty rate: (not ready) (

[PULL 18/26] virtio-mem: Migrate immutable properties early

2023-02-02 Thread Juan Quintela
From: David Hildenbrand The bitmap and the size are immutable while migration is active: see virtio_mem_is_busy(). We can migrate this information early, before migrating any actual RAM content. Further, all information we need for sanity checks is immutable as well. Having this information in p

[PULL 25/26] io: Add support for MSG_PEEK for socket channel

2023-02-02 Thread Juan Quintela
From: "manish.mishra" MSG_PEEK peeks at the channel, The data is treated as unread and the next read shall still return this data. This support is currently added only for socket class. Extra parameter 'flags' is added to io_readv calls to pass extra read flags like MSG_PEEK. Reviewed-by: Peter

[PULL 06/26] util/userfaultfd: Add uffd_open()

2023-02-02 Thread Juan Quintela
From: Peter Xu Add a helper to create the uffd handle. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Peter Xu Signed-off-by: Juan Quintela --- include/qemu/userfaultfd.h | 8 migration/postcopy-ram.c | 11 +-- tests/qtest/migration-tes

[PULL 09/26] migration/ram: Don't explicitly unprotect when unregistering uffd-wp

2023-02-02 Thread Juan Quintela
From: David Hildenbrand When unregistering uffd-wp, older kernels before commit f369b07c86143 ("mm/uffd:reset write protection when unregister with wp-mode") won't clear the uffd-wp PTE bit. When re-registering uffd-wp, the previous uffd-wp PTE bits would trigger again. With above commit, the ker

[PULL 16/26] migration/ram: Factor out check for advised postcopy

2023-02-02 Thread Juan Quintela
From: David Hildenbrand Let's factor out this check, to be used in virtio-mem context next. While at it, fix a spelling error in a related comment. Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela S Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela

[PULL 10/26] migration/ram: Rely on used_length for uffd_change_protection()

2023-02-02 Thread Juan Quintela
From: David Hildenbrand ram_mig_ram_block_resized() will abort migration (including background snapshots) when resizing a RAMBlock. ram_block_populate_read() will only populate RAM up to used_length, so at least for anonymous memory protecting everything between used_length and max_length won't a

[PULL 08/26] migration/ram: Fix error handling in ram_write_tracking_start()

2023-02-02 Thread Juan Quintela
From: David Hildenbrand If something goes wrong during uffd_change_protection(), we would miss to unregister uffd-wp and not release our reference. Fix it by performing the uffd_change_protection(true) last. Note that a uffd_change_protection(false) on the recovery path without a prior uffd_chan

[PULL 03/26] migration: Split save_live_pending() into state_pending_*

2023-02-02 Thread Juan Quintela
We split the function into to: - state_pending_estimate: We estimate the remaining state size without stopping the machine. - state pending_exact: We calculate the exact amount of remaining state. The only "device" that implements different functions for _estimate() and _exact() is ram. Sig

[PULL 04/26] migration: Remove unused threshold_size parameter

2023-02-02 Thread Juan Quintela
Until previous commit, save_live_pending() was used for ram. Now with the split into state_pending_estimate() and state_pending_exact() it is not needed anymore, so remove them. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- include/migration/register.h | 2 -- migrati

[PULL 01/26] migration: Fix migration crash when target psize larger than host

2023-02-02 Thread Juan Quintela
From: Peter Xu Commit d9e474ea56 overlooked the case where the target psize is even larger than the host psize. One example is Alpha has 8K page size and migration will start to crash the source QEMU when running Alpha migration on x86. Fix it by detecting that case and set host start/end just

[PULL 15/26] migration/vmstate: Introduce VMSTATE_WITH_TMP_TEST() and VMSTATE_BITMAP_TEST()

2023-02-02 Thread Juan Quintela
From: David Hildenbrand We'll make use of both next in the context of virtio-mem. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela S Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- include/migration/vmsta

[PULL 13/26] migration/savevm: Prepare vmdesc json writer in qemu_savevm_state_setup()

2023-02-02 Thread Juan Quintela
From: David Hildenbrand ... and store it in the migration state. This is a preparation for storing selected vmds's already in qemu_savevm_state_setup(). Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela Signed-off-by: David H

[PULL 12/26] migration/savevm: Move more savevm handling into vmstate_save()

2023-02-02 Thread Juan Quintela
From: David Hildenbrand Let's move more code into vmstate_save(), reducing code duplication and preparing for reuse of vmstate_save() in qemu_savevm_state_setup(). We have to move vmstate_save() to make the compiler happy. We'll now also trace from qemu_save_device_state(), triggering the same t

[PULL 05/26] migration: simplify migration_iteration_run()

2023-02-02 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 594a42f085..cb9aee76c0 100644 --- a/migration/migration.c

[PULL 02/26] migration: No save_live_pending() method uses the QEMUFile parameter

2023-02-02 Thread Juan Quintela
So remove it everywhere. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- include/migration/register.h | 2 +- migration/savevm.h | 2 +- hw/s390x/s390-stattrib.c | 2 +- hw/vfio/migration.c| 2 +- migration/block-dirty-bitmap.c | 2 +- migrat

[PULL 00/26] Next patches

2023-02-02 Thread Juan Quintela
The following changes since commit deabea6e88f7c4c3c12a36ee30051c6209561165: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2023-02-02 10:10:07 +) are available in the Git repository at: https://gitlab.com/juan.quintela/qemu.git tags/next-pull

Re: [PATCH v15 01/11] s390x/cpu topology: adding s390 specificities to CPU topology

2023-02-02 Thread Nina Schoetterl-Glausch
Nit patch title: s390x/cpu topology: add s390 specifics to CPU topology ? On Wed, 2023-02-01 at 14:20 +0100, Pierre Morel wrote: > S390 adds two new SMP levels, drawers and books to the CPU > topology. > The S390 CPU have specific toplogy features like dedication ^o

[PULL v2 00/36] Testing, docs, semihosting and plugin updates

2023-02-02 Thread Alex Bennée
The following changes since commit 026817fb69414c9d3909d8b1a209f90180d777d6: Merge tag 'python-pull-request' of https://gitlab.com/jsnow/qemu into staging (2023-02-01 16:15:56 +) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pull-jan-omnibus-020223-1

  1   2   3   4   >