Re: [PATCH 2/2] vhost: Add Error parameter to vhost_scsi_common_start()

2023-08-16 Thread Li Feng
> 2023年8月14日 下午8:11,Raphael Norwitz 写道: > > Thanks for the cleanup! A few comments. > >> On Aug 4, 2023, at 1:29 AM, Li Feng wrote: >> >> Add a Error parameter to report the real error, like vhost-user-blk. >> >> Signed-off-by: Li Feng >> --- >> hw/scsi/vhost-scsi-common.c | 17 +

Re: [PATCH 1/2] vhost-user: fix lost reconnect

2023-08-16 Thread Li Feng
> 2023年8月14日 下午8:11,Raphael Norwitz 写道: > > Why can’t we rather fix this by adding a “event_cb” param to > vhost_user_async_close and then call qemu_chr_fe_set_handlers in > vhost_user_async_close_bh()? > > Even if calling vhost_dev_cleanup() twice is safe today I worry future > changes may

Re: qemu-system-x86 dependencies

2023-08-16 Thread Paul Menzel
Dear Fourhundred, Am 17.08.23 um 07:10 schrieb Fourhundred Thecat: > On 2023-08-16 15:02, Fourhundred Thecat wrote:  > On 2023-08-16 14:52, Michael Tokarev wrote: 16.08.2023 15:37, Philippe Mathieu-Daudé пишет: Cc'ing Michael why does qemu depend on sound and gstreamer and wayland librari

Re: [PATCH] qga: Start qemu-ga service after NetworkManager start

2023-08-16 Thread Konstantin Kostiuk
Hi, Efim Thanks for your contribution. I think your patch is a partial solution because other network managers can be used for example systemd-networkd or dhcpcd. Maybe a better solution is After=network.target. Do you have any other suggestions? Best Regards, Konstantin Kostiuk. On Wed, Aug

Re: QEMU Summit Minutes 2023

2023-08-16 Thread Thomas Huth
On 13/07/2023 15.21, Peter Maydell wrote: QEMU Summit Minutes 2023 ... Topic 3: Should we split responsibility for managing CoC reports? = The QEMU project happily does not have to deal with many Code of C

RE: [RFC PATCH v4 22/24] vfio/pci: Adapt vfio pci hot reset support with iommufd BE

2023-08-16 Thread Duan, Zhenzhong
>-Original Message- >From: Nicolin Chen >Sent: Thursday, August 17, 2023 1:26 PM >Subject: Re: [RFC PATCH v4 22/24] vfio/pci: Adapt vfio pci hot reset support >with iommufd BE > >On Wed, Jul 12, 2023 at 03:25:26PM +0800, Zhenzhong Duan wrote: > >> +#ifdef CONFIG_IOMMUFD >> +static VFIODevi

RE: [RFC PATCH v4 21/24] vfio/as: Add vfio device iterator callback for iommufd

2023-08-16 Thread Duan, Zhenzhong
>-Original Message- >From: Nicolin Chen >Sent: Thursday, August 17, 2023 1:49 PM >Subject: Re: [RFC PATCH v4 21/24] vfio/as: Add vfio device iterator callback >for >iommufd > >On Wed, Jul 12, 2023 at 03:25:25PM +0800, Zhenzhong Duan wrote: > >> The way to get vfio device pointer is differ

Re: [RFC PATCH v4 21/24] vfio/as: Add vfio device iterator callback for iommufd

2023-08-16 Thread Nicolin Chen
On Wed, Jul 12, 2023 at 03:25:25PM +0800, Zhenzhong Duan wrote: > The way to get vfio device pointer is different between legacy > container and iommufd container, with iommufd backend support > added, it's time to add the iterator support for iommufd. > > In order to implement it, a pointer to h

Re: [PATCH v2 4/5] vdpa: move vhost_vdpa_set_vrings_ready to the caller

2023-08-16 Thread Eugenio Perez Martin
On Mon, Aug 14, 2023 at 8:57 AM Jason Wang wrote: > > On Thu, Aug 10, 2023 at 11:36 PM Eugenio Pérez wrote: > > > > Doing that way allows CVQ to be enabled before the dataplane vqs, > > restoring the state as MQ or MAC addresses properly in the case of a > > migration. > > > > A typo in the subje

[PATCH v5 01/26] contrib/plugins: Use GRWLock in execlog

2023-08-16 Thread Akihiko Odaki
execlog had the following comment: > As we could have multiple threads trying to do this we need to > serialise the expansion under a lock. Threads accessing already > created entries can continue without issue even if the ptr array > gets reallocated during resize. However, when the ptr array get

[PATCH v5 03/26] gdbstub: Add num_regs member to GDBFeature

2023-08-16 Thread Akihiko Odaki
Currently the number of registers exposed to GDB is written as magic numbers in code. Derive the number of registers GDB actually see from XML files to replace the magic numbers in code later. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- include

[PATCH v5 02/26] gdbstub: Introduce GDBFeature structure

