[RFC PATCH 0/2] bugfix: Decrease dirty bitmap blocks after we remove ramblock

2020-11-20 Thread Keqian Zhu
Hi all, I failed to find where we free dirty bitmap blocks of ramlist. If this is a memory leakage problem, I hope this patch series can fix it properly :-). Thanks, Keqian. Keqian Zhu (2): ramlist: Make dirty bitmap blocks of ramlist resizable ramlist: Resize dirty bitmap blocks after remov

[RFC PATCH 1/2] ramlist: Make dirty bitmap blocks of ramlist resizable

2020-11-20 Thread Keqian Zhu
When we remove a ramblock, we should decrease the dirty bitmap blocks of ramlist to avoid memory leakage. This patch rebuilds dirty_memory_ extend to support both "extend" and "decrease". Signed-off-by: Keqian Zhu --- softmmu/physmem.c | 28 1 file changed, 20 insert

Re: Peter Maydell

2020-11-20 Thread Paolo Bonzini
On 20/11/20 09:44, Liviu Ionescu wrote: On 20 Nov 2020, at 07:43, cavinnarsingh...@gmail.com wrote: This issue is about the Qemu Will the Qemu work on the new m1 macbook pro? And if yes, when will the arm version of Qemu be available for public I already distribute a binary version of the x

[RFC PATCH 2/2] ramlist: Resize dirty bitmap blocks after remove ramblock

2020-11-20 Thread Keqian Zhu
Use the new "dirty_bitmap_resize" interface to reduce dirty bitmap blocks after we remove a ramblock from ramlist. Signed-off-by: Keqian Zhu --- softmmu/physmem.c | 8 1 file changed, 8 insertions(+) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index f6ff78378e..2a17e0a89a 100644

[PATCH for-5.2] microvm: fix kconfig for non-default devices

2020-11-20 Thread Paolo Bonzini
PCIe and USB support can be disabled on the command line, and therefore should not be included if QEMU is configured --without-default-devices. While at it, also remove the "default y" for USB_XHCI_SYSBUS because sysbus devices are not user creatable; boards that use them will specify them manuall

Re: [PATCH v2 3/8] qnum: QNumValue type for QNum value literals

2020-11-20 Thread Markus Armbruster
Eduardo Habkost writes: > On Thu, Nov 19, 2020 at 01:21:58PM -0500, Eduardo Habkost wrote: >> On Thu, Nov 19, 2020 at 11:24:52AM +0100, Markus Armbruster wrote: > [...] >> > >> > > +return qnum_from_value((QNumValue) QNUM_VAL_INT(value)); >> > >> > No space between between (type) and its ope

Re: [RFC v3 9/9] i386: split cpu accelerators from cpu.c

2020-11-20 Thread Claudio Fontana
On 11/19/20 8:23 PM, Eduardo Habkost wrote: > On Thu, Nov 19, 2020 at 09:53:09AM +0100, Claudio Fontana wrote: >> Hi, >> >> On 11/18/20 7:28 PM, Eduardo Habkost wrote: >>> On Wed, Nov 18, 2020 at 11:29:36AM +0100, Claudio Fontana wrote: split cpu.c into: cpu.ccpuid and co

Re: [PATCH v5 6/7] tcg: implement JIT for iOS and Apple Silicon

2020-11-20 Thread Alexander Graf
On 09.11.20 00:24, Joelle van Dyne wrote: When entitlements are available (macOS or jailbroken iOS), a hardware feature called APRR exists on newer Apple Silicon that can cheaply mark JIT pages as either RX or RW. Reverse engineered functions from libsystem_pthread.dylib are implemented to hand

Re: Peter Maydell

2020-11-20 Thread Stefan Weil
Am 20.11.20 um 09:54 schrieb Paolo Bonzini: On 20/11/20 09:44, Liviu Ionescu wrote: On 20 Nov 2020, at 07:43, cavinnarsingh...@gmail.com wrote: This issue is about the Qemu Will the Qemu work on the new m1 macbook pro? And if yes, when will the arm version of Qemu be available for public I a

Re: [PATCH 1/2] pc-bios: s390x: Ensure Read IPL memory is clean

2020-11-20 Thread Cornelia Huck
On Thu, 19 Nov 2020 17:57:28 +0100 Eric Farman wrote: > If, for example, we boot off a virtio device and chreipl to a vfio-ccw > device, the space at lowcore will be non-zero. We build a Read IPL CCW > at address zero, but it will have leftover PSW data that will conflict > with the Format-0 CCW

Re: Peter Maydell

2020-11-20 Thread Liviu Ionescu
> On 20 Nov 2020, at 10:54, Paolo Bonzini wrote: > > new m1 ... Richard Henderson and Joelle van Dyne are working on it Ok, it's good to know that someone takes care of this. Personally I think that the new Apple hardware is great, but to match developer needs it might need a few more month

Re: [PATCH] qga: Correct loop count in qmp_guest_get_vcpus()

2020-11-20 Thread Lin Ma
On 2020-11-19 14:46, Marc-André Lureau wrote: Hi On Thu, Nov 19, 2020 at 12:48 PM Lin Ma wrote: The guest-get-vcpus returns incorrect vcpu info in case we hotunplug vcpus(not the last one). e.g.: A VM has 4 VCPUs: cpu0 + 3 hotunpluggable online vcpus(cpu1, cpu2 and cpu3). Hotunplug cpu2, Now

[PATCH v2] qga: Correct loop count in qmp_guest_get_vcpus()

2020-11-20 Thread Lin Ma
The guest-get-vcpus returns incorrect vcpu info in case we hotunplug vcpus(not the last one). e.g.: A VM has 4 VCPUs: cpu0 + 3 hotunpluggable online vcpus(cpu1, cpu2 and cpu3). Hotunplug cpu2, Now only cpu0, cpu1 and cpu3 are present & online. ./qmp-shell /tmp/qmp-monitor.sock (QEMU) query-hotplu

