Re: [PATCH v6 24/24] target/arm: Define neoverse-n1

2022-08-11 Thread Zenghui Yu via
On 2022/8/11 0:47, Peter Maydell wrote: On Wed, 10 Aug 2022 at 14:14, Zenghui Yu wrote: The r4p1 TRM says that the Neoverse N1 core supports SPE (the value of ID_AA64DFR0.PMSVer is 0b0001) but do we really support SPE emulation in QEMU? The guest immediately received an unexpected exception (w

Re: [PATCH v4 08/24] ppc/ppc4xx: Introduce a DCR device model

2022-08-11 Thread Cédric Le Goater
On 8/10/22 16:48, BALATON Zoltan wrote: On Wed, 10 Aug 2022, Cédric Le Goater wrote: On 8/10/22 15:28, BALATON Zoltan wrote: On Wed, 10 Aug 2022, Cédric Le Goater wrote: On 8/9/22 19:21, BALATON Zoltan wrote: On Tue, 9 Aug 2022, Cédric Le Goater wrote: The Device Control Registers (DCR) of o

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-08-11 Thread Marc-André Lureau
Hi On Thu, Aug 11, 2022 at 10:52 AM Markus Armbruster wrote: > Marc-André Lureau writes: > > > Hi > > > > On Fri, Aug 5, 2022 at 12:12 PM Markus Armbruster > wrote: > > > >> marcandre.lur...@redhat.com writes: > >> > >> > From: Marc-André Lureau > >> > > >> > This is just moving qapi-gen.py a

Re: [PATCH 1/3] hw/ssi: fixup typos in ibex_spi_host

2022-08-11 Thread Alistair Francis
On Thu, Aug 11, 2022 at 11:02 AM Wilfred Mallawa wrote: > > From: Wilfred Mallawa > > This patch fixes up minor typos in ibex_spi_host > > Signed-off-by: Wilfred Mallawa Reviewed-by: Alistair Francis Alistair > --- > hw/ssi/ibex_spi_host.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 de

RE: [PATCH v3 1/2] Update AVX512 support for xbzrle_encode_buffer function

2022-08-11 Thread Xu, Ling1
Hi, Richard, Thanks for your nice comments! Your suggestions are very helpful. We have revised code in ram.c according to your comments. As for "unroll residual from main loop" problem in algorithm, we will fix this later. Thanks for your time and patience~ Best Regards, Ling -Origin

Re: [PATCH 1/2] hw/arm/virt: Improve address assignment for highmem IO regions

2022-08-11 Thread Marc Zyngier
Hi Gavin, On Thu, 11 Aug 2022 06:32:36 +0100, Gavin Shan wrote: > > Hi Marc, > > On 8/8/22 7:17 PM, Marc Zyngier wrote: > > On Wed, 03 Aug 2022 14:02:04 +0100, > > Gavin Shan wrote: [...] > Sorry for the delay. I think the original changelog is confusing > enough and sorry about it. I will i

[PATCH] ppc/pnv: Add initial P9/10 SBE model

2022-08-11 Thread Nicholas Piggin
The SBE (Self Boot Engine) are on-chip microcontrollers that perform early boot steps, as well as provide some runtime facilities (e.g., timer, secure register access, MPIPL). The latter facilities are accessed mostly via a message system called SBEFIFO. This driver provides initial emulation for

Re: [PATCH] ppc/pnv: Add initial P9/10 SBE model

2022-08-11 Thread Cédric Le Goater
On 8/11/22 09:54, Nicholas Piggin wrote: The SBE (Self Boot Engine) are on-chip microcontrollers that perform early boot steps, as well as provide some runtime facilities (e.g., timer, secure register access, MPIPL). The latter facilities are accessed mostly via a message system called SBEFIFO.

Re: [PATCH v7 02/12] multifd: Create page_count fields into both MultiFD{Recv,Send}Params

2022-08-11 Thread Leonardo Brás
On Tue, 2022-08-02 at 08:38 +0200, Juan Quintela wrote: > We were recalculating it left and right. We plan to change that > values on next patches. > > Signed-off-by: Juan Quintela > --- > migration/multifd.h | 4 > migration/multifd.c | 7 --- > 2 files changed, 8 insertions(+), 3 del

Re: [PATCH v7 04/12] multifd: Count the number of bytes sent correctly

2022-08-11 Thread Leonardo Brás
On Tue, 2022-08-02 at 08:38 +0200, Juan Quintela wrote: > Current code asumes that all pages are whole. That is not true for > example for compression already. Fix it for creating a new field > ->sent_bytes that includes it. > > All ram_counters are used only from the migration thread, so we hav

Re: [PATCH v7 05/12] migration: Make ram_save_target_page() a pointer

2022-08-11 Thread Leonardo Brás
On Tue, 2022-08-02 at 08:39 +0200, Juan Quintela wrote: > We are going to create a new function for multifd latest in the series. > > Signed-off-by: Juan Quintela > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Juan Quintela Double Signed-off-by again. > --- > migration/ram.c | 13 +++

Re: [PATCH v7 01/12] multifd: Create page_size fields into both MultiFD{Recv,Send}Params

2022-08-11 Thread Leonardo Brás
Hello Juan, On Tue, 2022-08-02 at 08:38 +0200, Juan Quintela wrote: > We were calling qemu_target_page_size() left and right. > > Signed-off-by: Juan Quintela IMHO looks a good idea to bring that info inside the multifd parameters. > --- > migration/multifd.h | 4 > migration/multi

Re: [PATCH v7 03/12] migration: Export ram_transferred_ram()

2022-08-11 Thread Leonardo Brás
On Tue, 2022-08-02 at 08:38 +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela > Reviewed-by: Dr. David Alan Gilbert > Reviewed-by: David Edmondson > Signed-off-by: Juan Quintela Is this doubled Signed-off-by intentional? > --- > migration/ram.h | 2 ++ > migration/ram.c | 2 +- > 2

Re: [PATCH v4 00/24] ppc: QOM'ify 405 board

2022-08-11 Thread Daniel Henrique Barboza
Cedric, I pushed patches 1-7 to gitlab.com/danielhb/qemu/tree/ppc-7.2. This way you have 7 less patches to worry about for the next versions. Thanks, Daniel On 8/9/22 12:38, Cédric Le Goater wrote: Hello, Here is large series QOM'ifying the PPC405 board. It introduces a new generic machine

Re: [PATCH] [PATCH] linux-user/aarch64: Reset target data on MADV_DONTNEED

2022-08-11 Thread Laurent Vivier
Le 10/08/2022 à 22:47, Richard Henderson a écrit : On 8/10/22 13:32, Vitaly Buka wrote: Sorry, I only noticed today that it's not submitted. Version is not critical for us, as we build from masters anyway. Richard, do you know a reason to consider this critical? On Wed, 10 Aug 2022 at 13:04, Pe

Re: [PATCH v4 00/24] ppc: QOM'ify 405 board

2022-08-11 Thread Cédric Le Goater
On 8/11/22 10:24, Daniel Henrique Barboza wrote: Cedric, I pushed patches 1-7 to gitlab.com/danielhb/qemu/tree/ppc-7.2. This way you have 7 less patches to worry about for the next versions. Thanks Daniel, C.

Re: [PATCH v7 06/12] multifd: Make flags field thread local

2022-08-11 Thread Leonardo Brás
On Tue, 2022-08-02 at 08:39 +0200, Juan Quintela wrote: > Use of flags with respect to locking was incensistant. For the > sending side: > - it was set to 0 with mutex held on the multifd channel. > - MULTIFD_FLAG_SYNC was set with mutex held on the migration thread. > - Everything else was done w

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-08-11 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, Aug 11, 2022 at 10:52 AM Markus Armbruster > wrote: > >> Marc-André Lureau writes: >> >> > Hi >> > >> > On Fri, Aug 5, 2022 at 12:12 PM Markus Armbruster >> wrote: >> > >> >> marcandre.lur...@redhat.com writes: >> >> >> >> > From: Marc-André Lureau >

Re: [PATCH v7 07/12] multifd: Prepare to send a packet without the mutex held

2022-08-11 Thread Leonardo Brás
On Tue, 2022-08-02 at 08:39 +0200, Juan Quintela wrote: > We do the send_prepare() and the fill of the head packet without the > mutex held. It will help a lot for compression and later in the > series for zero pages. > > Notice that we can use p->pages without holding p->mutex because > p->pendi

Re: [PATCH v3 1/4] accel/tcg: Invalidate translations when clearing PAGE_EXEC

2022-08-11 Thread Ilya Leoshkevich
On Wed, 2022-08-10 at 13:29 -0700, Richard Henderson wrote: > On 8/8/22 10:10, Ilya Leoshkevich wrote: > > After mprotect(addr, PROT_NONE), addr can still be executed if > > there > > are cached translations. Drop them. > > > > Signed-off-by: Ilya Leoshkevich > > --- > >   accel/tcg/translate-all

Re: [PATCH v7 08/12] multifd: Add capability to enable/disable zero_page

2022-08-11 Thread Leonardo Brás
On Tue, 2022-08-02 at 08:39 +0200, Juan Quintela wrote: > We have to enable it by default until we introduce the new code. > > Signed-off-by: Juan Quintela > > --- > > Change it to a capability. As capabilities are off by default, have > to change MULTIFD_ZERO_PAGE to MAIN_ZERO_PAGE, so it is

Re: [PATCH v7 09/12] migration: Export ram_release_page()

2022-08-11 Thread Leonardo Brás
On Tue, 2022-08-02 at 08:39 +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > migration/ram.h | 1 + > migration/ram.c | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/migration/ram.h b/migration/ram.h > index e844966f69..038d52f49f 100644 > --- a/migra

[PATCH v2] ppc/pnv: Add initial P9/10 SBE model

2022-08-11 Thread Nicholas Piggin
The SBE (Self Boot Engine) are on-chip microcontrollers that perform early boot steps, as well as provide some runtime facilities (e.g., timer, secure register access, MPIPL). The latter facilities are accessed mostly via a message system called SBEFIFO. This driver provides initial emulation for

[PATCH v4 2/5] accel/tcg: Introduce is_same_page()

2022-08-11 Thread Ilya Leoshkevich
Introduce a function that checks whether a given address is on the same page as where disassembly started. Having it improves readability of the following patches. Signed-off-by: Ilya Leoshkevich --- include/exec/translator.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/includ

[PATCH v4 0/5] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-11 Thread Ilya Leoshkevich
Hi, I noticed that when we get a SEGV due to jumping to non-readable memory, sometimes si_addr and program counter in siginfo_t are slightly off. I tracked this down to the assumption that translators stop before the end of a page, while in reality they may stop right after it. Patch 1 fixes a mi

[PATCH v4 3/5] target/s390x: Make translator stop before the end of a page

2022-08-11 Thread Ilya Leoshkevich
Right now translator stops right *after* the end of a page, which breaks reporting of fault locations when the last instruction of a multi-insn translation block crosses a page boundary. Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/translate.c | 15 +++ 1 file changed, 11 ins

[PATCH v4 5/5] tests/tcg: Test siginfo_t contents when jumping to non-readable pages

2022-08-11 Thread Ilya Leoshkevich
Add x86_64 and s390x tests to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/noexec.h | 114 tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/noexec.c | 145 +++ tests/tcg/x86_64/Makefile.targ

[PATCH v4 4/5] target/i386: Make translator stop before the end of a page

2022-08-11 Thread Ilya Leoshkevich
Right now translator stops right *after* the end of a page, which breaks reporting of fault locations when the last instruction of a multi-insn translation block crosses a page boundary. An implementation, like the one arm and s390x have, would require an i386 length disassembler, which is burdens

[PATCH v4 1/5] accel/tcg: Invalidate translations when clearing PAGE_EXEC

2022-08-11 Thread Ilya Leoshkevich
In the following sequence: addr(); mprotect(addr, 0x1000, PROT_NONE); addr(); the second call must cause a SEGV, but it doesn't, because there is a cached translation. Drop it. Signed-off-by: Ilya Leoshkevich --- accel/tcg/translate-all.c | 17 - 1 file changed, 12 insert

Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-08-11 Thread Nikunj A. Dadhania
On 06/07/22 13:50, Chao Peng wrote: > This is the v7 of this series which tries to implement the fd-based KVM > guest private memory. The patches are based on latest kvm/queue branch > commit: > > b9b71f43683a (kvm/queue) KVM: x86/mmu: Buffer nested MMU > split_desc_cache only by default capacit

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-08-11 Thread Marc-André Lureau
On Thu, Aug 11, 2022 at 1:05 PM Markus Armbruster wrote: > Marc-André Lureau writes: > > > Hi > > > > On Thu, Aug 11, 2022 at 10:52 AM Markus Armbruster > > wrote: > > > >> Marc-André Lureau writes: > >> > >> > Hi > >> > > >> > On Fri, Aug 5, 2022 at 12:12 PM Markus Armbruster > >> wrote: > >

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-08-11 Thread Peter Maydell
On Thu, 11 Aug 2022 at 11:09, Marc-André Lureau wrote: > On Thu, Aug 11, 2022 at 1:05 PM Markus Armbruster wrote: >> Your moves tear closely related code apart. This is going to be a drag >> for developers in general and maintainers in particular. >> >> Ergonomics suffer when related code is in

[PING] [PATCH v2] linux-user: Passthrough MADV_DONTNEED for certain file mappings

2022-08-11 Thread Ilya Leoshkevich
On Mon, 2022-07-25 at 14:50 +0200, Ilya Leoshkevich wrote: > This is a follow-up for commit 892a4f6a750a ("linux-user: Add partial > support for MADV_DONTNEED"), which added passthrough for anonymous > mappings. File mappings can be handled in a similar manner. > > In order to do that, mark pages,

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-08-11 Thread Marc-André Lureau
Hi On Thu, Aug 11, 2022 at 2:22 PM Peter Maydell wrote: > On Thu, 11 Aug 2022 at 11:09, Marc-André Lureau > wrote: > > On Thu, Aug 11, 2022 at 1:05 PM Markus Armbruster > wrote: > >> Your moves tear closely related code apart. This is going to be a drag > >> for developers in general and main

Re: [PATCH RFC 0/7] hostmem: NUMA-aware memory preallocation using ThreadContext

2022-08-11 Thread Joao Martins
On 8/9/22 19:06, David Hildenbrand wrote: > On 09.08.22 12:56, Joao Martins wrote: >> On 7/21/22 13:07, David Hildenbrand wrote: >>> This is a follow-up on "util: NUMA aware memory preallocation" [1] by >>> Michal. >>> >>> Setting the CPU affinity of threads from inside QEMU usually isn't >>> easil

Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-08-11 Thread Gupta, Pankaj
This is the v7 of this series which tries to implement the fd-based KVM guest private memory. The patches are based on latest kvm/queue branch commit: b9b71f43683a (kvm/queue) KVM: x86/mmu: Buffer nested MMU split_desc_cache only by default capacity Introduction In general thi

Re: [PATCH v4 08/24] ppc/ppc4xx: Introduce a DCR device model

2022-08-11 Thread BALATON Zoltan
On Thu, 11 Aug 2022, Cédric Le Goater wrote: On 8/10/22 16:48, BALATON Zoltan wrote: On Wed, 10 Aug 2022, Cédric Le Goater wrote: On 8/10/22 15:28, BALATON Zoltan wrote: On Wed, 10 Aug 2022, Cédric Le Goater wrote: On 8/9/22 19:21, BALATON Zoltan wrote: On Tue, 9 Aug 2022, Cédric Le Goater w

[RFC PATCH] tests/avocado: apply a band aid to aspeed-evb login

2022-08-11 Thread Alex Bennée
This is really a limitation of the underlying console code which doesn't allow us to detect the login: and following "#" prompts because it reads input line wise. By adding a small delay we ensure that the login prompt has appeared so we don't accidentally spaff the shell commands to a confused get

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-08-11 Thread Markus Armbruster
Peter Maydell writes: > On Thu, 11 Aug 2022 at 11:09, Marc-André Lureau > wrote: >> On Thu, Aug 11, 2022 at 1:05 PM Markus Armbruster wrote: >>> Your moves tear closely related code apart. This is going to be a drag >>> for developers in general and maintainers in particular. >>> >>> Ergonomic

Re: [PATCH] [PATCH] linux-user/aarch64: Reset target data on MADV_DONTNEED

2022-08-11 Thread Peter Maydell
On Thu, 11 Aug 2022 at 09:29, Laurent Vivier wrote: > > Le 10/08/2022 à 22:47, Richard Henderson a écrit : > > On 8/10/22 13:32, Vitaly Buka wrote: > >> Sorry, I only noticed today that it's not submitted. > >> Version is not critical for us, as we build from masters anyway. > >> Richard, do you k

Re: [RFC PATCH] tests/avocado: apply a band aid to aspeed-evb login

2022-08-11 Thread Cédric Le Goater
On 8/11/22 13:43, Alex Bennée wrote: This is really a limitation of the underlying console code which doesn't allow us to detect the login: and following "#" prompts because it reads input line wise. By adding a small delay we ensure that the login prompt has appeared so we don't accidentally spa

Re: [PATCH v3 1/1] os-posix: asynchronous teardown for shutdown on Linux

2022-08-11 Thread Claudio Imbrenda
On Wed, 10 Aug 2022 17:30:41 -0300 Murilo Opsfelder Araújo wrote: > Hi, Claudio. Hi Murilo, [...] > I've smoke-tested this on ppc and everything looks fine. > For what's worth: > > Reviewed-by: Murilo Opsfelder Araujo > Tested-by: Murilo Opsfelder Araujo thanks a lot for testing this! >

Re: [PATCH v2 1/2] util/main-loop: Fix maximum number of wait objects for win32

2022-08-11 Thread Bin Meng
On Wed, Aug 10, 2022 at 11:57 PM Marc-André Lureau wrote: > > > > On Wed, Aug 10, 2022 at 7:20 PM Bin Meng wrote: >> >> On Wed, Aug 10, 2022 at 1:06 AM Marc-André Lureau >> wrote: >> > >> > Hi >> > >> > On Tue, Aug 9, 2022 at 8:43 PM Bin Meng wrote: >> >> >> >> From: Bin Meng >> >> >> >> The m

[PATCH v5 03/18] dump: Refactor dump_iterate and introduce dump_filter_memblock_*()

2022-08-11 Thread Janosch Frank
The iteration over the memblocks in dump_iterate() is hard to understand so it's about time to clean it up. Instead of manually grabbing the next memblock we can use QTAILQ_FOREACH to iterate over all memblocks. Additionally we move the calculation of the offset and length out by introducing and u

[PATCH v5 15/18] s390x: Add protected dump cap

2022-08-11 Thread Janosch Frank
Add a protected dump capability for later feature checking. Signed-off-by: Janosch Frank Reviewed-by: Steffen Eiden --- target/s390x/kvm/kvm.c | 7 +++ target/s390x/kvm/kvm_s390x.h | 1 + 2 files changed, 8 insertions(+) diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c in

[PATCH v5 05/18] dump: Rework filter area variables

2022-08-11 Thread Janosch Frank
While the DumpState begin and length variables directly mirror the API variable names they are not very descriptive. So let's add a "filter_area_" prefix and make has_filter a function checking length > 0. Signed-off-by: Janosch Frank --- dump/dump.c | 53 +-

[PATCH v5 17/18] s390x: Add KVM PV dump interface

2022-08-11 Thread Janosch Frank
Let's add a few bits of code which hide the new KVM PV dump API from us via new functions. Signed-off-by: Janosch Frank --- hw/s390x/pv.c | 51 +++ include/hw/s390x/pv.h | 8 +++ 2 files changed, 59 insertions(+) diff --git a/hw/s390x/pv.c b/

[PATCH v5 09/18] dump: Use a buffer for ELF section data and headers

2022-08-11 Thread Janosch Frank
Currently we're writing the NULL section header if we overflow the physical header number in the ELF header. But in the future we'll add custom section headers AND section data. To facilitate this we need to rearange section handling a bit. As with the other ELF headers we split the code into a pr

[PATCH v5 14/18] DRAFT: linux header sync

2022-08-11 Thread Janosch Frank
Add the uapi data for KVM_CAP_S390_PROTECTED_DUMP which I expect to be added with 5.20. Also add the missing NT_S390_RI_CB and the new NT_S390_PV_CPU_DATA elf note types. Signed-off-by: Janosch Frank --- include/elf.h | 2 ++ linux-headers/linux/kvm.h | 54 +

[PATCH v5 02/18] dump: Rename write_elf_loads to write_elf_phdr_loads

2022-08-11 Thread Janosch Frank
Let's make it a bit clearer that we write the program headers of the PT_LOAD type. Signed-off-by: Janosch Frank Reviewed-by: Marc-André Lureau Reviewed-by: Janis Schoetterl-Glausch Reviewed-by: Steffen Eiden --- dump/dump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --g

[PATCH v5 18/18] s390x: pv: Add dump support

2022-08-11 Thread Janosch Frank
Sometimes dumping a guest from the outside is the only way to get the data that is needed. This can be the case if a dumping mechanism like KDUMP hasn't been configured or data needs to be fetched at a specific point. Dumping a protected guest from the outside without help from fw/hw doesn't yield

[PATCH v5 10/18] dump: Reorder struct DumpState

2022-08-11 Thread Janosch Frank
Let's move ELF related members into one block and guest memory related ones into another to improve readability. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson Reviewed-by: Marc-André Lureau --- include/sysemu/dump.h | 16 +--- 1 file changed, 9 insertions(+), 7 deleti

[PATCH v5 11/18] dump: Swap segment and section header locations

2022-08-11 Thread Janosch Frank
For the upcoming string table and arch section support we need to modify the elf layout a bit. Instead of the segments, i.e. the guest's memory contents, being the last area the section data will live at the end of the file. This will allow us to write the section data after all guest memory has be

[PATCH v5 00/18] dump: Add arch section and s390x PV dump

2022-08-11 Thread Janosch Frank
Previously this series was two separate series: * Arch section support Adds the possibility for arch code to add custom section data. * s390 PV dump support Adds PV dump data to the custom arch sections. I've chosen to merge them so it's easier to understand why the arch section support h

[PATCH v5 04/18] dump: Rework get_start_block

2022-08-11 Thread Janosch Frank
get_start_block() returns the start address of the first memory block or -1. With the GuestPhysBlock iterator conversion we don't need to set the start address and can therefore remove that code and the "start" DumpState struct member. The only functionality left is the validation of the start blo

[PATCH v5 16/18] s390x: Introduce PV query interface

2022-08-11 Thread Janosch Frank
Introduce an interface over which we can get information about UV data. Signed-off-by: Janosch Frank Reviewed-by: Steffen Eiden --- hw/s390x/pv.c | 61 ++ hw/s390x/s390-virtio-ccw.c | 6 include/hw/s390x/pv.h | 10 +++ 3 files chan

[PATCH v5 13/18] dump/dump: Add arch section support

2022-08-11 Thread Janosch Frank
Add hooks which architectures can use to add arbitrary data to custom sections. Signed-off-by: Janosch Frank --- dump/dump.c| 120 ++--- include/sysemu/dump-arch.h | 3 + 2 files changed, 100 insertions(+), 23 deletions(-) diff --git a/dump/dump

[PATCH v5 01/18] dump: Replace opaque DumpState pointer with a typed one

2022-08-11 Thread Janosch Frank
It's always better to convey the type of a pointer if at all possible. So let's add the DumpState typedef to typedefs.h and move the dump note functions from the opaque pointers to DumpState pointers. Signed-off-by: Janosch Frank CC: Peter Maydell CC: Cédric Le Goater CC: Daniel Henrique Barboz

[PATCH v5 07/18] dump: Split elf header functions into prepare and write

2022-08-11 Thread Janosch Frank
Let's split the write from the modification of the elf header so we can consolidate the write of the data in one function. Signed-off-by: Janosch Frank --- dump/dump.c | 100 1 file changed, 53 insertions(+), 47 deletions(-) diff --git a/dump

Re: [PATCH v4 08/24] ppc/ppc4xx: Introduce a DCR device model

2022-08-11 Thread Cédric Le Goater
Don't drop Ppc4xxDcrDeviceState, that simplifies it a lot. If you don't want to make mote changes, let me take your series and make a version with my proposed changes. Patch 1-7 are already merged. You can grab the rest here : https://github.com/legoater/qemu/tree/ppc-ref405ep I have do

[PATCH v5 12/18] dump/dump: Add section string table support

2022-08-11 Thread Janosch Frank
As sections don't have a type like the notes do we need another way to determine their contents. The string table allows us to assign each section an identification string which architectures can then use to tag their sections with. There will be no string table if the architecture doesn't add cus

[PATCH v15 1/6] qmp: add QMP command x-query-virtio

2022-08-11 Thread Jonah Palmer
From: Laurent Vivier This new command lists all the instances of VirtIODevices with their canonical QOM path and name. [Jonah: @virtio_list duplicates information that already exists in the QOM composition tree. However, extracting necessary information from this tree seems to be a bit convolu

[PATCH v5 06/18] dump: Rework dump_calculate_size function

2022-08-11 Thread Janosch Frank
dump_calculate_size() sums up all the sizes of the guest memory blocks. Since we already have a function that calculates the size of a single memory block (dump_get_memblock_size()) we can simply iterate over the blocks and use the function instead of calculating the size ourselves. Signed-off-by:

[PATCH v15 5/6] qmp: add QMP command x-query-virtio-queue-element

2022-08-11 Thread Jonah Palmer
From: Laurent Vivier This new command shows the information of a VirtQueue element. [Note: Up until v10 of this patch series, virtio.json had many (15+) enums defined (e.g. decoded device features, statuses, etc.). In v10 most of these enums were removed and replaced with string literals. By

[PATCH v5 08/18] dump: Rename write_elf*_phdr_note to prepare_elf*_phdr_note

2022-08-11 Thread Janosch Frank
The functions in question do not actually write to the file descriptor they set up a buffer which is later written to the fd. Signed-off-by: Janosch Frank --- dump/dump.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index 8a2a97a85e..a9053

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-08-11 Thread Daniel P . Berrangé
On Thu, Aug 11, 2022 at 02:50:01PM +0400, Marc-André Lureau wrote: > Hi > > On Thu, Aug 11, 2022 at 2:22 PM Peter Maydell > wrote: > > > On Thu, 11 Aug 2022 at 11:09, Marc-André Lureau > > wrote: > > > On Thu, Aug 11, 2022 at 1:05 PM Markus Armbruster > > wrote: > > >> Your moves tear closely

Re: [PATCH v7 03/14] mm: Introduce memfile_notifier

2022-08-11 Thread Quentin Perret
+CC Fuad On Wednesday 10 Aug 2022 at 14:38:43 (+), Sean Christopherson wrote: > > I understand Sean's suggestion about abstracting, but if the new name > > makes it harder to grasp and there isn't really an alternative to memfd > > in sight, I'm not so sure I enjoy the tried abstraction here.

Re: [PATCH v3 1/1] os-posix: asynchronous teardown for shutdown on Linux

2022-08-11 Thread Daniel P . Berrangé
On Tue, Aug 09, 2022 at 08:40:24AM +0200, Claudio Imbrenda wrote: > This patch adds support for asynchronously tearing down a VM on Linux. > > When qemu terminates, either naturally or because of a fatal signal, > the VM is torn down. If the VM is huge, it can take a considerable > amount of time

[PATCH v15 2/6] qmp: add QMP command x-query-virtio-status

2022-08-11 Thread Jonah Palmer
From: Laurent Vivier This new command shows the status of a VirtIODevice, including its corresponding vhost device's status (if active). Next patch will improve output by decoding feature bits, including vhost device's feature bits (backend, protocol, acked, and features). Also will decode statu

[PATCH v15 0/6] hmp,qmp: Add commands to introspect virtio devices

2022-08-11 Thread Jonah Palmer
This series introduces new QMP/HMP commands to dump the status of a virtio device at different levels. [Jonah: Rebasing from previous patchset from Apr. 1 (v14). Original patches are by Laurent Vivier from May 2020. I sincerely apologize for the *massive* delay in getting this latest v15 serie

[PATCH v15 4/6] qmp: add QMP commands for virtio/vhost queue-status

2022-08-11 Thread Jonah Palmer
From: Laurent Vivier These new commands show the internal status of a VirtIODevice's VirtQueue and a vhost device's vhost_virtqueue (if active). Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 14 +++ hw/virtio/virtio.c | 103 qap

Re: [PULL 0/5] Misc QEMU 7.1 fixes for 2002-08-08

2022-08-11 Thread Paolo Bonzini
On 8/8/22 16:23, Thomas Huth wrote: I still had some questions wrt to Daniel's patch, especially there seems to be a bug ("spcie" instead of "spice"), see: https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg01153.html I doubt that this test is working if spice is enabled... (which lead

[PATCH v15 3/6] qmp: decode feature & status bits in virtio-status

2022-08-11 Thread Jonah Palmer
From: Laurent Vivier Display feature names instead of bitmaps for host, guest, and backend for VirtIODevices. Display status names instead of bitmaps for VirtIODevices. Display feature names instead of bitmaps for backend, protocol, acked, and features (hdev->features) for vhost devices. Decod

Re: [PATCH] tests/qtest: misc tweaks to readconfig

2022-08-11 Thread Thomas Huth
On 09/08/2022 11.38, Daniel P. Berrangé wrote: The property name parameter is ignored when visiting a top level type, but the obvious typo should be fixed to avoid confusion. A few indentation issues were tidied up. We can break out of the loop when finding the RNG device. Finally, close the temp

[PATCH v15 6/6] hmp: add virtio commands

2022-08-11 Thread Jonah Palmer
From: Laurent Vivier This patch implements the HMP versions of the virtio QMP commands. [Jonah: Adjusted hmp monitor output format for features / statuses with their descriptions.] Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hmp-commands-info.hx | 70 ++ i

Re: [PATCH v5 18/18] s390x: pv: Add dump support

2022-08-11 Thread Janosch Frank
On 8/11/22 14:11, Janosch Frank wrote: Sometimes dumping a guest from the outside is the only way to get the data that is needed. This can be the case if a dumping mechanism like KDUMP hasn't been configured or data needs to be fetched at a specific point. Dumping a protected guest from the outsi

[PATCH for-7.1] target/arm: Don't report Statistical Profiling Extension in ID registers

2022-08-11 Thread Peter Maydell
The newly added neoverse-n1 CPU has ID register values which indicate the presence of the Statistical Profiling Extension, because the real hardware has this feature. QEMU's TCG emulation does not yet implement SPE, though (not even as a minimal stub implementation), so guests will crash if they t

Re: [PATCH] [PATCH] linux-user/aarch64: Reset target data on MADV_DONTNEED

2022-08-11 Thread Laurent Vivier
Le 11/08/2022 à 13:54, Peter Maydell a écrit : On Thu, 11 Aug 2022 at 09:29, Laurent Vivier wrote: Le 10/08/2022 à 22:47, Richard Henderson a écrit : On 8/10/22 13:32, Vitaly Buka wrote: Sorry, I only noticed today that it's not submitted. Version is not critical for us, as we build from mas

Re: [PATCH v7 05/14] mm/memfd: Introduce MFD_INACCESSIBLE flag

2022-08-11 Thread Chao Peng
On Wed, Aug 10, 2022 at 11:55:19AM +0200, David Hildenbrand wrote: > On 10.08.22 11:37, Chao Peng wrote: > > On Fri, Aug 05, 2022 at 03:28:50PM +0200, David Hildenbrand wrote: > >> On 06.07.22 10:20, Chao Peng wrote: > >>> Introduce a new memfd_create() flag indicating the content of the > >>> crea

problem with qemu-system-loongarch64

2022-08-11 Thread Waldemar Brodkorb
Hi Qemu developers, I am trying to bootup a loongarch64 Linux kernel in Qemu 7.1.0-rc2. The problem is I get no output when using following command: qemu-system-loongarch64 -M virt -nographic -kernel vmlinux You can find my vmlinux initramfs here: https://debug.openadk.org/vmlinux It is cross-co

Re: [RFC PATCH] tests/avocado: apply a band aid to aspeed-evb login

2022-08-11 Thread Alex Bennée
Cédric Le Goater writes: > On 8/11/22 13:43, Alex Bennée wrote: >> This is really a limitation of the underlying console code which >> doesn't allow us to detect the login: and following "#" prompts >> because it reads input line wise. By adding a small delay we ensure >> that the login prompt

[RFC] Testing 7.1.0-rc2, qemu-ppc does not give valid disassembly

2022-08-11 Thread Pierre Muller
Hello, I don't know if this is the right place to submit this report, but I have a problem with my attempt to check the 7.1.0 release candidate for linux user powerpc CPU. I am testing a simple executable, compiled with Free Pacal compiler, but also linked to libc. This is what I obtain w

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-08-11 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, Aug 11, 2022 at 02:50:01PM +0400, Marc-André Lureau wrote: >> Hi >> >> On Thu, Aug 11, 2022 at 2:22 PM Peter Maydell >> wrote: [...] >> > As Markus says, your branch ends up moving most of qobject into >> > qemu-common/. We are never going to let that out

Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-08-11 Thread Chao Peng
On Thu, Aug 11, 2022 at 01:30:06PM +0200, Gupta, Pankaj wrote: > > > > This is the v7 of this series which tries to implement the fd-based KVM > > > guest private memory. The patches are based on latest kvm/queue branch > > > commit: > > > > > >b9b71f43683a (kvm/queue) KVM: x86/mmu: Buffer ne

Re: [PATCH v7 03/14] mm: Introduce memfile_notifier

2022-08-11 Thread Chao Peng
On Thu, Aug 11, 2022 at 12:27:56PM +, Quentin Perret wrote: > +CC Fuad > > On Wednesday 10 Aug 2022 at 14:38:43 (+), Sean Christopherson wrote: > > > I understand Sean's suggestion about abstracting, but if the new name > > > makes it harder to grasp and there isn't really an alternative t

towards a workable O_DIRECT outmigration to a file

2022-08-11 Thread Nikolay Borisov
Hello, I'm currently looking into implementing a 'file:' uri for migration save in qemu. Ideally the solution will be O_DIRECT compatible. I'm aware of the branch https://gitlab.com/berrange/qemu/-/tree/mig-file. In the process of brainstorming how a solution would like the a couple of questi

Re: [PATCH v3 1/1] os-posix: asynchronous teardown for shutdown on Linux

2022-08-11 Thread Christian Borntraeger
Am 11.08.22 um 14:27 schrieb Daniel P. Berrangé: [...] --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4743,6 +4743,23 @@ HXCOMM Internal use DEF("qtest", HAS_ARG, QEMU_OPTION_qtest, "", QEMU_ARCH_ALL) DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log, "", QEMU_ARCH_ALL) +#ifdef __linux__

Re: [PATCH v3 1/1] os-posix: asynchronous teardown for shutdown on Linux

2022-08-11 Thread Claudio Imbrenda
On Thu, 11 Aug 2022 13:27:44 +0100 Daniel P. Berrangé wrote: > On Tue, Aug 09, 2022 at 08:40:24AM +0200, Claudio Imbrenda wrote: > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > When qemu terminates, either naturally or because of a fatal signal, > > the VM is t

Re: [PATCH v3 1/1] os-posix: asynchronous teardown for shutdown on Linux

2022-08-11 Thread Daniel P . Berrangé
On Thu, Aug 11, 2022 at 03:56:23PM +0200, Claudio Imbrenda wrote: > On Thu, 11 Aug 2022 13:27:44 +0100 > Daniel P. Berrangé wrote: > > > On Tue, Aug 09, 2022 at 08:40:24AM +0200, Claudio Imbrenda wrote: > > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > > > When

Re: [RFC PATCH] tests/avocado: apply a band aid to aspeed-evb login

2022-08-11 Thread John Snow
On Thu, Aug 11, 2022 at 7:43 AM Alex Bennée wrote: > > This is really a limitation of the underlying console code which > doesn't allow us to detect the login: and following "#" prompts > because it reads input line wise. By adding a small delay we ensure > that the login prompt has appeared so we

Re: towards a workable O_DIRECT outmigration to a file

2022-08-11 Thread Nikolay Borisov
[adding Juan and David to cc as I had missed them. ] On 11.08.22 г. 16:47 ч., Nikolay Borisov wrote: Hello, I'm currently looking into implementing a 'file:' uri for migration save in qemu. Ideally the solution will be O_DIRECT compatible. I'm aware of the branch https://gitlab.com/berrange/q

Re: [RFC PATCH] tests/avocado: apply a band aid to aspeed-evb login

2022-08-11 Thread Cédric Le Goater
On 8/11/22 16:08, John Snow wrote: On Thu, Aug 11, 2022 at 7:43 AM Alex Bennée wrote: This is really a limitation of the underlying console code which doesn't allow us to detect the login: and following "#" prompts because it reads input line wise. By adding a small delay we ensure that the lo

Re: [PATCH 2/3] hw/ssi: fixup coverity issue

2022-08-11 Thread Andrew Jones
On Thu, Aug 11, 2022 at 09:02:00AM +1000, Wilfred Mallawa wrote: > From: Wilfred Mallawa > > This patch addresses the coverity issues specified in [1], > as suggested, `FIELD_DP32()`/`FIELD_EX32()` macros have been > implemented to clean up the code. > > Additionally, the `EVENT_ENABLE` register

Re: [PATCH 1/3] hw/ssi: fixup typos in ibex_spi_host

2022-08-11 Thread Andrew Jones
On Thu, Aug 11, 2022 at 09:01:58AM +1000, Wilfred Mallawa wrote: > From: Wilfred Mallawa > > This patch fixes up minor typos in ibex_spi_host > > Signed-off-by: Wilfred Mallawa > --- > hw/ssi/ibex_spi_host.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/ssi

Re: [RFC PATCH] tests/avocado: apply a band aid to aspeed-evb login

2022-08-11 Thread Alex Bennée
John Snow writes: > On Thu, Aug 11, 2022 at 7:43 AM Alex Bennée wrote: >> >> This is really a limitation of the underlying console code which >> doesn't allow us to detect the login: and following "#" prompts >> because it reads input line wise. By adding a small delay we ensure >> that the lo

[PATCH v2 3/8] parallels: Replace bdrv_co_pwrite_sync by bdrv_co_flush for BAT flushing

2022-08-11 Thread Alexander Ivanov
It's too costly to write all the BAT to the disk. Let the flush function write only dirty blocks. Use parallels_set_bat_entry for setting a BAT entry and marking a relevant block as dirty. Move bdrv_co_flush call outside the locked area. v2: Patch order was changed so the replacement is done in pa

[PATCH v2 7/8] parallels: Move statistic collection to a separate function

2022-08-11 Thread Alexander Ivanov
v2: Move fragmentation counting code to this function too. Signed-off-by: Alexander Ivanov --- block/parallels.c | 54 +++ 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 8737eadfb4..d0364182b

[PATCH v2 5/8] parallels: Move check of cluster outside image to a separate function

2022-08-11 Thread Alexander Ivanov
v2: Move unrelated helper parallels_set_bat_entry creation to a separate patch. Signed-off-by: Alexander Ivanov --- block/parallels.c | 48 ++- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/block/parallels.c b/block/parallels.c in

[PATCH v2 0/8] parallels: Refactor the code of images checks and fix a bug

2022-08-11 Thread Alexander Ivanov
Fix image inflation when offset in BAT is out of image. Replace whole BAT syncing by flushing only dirty blocks. Move all the checks outside the main check function in separate functions Use WITH_QEMU_LOCK_GUARD for more clean code. Alexander Ivanov (8): parallels: Out of image offset in BAT

[PATCH v2 4/8] parallels: Move check of unclean image to a separate function

2022-08-11 Thread Alexander Ivanov
v2: Revert the condition with s->header_unclean. Signed-off-by: Alexander Ivanov --- block/parallels.c | 31 +-- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 6879ea4597..c53b2810cf 100644 --- a/block/paral

  1   2   3   >