2023-08-16 Thread Akihiko Odaki
Before this change, the information from a XML file was stored in an array that is not descriptive. Introduce a dedicated structure type to make it easier to understand and to extend with more fields. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Revi

[PATCH v5 00/26] plugins: Allow to read registers

2023-08-16 Thread Akihiko Odaki
I and other people in the University of Tokyo, where I research processor design, found TCG plugins are very useful for processor design exploration. The feature we find missing is the capability to read registers from plugins. In this series, I propose to add such a capability by reusing gdbstub

Re: [RFC PATCH v4 22/24] vfio/pci: Adapt vfio pci hot reset support with iommufd BE

2023-08-16 Thread Nicolin Chen
On Wed, Jul 12, 2023 at 03:25:26PM +0800, Zhenzhong Duan wrote: > +#ifdef CONFIG_IOMMUFD > +static VFIODevice *vfio_pci_iommufd_binded(__u32 devid) > +{ > +VFIOAddressSpace *space; > +VFIOContainer *bcontainer; > +VFIOIOMMUFDContainer *container; > +VFIOIOASHwpt *hwpt; > +VFIO

Re: [PATCH v7 9/9] docs/system: add basic virtio-gpu documentation

2023-08-16 Thread Akihiko Odaki
On 2023/08/17 11:23, Gurchetan Singh wrote: From: Gurchetan Singh This adds basic documentation for virtio-gpu. Suggested-by: Akihiko Odaki Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pitsidianakis --- v2: - Incorporated

Re: qemu-system-x86 dependencies

2023-08-16 Thread Fourhundred Thecat
> On 2023-08-16 15:02, Fourhundred Thecat wrote: > On 2023-08-16 14:52, Michael Tokarev wrote: 16.08.2023 15:37, Philippe Mathieu-Daudé пишет: Cc'ing Michael why does qemu depend on sound and gstreamer and wayland libraries? After all, i am just trying to run VMs on my hypervisor. If I reme

Re: [PATCH 01/10] hw/arm/virt-acpi-build.c: Move fw_cfg and virtio to common location

2023-08-16 Thread Sunil V L
On Wed, Aug 16, 2023 at 03:51:58PM -0300, Daniel Henrique Barboza wrote: > > > On 7/26/23 05:25, Igor Mammedov wrote: > > On Tue, 25 Jul 2023 22:20:36 +0530 > > Sunil V L wrote: > > > > > On Mon, Jul 24, 2023 at 05:18:59PM +0200, Igor Mammedov wrote: > > > > On Wed, 12 Jul 2023 22:09:34 +0530 >

Re: [PATCH v2 02/19] ppc/vof: Fix missed fields in VOF cleanup

2023-08-16 Thread Alexey Kardashevskiy
On 08/08/2023 14:19, Nicholas Piggin wrote: Failing to reset the of_instance_last makes ihandle allocation continue to increase, which causes record-replay replay fail to match the recorded trace. Not resetting claimed_base makes VOF eventually run out of memory after some resets. Cc: Alexey

[PATCH v7 5/9] gfxstream + rutabaga prep: added need defintions, fields, and options

2023-08-16 Thread Gurchetan Singh
From: Gurchetan Singh This modifies the common virtio-gpu.h file have the fields and defintions needed by gfxstream/rutabaga, by VirtioGpuRutabaga. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pitsidianakis --- v1: void *ruta