Re: [PATCH v4 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-11-20 Thread Steven Price
On 19/11/2020 16:24, Catalin Marinas wrote: On Thu, Nov 19, 2020 at 12:45:52PM +, Steven Price wrote: On 18/11/2020 17:05, Andrew Jones wrote: On Wed, Nov 18, 2020 at 04:50:01PM +, Catalin Marinas wrote: On Wed, Nov 18, 2020 at 04:01:20PM +, Steven Price wrote: On 17/11/2020 16:07

Re: [PATCH for-5.2] microvm: fix kconfig for non-default devices

2020-11-20 Thread Gerd Hoffmann
On Fri, Nov 20, 2020 at 09:55:24AM +0100, Paolo Bonzini wrote: > PCIe and USB support can be disabled on the command line, and therefore > should not be included if QEMU is configured --without-default-devices. I don't think this will work. I expect linking will fail due to xhci_sysbus_build_aml

Re: [PATCH] qga: Correct loop count in qmp_guest_get_vcpus()

2020-11-20 Thread Marc-André Lureau
Hi On Fri, Nov 20, 2020 at 1:28 PM Lin Ma wrote: > On 2020-11-19 14:46, Marc-André Lureau wrote: > > Hi > > > > On Thu, Nov 19, 2020 at 12:48 PM Lin Ma wrote: > > > >> The guest-get-vcpus returns incorrect vcpu info in case we hotunplug > >> vcpus(not > >> the last one). > >> e.g.: > >> A VM ha

Re: [PATCH v5 0/2] MTE support for KVM guest

2020-11-20 Thread Steven Price
On 19/11/2020 19:11, Marc Zyngier wrote: On 2020-11-19 18:42, Andrew Jones wrote: On Thu, Nov 19, 2020 at 03:45:40PM +, Peter Maydell wrote: On Thu, 19 Nov 2020 at 15:39, Steven Price wrote: > This series adds support for Arm's Memory Tagging Extension (MTE) to > KVM, allowing KVM guests t

Re: iotest 030 still occasionally intermittently failing

2020-11-20 Thread Vladimir Sementsov-Ogievskiy
19.11.2020 23:31, Vladimir Sementsov-Ogievskiy wrote: 19.11.2020 22:31, Vladimir Sementsov-Ogievskiy wrote: 19.11.2020 22:30, Vladimir Sementsov-Ogievskiy wrote: 19.11.2020 19:11, Vladimir Sementsov-Ogievskiy wrote: 16.11.2020 20:59, Peter Maydell wrote: On Mon, 16 Nov 2020 at 17:34, Alberto

Re: [PATCH v5 0/2] MTE support for KVM guest

2020-11-20 Thread Marc Zyngier
On 2020-11-20 09:50, Steven Price wrote: On 19/11/2020 19:11, Marc Zyngier wrote: Does this sound reasonable? I'll clean up the set_pte_at() change and post a v6 later today. Please hold on. I still haven't reviewed your v5, nor have I had time to read your reply to my comments on v4. Than

Re: [PATCH v5 0/2] MTE support for KVM guest

2020-11-20 Thread Steven Price
On 20/11/2020 09:56, Marc Zyngier wrote: On 2020-11-20 09:50, Steven Price wrote: On 19/11/2020 19:11, Marc Zyngier wrote: Does this sound reasonable? I'll clean up the set_pte_at() change and post a v6 later today. Please hold on. I still haven't reviewed your v5, nor have I had time to r

Re: [PATCH for-5.2] hw/display/tcx: add missing 64-bit access for framebuffer blitter

2020-11-20 Thread Philippe Mathieu-Daudé
On 11/20/20 9:17 AM, Mark Cave-Ayland wrote: > Commit ae5643ecc6 "hw/display/tcx: Allow 64-bit accesses to framebuffer > stippler > and blitter" enabled 64-bit access for the TCX framebuffer stippler and > blitter > but missed applying the change to one of the blitter MemoryRegions. > > Whilst t

Re: [PATCH for-5.2] microvm: fix kconfig for non-default devices

2020-11-20 Thread Philippe Mathieu-Daudé
On 11/20/20 9:55 AM, Paolo Bonzini wrote: > PCIe and USB support can be disabled on the command line, and therefore > should not be included if QEMU is configured --without-default-devices. > > While at it, also remove the "default y" for USB_XHCI_SYSBUS because > sysbus devices are not user creat

Re: [PATCH 4/4] [broken] meson: try link tracepoints to module

2020-11-20 Thread Gerd Hoffmann
Hi, > > Nope. Tried s/module_ss/kraxel_ss/, still not working. > > > > I get tons of "undefined reference to `_TRACE_something'" > > errors (*not* qxl). Seems trace_ss is not updated as intended. > > Okay. There is a workaround available: > [PATCH v2] trace: use STAP_SDT_V2 to work around sy

Re: [PATCH v5 2/7] configure: cross-compiling with empty cross_prefix

2020-11-20 Thread Philippe Mathieu-Daudé
On 11/9/20 12:24 AM, Joelle van Dyne wrote: > The iOS toolchain does not use the host prefix naming convention. So we need > to enable cross-compile options while allowing the PREFIX to be blank. > > Signed-off-by: Joelle van Dyne > --- > configure | 6 -- > 1 file changed, 4 insertions(+),

Re: QMP and the 'id' parameter

2020-11-20 Thread Markus Armbruster
John Snow writes: > On 11/11/20 3:27 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> On 11/10/20 1:22 AM, Markus Armbruster wrote: John Snow writes: > The QMP specification states: > >> NOTE: Some errors can occur before the Server is able to read the "id" >>

Re: [PATCH v5 7/7] block: check availablity for preadv/pwritev on mac

2020-11-20 Thread Philippe Mathieu-Daudé
On 11/9/20 12:24 AM, Joelle van Dyne wrote: > macOS 11/iOS 14 added preadv/pwritev APIs. Due to weak linking, configure > will succeed with CONFIG_PREADV even when targeting a lower OS version. We > therefore need to check at run time if we can actually use these APIs. > > Signed-off-by: Joelle va

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-20 Thread Andrew Melnichenko
Ping On Thu, Jul 16, 2020 at 6:26 AM wrote: > From: Andrew Melnychenko > > There is an issue, that netdev can't be removed if it was added using hmp. > The bug appears after 08712fcb851034228b61f75bd922863a984a4f60 commit. > It happens because of unclear QemuOpts that was created during > hmp_n

Re: iotest 030 still occasionally intermittently failing

2020-11-20 Thread Philippe Mathieu-Daudé
Cc'ing Stefan/Paolo On 11/20/20 10:51 AM, Vladimir Sementsov-Ogievskiy wrote: > 19.11.2020 23:31, Vladimir Sementsov-Ogievskiy wrote: >> 19.11.2020 22:31, Vladimir Sementsov-Ogievskiy wrote: >>> 19.11.2020 22:30, Vladimir Sementsov-Ogievskiy wrote: 19.11.2020 19:11, Vladimir Sementsov-Ogievsk

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-20 Thread Andrey Gruzdev
On 19.11.2020 21:25, Peter Xu wrote: On Thu, Nov 19, 2020 at 03:59:36PM +0300, Andrey Gruzdev via wrote: [...] +/** + * ram_find_block_by_host_address: find RAM block containing host page + * + * Returns true if RAM block is found and pss->block/page are + * pointing to the given host page, fa

Re: [PATCH V13 2/9] meson.build: Re-enable KVM support for MIPS

2020-11-20 Thread Philippe Mathieu-Daudé
On 11/20/20 5:28 AM, Huacai Chen wrote: > On Wed, Nov 18, 2020 at 1:17 AM Philippe Mathieu-Daudé > wrote: >> On 10/7/20 10:39 AM, Huacai Chen wrote: >>> After converting from configure to meson, KVM support is lost for MIPS, >>> so re-enable it in meson.build. >>> >>> Fixes: fdb75aeff7c212e1afaaa

Re: [PATCH-for-5.2 v2] hw/core/qdev-properties-system: Rewrite set_pci_host_devaddr using GLib

2020-11-20 Thread Philippe Mathieu-Daudé
On 11/17/20 12:16 PM, Philippe Mathieu-Daudé wrote: > ping??? > > On 11/9/20 3:16 PM, Philippe Mathieu-Daudé wrote: >> Cc'ing PCI developers (rc2 is scheduled for tomorrow). >> >> On 11/7/20 9:59 AM, Philippe Mathieu-Daudé wrote: >>> Ping for 5.2 as this is a bugfix. >>> >>> On 10/13/20 12:22 PM,

Re: [PATCH v3 2/7] introduce UFFD-WP low-level interface helpers

2020-11-20 Thread Andrey Gruzdev
On 19.11.2020 21:39, Peter Xu wrote: On Thu, Nov 19, 2020 at 03:59:35PM +0300, Andrey Gruzdev via wrote: +/** + * uffd_register_memory: register memory range with UFFD + * + * Returns 0 in case of success, negative value on error + * + * @uffd: UFFD file descriptor + * @start: starting virtual a

Re: [PATCH v3 5/7] implementation of vm_start() BH

2020-11-20 Thread Andrey Gruzdev
On 19.11.2020 21:46, Peter Xu wrote: On Thu, Nov 19, 2020 at 03:59:38PM +0300, Andrey Gruzdev wrote: To avoid saving updated versions of memory pages we need to start tracking RAM writes before we resume operation of vCPUs. This sequence is especially critical for virtio device backends whos VQs

Re: [PATCH 4/4] [broken] meson: try link tracepoints to module

2020-11-20 Thread Gerd Hoffmann
Hi, > Guess I'll go dig into the meson documentation, this looks more like a > build system than a tracing problem to me. Looking at https://mesonbuild.com/Syntax.html ... "all objects are immutable". So "var2 = var1" creates a copy not a reference I guess? Which implies that ... fo

Re: [PATCH v3 1/7] introduce 'track-writes-ram' migration capability

2020-11-20 Thread Andrey Gruzdev
On 19.11.2020 21:51, Peter Xu wrote: On Thu, Nov 19, 2020 at 03:59:34PM +0300, Andrey Gruzdev via wrote: Signed-off-by: Andrey Gruzdev --- migration/migration.c | 96 +++ migration/migration.h | 1 + qapi/migration.json | 7 +++- 3 files changed,

Re: [PATCH v3 1/7] introduce 'track-writes-ram' migration capability

2020-11-20 Thread Andrey Gruzdev
On 19.11.2020 22:07, Peter Xu wrote: On Thu, Nov 19, 2020 at 01:51:50PM -0500, Peter Xu wrote: On Thu, Nov 19, 2020 at 03:59:34PM +0300, Andrey Gruzdev via wrote: Signed-off-by: Andrey Gruzdev --- migration/migration.c | 96 +++ migration/migration.h

Availability of physical devices and migration (was: Re: [RFC PATCH 2/2] vfio-ccw: Connect the device request notifier)

2020-11-20 Thread Cornelia Huck
On Fri, 20 Nov 2020 03:51:07 +0100 Halil Pasic wrote: > On Tue, 17 Nov 2020 04:26:05 +0100 > Eric Farman wrote: > > > Now that the vfio-ccw code has a notifier interface to request that > > a device be unplugged, let's wire that together. > > I'm aware of the fact that performing an unplug i

Re: [PATCH v3 4/7] implementation of write-tracking migration thread

2020-11-20 Thread Andrey Gruzdev
On 19.11.2020 21:47, Peter Xu wrote: On Thu, Nov 19, 2020 at 03:59:37PM +0300, Andrey Gruzdev via wrote: Signed-off-by: Andrey Gruzdev Some commit message would always be appreciated... Thanks, Yep, missed it.. -- Andrey Gruzdev, Principal Engineer Virtuozzo GmbH +7-903-247-6397

Re: [PATCH v3 7/7] introduce simple linear scan rate limiting mechanism

2020-11-20 Thread Andrey Gruzdev
On 19.11.2020 23:02, Peter Xu wrote: On Thu, Nov 19, 2020 at 03:59:40PM +0300, Andrey Gruzdev wrote: Since reading UFFD events and saving paged data are performed from the same thread, write fault latencies are sensitive to migration stream stalls. Limiting total page saving rate is a method to

Re: [PATCH for-5.2] microvm: fix kconfig for non-default devices

2020-11-20 Thread Paolo Bonzini
On 20/11/20 10:38, Gerd Hoffmann wrote: On Fri, Nov 20, 2020 at 09:55:24AM +0100, Paolo Bonzini wrote: PCIe and USB support can be disabled on the command line, and therefore should not be included if QEMU is configured --without-default-devices. I don't think this will work. I expect linking

Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU

2020-11-20 Thread Claudio Fontana
On 11/18/20 11:07 PM, Eduardo Habkost wrote: > On Wed, Nov 18, 2020 at 08:13:18PM +0100, Paolo Bonzini wrote: >> On 18/11/20 18:30, Eduardo Habkost wrote: Adding a layer of indirect calls is not very different from monkey patching though. >>> >>> I'm a little bothered by monkey patching,

[PATCH v3] qga: Correct loop count in qmp_guest_get_vcpus()

2020-11-20 Thread Lin Ma
The guest-get-vcpus returns incorrect vcpu info in case we hotunplug vcpus(not the last one). e.g.: A VM has 4 VCPUs: cpu0 + 3 hotunpluggable online vcpus(cpu1, cpu2 and cpu3). Hotunplug cpu2, Now only cpu0, cpu1 and cpu3 are present & online. ./qmp-shell /tmp/qmp-monitor.sock (QEMU) query-hotplu

Re: Availability of physical devices and migration (was: Re: [RFC PATCH 2/2] vfio-ccw: Connect the device request notifier)

2020-11-20 Thread Halil Pasic
On Fri, 20 Nov 2020 12:38:37 +0100 Cornelia Huck wrote: > On Fri, 20 Nov 2020 03:51:07 +0100 > Halil Pasic wrote: > > > On Tue, 17 Nov 2020 04:26:05 +0100 > > Eric Farman wrote: > > > > > Now that the vfio-ccw code has a notifier interface to request that > > > a device be unplugged, let's wi

Re: [PATCH 4/4] [broken] meson: try link tracepoints to module

2020-11-20 Thread Philippe Mathieu-Daudé
On 11/20/20 12:25 PM, Gerd Hoffmann wrote: > Hi, > >> Guess I'll go dig into the meson documentation, this looks more like a >> build system than a tracing problem to me. > > Looking at https://mesonbuild.com/Syntax.html ... > > "all objects are immutable". > > So "var2 = var1" creates a copy

Re: [PATCH 00/10] vhost/qemu: thread per IO SCSI vq

2020-11-20 Thread Michael S. Tsirkin
On Fri, Nov 20, 2020 at 08:45:49AM +, Stefan Hajnoczi wrote: > On Thu, Nov 19, 2020 at 5:08 PM Stefan Hajnoczi wrote: > > > > On Thu, Nov 19, 2020 at 4:43 PM Mike Christie > > wrote: > > > > > > On 11/19/20 10:24 AM, Stefan Hajnoczi wrote: > > > > On Thu, Nov 19, 2020 at 4:13 PM Mike Christie

Re: [PATCH v3] qga: Correct loop count in qmp_guest_get_vcpus()

2020-11-20 Thread Marc-André Lureau
Hi On Fri, Nov 20, 2020 at 4:27 PM Lin Ma wrote: > The guest-get-vcpus returns incorrect vcpu info in case we hotunplug > vcpus(not > the last one). > e.g.: > A VM has 4 VCPUs: cpu0 + 3 hotunpluggable online vcpus(cpu1, cpu2 and > cpu3). > Hotunplug cpu2, Now only cpu0, cpu1 and cpu3 are presen

Re: [PATCH] qtest: do not return freed argument vector from qtest_rsp

2020-11-20 Thread Thomas Huth
On 20/11/2020 08.31, Paolo Bonzini wrote: > If expected_args is 0, qtest frees the argument vector and then returns it > nevertheless. Coverity complains; in practice this is not an issue because > expected_args == 0 means that the caller is not interested in the argument > vector, but it would be

Re: [RFC PATCH v3 01/13] hw/arm/virt: Spell out smp.cpus and smp.max_cpus

2020-11-20 Thread Andrew Jones
On Tue, Nov 17, 2020 at 06:27:54PM +0800, Ying Fang wrote: > > > On 11/9/2020 6:45 PM, Salil Mehta wrote: > > Hi Fangying, > > A trivial thing. This patch looks bit of a noise in this patch-set. Better > > to send it as a separate patch-set and get it accepted. > > > Hmm, this patch looks like a

Re: iotest 030 still occasionally intermittently failing

2020-11-20 Thread Vladimir Sementsov-Ogievskiy
20.11.2020 13:34, Philippe Mathieu-Daudé wrote: Cc'ing Stefan/Paolo On 11/20/20 10:51 AM, Vladimir Sementsov-Ogievskiy wrote: 19.11.2020 23:31, Vladimir Sementsov-Ogievskiy wrote: 19.11.2020 22:31, Vladimir Sementsov-Ogievskiy wrote: 19.11.2020 22:30, Vladimir Sementsov-Ogievskiy wrote: 19.1

Re: [PATCH-for-5.2 v2] hw/core/qdev-properties-system: Rewrite set_pci_host_devaddr using GLib

2020-11-20 Thread Michael S. Tsirkin
On Fri, Nov 20, 2020 at 12:00:56PM +0100, Philippe Mathieu-Daudé wrote: > On 11/17/20 12:16 PM, Philippe Mathieu-Daudé wrote: > > ping??? > > > > On 11/9/20 3:16 PM, Philippe Mathieu-Daudé wrote: > >> Cc'ing PCI developers (rc2 is scheduled for tomorrow). > >> > >> On 11/7/20 9:59 AM, Philippe

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-20 Thread Markus Armbruster
Andrew Melnichenko writes: > Ping > > On Thu, Jul 16, 2020 at 6:26 AM wrote: > >> From: Andrew Melnychenko >> >> There is an issue, that netdev can't be removed if it was added using hmp. >> The bug appears after 08712fcb851034228b61f75bd922863a984a4f60 commit. >> It happens because of unclear

Re: [PATCH for-5.2] microvm: fix kconfig for non-default devices

2020-11-20 Thread Gerd Hoffmann
On Fri, Nov 20, 2020 at 01:08:40PM +0100, Paolo Bonzini wrote: > On 20/11/20 10:38, Gerd Hoffmann wrote: > > On Fri, Nov 20, 2020 at 09:55:24AM +0100, Paolo Bonzini wrote: > > > PCIe and USB support can be disabled on the command line, and therefore > > > should not be included if QEMU is configure

[PATCH for-5.2] Revert "hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr()"

2020-11-20 Thread Michael S. Tsirkin
This reverts commit bccb20c49df1bd683248a366021973901c11982f as it introduced a regression blocking bus addresses > 0x1f or higher. Legal bus numbers go up to 0xff. Cc: "Philippe Mathieu-Daudé" Fixes: bccb20c49df ("Use qemu_strtoul() in set_pci_host_devaddr()") Reported-by: Klaus Herman Reported

Re: [PATCH 4/4] [broken] meson: try link tracepoints to module

2020-11-20 Thread Paolo Bonzini
On 20/11/20 12:25, Gerd Hoffmann wrote: Hi, Guess I'll go dig into the meson documentation, this looks more like a build system than a tracing problem to me. Looking at https://mesonbuild.com/Syntax.html ... "all objects are immutable". So "var2 = var1" creates a copy not a reference I g

Re: [PATCH 4/4] [broken] meson: try link tracepoints to module

2020-11-20 Thread Paolo Bonzini
On 20/11/20 13:30, Philippe Mathieu-Daudé wrote: Maybe managing it all in the main meson.build, like the e28ab096bf8..da33fc09873 cleanup? ("Move the creation of the library to the main meson.build") That was a different issue due to variables being defined in many different meson.build files.

Re: [PATCH] qtest: do not return freed argument vector from qtest_rsp

2020-11-20 Thread Markus Armbruster
Paolo Bonzini writes: > If expected_args is 0, qtest frees the argument vector and then returns it > nevertheless. Coverity complains; in practice this is not an issue because > expected_args == 0 means that the caller is not interested in the argument > vector, but it would be a potential probl

Re: [PATCH for-5.2] Revert "hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr()"

2020-11-20 Thread Paolo Bonzini
On 20/11/20 14:04, Michael S. Tsirkin wrote: This reverts commit bccb20c49df1bd683248a366021973901c11982f as it introduced a regression blocking bus addresses > 0x1f or higher. Legal bus numbers go up to 0xff. Cc: "Philippe Mathieu-Daudé" Fixes: bccb20c49df ("Use qemu_strtoul() in set_pci_host_

Re: [PATCH for-5.2] Revert "hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr()"

2020-11-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201120130409.956956-1-...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201120130409.956956-1-...@redhat.com Subject: [PATCH for-5.2] Revert "hw/core/qdev-propertie

Re: [PATCH 21/29] vl: separate qemu_resolve_machine_memdev

2020-11-20 Thread Igor Mammedov
On Tue, 27 Oct 2020 14:21:36 -0400 Paolo Bonzini wrote: > This is a bit nasty: the machine is storing a string and later > resolving it. We probably want to remove the memdev property > and instead make this a memory-set command. "-M memdev" can be > handled as a legacy option that is special c

Re: [PATCH 4/4] [broken] meson: try link tracepoints to module

2020-11-20 Thread Gerd Hoffmann
> > So "var2 = var1" creates a copy not a reference I guess? > > > > Which implies that ... > > > > foo_ss.add(something) > > > > ... is different from ... > > > > bar_ss = foo_ss > > bar_ss.add(something) > > > > ... which in turn explains why the patch doesn't work at all. > > >

Re: [PATCH-for-5.2 v2] hw/intc: fix heap-buffer-overflow in rxicu_realize()

2020-11-20 Thread Peter Maydell
On Wed, 11 Nov 2020 at 14:18, Chen Qun wrote: > > When 'j = icu->nr_sense – 1', the 'j < icu->nr_sense' condition is true, > then 'j = icu->nr_sense', the'icu->init_sense[j]' has out-of-bounds access. > > The asan showed stack: > ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60404

Re: [PATCH-for-5.2 v2] hw/core/qdev-properties-system: Rewrite set_pci_host_devaddr using GLib

2020-11-20 Thread Philippe Mathieu-Daudé
On Fri, Nov 20, 2020 at 1:55 PM Michael S. Tsirkin wrote: > On Fri, Nov 20, 2020 at 12:00:56PM +0100, Philippe Mathieu-Daudé wrote: > > On 11/17/20 12:16 PM, Philippe Mathieu-Daudé wrote: > > > ping??? > > > > > > On 11/9/20 3:16 PM, Philippe Mathieu-Daudé wrote: > > >> Cc'ing PCI developers (r

Re: [PATCH for-5.2] Revert "hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr()"

2020-11-20 Thread Philippe Mathieu-Daudé
On 11/20/20 2:04 PM, Michael S. Tsirkin wrote: > This reverts commit bccb20c49df1bd683248a366021973901c11982f as it > introduced a regression blocking bus addresses > 0x1f or higher. > Legal bus numbers go up to 0xff. > > Cc: "Philippe Mathieu-Daudé" > Fixes: bccb20c49df ("Use qemu_strtoul() in s

[Bug 1905037] [NEW] Qemu SPARC64 Panics on Sun Solaris 5.8 - BOP_ALLOC failed

2020-11-20 Thread Morteza NourelahiAlamdari
Public bug reported: Hi, Running Sun Solaris 5.8 by SPARC64, will panic by "BOP_ALLOC failed": $ qemu-system-sparc64 \ -drive file=sparc.qcow2,if=ide,bus=0,unit=0 \ -drive file=sun5.8.no1.iso,format=raw,if=ide,bus=1,unit=0,media=cdrom,readonly=on \ -boot d $ qemu-system-sparc64 -M sun4u -

Re: [PATCH] meson.build: convert --with-default-devices to meson

2020-11-20 Thread Richard Henderson
On 11/19/20 11:38 PM, Paolo Bonzini wrote: > Pass the boolean option directly instead of writing > CONFIG_MINIKCONF_MODE to config-host.mak. > > Signed-off-by: Paolo Bonzini > --- > configure | 12 > meson.build | 5 +++-- > meson_options.txt | 2 ++ > 3 files change

Re: [PATCH RFC] vfio: Move the saving of the config space to the right place in VFIO migration

2020-11-20 Thread Shenming Lu
On 2020/11/20 1:41, Alex Williamson wrote: > On Thu, 19 Nov 2020 14:13:24 +0530 > Kirti Wankhede wrote: > >> On 11/14/2020 2:47 PM, Shenming Lu wrote: >>> When running VFIO migration, I found that the restoring of VFIO PCI device’s >>> config space is before VGIC on ARM64 target. But generally, i

Re: [PATCH v5 6/7] tcg: implement JIT for iOS and Apple Silicon

2020-11-20 Thread Alexander Graf
On 20.11.20 10:08, Alexander Graf wrote: On 09.11.20 00:24, Joelle van Dyne wrote: When entitlements are available (macOS or jailbroken iOS), a hardware feature called APRR exists on newer Apple Silicon that can cheaply mark JIT pages as either RX or RW. Reverse engineered functions from li

Re: [PATCH v1 6/6] gitlab-ci: Move trace backend tests across to gitlab

2020-11-20 Thread Thomas Huth
On 18/11/2020 10.54, Thomas Huth wrote: > On 17/11/2020 18.36, Alex Bennée wrote: >> From: Philippe Mathieu-Daudé >> >> Similarly to commit 8cdb2cef3f1, move the trace backend >> tests to GitLab. >> >> Note the User-Space Tracer backend is still tested on >> Ubuntu by the s390x jobs on Travis-CI.

Re: [PATCH v5 6/7] tcg: implement JIT for iOS and Apple Silicon

2020-11-20 Thread Richard Henderson
On 11/20/20 6:15 AM, Alexander Graf wrote: > MAP_JIT is definitely missing to make it work on macos. As per the cover, Based-on: 20201106032921.600200-1-richard.hender...@linaro.org ([PATCH v3 00/41] Mirror map JIT memory for TCG) which contains https://lists.nongnu.org/archive/html/qemu-devel/

Re: [PATCH 2/2] pc-bios: s390x: Give precedence to reset PSW

2020-11-20 Thread Eric Farman
On 11/20/20 1:02 AM, Thomas Huth wrote: On 19/11/2020 22.11, Eric Farman wrote: On 11/19/20 3:20 PM, Thomas Huth wrote: On 19/11/2020 17.57, Eric Farman wrote: Let's look at the Reset PSW first instead of the contents of memory. It might be leftover from an earlier system boot when proces

Re: [PATCH 1/2] pc-bios: s390x: Ensure Read IPL memory is clean

2020-11-20 Thread Eric Farman
On 11/20/20 3:26 AM, Janosch Frank wrote: On 11/19/20 5:57 PM, Eric Farman wrote: If, for example, we boot off a virtio device and chreipl to a vfio-ccw device, the space at lowcore will be non-zero. We build a Read IPL CCW at address zero, but it will have leftover PSW data that will conflic

Re: [PATCH 5/6] qapi: Add support for aliases

2020-11-20 Thread Peter Krempa
On Fri, Nov 13, 2020 at 10:46:02 +0100, Kevin Wolf wrote: > Am 12.11.2020 um 19:34 hat Eric Blake geschrieben: > > On 11/12/20 11:28 AM, Kevin Wolf wrote: > > > Introduce alias definitions for object types (structs and unions). This > > > allows using the same QAPI type and visitor for many syntax

[RFC v4 3/9] i386: move hax accel files into hax/

2020-11-20 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- MAINTAINERS | 2 +- target/i386/{ => hax}/hax-all.c | 0 target/i386/{ => hax}/hax-cpus.c | 0 target/i386/{ => hax}/hax-cpus.h | 0 target/i386/{ => hax}/hax-i386.h | 6 +++--- target/i386/{ => hax}/hax-interface.h

[RFC v4 0/9] i386 cleanup

2020-11-20 Thread Claudio Fontana
Hi all, this is v4 of the i386 cleanup, with the most interesting patches at the end. v3 -> v4: QOMification of X86CPUAccelClass In this version I basically QOMified X86CPUAccel, taking the suggestions from Eduardo as the starting point, but stopping just short of making it an actual QOM interfac

[RFC v4 5/9] i386: move TCG accel files into tcg/

2020-11-20 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/i386/meson.build | 14 +- target/i386/{ => tcg}/bpt_helper.c | 0 target/i386/{ => tcg}/cc_helper.c | 0 target/i386/{ => tcg}/excp_helper.c | 0 target/i386/{ => tcg}/fpu_helper.c | 0 target/i386/{ => tcg}/int_helper.c |

[RFC v4 7/9] i386: move TCG cpu class initialization out of helper.c

2020-11-20 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/i386/cpu.c | 33 -- target/i386/cpu.h | 97 ++--- target/i386/helper-tcg.h | 112 ++ target/i386/helper.c | 23 --- target/i386/meson.build

[RFC v4 4/9] i386: hvf: remove stale MAINTAINERS entry for old hvf stubs

2020-11-20 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 463317784c..e892dd2220 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -443,7 +443,6 @@ M: Cameron Esfahani M: Roman Bolshakov W: https://wiki.qemu.org/Features/HVF

[RFC v4 9/9] i386: split cpu accelerators from cpu.c

2020-11-20 Thread Claudio Fontana
split cpu.c into: cpu.ccpuid and common x86 cpu functionality host-cpu.c host x86 cpu functions and "host" cpu type kvm/cpu.cKVM x86 cpu type hvf/cpu.cHVF x86 cpu type tcg/cpu.cTCG x86 cpu type The link to the accel class is set in the X86CPUClass classes

[RFC v4 8/9] module: introduce MODULE_INIT_ACCEL_CPU

2020-11-20 Thread Claudio Fontana
apply this to the registration of the cpus accel interfaces, but this will be also in preparation for later use of this new module init step to also defer the registration of the cpu models, in order to make them subclasses of a per-accel cpu type. Signed-off-by: Claudio Fontana --- accel/kvm/k

[RFC v4 6/9] i386: move cpu dump out of helper.c into cpu-dump.c

2020-11-20 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/i386/cpu-dump.c | 538 target/i386/cpu.h | 1 + target/i386/helper.c| 514 -- target/i386/meson.build | 1 + 4 files changed, 540 insertions(+), 514 deletions(-)

[RFC v4 2/9] i386: move whpx accel files into whpx/

2020-11-20 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- MAINTAINERS | 5 + target/i386/meson.build | 5 + target/i386/whpx/meson.build | 4 target/i386/{ => whpx}/whp-dispatch.h | 0 target/i386/{ => whpx}/whpx-all.c | 0 target/i386/{ => whpx}/whpx-cp

[RFC v4 1/9] i386: move kvm accel files into kvm/

2020-11-20 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- MAINTAINERS | 2 +- hw/i386/fw_cfg.c | 2 +- hw/i386/intel_iommu.c| 2 +- hw/i386/kvm/apic.c | 2 +- hw/i386/kvm/clock.c | 2 +- hw/i386/microvm.c

Re: [PATCH v3 2/7] introduce UFFD-WP low-level interface helpers

2020-11-20 Thread Peter Xu
On Fri, Nov 20, 2020 at 02:04:46PM +0300, Andrey Gruzdev wrote: > > > +RAMBLOCK_FOREACH_NOT_IGNORED(bs) { > > > +/* Nothing to do with read-only and MMIO-writable regions */ > > > +if (bs->mr->readonly || bs->mr->rom_device) { > > > +continue; > > > +} > > >

Re: [PATCH 5/6] qapi: Add support for aliases

2020-11-20 Thread Daniel P . Berrangé
On Fri, Nov 20, 2020 at 03:41:54PM +0100, Peter Krempa wrote: > On Fri, Nov 13, 2020 at 10:46:02 +0100, Kevin Wolf wrote: > > Am 12.11.2020 um 19:34 hat Eric Blake geschrieben: > > > On 11/12/20 11:28 AM, Kevin Wolf wrote: > > > > Introduce alias definitions for object types (structs and unions). T

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-20 Thread Peter Xu
On Fri, Nov 20, 2020 at 01:44:53PM +0300, Andrey Gruzdev wrote: > On 19.11.2020 21:25, Peter Xu wrote: > > On Thu, Nov 19, 2020 at 03:59:36PM +0300, Andrey Gruzdev via wrote: > > > > [...] > > > > > +/** > > > + * ram_find_block_by_host_address: find RAM block containing host page > > > + * > > >

Re: [PATCH 23/29] vl: move -global check earlier

2020-11-20 Thread Igor Mammedov
On Tue, 27 Oct 2020 14:21:38 -0400 Paolo Bonzini wrote: > The check has no effect after both builtin and user-specified devices > have been created. > > Signed-off-by: Paolo Bonzini Reviewed-by: Igor Mammedov > --- > softmmu/vl.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >

[PATCH] sbsa-ref: allow to use Cortex-A53/57/72 cpus

2020-11-20 Thread Marcin Juszkiewicz
Trusted Firmware now supports A72 on sbsa-ref by default [1] so enable it for QEMU as well. A53 was already enabled there. 1. https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/7117 Signed-off-by: Marcin Juszkiewicz diff --git hw/arm/sbsa-ref.c hw/arm/sbsa-ref.c index 7d9e180c0d..b9

Re: [PATCH 22/29] vl: initialize displays before preconfig loop

2020-11-20 Thread Igor Mammedov
On Tue, 27 Oct 2020 14:21:37 -0400 Paolo Bonzini wrote: > Displays should be available before the monitor starts, so that > it is possible to use the graphical console to interact with > the monitor itself. > > This patch is quite ugly, but all this is temporary. The double > call to qemu_init_

Re: [RFC v4 0/9] i386 cleanup

2020-11-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201120144909.24097-1-cfont...@suse.de/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201120144909.24097-1-cfont...@suse.de Subject: [RFC v4 0/9] i386 cleanup === TEST SCRIPT B

[PATCH-for-5.2 0/4] docs/system/arm: Document raspi/tosa boards

2020-11-20 Thread Philippe Mathieu-Daudé
- Deprecate raspi2/raspi3 machine aliases - Document the Raspberry Pi boards - Document LED on OpenPOWER Witherspoon - Document Sharp Zaurus SL-6000 Tosa Philippe Mathieu-Daudé (4): docs/system: Deprecate raspi2/raspi3 machine aliases docs/system/arm: Document the various raspi boards docs/s

[PATCH-for-5.2 1/4] docs/system: Deprecate raspi2/raspi3 machine aliases

2020-11-20 Thread Philippe Mathieu-Daudé
Since commit aa35ec2213b ("hw/arm/raspi: Use more specific machine names") the raspi2/raspi3 machines have been renamed as raspi2b/raspi3b. Note, rather than the raspi3b, the raspi3ap introduced in commit 5be94252d34 ("hw/arm/raspi: Add the Raspberry Pi 3 model A+") is a closer match to what QEMU

[PATCH-for-5.2 2/4] docs/system/arm: Document the various raspi boards

2020-11-20 Thread Philippe Mathieu-Daudé
Document the following Raspberry Pi models: - raspi0 Raspberry Pi Zero (revision 1.2) - raspi1ap Raspberry Pi A+ (revision 1.1) - raspi2b Raspberry Pi 2B (revision 1.1) - raspi3ap Raspberry Pi 3A+ (revision 1.0) - raspi3b Raspber

Re: [PATCH v3 7/7] introduce simple linear scan rate limiting mechanism

2020-11-20 Thread Peter Xu
On Fri, Nov 20, 2020 at 03:06:56PM +0300, Andrey Gruzdev wrote: > On 19.11.2020 23:02, Peter Xu wrote: > > On Thu, Nov 19, 2020 at 03:59:40PM +0300, Andrey Gruzdev wrote: > > > Since reading UFFD events and saving paged data are performed > > > from the same thread, write fault latencies are sensit

[PATCH-for-5.2 3/4] docs/system/arm: Document OpenPOWER Witherspoon BMC model Front LEDs

2020-11-20 Thread Philippe Mathieu-Daudé
Document the 3 front LEDs modeled on the OpenPOWER Witherspoon BMC (see commit 7cfbde5ea1c "hw/arm/aspeed: Add the 3 front LEDs drived by the PCA9552 #1"). Signed-off-by: Philippe Mathieu-Daudé --- docs/system/arm/aspeed.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/system/arm/asp

[RFC PATCH-for-5.2 4/4] docs/system/arm: Document the Sharp Zaurus SL-6000

2020-11-20 Thread Philippe Mathieu-Daudé
List the 'tosa' machine with the XScale-based PDAs models. Signed-off-by: Philippe Mathieu-Daudé --- docs/system/arm/xscale.rst | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/system/arm/xscale.rst b/docs/system/arm/xscale.rst index 89ec93e904e..2dd2f8f9a56

Re: [PATCH-for-5.2 2/4] docs/system/arm: Document the various raspi boards

2020-11-20 Thread Philippe Mathieu-Daudé
On 11/20/20 4:21 PM, Philippe Mathieu-Daudé wrote: > Document the following Raspberry Pi models: > > - raspi0 Raspberry Pi Zero (revision 1.2) > - raspi1ap Raspberry Pi A+ (revision 1.1) > - raspi2b Raspberry Pi 2B (revision 1.1) > - raspi3ap

[PATCH] qboot: update to latest upstream

2020-11-20 Thread Paolo Bonzini
This also brings in two patches that Debian had to include, qboot_stop_using_inttypes.patch and qboot_no_jump_tables.diff. Reported-by: Michael Tokarev Signed-off-by: Paolo Bonzini --- pc-bios/qboot.rom | Bin 65536 -> 65536 bytes roms/Makefile | 8 ++-- roms/qboot| 2 +- 3

Re: [PATCH 24/29] migration, vl: start migration via qmp_migrate_incoming

2020-11-20 Thread Igor Mammedov
On Tue, 27 Oct 2020 14:21:39 -0400 Paolo Bonzini wrote: > Make qemu_start_incoming_migration local to migration/migration.c. > By using the runstate instead of a separate flag, vl need not do > anything to setup deferred incoming migration. > > qmp_migrate_incoming also does not need the deferre

Re: [RFC v4 9/9] i386: split cpu accelerators from cpu.c

2020-11-20 Thread Claudio Fontana
On 11/20/20 3:49 PM, Claudio Fontana wrote: > split cpu.c into: > > cpu.ccpuid and common x86 cpu functionality > host-cpu.c host x86 cpu functions and "host" cpu type > kvm/cpu.cKVM x86 cpu type > hvf/cpu.cHVF x86 cpu type > tcg/cpu.cTCG x86 cpu type > >

[PATCH v2] python, tests: do not use short-form boolean options

2020-11-20 Thread Paolo Bonzini
They are going to be deprecated, avoid warnings on stdout while the tests run. Signed-off-by: Paolo Bonzini --- python/qemu/machine.py | 2 +- tests/qtest/pflash-cfi02-test.c | 4 ++-- tests/qtest/test-filter-redirector.c | 8 tests/qtest/vhost-user-test.c| 8

  1   2   3   >