[PULL 1/3] dbus-vmstate: Restrict error checks to registered proxies in dbus_get_proxies

2022-08-18 Thread marcandre . lureau
From: Priyankar Jain The purpose of dbus_get_proxies to construct the proxies corresponding to the IDs registered to dbus-vmstate. Currenty, this function returns an error in case there is any failure while instantiating proxy for "all" the names on dbus. Ideally this function should error out

[PULL 3/3] ui/console: fix qemu_console_resize() regression

2022-08-18 Thread marcandre . lureau
From: Marc-André Lureau The display may be corrupted when changing screen colour depth in qemu-system-ppc/MacOS since 7.0. Do not short-cut qemu_console_resize() if the surface is backed by vga vram. When the scanout isn't set, or it is already allocated, or opengl, and the size is fitting, we s

Re: [PATCH] .gitlab-ci.d/buildtest.yml: Increase the check-gprof-gcov job timeout

2022-08-18 Thread Alex Bennée
Bin Meng writes: > Current project timeout is 1 hour, but the check-gprof-gcov job never > completes within 1 hour. Increase the job timeout to 90 minutes. I've tried to do some data mining on this test which seems to indicate that the average successful completion time for gprof-gcov is 27 mi

Re: [PATCH] .gitlab-ci.d/buildtest.yml: Increase the check-gprof-gcov job timeout

2022-08-18 Thread Thomas Huth
On 18/08/2022 09.07, Alex Bennée wrote: Bin Meng writes: Current project timeout is 1 hour, but the check-gprof-gcov job never completes within 1 hour. Increase the job timeout to 90 minutes. I've tried to do some data mining on this test which seems to indicate that the average successful

Re: [PATCH v3 2/8] parallels: create parallels_set_bat_entry_helper() to assign BAT value