[PATCH v7 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-08-16 Thread Gurchetan Singh
From: Gurchetan Singh This adds initial support for gfxstream and cross-domain. Both features rely on virtio-gpu blob resources and context types, which are also implemented in this patch. gfxstream has a long and illustrious history in Android graphics paravirtualization. It has been powering

[PATCH v7 1/9] virtio: Add shared memory capability

2023-08-16 Thread Gurchetan Singh
From: "Dr. David Alan Gilbert" Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' to allow defining shared memory regions with sizes and offsets of 2^32 and more. Multiple instances of the capability are allowed and distinguished by a device-specific 'id'. Signed-off-by: Dr. David A

[PATCH v7 9/9] docs/system: add basic virtio-gpu documentation

2023-08-16 Thread Gurchetan Singh
From: Gurchetan Singh This adds basic documentation for virtio-gpu. Suggested-by: Akihiko Odaki Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pitsidianakis --- v2: - Incorporated suggestions by Akihiko Odaki - Listed the

[PATCH v7 7/9] gfxstream + rutabaga: meson support

2023-08-16 Thread Gurchetan Singh
From: Gurchetan Singh - Add meson detection of rutabaga_gfx - Build virtio-gpu-rutabaga.c + associated vga/pci files when present Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pitsidianakis --- v3: Fix alignment issues (Akih

[PATCH v7 3/9] virtio-gpu: hostmem

2023-08-16 Thread Gurchetan Singh
From: Gerd Hoffmann Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. Signed-off-by: Antonio Caggiano Tested-by: Alyssa Ross Acked-by: Michael S. Tsirkin --- hw/display/virtio-gpu-pci.c| 14 ++ hw/display/virtio-gpu.c| 1 + hw/display/virtio-vga.c| 33

[PATCH v7 8/9] gfxstream + rutabaga: enable rutabaga

2023-08-16 Thread Gurchetan Singh
From: Gurchetan Singh This change enables rutabaga to receive virtio-gpu-3d hypercalls when it is active. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pitsidianakis --- v3: Whitespace fix (Akihiko) hw/display/virtio-gpu-bas

[PATCH v7 2/9] virtio-gpu: CONTEXT_INIT feature

2023-08-16 Thread Gurchetan Singh
From: Antonio Caggiano The feature can be enabled when a backend wants it. Signed-off-by: Antonio Caggiano Reviewed-by: Marc-André Lureau Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Akihiko Odaki --- hw/display/virtio-gpu-base.c

[PATCH v7 0/9] gfxstream + rutabaga_gfx

2023-08-16 Thread Gurchetan Singh
Prior versions: v6: https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg02520.html v5: https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg02339.html v4: https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg01566.html v3: https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg00

[PATCH v7 4/9] virtio-gpu: blob prep

2023-08-16 Thread Gurchetan Singh
From: Antonio Caggiano This adds preparatory functions needed to: - decode blob cmds - tracking iovecs Signed-off-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pi

Re: [PATCH] migrate/ram: let ram_save_target_page_legacy() return if qemu file got error

2023-08-16 Thread Guoyi Tu
On 2023/8/16 23:15, 【外部账号】 Fabiano Rosas wrote: Peter Xu writes: On Tue, Aug 15, 2023 at 07:42:24PM -0300, Fabiano Rosas wrote: Yep, I see that. I meant explicitly move the code into the loop. Feels a bit weird to check the QEMUFile for errors first thing inside the function when nothing a

Re: [PATCH v3 2/2] target/i386: Avoid overflow of the cache parameter enumerated by leaf 4

2023-08-16 Thread Xiaoyao Li
On 8/16/2023 4:06 PM, Qian Wen wrote: According to SDM, CPUID.0x4:EAX[31:26] indicates the Maximum number of addressable IDs for processor cores in the physical package. If we launch over 64 cores VM, the 6-bit field will overflow, and the wrong core_id number will be reported. Since the HW repo

Re: [PATCH v3 1/2] target/i386: Avoid cpu number overflow in legacy topology

2023-08-16 Thread Xiaoyao Li
On 8/16/2023 4:06 PM, Qian Wen wrote: The legacy topology enumerated by CPUID.1.EBX[23:16] is defined in SDM Vol2: Bits 23-16: Maximum number of addressable IDs for logical processors in this physical package. When threads_per_socket > 255, it will 1) overwrite bits[31:24] which is apic_id, 2)

Re: [PATCH v4 05/18] linux-user: Use ImageSource in load_symbols

2023-08-16 Thread Philippe Mathieu-Daudé
On 16/8/23 20:03, Richard Henderson wrote: Aside from the section headers, we're unlikely to hit the ImageSource cache on guest executables. But the interface for imgsrc_read_* is better. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 87 -

Re: [PATCH v4 01/18] linux-user: Introduce imgsrc_read, imgsrc_read_alloc

2023-08-16 Thread Philippe Mathieu-Daudé
On 16/8/23 20:03, Richard Henderson wrote: Introduced and initialized, but not yet really used. These will tidy the current tests vs BPRM_BUF_SIZE. Signed-off-by: Richard Henderson --- linux-user/loader.h| 61 +++- linux-user/linuxload.c | 90 +

Re: [PATCH for-8.1] vfio/display: Fix missing update to set backing fields

2023-08-16 Thread Philippe Mathieu-Daudé
On 16/8/23 23:55, Alex Williamson wrote: The below referenced commit renames scanout_width/height to backing_width/height, but also promotes these fields in various portions of the egl interface. Meanwhile vfio dmabuf support has never used the previous scanout fields and is therefore missed in

Re: [PATCH 0/6] linux-user: Rewrite open_self_maps

2023-08-16 Thread Helge Deller
Hi Richard, On 8/16/23 20:14, Richard Henderson wrote: Based-on: 20230816180338.572576-1-richard.hender...@linaro.org ("[PATCH v4 00/18] linux-user: Implement VDSOs") As promised, a rewrite of /proc/self/{maps,smaps} emulation using interval trees. Incorporate Helge's change to mark [heap], an

Re: [PATCH 4/4] tcg: Map code_gen_buffer with PROT_BTI

2023-08-16 Thread Philippe Mathieu-Daudé
(Cc'ing Joelle) On 16/8/23 16:25, Richard Henderson wrote: For linux aarch64 host supporting BTI, map the buffer to require BTI instructions at branch landing pads. Signed-off-by: Richard Henderson --- tcg/region.c | 39 --- 1 file changed, 28 insertions(

[PATCH for-8.1] vfio/display: Fix missing update to set backing fields

2023-08-16 Thread Alex Williamson
The below referenced commit renames scanout_width/height to backing_width/height, but also promotes these fields in various portions of the egl interface. Meanwhile vfio dmabuf support has never used the previous scanout fields and is therefore missed in the update. This results in a black screen

Re: [PATCH v4 8/8] migration: Add a wrapper to cleanup migration files

2023-08-16 Thread Peter Xu
On Wed, Aug 16, 2023 at 06:20:58PM -0300, Fabiano Rosas wrote: > > One more thing to mention is, now I kind of agree probably we should > > register yank over each qemufile, as you raised the concern in the other > > thread that otherwise qmp_yank() won't set error for the qemufile, which > > seems

Re: [PATCH 1/4] tcg: Add tcg_out_tb_start backend hook

2023-08-16 Thread Philippe Mathieu-Daudé
On 16/8/23 16:25, Richard Henderson wrote: This hook may emit code at the beginning of the TB. Suggested-by: Jordan Niethe Signed-off-by: Richard Henderson --- tcg/tcg.c| 3 +++ tcg/aarch64/tcg-target.c.inc | 5 + tcg/arm/tcg-target.c.inc | 5 +

Re: [PATCH 2/4] util/cpuinfo-aarch64: Add CPUINFO_BTI

2023-08-16 Thread Philippe Mathieu-Daudé
On 16/8/23 16:25, Richard Henderson wrote: Signed-off-by: Richard Henderson --- host/include/aarch64/host/cpuinfo.h | 1 + util/cpuinfo-aarch64.c | 4 2 files changed, 5 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [8.1 regression] Re: [PULL 05/19] virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties

2023-08-16 Thread Alex Williamson
On Wed, 16 Aug 2023 15:08:10 -0600 Alex Williamson wrote: > > diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c > > index 8f9fbf583e..3d19dbe382 100644 > > --- a/ui/egl-helpers.c > > +++ b/ui/egl-helpers.c > > @@ -314,9 +314,9 @@ void egl_dmabuf_import_texture(QemuDmaBuf *dmabuf) > > } > > >

Re: [PATCH] target/riscv: Allocate itrigger timers only once

2023-08-16 Thread Philippe Mathieu-Daudé
On 16/8/23 18:27, Akihiko Odaki wrote: riscv_trigger_init() had been called on reset events that can happen several times for a CPU and it allocated timers for itrigger. If old timers were present, they were simply overwritten by the new timers, resulting in a memory leak. Divide riscv_trigger_i

Re: [PATCH v4 8/8] migration: Add a wrapper to cleanup migration files

2023-08-16 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Aug 16, 2023 at 03:35:24PM -0400, Peter Xu wrote: >> On Wed, Aug 16, 2023 at 03:47:26PM -0300, Fabiano Rosas wrote: >> > Peter Xu writes: >> > >> > > On Wed, Aug 16, 2023 at 11:25:10AM -0300, Fabiano Rosas wrote: >> > >> @@ -2003,6 +1980,8 @@ static int >> > >> open_

Re: [PATCH 1/2] virtio: use blk_io_plug_call() in virtio_irqfd_notify()

2023-08-16 Thread Stefan Hajnoczi
On Wed, Aug 16, 2023 at 08:30:58PM +0200, Ilya Maximets wrote: > On 8/16/23 17:30, Stefan Hajnoczi wrote: > > On Wed, Aug 16, 2023 at 03:36:32PM +0200, Ilya Maximets wrote: > >> On 8/15/23 14:08, Stefan Hajnoczi wrote: > >>> virtio-blk and virtio-scsi invoke virtio_irqfd_notify() to send Used > >>>

[PATCH] qga: Start qemu-ga service after NetworkManager start

2023-08-16 Thread Efim Shevrin via
From: Fima Shevrin When the guest OS starts, qemu-ga sends an event to the host. This event allows services on the host to start configuring the already running guest OS. When configuring network settings, it is possible that an external service will receive a signal from qemu-ga about the start

[8.1 regression] Re: [PULL 05/19] virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties

2023-08-16 Thread Alex Williamson
This commit introduces a regression when using GVT-g with the display and ramfb options. At the point where it appears the guest is switching from ramfb to the vGPU display, the display goes black and QEMU reports: qemu: eglCreateImageKHR failed This message occurs repeatedly. VM command line:

Re: [PATCH v2 3/4] qcow2: add zoned emulation capability

2023-08-16 Thread Stefan Hajnoczi
On Mon, Aug 14, 2023 at 04:58:01PM +0800, Sam Li wrote: > By adding zone operations and zoned metadata, the zoned emulation > capability enables full emulation support of zoned device using > a qcow2 file. The zoned device metadata includes zone type, > zoned device state and write pointer of each

[PATCH] chardev/char-pty: Avoid losing bytes when the other side just (re-)connected

2023-08-16 Thread Thomas Huth
When starting a guest via libvirt with "virsh start --console ...", the first second of the console output is missing. This is especially annoying on s390x that only has a text console by default and no graphical output - if the bios fails to boot here, the information about what went wrong is comp