2022-08-18 Thread Alexander Ivanov
On 17.08.2022 21:21, Vladimir Sementsov-Ogievskiy wrote: On 8/15/22 12:02, Alexander Ivanov wrote: This helper will be reused in next patches during parallels_co_check rework to simplify its code. Signed-off-by: Alexander Ivanov Reviewed-by: Vladimir Sementsov-Ogievskiy --- v2: A new pa

Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-08-18 Thread Emanuele Giuseppe Esposito
Am 17/08/2022 um 20:54 schrieb Vladimir Sementsov-Ogievskiy: > On 8/16/22 15:52, Emanuele Giuseppe Esposito wrote:    } @@ -501,8 +481,12 @@ void job_unref_locked(Job *job)> assert(!job->txn);      if (job->driver->free) { +    AioContext *aio_context = j

Re: [RFC PATCH v2 5/8] qapi: golang: Generate qapi's event types in Go

2022-08-18 Thread Victor Toso
Hi, On Tue, Jul 05, 2022 at 08:45:54AM -0700, Andrea Bolognani wrote: > On Fri, Jun 17, 2022 at 02:19:29PM +0200, Victor Toso wrote: > > This patch handles QAPI event types and generates data structures in > > Go that handles it. > > > > We also define a Event interface and two helper functions Ma

Re: [RFC PATCH v2 5/8] qapi: golang: Generate qapi's event types in Go

2022-08-18 Thread Victor Toso
Hi, On Tue, Jul 05, 2022 at 05:47:25PM +0100, Daniel P. Berrangé wrote: > On Tue, Jul 05, 2022 at 08:45:54AM -0700, Andrea Bolognani wrote: > > On Fri, Jun 17, 2022 at 02:19:29PM +0200, Victor Toso wrote: > > > This patch handles QAPI event types and generates data structures in > > > Go that hand

Re: [PATCH 19/20] disas/nanomips: Add modifier static

2022-08-18 Thread Milica Lazarevic
Yes, it should. I'll squash it in the next version, thanks. Milica From: Philippe Mathieu-Daudé on behalf of Philippe Mathieu-Daudé Sent: Tuesday, August 16, 2022 2:22 AM To: Milica Lazarevic ; th...@redhat.com Cc: qemu-devel@nongnu.org ; cfont...@suse.de ; b

Re: [PATCH V4 RESEND] net/colo.c: Fix the pointer issue reported by Coverity.

2022-08-18 Thread Jason Wang
On Wed, Aug 17, 2022 at 3:45 PM Zhang, Chen wrote: > > Ping Jason and Peter, any comments for this patch? > > Thanks > Chen > > > -Original Message- > > From: Zhang, Chen > > Sent: Tuesday, August 9, 2022 4:49 PM > > To: Jason Wang ; Peter Maydell > > ; Li Zhijian ; qemu-dev > > > >

Re: [RFC PATCH v2 0/8] qapi: add generator for Golang interface

2022-08-18 Thread Victor Toso
Hi, On Mon, Jun 27, 2022 at 05:29:26PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Hi Markus, > > > > On Mon, Jun 27, 2022 at 09:15:53AM +0200, Markus Armbruster wrote: > >> Victor Toso writes: > >> > >> > Hi, > >> > > >> > This is the second iteration of RFC v1: > >> > https:

Re: [PATCH v10 14/21] jobs: protect job.aio_context with BQL and job_mutex

2022-08-18 Thread Emanuele Giuseppe Esposito
Am 17/08/2022 um 15:10 schrieb Emanuele Giuseppe Esposito: > > > Am 17/08/2022 um 10:04 schrieb Emanuele Giuseppe Esposito: +/* protect against read in job_do_yield_locked */ +JOB_LOCK_GUARD(); +/* ensure the coroutine is quiescent while the AioContext is changed >>

Re: [PATCH v3 1/8] parallels: Out of image offset in BAT leads to image inflation

2022-08-18 Thread Alexander Ivanov
On 17.08.2022 21:43, Vladimir Sementsov-Ogievskiy wrote: On 8/17/22 22:27, Denis V. Lunev wrote: On 17.08.2022 21:13, Vladimir Sementsov-Ogievskiy wrote: On 8/15/22 12:02, Alexander Ivanov wrote: data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset

Re: [PATCH v3 3/8] parallels: Use generic infrastructure for BAT writing in parallels_co_check()

2022-08-18 Thread Alexander Ivanov
On 17.08.2022 21:48, Vladimir Sementsov-Ogievskiy wrote: On 8/15/22 12:02, Alexander Ivanov wrote: BAT is written in the context of conventional operations over the image inside bdrv_co_flush() when it calls parallels_co_flush_to_os() callback. Thus we should not modify BAT array directly, but c

Re: [PATCH v3 6/8] parallels: Move check of leaks to a separate function

2022-08-18 Thread Alexander Ivanov
On 17.08.2022 23:00, Vladimir Sementsov-Ogievskiy wrote: On 8/15/22 12:02, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov --- v

Re: [PATCH v2] meson: be strict for boolean options

2022-08-18 Thread Paolo Bonzini
Queued, thanks. Paolo

[PATCH] meson: remove dead code

2022-08-18 Thread Paolo Bonzini
Found with "muon analyze". Signed-off-by: Paolo Bonzini --- meson.build | 2 -- pc-bios/keymaps/meson.build | 1 - qapi/meson.build| 15 --- target/riscv/meson.build| 2 -- 4 files changed, 20 deletions(-) diff --git a/meson.build b/meson.build ind

Re: [PATCH v7 01/14] mm: Add F_SEAL_AUTO_ALLOCATE seal to memfd

2022-08-18 Thread Paolo Bonzini
On 8/18/22 01:41, Kirill A. Shutemov wrote: Note, that userfaultfd is only relevant for shared memory as it requires VMA which we don't have for MFD_INACCESSIBLE. Oh, you're right! So yeah, looks like userfaultfd is not a problem. Paolo

Re: [PULL 05/10] x86: disable rng seeding via setup_data

2022-08-18 Thread Paolo Bonzini
On 8/17/22 18:14, Michael S. Tsirkin wrote: @@ -332,7 +332,7 @@ static void microvm_memory_init(MicrovmMachineState *mms) rom_set_fw(fw_cfg); if (machine->kernel_filename != NULL) { -x86_load_linux(x86ms, fw_cfg, 0, true, false); +x86_load_linux(x86ms, fw_cfg, 0, t

Re: [PATCH for-7.2 v3 14/20] qmp/hmp, device_tree.c: introduce dumpdtb

2022-08-18 Thread Dr. David Alan Gilbert
* Daniel Henrique Barboza (danielhb...@gmail.com) wrote: > To save the FDT blob we have the '-machine dumpdtb=' property. > With this property set, the machine saves the FDT in and exit. > The created file can then be converted to plain text dts format using > 'dtc'. > > There's nothing particula

Re: [PATCH v3 1/8] parallels: Out of image offset in BAT leads to image inflation

2022-08-18 Thread Vladimir Sementsov-Ogievskiy
On 8/18/22 11:49, Alexander Ivanov wrote: On 17.08.2022 21:43, Vladimir Sementsov-Ogievskiy wrote: On 8/17/22 22:27, Denis V. Lunev wrote: On 17.08.2022 21:13, Vladimir Sementsov-Ogievskiy wrote: On 8/15/22 12:02, Alexander Ivanov wrote: data_end field in BDRVParallelsState is set to the big

[PATCH] meson: remove dead assignments

2022-08-18 Thread Paolo Bonzini
Found with "muon analyze". Signed-off-by: Paolo Bonzini --- plugins/meson.build | 2 +- tests/fp/meson.build | 2 +- tests/qapi-schema/meson.build | 24 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/plugins/meson.build b/plugins/me

[PATCH v5 1/2] Update AVX512 support for xbzrle_encode_buffer

2022-08-18 Thread ling xu
This commit updates code of avx512 support for xbzrle_encode_buffer function to accelerate xbzrle encoding speed. We add runtime check of avx512 and add benchmark for this feature. Compared with C version of xbzrle_encode_buffer function, avx512 version can achieve 50%-70% performance improvement o

[PATCH v5 2/2] Test code and benchmark code

2022-08-18 Thread ling xu
Test code in test-xbzrle.c, benchmark code in xbzrle-bench.c for performance benchmarking. Signed-off-by: ling xu Co-authored-by: Zhou Zhao Co-authored-by: Jun Jin --- tests/bench/meson.build| 4 + tests/bench/xbzrle-bench.c | 468 + tests/unit/test-xb

[PATCH v5 0/2] This patch updates AVX512 support for xbzrle

2022-08-18 Thread ling xu
This patch updates code of avx512 support for xbzrle_encode_buffer function. We modified runtime check of avx512 and simplified algorithm. Besides, we provide benchmark in xbzrle-bench.c for performance comparison. Signed-off-by: ling xu Co-authored-by: Zhou Zhao Co-authored-by: Jun Jin ling x

Re: [PATCH for-7.2 v3 15/20] qmp/hmp, device_tree.c: introduce 'info fdt' command

2022-08-18 Thread Dr. David Alan Gilbert
* Daniel Henrique Barboza (danielhb...@gmail.com) wrote: > Reading the FDT requires that the user saves the fdt_blob and then use > 'dtc' to read the contents. Saving the file and using 'dtc' is a strong > use case when we need to compare two FDTs, but it's a lot of steps if > you want to do quick

Re: [PULL 05/10] x86: disable rng seeding via setup_data

2022-08-18 Thread Michael S. Tsirkin
On Thu, Aug 18, 2022 at 11:27:30AM +0200, Paolo Bonzini wrote: > On 8/17/22 18:14, Michael S. Tsirkin wrote: > > @@ -332,7 +332,7 @@ static void microvm_memory_init(MicrovmMachineState > > *mms) > > rom_set_fw(fw_cfg); > > if (machine->kernel_filename != NULL) { > > -x86_load_l

Re: [PATCH] meson: remove dead code

2022-08-18 Thread Marc-André Lureau
On Thu, Aug 18, 2022 at 1:31 PM Paolo Bonzini wrote: > Found with "muon analyze". > nice Reviewed-by: Marc-André Lureau > > Signed-off-by: Paolo Bonzini > --- > meson.build | 2 -- > pc-bios/keymaps/meson.build | 1 - > qapi/meson.build| 15 --- > ta

Re: [PATCH] meson: remove dead assignments

2022-08-18 Thread Marc-André Lureau
On Thu, Aug 18, 2022 at 1:44 PM Paolo Bonzini wrote: > Found with "muon analyze". > > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- > plugins/meson.build | 2 +- > tests/fp/meson.build | 2 +- > tests/qapi-schema/meson.build | 24 --

KVM call for agenda for 2022-08-23

2022-08-18 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. At the end of Monday I will send an email with the agenda or the cancellation of the call, so hurry up. After discussions on the QEMU Summit, we are going to have always open a KVM call where you can add topics. Call details: B

Re: [PATCH 2/2] vhost-user: Call qemu_socketpair() instead of socketpair()

2022-08-18 Thread Guoyi Tu
On 8/12/22 19:50, Peter Maydell wrote: On Fri, 12 Aug 2022 at 12:44, wrote: From: Guoyi Tu set close-on-exec flag on the new opened file descriptors at default What goes wrong if we don't do this? The commit message is a good place to explain what bug the commit is fixing, and its conse

Re: [PATCH 1/2] osdeps: Introduce qemu_socketpair()

2022-08-18 Thread Guoyi Tu
On 8/12/22 19:49, Peter Maydell wrote: On Fri, 12 Aug 2022 at 12:44, wrote: From: Guoyi Tu qemu_socketpair() will create a pair of connected sockets with FD_CLOEXEC set Signed-off-by: Guoyi Tu --- include/qemu/sockets.h | 3 +++ util/osdep.c | 24

Re: [PULL 05/10] x86: disable rng seeding via setup_data

2022-08-18 Thread Gerd Hoffmann
Hi, > > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c > > index 3a35193ff7..2e5dae9a89 100644 > > --- a/hw/i386/pc_q35.c > > +++ b/hw/i386/pc_q35.c > > @@ -376,6 +376,7 @@ static void pc_q35_7_1_machine_options(MachineClass *m) > > pc_q35_machine_options(m); > > m->alias = "q35";

Re: [PATCH] osdep: Introduce qemu_get_fd() to wrap the common codes

2022-08-18 Thread Guoyi Tu
Ping... Any comments are welcome On 8/12/22 19:01, Guoyi Tu wrote: socket_get_fd() have much the same codes as monitor_fd_param(), so qemu_get_fd() is introduced to implement the common logic. now socket_get_fd() and monitor_fd_param() directly call this function. Signed-off-by: Guoyi Tu ---

Making GSoC Org highlight video for QEMU

2022-08-18 Thread Stefan Hajnoczi
Hi, Google Summer of Code organizations are encouraged to create 2-3 minute videos that present their organization. Organizations with videos will stand out and may be more successful in attracting applicants. I want to give this a try for QEMU. If you want to be involved either as the video prese

Re: towards a workable O_DIRECT outmigration to a file

2022-08-18 Thread Dr. David Alan Gilbert
* Nikolay Borisov (nbori...@suse.com) wrote: > [adding Juan and David to cc as I had missed them. ] Hi Nikolay, > 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

Re: towards a workable O_DIRECT outmigration to a file

2022-08-18 Thread Claudio Fontana
On 8/18/22 14:38, Dr. David Alan Gilbert wrote: > * Nikolay Borisov (nbori...@suse.com) wrote: >> [adding Juan and David to cc as I had missed them. ] > > Hi Nikolay, > >> On 11.08.22 г. 16:47 ч., Nikolay Borisov wrote: >>> Hello, >>> >>> I'm currently looking into implementing a 'file:' uri for

Re: [PATCH] osdep: Introduce qemu_get_fd() to wrap the common codes

2022-08-18 Thread Christian Schoenebeck
On Donnerstag, 18. August 2022 14:06:04 CEST Guoyi Tu wrote: > Ping... > > Any comments are welcome > > On 8/12/22 19:01, Guoyi Tu wrote: > > socket_get_fd() have much the same codes as monitor_fd_param(), > > so qemu_get_fd() is introduced to implement the common logic. > > now socket_get_fd() a

Re: [PATCH] pci/pci_expander_bridge: migrate state of pxb/pxb-pcie devices.

2022-08-18 Thread Dr. David Alan Gilbert
* Vladimir Sementsov-Ogievskiy (vsement...@yandex-team.ru) wrote: > [add migration maintainers] Thanks, > On 8/11/22 19:49, Andrey Ryabinin wrote: > > pxb/pxb-pcie/pxb-cxl devices currently doesn't have vmstate description > > So the state of device is not preserved during migration and > > guest

Re: [PATCH v2 24/31] ppc4xx: Fix code style problems reported by checkpatch

2022-08-18 Thread Cédric Le Goater
On 8/17/22 17:08, BALATON Zoltan wrote: Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Thanks, C. --- hw/ppc/ppc405_uc.c | 5 +++-- hw/ppc/ppc440_bamboo.c | 27 ++-- hw/ppc/ppc440_uc.c | 3 ++- hw/ppc/ppc4xx_devs.c | 48 +++

Re: [PATCH v2 00/31] QOMify PPC4xx devices and minor clean ups

2022-08-18 Thread Cédric Le Goater
Daniel, On 8/17/22 17:08, BALATON Zoltan wrote: Hello, This is based on gitlab.com/danielhb/qemu/tree/ppc-7.2 This series contains the rest of Cédric's OOM'ify patches modified according my review comments and some other clean ups I've noticed along the way. I think patches 01-24 are good fo

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

2022-08-18 Thread Kirill A . Shutemov
On Wed, Aug 17, 2022 at 10:40:12PM -0700, Hugh Dickins wrote: > On Wed, 6 Jul 2022, Chao Peng wrote: > > This is the v7 of this series which tries to implement the fd-based KVM > > guest private memory. > > Here at last are my reluctant thoughts on this patchset. > > fd-based approach for support

[PATCH v2 for-7.2 1/2] pci: Remove unused pci_get_*_by_mask() functions

2022-08-18 Thread Peter Maydell
The helper functions pci_get_{byte,word,long,quad}_by_mask() were added in 2012 in commit c9f50cea70a1596. In the decade since we have never added a single use of them. The helpers clearly aren't that helpful, so drop them rather than carrying around dead code. Reviewed-by: Richard Henderson Sig

[PATCH v2 for-7.2 0/2] pci *_by_mask() coverity fix

2022-08-18 Thread Peter Maydell
This patchset fixes a Coverity nit relating to the pci_set_*_by_mask() helper functions, where we might shift off the end of a variable if the caller passes in a bogus mask argument. Patch 2 is the coverity fix (adding an assert() to help Coverity out a bit and to catch potential future actual bugs

[PATCH v2 for-7.2 2/2] pci: Sanity check mask argument to pci_set_*_by_mask()

2022-08-18 Thread Peter Maydell
Coverity complains that in functions like pci_set_word_by_mask() we might end up shifting by more than 31 bits. This is true, but only if the caller passes in a zero mask. Help Coverity out by asserting that the mask argument is valid. Fixes: CID 1487168 Reviewed-by: Richard Henderson Signed-off

Re: [PATCH 7/7] target/riscv: Honour -semihosting-config userspace=on and enable=on

2022-08-18 Thread Peter Maydell
On Thu, 18 Aug 2022 at 05:20, Alistair Francis wrote: > > On Tue, Aug 16, 2022 at 5:11 AM Peter Maydell > wrote: > > > > The riscv target incorrectly enabled semihosting always, whether the > > user asked for it or not. Call semihosting_enabled() passing the > > correct value to the is_userspac

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-18 Thread Christian Schoenebeck
On Mittwoch, 17. August 2022 17:55:24 CEST Peter Maydell wrote: > On Wed, 17 Aug 2022 at 15:49, Nikita Ivanov wrote: > > Well... > > > > What exactly is still under discussion? In my perspective, the main > > pitfalls have been resolved: > > > > 0. All possible places where TFR() macro could be

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-18 Thread Peter Maydell
On Thu, 18 Aug 2022 at 15:07, Christian Schoenebeck wrote: > > On Mittwoch, 17. August 2022 17:55:24 CEST Peter Maydell wrote: > > On Wed, 17 Aug 2022 at 15:49, Nikita Ivanov wrote: > > > Well... > > > > > > What exactly is still under discussion? In my perspective, the main > > > pitfalls have b

Re: [RFC PATCH v2] tests/9p: introduce declarative function calls

2022-08-18 Thread Christian Schoenebeck
On Montag, 18. Juli 2022 16:02:31 CEST Christian Schoenebeck wrote: > On Montag, 18. Juli 2022 15:10:55 CEST Christian Schoenebeck wrote: > > There are currently 4 different functions for sending a 9p 'Twalk' > > request. They are all doing the same thing, just in a slightly different > > way and w

[PATCH v3] xio3130_upstream: Add ACS (Access Control Services) capability

2022-08-18 Thread Paul Schlacter
If it is a pcie device, check that all devices on the path from the device to the root complex have ACS enabled, and then the device will become an iommu_group. pci_acs_path_enabled, this function in the Linux kernel, it means that if the device is a PCIe device, check the path from the device to

Re: [PATCH] target/arm: Add cortex-a35

2022-08-18 Thread Peter Maydell
On Mon, 15 Aug 2022 at 22:35, Hao Wu wrote: > > Add cortex A35 core and enable it for virt board. > > Signed-off-by: Hao Wu > Reviewed-by: Joe Komlodi > +static void aarch64_a35_initfn(Object *obj) > +{ > +ARMCPU *cpu = ARM_CPU(obj); > + > +cpu->dtb_compatible = "arm,cortex-a35"; > +

[PATCH v1 0/2] i386: KVM: Fix 'system_reset' failures when vCPU is in VMX root operation

2022-08-18 Thread Vitaly Kuznetsov
Changes since RFC: - Call kvm_put_msr_feature_control() before kvm_put_sregs2() to achieve the same result [Paolo]. - Add Maxim's R-b to PATCH1. It was discovered that Windows 11 with WSL2 (Hyper-V) enabled guests fail to reboot when QEMU's 'system_reset' command is issued. The problem appears to

[PATCH v1 2/2] i386: do kvm_put_msr_feature_control() first thing when vCPU is reset

2022-08-18 Thread Vitaly Kuznetsov
kvm_put_sregs2() fails to reset 'locked' CR4/CR0 bits upon vCPU reset when it is in VMX root operation. Do kvm_put_msr_feature_control() before kvm_put_sregs2() to (possibly) kick vCPU out of VMX root operation. It also seems logical to do kvm_put_msr_feature_control() before kvm_put_nested_state()

Re: [PATCH v2 00/31] QOMify PPC4xx devices and minor clean ups

2022-08-18 Thread BALATON Zoltan
On Thu, 18 Aug 2022, Cédric Le Goater wrote: Daniel, On 8/17/22 17:08, BALATON Zoltan wrote: Hello, This is based on gitlab.com/danielhb/qemu/tree/ppc-7.2 This series contains the rest of Cédric's OOM'ify patches modified according my review comments and some other clean ups I've noticed alon

[PATCH v1 1/2] i386: reset KVM nested state upon CPU reset

2022-08-18 Thread Vitaly Kuznetsov
Make sure env->nested_state is cleaned up when a vCPU is reset, it may be stale after an incoming migration, kvm_arch_put_registers() may end up failing or putting vCPU in a weird state. Reviewed-by: Maxim Levitsky Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm/kvm.c | 37 +

[PATCH 1/9] parallels: Out of image offset in BAT leads to image inflation

2022-08-18 Thread Alexander Ivanov
data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset is outside of the image, any further write will create the cluster at this offset and/or the image will be truncated to this offset on close. This is definitely not correct. Raise an error in parallels_

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

2022-08-18 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 simplier code. v4 changes: Move s->data_end fixing to parallels_co_check().

[PATCH 2/9] parallels: Fix data_end field value in parallels_co_check()

2022-08-18 Thread Alexander Ivanov
When an image is opened for check there is no error if an offset in the BAT points outside the image. In such a way we can repair the image. Out-of-image offsets are repaired in the check, but data_end field still points outside. Fix this field by file size. Signed-off-by: Alexander Ivanov --- b

[PATCH 3/9] parallels: create parallels_set_bat_entry_helper() to assign BAT value

2022-08-18 Thread Alexander Ivanov
This helper will be reused in next patches during parallels_co_check rework to simplify its code. Signed-off-by: Alexander Ivanov --- block/parallels.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 24c05b95e8..f460b360

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

2022-08-18 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov --- block/parallels.c | 53 +++ 1 file changed, 31 insertions(+)

[PATCH 4/9] parallels: Use generic infrastructure for BAT writing in parallels_co_check()

2022-08-18 Thread Alexander Ivanov
BAT is written in the context of conventional operations over the image inside bdrv_co_flush() when it calls parallels_co_flush_to_os() callback. Thus we should not modify BAT array directly, but call parallels_set_bat_entry() helper and bdrv_co_flush() further on. After that there is no need to ma

[PATCH 5/9] parallels: Move check of unclean image to a separate function

2022-08-18 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov --- block/parallels.c | 31 +-- 1 file changed, 21 insertions(+), 10 deletions(-

[PATCH 6/9] parallels: Move check of cluster outside image to a separate function

2022-08-18 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. s->data_end fix relates to out-of-image check so move it to the helper too. Signed-off-by: Alexander Ivanov --- block/parallels.c | 67 +

[PATCH 7/9] parallels: Move check of leaks to a separate function

2022-08-18 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov --- block/parallels.c | 84 +-- 1 file changed, 52 insertions(+)

[PATCH 9/9] parallels: Replace qemu_co_mutex_lock by WITH_QEMU_LOCK_GUARD

2022-08-18 Thread Alexander Ivanov
Replace the way we use mutex in parallels_co_check() for simplier and less error prone code. Signed-off-by: Alexander Ivanov --- block/parallels.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index f19e86d5

[RFC 0/2] Virtio in order feature support for virtio-net device.

2022-08-18 Thread Guo Zhi
In virtio-spec 1.1, new feature bit VIRTIO_F_IN_ORDER was introduced. When this feature has been negotiated, virtio driver will use descriptors in ring order: starting from offset 0 in the table, and wrapping around at the end of the table. Virtio devices will always use descriptors in the same ord

[RFC 1/2] virtio: expose used buffers

2022-08-18 Thread Guo Zhi
Follow VIRTIO 1.1 spec, we can only writing out a single used ring for a batch of descriptors, and only notify guest when the batch of descriptors have all been used. We do that batch for tx, because the driver doesn't need to know the length of tx buffer, while for rx, we don't apply the batch st

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-18 Thread Jason A. Donenfeld
Hey Gerd, On Tue, Aug 16, 2022 at 10:55:11AM +0200, Gerd Hoffmann wrote: > Hi, > > > > We can make setup_data chaining work with OVMF, but the whole chain > > > should be located in a GPA range that OVMF dictates. > > > > It sounds like what you describe is pretty OVMF-specific though, > > rig

[RFC 2/2] virtio: enable f_in_order feature for virtio-net

2022-08-18 Thread Guo Zhi
In order feature is not a transparent feature in QEMU, only specific devices(eg, virtio-net) support it. Signed-off-by: Guo Zhi --- hw/net/virtio-net.c| 1 + include/hw/virtio/virtio.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/vi

Re: [PULL 05/10] x86: disable rng seeding via setup_data

2022-08-18 Thread Jason A. Donenfeld
Hi Gerd, Michael, Paolo, On Thu, Aug 18, 2022 at 01:56:14PM +0200, Gerd Hoffmann wrote: > Hi, > > > > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c > > > index 3a35193ff7..2e5dae9a89 100644 > > > --- a/hw/i386/pc_q35.c > > > +++ b/hw/i386/pc_q35.c > > > @@ -376,6 +376,7 @@ static void pc_q35

Re: [PATCH 1/2] tests/tcg/ppc64le: Added an overflow with OE=1 test

2022-08-18 Thread Richard Henderson
On 8/17/22 09:57, Lucas Mateus Castro(alqotel) wrote: +void sigfpe_handler(int sig, siginfo_t *si, void *ucontext) +{ +uint64_t t; +uint64_t ch = 0x5fcfffe4965a17e0ull; +asm ( +"stfd 2, %0\n\t" +: "=m"(t) +: +: "memory", "fr2" +); No, you need to

Re: [PATCH for-7.1 3/4] target/loongarch: rename the TCG CPU "la464" to "qemu64-v1.00"

2022-08-18 Thread Richard Henderson
On 8/17/22 19:31, WANG Xuerui wrote: Hmm, I've looked up more context and it is indeed reasonable to generally name the QEMU models after real existing models. But in this case we could face a problem with Loongson's nomenclature: all of Loongson 3A5000, 3C5000 and 3C5000L are LA464, yet they s

Re: [PULL 00/12] pc,virtio: fixes

2022-08-18 Thread Richard Henderson
On 8/17/22 13:05, Michael S. Tsirkin wrote: The following changes since commit c7208a6e0d049f9e8af15df908168a79b1f99685: Update version for v7.1.0-rc3 release (2022-08-16 20:45:19 -0500) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_u

Re: Using Unicamp's Minicloud for the QEMU CI

2022-08-18 Thread Lucas Mateus Martins Araujo e Castro
ping Any interest in this? On 12/07/2022 11:51, Lucas Mateus Martins Araujo e Castro wrote: Hi everyone! I would like gauge the interest in using Minicloud's infrastructure[1] for the CI, talking with some people from there they are interested. It has both ppc64 and pp64le images, multiple

Re: [PATCH 1/2] tests/tcg/ppc64le: Added an overflow with OE=1 test

2022-08-18 Thread Lucas Mateus Martins Araujo e Castro
On 18/08/2022 12:32, Richard Henderson wrote: On 8/17/22 09:57, Lucas Mateus Castro(alqotel) wrote: +void sigfpe_handler(int sig, siginfo_t *si, void *ucontext) +{ +    uint64_t t; +    uint64_t ch = 0x5fcfffe4965a17e0ull; +    asm ( +    "stfd 2, %0\n\t" +    : "=m"(t) +    : +

Re: [PATCH 2/8] qapi/migration: Introduce vcpu-dirty-limit parameters

2022-08-18 Thread Hyman
在 2022/8/18 6:07, Peter Xu 写道: On Sat, Jul 23, 2022 at 03:49:14PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Introduce "vcpu-dirty-limit" migration parameter used to limit dirty page rate during live migration. "vcpu-dirty-limit" and "x-vcpu-dirty-limit-period" are two di

Re: Using Unicamp's Minicloud for the QEMU CI

2022-08-18 Thread Peter Maydell
On Thu, 18 Aug 2022 at 17:11, Lucas Mateus Martins Araujo e Castro wrote: > Lucas wrote: >> I would like gauge the interest in using Minicloud's infrastructure[1] >> for the CI, talking with some people from there they are interested. >> It has both ppc64 and pp64le images, multiple versions of 4

[PATCH] tests/qtest/migration-test: Only wait for serial output where migration succeeds

2022-08-18 Thread Thomas Huth
Waiting for the serial output can take a couple of seconds - and since we're doing a lot of migration tests, this time easily sums up to multiple minutes. But if a test is supposed to fail, it does not make much sense to wait for the source to be in the right state first, so we can skip the waiting

Re: towards a workable O_DIRECT outmigration to a file

2022-08-18 Thread Dr. David Alan Gilbert
* Claudio Fontana (cfont...@suse.de) wrote: > On 8/18/22 14:38, Dr. David Alan Gilbert wrote: > > * Nikolay Borisov (nbori...@suse.com) wrote: > >> [adding Juan and David to cc as I had missed them. ] > > > > Hi Nikolay, > > > >> On 11.08.22 г. 16:47 ч., Nikolay Borisov wrote: > >>> Hello, > >>>

Re: [BUG] cxl can not create region

2022-08-18 Thread Jonathan Cameron via
On Wed, 17 Aug 2022 17:16:19 +0100 Jonathan Cameron wrote: > On Thu, 11 Aug 2022 17:46:55 -0700 > Dan Williams wrote: > > > Dan Williams wrote: > > > Bobo WL wrote: > > > > Hi Dan, > > > > > > > > Thanks for your reply! > > > > > > > > On Mon, Aug 8, 2022 at 11:58 PM Dan Williams > >

Re: [PATCH] target/arm: Add cortex-a35

2022-08-18 Thread Hao Wu
Hi, This is used by a new series of Nuvoton SoC (NPCM8XX) which contains 4 Cortex A-35 cores. I'll update the missing fields in a follow-up patch set. On Thu, Aug 18, 2022 at 7:59 AM Peter Maydell wrote: > On Mon, 15 Aug 2022 at 22:35, Hao Wu wrote: > > > > Add cortex A35 core and enable it f

Re: [PATCH 1/8] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter

2022-08-18 Thread Hyman
在 2022/8/18 6:06, Peter Xu 写道: On Sat, Jul 23, 2022 at 03:49:13PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Introduce "x-vcpu-dirty-limit-period" migration experimental parameter, which is used to make dirtyrate calculation period configurable. Signed-off-by: Hyman Huang

[qemu-web PATCH] Add signing pubkey for python-qemu-qmp package

2022-08-18 Thread John Snow
Add the pubkey currently used for signing PyPI releases of qemu.qmp to a stable location where it can be referenced by e.g. Fedora RPM specfiles. At present, the key happens to just simply be my own -- but future releases may be signed by a different key. In that case, we can increment '1.txt' to

Re: [PATCH 4/8] migration: Implement dirty-limit convergence algo

2022-08-18 Thread Hyman
在 2022/8/18 6:09, Peter Xu 写道: On Sat, Jul 23, 2022 at 03:49:16PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Implement dirty-limit convergence algo for live migration, which is kind of like auto-converge algo but using dirty-limit instead of cpu throttle to make migration

Re: [PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-18 Thread Vivian Wang
On 8/17/22 23:05, Ilya Leoshkevich wrote: > 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 real

Re: [PATCH] tests/qtest/migration-test: Only wait for serial output where migration succeeds

2022-08-18 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > Waiting for the serial output can take a couple of seconds - and since > we're doing a lot of migration tests, this time easily sums up to > multiple minutes. But if a test is supposed to fail, it does not make > much sense to wait for the source to be in t

[PATCH] kvm: fix segfault with query-stats-schemas and -M none

2022-08-18 Thread Paolo Bonzini
-M none creates a guest without a vCPU, causing the following error: $ ./qemu-system-x86_64 -qmp stdio -M none -accel kvm {execute:qmp_capabilities} {"return": {}} {execute: query-stats-schemas} Segmentation fault (core dumped) Fix it by not querying the vCPU stats if first_cpu is NULL. Signed-o

Re: [PATCH v2 00/31] QOMify PPC4xx devices and minor clean ups

2022-08-18 Thread Daniel Henrique Barboza
On 8/18/22 10:17, Cédric Le Goater wrote: Daniel, On 8/17/22 17:08, BALATON Zoltan wrote: Hello, This is based on gitlab.com/danielhb/qemu/tree/ppc-7.2 This series contains the rest of Cédric's OOM'ify patches modified according my review comments and some other clean ups I've noticed alon

Re: [PULL 0/3] Fixes for QEMU 7.1-rc4

2022-08-18 Thread Richard Henderson
On 8/17/22 23:56, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The following changes since commit c7208a6e0d049f9e8af15df908168a79b1f99685: Update version for v7.1.0-rc3 release (2022-08-16 20:45:19 -0500) are available in the Git repository at: g...@gitlab.com:marcandre.

Re: towards a workable O_DIRECT outmigration to a file

2022-08-18 Thread Claudio Fontana
On 8/18/22 18:31, Dr. David Alan Gilbert wrote: > * Claudio Fontana (cfont...@suse.de) wrote: >> On 8/18/22 14:38, Dr. David Alan Gilbert wrote: >>> * Nikolay Borisov (nbori...@suse.com) wrote: [adding Juan and David to cc as I had missed them. ] >>> >>> Hi Nikolay, >>> On 11.08.22 г. 16:

Re: towards a workable O_DIRECT outmigration to a file

2022-08-18 Thread Claudio Fontana
On 8/18/22 18:31, Dr. David Alan Gilbert wrote: > * Claudio Fontana (cfont...@suse.de) wrote: >> On 8/18/22 14:38, Dr. David Alan Gilbert wrote: >>> * Nikolay Borisov (nbori...@suse.com) wrote: [adding Juan and David to cc as I had missed them. ] >>> >>> Hi Nikolay, >>> On 11.08.22 г. 16:

[PATCH] virtiofsd: use g_date_time_get_microsecond to get subsecond

2022-08-18 Thread Yusuke Okada
The "%f" specifier in g_date_time_format() is only available in glib 2.65.2 or later. If combined with older glib, the function returns null and the timestamp displayed as "(null)". For backward compatibility, g_date_time_get_microsecond should be used to retrieve subsecond. In this patch the g_d

Re: [PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-18 Thread Ilya Leoshkevich
On Fri, 2022-08-19 at 00:55 +0800, Vivian Wang wrote: > Hi, > Could this be related to issue 1155 [1]? On RISC-V, I'm getting > incorrect [m|s]tval/[m|s]epc combinations for page faults in system > emulation and incorrect si_addr and program counter on SIGSEGV in > user emulation. Since it seems to

Re: [PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-18 Thread Richard Henderson
On 8/18/22 09:55, Vivian Wang wrote: On 8/17/22 23:05, Ilya Leoshkevich wrote: 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

[PATCH v2 1/2] tests/tcg/ppc64le: Added an overflow with OE=1 test

2022-08-18 Thread Lucas Mateus Castro(alqotel)
Added a test to see if the adjustment is being made correctly when an overflow occurs and OE is set. Signed-off-by: Lucas Mateus Castro (alqotel) --- The prctl patch is not ready yet, so this patch does as Richard Henderson suggested and check the fp register in the signal handler This patch wil

[PATCH v2 2/2] tests/tcg/ppc64le: Added an underflow with UE=1 test

2022-08-18 Thread Lucas Mateus Castro(alqotel)
Added a test to see if the adjustment is being made correctly when an underflow occurs and UE is set. Signed-off-by: Lucas Mateus Castro (alqotel) --- This patch will also fail without the underflow with UE set bugfix Message-Id:<20220805141522.412864-3-lucas.ara...@eldorado.org.br> --- tests/tc

[PATCH] virtiofsd: use g_date_time_get_microsecond to get subsecond

2022-08-18 Thread Yusuke Okada
From: Yusuke Okada The "%f" specifier in g_date_time_format() is only available in glib 2.65.2 or later. If combined with older glib, the function returns null and the timestamp displayed as "(null)". For backward compatibility, g_date_time_get_microsecond should be used to retrieve subsecond.

Re: towards a workable O_DIRECT outmigration to a file

2022-08-18 Thread Claudio Fontana
On 8/18/22 20:09, Claudio Fontana wrote: > On 8/18/22 18:31, Dr. David Alan Gilbert wrote: >> * Claudio Fontana (cfont...@suse.de) wrote: >>> On 8/18/22 14:38, Dr. David Alan Gilbert wrote: * Nikolay Borisov (nbori...@suse.com) wrote: > [adding Juan and David to cc as I had missed them. ]

Re: [RFC PATCH] pnv/chiptod: Add basic P9 chiptod model

2022-08-18 Thread Daniel Henrique Barboza
On 8/11/22 13:40, Nicholas Piggin wrote: The chiptod is a pervasive facility which can keep a time, synchronise it across multiple chips, and can move that time to or from the core timebase units. This adds a very basic initial emulation of chiptod registers. The interesting thing about chipt

Re: towards a workable O_DIRECT outmigration to a file

2022-08-18 Thread Dr. David Alan Gilbert
* Claudio Fontana (cfont...@suse.de) wrote: > On 8/18/22 18:31, Dr. David Alan Gilbert wrote: > > * Claudio Fontana (cfont...@suse.de) wrote: > >> On 8/18/22 14:38, Dr. David Alan Gilbert wrote: > >>> * Nikolay Borisov (nbori...@suse.com) wrote: > [adding Juan and David to cc as I had missed t

  1   2   >