Re: [PATCH v4 8/8] migration: Add a wrapper to cleanup migration files

2023-08-16 Thread Peter Xu
On Wed, Aug 16, 2023 at 03:35:24PM -0400, Peter Xu wrote: > On Wed, Aug 16, 2023 at 03:47:26PM -0300, Fabiano Rosas wrote: > > Peter Xu writes: > > > > > On Wed, Aug 16, 2023 at 11:25:10AM -0300, Fabiano Rosas wrote: > > >> @@ -2003,6 +1980,8 @@ static int > > >> open_return_path_on_source(Mig

Re: [PATCH v2 2/4] qcow2: add configurations for zoned format extension

2023-08-16 Thread Stefan Hajnoczi
On Mon, Aug 14, 2023 at 04:58:00PM +0800, Sam Li wrote: > To configure the zoned format feature on the qcow2 driver, it > requires following arguments: the device size, zoned profile, > zoned model, zone size, zone capacity, number of conventional > zones, limits on zone resources (max append secto

Re: [PATCH 01/10] hw/arm/virt-acpi-build.c: Move fw_cfg and virtio to common location

2023-08-16 Thread Daniel Henrique Barboza
On 7/26/23 05:25, Igor Mammedov wrote: On Tue, 25 Jul 2023 22:20:36 +0530 Sunil V L wrote: On Mon, Jul 24, 2023 at 05:18:59PM +0200, Igor Mammedov wrote: On Wed, 12 Jul 2023 22:09:34 +0530 Sunil V L wrote: The functions which add fw_cfg and virtio to DSDT are same for ARM and RISC-V.

Re: [PATCH v2 4/4] migration/ram: Merge save_zero_page functions

2023-08-16 Thread Peter Xu
On Wed, Aug 16, 2023 at 03:28:17PM -0300, Fabiano Rosas wrote: > We don't need to do this in two pieces. One single function makes it > easier to grasp, specially since it removes the indirection on the > return value handling. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter X

Re: [PATCH 1/2] virtio: use blk_io_plug_call() in virtio_irqfd_notify()

2023-08-16 Thread Ilya Maximets
On 8/16/23 17:30, Stefan Hajnoczi wrote: > On Wed, Aug 16, 2023 at 03:36:32PM +0200, Ilya Maximets wrote: >> On 8/15/23 14:08, Stefan Hajnoczi wrote: >>> virtio-blk and virtio-scsi invoke virtio_irqfd_notify() to send Used >>> Buffer Notifications from an IOThread. This involves an eventfd >>> writ

[PATCH v2 0/4] migration/ram: Merge zero page handling

2023-08-16 Thread Fabiano Rosas
For v2 I fixed patch 3 which had a hunk belonging to patch 5. CI run: https://gitlab.com/farosas/qemu/-/pipelines/969706915 v1: https://lore.kernel.org/r/20230815143828.15436-1-faro...@suse.de Hi, This is another small series that I extracted from my fixed-ram series and that could be already c

[PATCH v2 4/4] migration/ram: Merge save_zero_page functions

2023-08-16 Thread Fabiano Rosas
We don't need to do this in two pieces. One single function makes it easier to grasp, specially since it removes the indirection on the return value handling. Signed-off-by: Fabiano Rosas --- migration/ram.c | 46 +- 1 file changed, 13 insertions(+), 3

[PATCH v2 3/4] migration/ram: Move xbzrle zero page handling into save_zero_page

2023-08-16 Thread Fabiano Rosas
It makes a bit more sense to have the zero page handling of xbzrle right where we save the zero page. Also invert the exit condition to remove one level of indentation which makes the next patch easier to grasp. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/ram.c | 35 ++

[PATCH v2 1/4] migration/ram: Remove RAMState from xbzrle_cache_zero_page

2023-08-16 Thread Fabiano Rosas
'rs' is not used in that function. It's a leftover from commit 9360447d34 ("ram: Use MigrationStats for statistics"). Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/ram.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/migration/ram.c b/migration/ram.c

[PATCH v2 2/4] migration/ram: Stop passing QEMUFile around in save_zero_page

2023-08-16 Thread Fabiano Rosas
We don't need the QEMUFile when we're already passing the PageSearchStatus. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/ram.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 87efab72e8..761f43dc34 10064

Re: How to synchronize CPUs on MMIO read?

2023-08-16 Thread Alex Bennée
Igor Lesik writes: > Hi. > > I need to model some custom HW that synchronizes CPUs when they read MMIO > register N: MMIO read does not > return until another CPU writes to MMIO register M. I modeled this behavior > with a) on MMIO read of N, save CPU into > a list of waiting CPUs and put it

[PATCH 1/6] util/selfmap: Use dev_t and ino_t in MapInfo

2023-08-16 Thread Richard Henderson
Use dev_t instead of a string, and ino_t instead of uint64_t. The latter is likely to be identical on modern systems but is more type-correct for usage. Signed-off-by: Richard Henderson --- include/qemu/selfmap.h | 4 ++-- linux-user/syscall.c | 6 -- util/selfmap.c | 12 +++-

[PATCH 0/6] linux-user: Rewrite open_self_maps

2023-08-16 Thread Richard Henderson
Based-on: 20230816180338.572576-1-richard.hender...@linaro.org ("[PATCH v4 00/18] linux-user: Implement VDSOs") As promised, a rewrite of /proc/self/{maps,smaps} emulation using interval trees. Incorporate Helge's change to mark [heap], and also mark [vdso]. r~ Richard Henderson (6): util/s

[PATCH 4/6] linux-user: Show heap address in /proc/pid/maps

2023-08-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 658c276e39..5c0fb20e19 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8125,6 +8125,8 @@ static void open_self_maps_4(

[PATCH 5/6] linux-user: Remove ELF_START_MMAP and image_info.start_mmap

2023-08-16 Thread Richard Henderson
The start_mmap value is write-only. Remove the field and the defines that populated it. Logically, this has been replaced by task_unmapped_base. Signed-off-by: Richard Henderson --- linux-user/qemu.h| 1 - linux-user/elfload.c | 38 -- 2 files changed, 39

[PATCH 2/6] linux-user: Use walk_memory_regions for open_self_maps

2023-08-16 Thread Richard Henderson
Replace the by-hand method of region identification with the official user-exec interface. Cross-check the region provided to the callback with the interval tree from read_self_maps(). Signed-off-by: Richard Henderson --- linux-user/syscall.c | 192 ++- 1

[PATCH 6/6] linux-user: Show vdso address in /proc/pid/maps

2023-08-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/qemu.h| 1 + linux-user/elfload.c | 1 + linux-user/syscall.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 12f638336a..4de9ec783f 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -32

[PATCH 3/6] linux-user: Adjust brk for load_bias

2023-08-16 Thread Richard Henderson
PIE executables are usually linked at offset 0 and are relocated somewhere during load. The hiaddr needs to be adjusted to keep the brk next to the executable. Cc: qemu-sta...@nongnu.org Fixes: 1f356e8c013 ("linux-user: Adjust initial brk when interpreter is close to executable") Signed-off-by:

Re: [PATCH v3 00/15] linux-user: Implement VDSOs

2023-08-16 Thread Richard Henderson
On 8/14/23 02:52, Alex Bennée wrote: Richard Henderson writes: It's time for another round on implementing the VDSO for linux-user. We are now seeing applications built that absolutely require it, and have no fallback for the VDSO to be absent. Something broke configure for me: ../../co

[PATCH v4 04/18] linux-user: Use ImageSource in load_elf_image

2023-08-16 Thread Richard Henderson
Change parse_elf_properties as well, as the bprm_buf argument ties the two functions closely. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 128 +-- 1 file changed, 49 insertions(+), 79 deletions(-) diff --git a/linux-user/elfload.c b/linux-

[PATCH v4 03/18] linux-user: Do not clobber bprm_buf swapping ehdr

2023-08-16 Thread Richard Henderson
Rearrange the allocation of storage for ehdr between load_elf_image and load_elf_binary. The same set of copies are done, but we don't modify bprm_buf, which will be important later. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/elfload.c | 25

[PATCH v4 09/18] linux-user/i386: Add vdso

2023-08-16 Thread Richard Henderson
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1267 Signed-off-by: Richard Henderson --- linux-user/i386/vdso-asmoffset.h | 6 ++ linux-user/elfload.c | 16 +++- linux-user/i386/signal.c | 11 +++ linux-user/i386/Makefile.vdso| 5 ++ linux-user/i386/meson.bu

[PATCH v4 13/18] linux-user/hppa: Add vdso

2023-08-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/hppa/vdso-asmoffset.h | 12 +++ linux-user/elfload.c | 4 + linux-user/hppa/signal.c | 24 +++-- linux-user/hppa/Makefile.vdso| 6 ++ linux-user/hppa/meson.build | 6 ++ linux-user/hppa/vdso.S | 165 +++

[PATCH v4 14/18] linux-user/riscv: Add vdso

2023-08-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/riscv/vdso-asmoffset.h | 9 ++ linux-user/elfload.c | 4 + linux-user/riscv/signal.c | 8 ++ linux-user/meson.build| 1 + linux-user/riscv/Makefile.vdso| 11 ++ linux-user/riscv/meson.build | 9 ++

[PATCH v4 05/18] linux-user: Use ImageSource in load_symbols

2023-08-16 Thread Richard Henderson
Aside from the section headers, we're unlikely to hit the ImageSource cache on guest executables. But the interface for imgsrc_read_* is better. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 87 1 file changed, 48 insertions(+), 39 dele

[PATCH v4 16/18] linux-user/ppc: Add vdso

2023-08-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/ppc/vdso-asmoffset.h | 20 +++ linux-user/elfload.c| 9 ++ linux-user/ppc/signal.c | 31 +++-- linux-user/gen-vdso-elfn.c.inc | 7 + linux-user/ppc/Makefile.vdso| 18 +++ linux-user/ppc/meson.build | 12 ++ linu

[PATCH v4 00/18] linux-user: Implement VDSOs

2023-08-16 Thread Richard Henderson
Still no integrated cross-compile, however: Changes for v4: * Force all vdso to have a single load segment. This will prevent problems with varying host/guest page size. * Tidy some of the assembly with macros. * Implement loongarch, ppc, s390x. Just in case the list eats a binary: ht

[PATCH v4 12/18] linux-user/arm: Add vdso

2023-08-16 Thread Richard Henderson
The thumb vdso will only be used for m-profile, as all of our a-profile cpus support arm mode. Signed-off-by: Richard Henderson --- linux-user/arm/signal.c | 30 +++--- linux-user/elfload.c | 24 + linux-user/arm/Makefile.vdso | 17 +++ linux-user/arm/meson.build| 18

[PATCH v4 06/18] linux-user: Replace bprm->fd with bprm->src.fd

2023-08-16 Thread Richard Henderson
There are only a couple of uses of bprm->fd remaining. Migrate to the other field. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/loader.h| 1 - linux-user/flatload.c | 8 linux-user/linuxload.c | 5 ++--- 3 files changed, 6 insertions(+), 8 de

[PATCH v4 18/18] linux-user/s390x: Add vdso

2023-08-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/s390x/vdso-asmoffset.h | 2 + linux-user/elfload.c | 3 ++ linux-user/s390x/signal.c | 4 +- linux-user/s390x/Makefile.vdso| 5 +++ linux-user/s390x/meson.build | 6 +++ linux-user/s390x/vdso.S | 61

[PATCH v4 10/18] linux-user/x86_64: Add vdso

2023-08-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/elfload.c| 4 +- linux-user/x86_64/Makefile.vdso | 5 ++ linux-user/x86_64/meson.build | 6 +++ linux-user/x86_64/vdso.S| 78 linux-user/x86_64/vdso.ld | 73 +++

[PATCH v4 01/18] linux-user: Introduce imgsrc_read, imgsrc_read_alloc

2023-08-16 Thread Richard Henderson
Introduced and initialized, but not yet really used. These will tidy the current tests vs BPRM_BUF_SIZE. Signed-off-by: Richard Henderson --- linux-user/loader.h| 61 +++- linux-user/linuxload.c | 90 ++ 2 files changed, 142 ins

[PATCH v4 11/18] linux-user/aarch64: Add vdso

2023-08-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/elfload.c | 4 ++ linux-user/aarch64/Makefile.vdso | 12 + linux-user/aarch64/meson.build | 12 + linux-user/aarch64/vdso-be.so| Bin 0 -> 3216 bytes linux-user/aarch64/vdso-le.so| Bin 0 -> 3216 bytes linux-user/aa

[PATCH v4 02/18] linux-user: Tidy loader_exec

2023-08-16 Thread Richard Henderson
Reorg the if cases to reduce indentation. Test for 4 bytes in the file before checking the signatures. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/linuxload.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(

[PATCH v4 17/18] linux-user/s390x: Rename __SIGNAL_FRAMESIZE to STACK_FRAME_OVERHEAD

2023-08-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/s390x/signal.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c index f72165576f..0f8b8e04bf 100644 --- a/linux-user/s390x/signal.c +++ b/linux-user/s390x/signal.c @@ -2

[PATCH v4 07/18] linux-user: Load vdso image if available

2023-08-16 Thread Richard Henderson
The vdso image will be pre-processed into a C data array, with a simple list of relocations to perform, and identifying the location of signal trampolines. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 87 +++- 1 file changed, 78 insertions(+

[PATCH v4 15/18] linux-user/loongarch64: Add vdso

2023-08-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/loongarch64/vdso-asmoffset.h | 8 ++ linux-user/elfload.c| 4 + linux-user/loongarch64/signal.c | 17 +++- linux-user/loongarch64/Makefile.vdso| 7 ++ linux-user/loongarch64/meson.build | 4 + linux-user

Re: [PATCH v2 0/4] Add full zoned storage emulation to qcow2 driver

2023-08-16 Thread Stefan Hajnoczi
On Wed, Aug 16, 2023 at 04:14:08PM +0800, Sam Li wrote: > Klaus Jensen 于2023年8月16日周三 15:37写道: > > > > On Aug 14 16:57, Sam Li wrote: > > > This patch series add a new extension - zoned format - to the > > > qcow2 driver thereby allowing full zoned storage emulation on > > > the qcow2 img file. Use

[PATCH v4 08/18] linux-user: Add gen-vdso tool

2023-08-16 Thread Richard Henderson
This tool will be used for post-processing the linked vdso image, turning it into something that is easy to include into elfload.c. Signed-off-by: Richard Henderson --- linux-user/gen-vdso.c | 223 linux-user/gen-vdso-elfn.c.inc | 307 +++

[PATCH v4 06/25] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature

2023-08-16 Thread Akihiko Odaki
This is a tree-wide change to replace gdb_core_xml_file, the path to GDB XML file with gdb_core_feature, the pointer to GDBFeature. This also replaces the values assigned to gdb_num_core_regs with the num_regs member of GDBFeature where applicable to remove magic numbers. A following change will u

[PATCH 3/3] tcg/i386: Allow immediate as input to deposit_*

2023-08-16 Thread Richard Henderson
We can use MOVB and MOVW with an immediate just as easily as with a register input. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target-con-set.h | 2 +- tcg/i386/tcg-target.c.inc | 26 ++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/tcg/i386/

Re: [PATCH V1 2/3] migration: fix suspended runstate

2023-08-16 Thread Steven Sistare
On 8/14/2023 3:37 PM, Peter Xu wrote: > On Mon, Aug 14, 2023 at 02:53:56PM -0400, Steven Sistare wrote: >>> Can we just call vm_state_notify() earlier? >> >> We cannot. The guest is not running yet, and will not be until later. >> We cannot call notifiers that perform actions that complete, or rea

Re: [RFC PATCH 15/24] target/arm: Fill new members of GDBFeature

2023-08-16 Thread Alex Bennée
Akihiko Odaki writes: > On 2023/08/14 23:56, Alex Bennée wrote: >> Akihiko Odaki writes: >> >>> These members will be used to help plugins to identify registers. >>> >>> Signed-off-by: Akihiko Odaki >>> --- >>> target/arm/gdbstub.c | 46 +++--- >>> ta

Re: [PATCH v5 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-08-16 Thread Akihiko Odaki
On 2023/08/16 0:50, Gurchetan Singh wrote: On Tue, Aug 15, 2023 at 8:07 AM Akihiko Odaki > wrote: On 2023/08/15 9:35, Gurchetan Singh wrote: > This adds initial support for gfxstream and cross-domain.  Both > features rely on virtio-gpu blob resou

How to synchronize CPUs on MMIO read?

2023-08-16 Thread Igor Lesik
Hi. I need to model some custom HW that synchronizes CPUs when they read MMIO register N: MMIO read does not return until another CPU writes to MMIO register M. I modeled this behavior with a) on MMIO read of N, save CPU into a list of waiting CPUs and put it asleep with cpu_interrupt(current_cp

Re: [PATCH v4 06/25] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature

2023-08-16 Thread Akihiko Odaki
On 2023/08/17 0:58, Richard Henderson wrote: On 8/16/23 07:51, Akihiko Odaki wrote: diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index f155936289..b54162cbeb 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -391,7 +391,7 @@ static void hexagon_cpu_class_init(ObjectClas

[PATCH v4 21/25] cpu: Call plugin hooks only when ready

2023-08-16 Thread Akihiko Odaki
The initialization and exit hooks will not affect the state of vCPU, but they may depend on the state of vCPU. Therefore, it's better to call plugin hooks after the vCPU state is fully initialized and before it gets uninitialized. Signed-off-by: Akihiko Odaki --- cpu.c| 11 --

[PATCH] target/riscv: Allocate itrigger timers only once

2023-08-16 Thread Akihiko Odaki
riscv_trigger_init() had been called on reset events that can happen several times for a CPU and it allocated timers for itrigger. If old timers were present, they were simply overwritten by the new timers, resulting in a memory leak. Divide riscv_trigger_init() into two functions, namely riscv_tr

Re: [PATCH v4 10/25] target/riscv: Use GDBFeature for dynamic XML

2023-08-16 Thread Richard Henderson
On 8/16/23 07:51, Akihiko Odaki wrote: -if (csr_ops[i].name) { -g_string_append_printf(s, " You are now leaking name. r~

Re: [PATCH v4 09/25] target/ppc: Use GDBFeature for dynamic XML

2023-08-16 Thread Richard Henderson
On 8/16/23 07:51, Akihiko Odaki wrote: In preparation for a change to use GDBFeature as a parameter of gdb_register_coprocessor(), convert the internal representation of dynamic feature from plain XML to GDBFeature. Signed-off-by: Akihiko Odaki --- target/ppc/cpu-qom.h | 3 +-- target/ppc/c

Re: [PATCH v4 08/25] target/arm: Use GDBFeature for dynamic XML

2023-08-16 Thread Richard Henderson
On 8/16/23 07:51, Akihiko Odaki wrote: In preparation for a change to use GDBFeature as a parameter of gdb_register_coprocessor(), convert the internal representation of dynamic feature from plain XML to GDBFeature. Signed-off-by: Akihiko Odaki --- target/arm/cpu.h | 20 +++--- target/

Re: [PATCH] subprojects/berkeley-testfloat-3: Update to fix a problem with compiler warnings

2023-08-16 Thread Alex Bennée
Peter Maydell writes: > On Wed, 16 Aug 2023 at 10:16, Thomas Huth wrote: >> >> Update the berkeley-testfloat-3 wrap to include a patch provided by >> Olaf Hering. This fixes a problem with "control reaches end of non-void >> function [-Werror=return-type]" compiler warning/errors that are now

  1   2   3   >