[PULL v8 139/152] remove Makefile.target

2020-08-21 Thread Paolo Bonzini
Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile| 53 - Makefile.target | 12 --- configure | 15 -- 3 files changed, 4 insertions(+), 76 deletions(-) delete mode 100644 Makefile.target

Re: [RFC PATCH v2 0/4] Use ACPI PCI hot-plug for q35

2020-08-21 Thread Igor Mammedov
On Tue, 18 Aug 2020 23:52:23 +0200 Julia Suvorova wrote: > PCIe native hot-plug has numerous problems with racing events and > unpredictable > guest behaviour (Windows). Documenting these misterious problems I've asked for in previous review hasn't been addressed. Pls see v1 for comments and ad

[PULL v8 148/152] meson: convert VNC and dependent libraries to meson

2020-08-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 122 +- meson.build | 40 +-- meson_options.txt | 4 ++ ui/meson.build| 10 ++-- 4 files changed, 45 insertions(+), 131 deletions(-) diff --git a/configure b/configure index

[PULL v8 150/152] meson: avoid unstable module warning with Meson 0.56.0 or newer

2020-08-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- meson.build | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 62bf8a51c2..808f50b07e 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,11 @@ project('qemu', ['c'], meson_version: '>=0.55.0', versi

[PULL v8 143/152] meson: convert check-block

2020-08-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- meson.build| 2 ++ tests/Makefile.include | 18 ++ tests/meson.build | 4 tests/qemu-iotests/meson.build | 10 ++ 4 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 tests/q

Re: [PATCH v5 15/15] block/nvme: Use an array of EventNotifier

2020-08-21 Thread Stefano Garzarella
On Thu, Aug 20, 2020 at 06:59:01PM +0200, Philippe Mathieu-Daudé wrote: > In preparation of using multiple IRQ (thus multiple eventfds) > make BDRVNVMeState::irq_notifier an array (for now of a single > element, the admin queue notifier). > > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Philipp

Re: [PATCH] numa: hmat: fix cache size check

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/21/20 12:05 PM, Igor Mammedov wrote: > when QEMU is started like: > > qemu-system-x86_64 -smp 2 -machine hmat=on \ > -m 2G \ > -object memory-backend-ram,size=1G,id=m0 \ > -object memory-backend-ram,size=1G,id=m1 \ > -numa node,nodeid=0,memdev=m0 \ > -numa node,nodeid=1,memdev=m1,initiat

[PULL v9 016/152] configure: add support for pseudo-"in source tree" builds

2020-08-21 Thread Paolo Bonzini
From: Daniel P. Berrangé Meson requires the build dir to be separate from the source tree. Many people are used to just running "./configure && make" though and the meson conversion breaks that. This introduces some backcompat support to make it appear as if an "in source tree" build is being do

[PULL v8 140/152] meson: sphinx-build

2020-08-21 Thread Paolo Bonzini
For now, sphinx is run on every invocation of make. The previous mechanism using $(wildcard) is not reproducible in Meson and was also brittle; for example some .rst.inc files were left out. The next patch will introduce a Sphinx extension to emit a depfile. Signed-off-by: Marc-André Lureau Sig

[PULL v8 144/152] rules.mak: drop unneeded macros

2020-08-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- .gitignore | 1 - Makefile| 7 +- configure | 55 ++--- docs/devel/build-system.txt | 5 +- rules.mak | 231 +--- scripts/create_config | 6

Re: [PATCH] cirrus: handle wraparound in cirrus_invalidate_region

2020-08-21 Thread Li Qiang
Gerd Hoffmann 于2020年8月21日周五 下午4:27写道: > > Code simply asserts that there is no wraparound instead of handling > it properly. The assert() can be triggered by the guest (must be > privilidged inside the guest though). Fix it. > > Buglink: https://bugs.launchpad.net/qemu/+bug/1880189 > Cc: Li Qian

Re: [PATCH] virtio-gpu: fix unmap the already mapped items

2020-08-21 Thread Li Zhijian
On 8/21/20 6:07 PM, Gerd Hoffmann wrote: On Fri, Aug 21, 2020 at 04:49:45PM +0800, Li Zhijian wrote: we go here either (!(*iov)[i].iov_base) or (len != l), so we need to consider to unmap the 'i'th item as well when the 'i'th item is not nil Signed-off-by: Li Zhijian --- hw/display/virtio

Re: [PATCH] hw/arm/sbsa-ref: fix typo breaking PCIe IRQs

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/21/20 10:38 AM, Graeme Gregory wrote: > Fixing a typo in a previous patch that translated an "i" to a 1 > and therefore breaking the allocation of PCIe interrupts. This was > discovered when virtio-net-pci devices ceased to function correctly. > > Fixes: 48ba18e6d3f3 ("hw/arm/sbsa-ref: Simpli

Re: [PATCH v2] configure: add support for pseudo-"in source tree" builds

2020-08-21 Thread Daniel P . Berrangé
On Fri, Aug 21, 2020 at 12:17:53PM +0200, Kevin Wolf wrote: > Am 20.08.2020 um 19:31 hat Daniel P. Berrangé geschrieben: > > Meson requires the build dir to be separate from the source tree. Many > > people are used to just running "./configure && make" though and the > > meson conversion breaks

Re: [PATCH] cirrus: handle wraparound in cirrus_invalidate_region

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/21/20 10:26 AM, Gerd Hoffmann wrote: > Code simply asserts that there is no wraparound instead of handling > it properly. The assert() can be triggered by the guest (must be > privilidged inside the guest though). Fix it. Thanks for fixing this! > Buglink: https://bugs.launchpad.net/qemu/+

[PULL v9 000/152] Meson-based build system

2020-08-21 Thread Paolo Bonzini
The following changes since commit 1d806cef0e38b5db8347a8e12f214d543204a314: Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-08-11' into staging (2020-08-19 22:19:11 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for

[PATCH v2] virtio-gpu: fix unmap the already mapped items

2020-08-21 Thread Li Zhijian
we go here either (!(*iov)[i].iov_base) or (len != l), so we need to consider to unmap the 'i'th item as well when the 'i'th item is not nil Signed-off-by: Li Zhijian --- v2: address Gerd's comments --- hw/display/virtio-gpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/display/vi

Re: [PATCH V6] Introduce a new flag for i440fx to disable PCI hotplug on the root bus

2020-08-21 Thread Igor Mammedov
On Fri, 21 Aug 2020 11:16:12 +0200 Igor Mammedov wrote: > On Thu, 20 Aug 2020 22:11:41 +0530 > Ani Sinha wrote: > > > > On Aug 20, 2020, at 9:11 PM, Ani Sinha wrote: > > > > > > On Thu, Aug 20, 2020 at 7:37 PM Igor Mammedov > > > wrote: > > >> > > >>> On Thu, 20 Aug 2020 14:51:56

Re: [PULL v7 000/151] Meson-based build system

2020-08-21 Thread Howard Spoelstra
On Fri, Aug 21, 2020 at 8:15 AM Howard Spoelstra wrote: > > > On Wed, Aug 19, 2020 at 11:32 PM Paolo Bonzini > wrote: > >> The following changes since commit >> d0ed6a69d399ae193959225cdeaa9382746c91cc: >> >> Update version for v5.1.0 release (2020-08-11 17:07:03 +0100) >> >> are available in

Re: [PATCH v2] configure: add support for pseudo-"in source tree" builds

2020-08-21 Thread Kevin Wolf
Am 21.08.2020 um 12:15 hat Paolo Bonzini geschrieben: > On 21/08/20 12:04, Kevin Wolf wrote: > >> So I'm not sure why the first build gets as far as it does, but does NOT > >> complete things and yet does not fail make, but my advice is that you > >> should > >> NOT try to an incremental build on

Re: [PATCH v2] spapr/xive: Use the xics flag to check for XIVE-only IRQ backends

2020-08-21 Thread David Gibson
On Fri, Aug 21, 2020 at 07:39:34AM +0200, Cédric Le Goater wrote: > On 8/21/20 1:22 AM, David Gibson wrote: > > On Thu, Aug 20, 2020 at 04:01:06PM +0200, Cédric Le Goater wrote: > >> The sPAPR machine has four different IRQ backends, each implementing > >> the XICS or XIVE interrupt mode or both in

Re: [PATCH v1 0/2] pc-bios: petalogix: Re-generate DTB and add DTS files

2020-08-21 Thread Philippe Mathieu-Daudé
Hi Edgar, On 8/20/20 9:43 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > This adds missing device-tree source files for the petalogix boards > with recompiled DTBs. > > Cheers, > Edgar > > Edgar E. Iglesias (2): > microblaze: petalogix-ml605: Add device-tree source > microbla

Re: [PATCH 0/1] qcow2: Skip copy-on-write when allocating a zero cluster

2020-08-21 Thread Brian Foster
On Fri, Aug 21, 2020 at 07:58:11AM +1000, Dave Chinner wrote: > On Thu, Aug 20, 2020 at 10:03:10PM +0200, Alberto Garcia wrote: > > Cc: linux-xfs > > > > On Wed 19 Aug 2020 07:53:00 PM CEST, Brian Foster wrote: > > > In any event, if you're seeing unclear or unexpected performance > > > deltas bet

Re: [PATCH] virtiofsd: add -o allow_directio|no_directio option

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/21/20 5:41 AM, Jiachen Zhang wrote: > Due to the commit 65da4539803373ec4eec97ffc49ee90083e56efd, the O_DIRECT > open flag of guest applications will be discarded by virtiofsd. While > this behavior makes it consistent with the virtio-9p scheme when guest > applications using direct I/O, we no

Re: [PATCH v2 0/7] accel/tcg: remove implied BQL from cpu_handle_interrupt/exception path

2020-08-21 Thread Cornelia Huck
On Wed, 19 Aug 2020 14:28:49 -0400 Robert Foley wrote: > The purpose of this change is to set the groundwork > so that an arch could move towards removing > the BQL from the cpu_handle_interrupt/exception paths. > > The BQL is a bottleneck in scaling to more cores. > And this cpu_handle_interrup

Re: [PATCH v3] configure: add support for pseudo-"in source tree" builds

2020-08-21 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200821102204.337859-1-berra...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN =

Re: Suspicious QOM types without instance/class size

2020-08-21 Thread Roman Bolshakov
On Thu, Aug 20, 2020 at 05:55:29PM -0400, Eduardo Habkost wrote: > While trying to convert TypeInfo declarations to the new > OBJECT_DECLARE* macros, I've stumbled on a few suspicious cases > where instance_size or class_size is not set, despite having type > checker macros that use a specific type

[Bug 1883984] Re: QEMU S/390x sqxbr (128-bit IEEE 754 square root) crashes qemu-system-s390x

2020-08-21 Thread Timo Aaltonen
Hello Nelson, or anyone else affected, Accepted qemu into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qemu/1:4.2-3ubuntu6.5 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.u

Re: hw/arm/sbsa-ref.c : Add a fake embedded controller

2020-08-21 Thread Leif Lindholm
On Thu, Aug 20, 2020 at 14:32:01 +0100, Graeme Gregory wrote: > A difference between sbsa platform and the virt platform is PSCI is > handled by ARM-TF in the sbsa platform. This means that the PSCI code > there needs to communicate some of the platform power changes down > to the qemu code for thi

Re: [PATCH 1/1] spapr_vscsi: do not allow device hotplug

2020-08-21 Thread Philippe Mathieu-Daudé
Cc'ing Markus On 8/20/20 9:06 PM, Daniel Henrique Barboza wrote: > We do not implement hotplug in the vscsi bus, but we forgot to > tell qdev about it. The result is that users are able to hotplug > devices in the vscsi bus, the devices appear in qdev, but they > aren't usable by the guest OS unle

VHOST_USER_PROTOCOL_F_VDPA

2020-08-21 Thread Stefan Hajnoczi
The first vDPA ioctls have been added to the vhost-user protocol and I wonder if it's time to fully change the vhost-user protocol's focus to providing a full VIRTIO device model like vDPA does. Initially vhost-user was just used for vhost-net. As a result it didn't need the full VIRTIO device mod

Re: [PATCH v4 4/4] iotests: Test node/bitmap aliases during migration

2020-08-21 Thread Vladimir Sementsov-Ogievskiy
21.08.2020 03:44, Eric Blake wrote: On 8/20/20 10:49 AM, Vladimir Sementsov-Ogievskiy wrote: # MYPYPATH=../../python/ mypy 300 300:154: error: Item "None" of "Optional[Match[Any]]" has no attribute "group" Found 1 error in 1 file (checked 1 source file) - the only complain. Suggest a fix: diff

recursive locks (in general)

2020-08-21 Thread Christian Schoenebeck
On Donnerstag, 20. August 2020 12:54:49 CEST Paolo Bonzini wrote: > More seriously: programming with concurrency is first and foremost about > understanding invariants[1]. Locks are relatively simple to reason > about because they enforce invariants at the points where they are > acquired or relea

Re: [PATCH] virtiofsd: add -o allow_directio|no_directio option

2020-08-21 Thread Stefan Hajnoczi
On Fri, Aug 21, 2020 at 11:41:26AM +0800, Jiachen Zhang wrote: > Due to the commit 65da4539803373ec4eec97ffc49ee90083e56efd, the O_DIRECT > open flag of guest applications will be discarded by virtiofsd. While > this behavior makes it consistent with the virtio-9p scheme when guest > applications u

Re: [PATCH V6] Introduce a new flag for i440fx to disable PCI hotplug on the root bus

2020-08-21 Thread Ani Sinha
On Fri, Aug 21, 2020 at 2:46 PM Igor Mammedov wrote: > > On Thu, 20 Aug 2020 22:11:41 +0530 > Ani Sinha wrote: > > > > On Aug 20, 2020, at 9:11 PM, Ani Sinha wrote: > > > > > > On Thu, Aug 20, 2020 at 7:37 PM Igor Mammedov > > > wrote: > > >> > > >>> On Thu, 20 Aug 2020 14:51:56 +0530 > > >>>

Re: [PATCH v5 1/1] audio/jack: fix use after free segfault

2020-08-21 Thread Geoffrey McRae
My suggestion is to work towards protecting the audio code with its own mutex(es) and ignore the existence of the BQL for subsystems that can do so (audio is a prime candidate). Also please add comments to audio_int.h about which functions are called from other threads than the QEMU main t

Re: [PATCH v2 19/58] hvf: Move HVFState typedef to hvf.h

2020-08-21 Thread Roman Bolshakov
On Wed, Aug 19, 2020 at 08:11:57PM -0400, Eduardo Habkost wrote: > Move typedef closer to the type check macros, to make it easier > to convert the code to OBJECT_DEFINE_TYPE() in the future. > > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Eduardo Habkost > --- > Changes v1 -> v2: none > >

Re: [PATCH v2 19/58] hvf: Move HVFState typedef to hvf.h

2020-08-21 Thread Roman Bolshakov
On Wed, Aug 19, 2020 at 08:11:57PM -0400, Eduardo Habkost wrote: > Move typedef closer to the type check macros, to make it easier > to convert the code to OBJECT_DEFINE_TYPE() in the future. > > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Eduardo Habkost > --- > Changes v1 -> v2: none > >

Re: [PATCH 0/1] qcow2: Skip copy-on-write when allocating a zero cluster

2020-08-21 Thread Alberto Garcia
On Fri 21 Aug 2020 01:05:06 PM CEST, Brian Foster wrote: >> > 1) off: for every write request QEMU initializes the cluster (64KB) >> > with fallocate(ZERO_RANGE) and then writes the 4KB of data. >> > >> > 2) off w/o ZERO_RANGE: QEMU writes the 4KB of data and fills the rest >> > o

Re: [PATCH] virtiofsd: add -o allow_directio|no_directio option

2020-08-21 Thread Daniel P . Berrangé
On Fri, Aug 21, 2020 at 11:41:26AM +0800, Jiachen Zhang wrote: > Due to the commit 65da4539803373ec4eec97ffc49ee90083e56efd, the O_DIRECT > open flag of guest applications will be discarded by virtiofsd. While > this behavior makes it consistent with the virtio-9p scheme when guest > applications u

Re: [PATCH v3 06/10] migration/dirtyrate: Compare page hash results for recorded sampled page

2020-08-21 Thread Zheng Chuan
On 2020/8/21 1:36, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Compare page hash results for recorded sampled page. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> --- >> migration/dirtyrate.c | 76 >> ++

Re: [PATCH v3 02/10] migration/dirtyrate: Add RamlockDirtyInfo to store sampled page info

2020-08-21 Thread Dr. David Alan Gilbert
* Zheng Chuan (zhengch...@huawei.com) wrote: > > > On 2020/8/21 0:20, Dr. David Alan Gilbert wrote: > > * Chuan Zheng (zhengch...@huawei.com) wrote: > >> Add RamlockDirtyInfo to store sampled page info of each ramblock. > >> > >> Signed-off-by: Chuan Zheng > >> Signed-off-by: YanYing Zhuang > >

Re: [RFC PATCH v2 2/4] hw/i386/acpi-build: Add ACPI PCI hot-plug methods to q35

2020-08-21 Thread Igor Mammedov
On Tue, 18 Aug 2020 23:52:25 +0200 Julia Suvorova wrote: > Implement notifications and gpe to support q35 ACPI PCI hot-plug. > Use 0xcc4 - 0xcd7 range for 'acpi-pci-hotplug' io ports. in addition to comment from Philippe > > Signed-off-by: Julia Suvorova > --- > include/hw/acpi/pcihp.h | 3

Re: [PATCH v3 06/10] migration/dirtyrate: Compare page hash results for recorded sampled page

2020-08-21 Thread Dr. David Alan Gilbert
* Zheng Chuan (zhengch...@huawei.com) wrote: > > > On 2020/8/21 1:36, Dr. David Alan Gilbert wrote: > > * Chuan Zheng (zhengch...@huawei.com) wrote: > >> Compare page hash results for recorded sampled page. > >> > >> Signed-off-by: Chuan Zheng > >> Signed-off-by: YanYing Zhuang > >> --- > >> m

Re: [PATCH 0/1] qcow2: Skip copy-on-write when allocating a zero cluster

2020-08-21 Thread Alberto Garcia
On Fri 21 Aug 2020 01:42:52 PM CEST, Alberto Garcia wrote: > On Fri 21 Aug 2020 01:05:06 PM CEST, Brian Foster wrote: >>> > 1) off: for every write request QEMU initializes the cluster (64KB) >>> > with fallocate(ZERO_RANGE) and then writes the 4KB of data. >>> > >>> > 2) off w/o ZERO_RAN

Re: [RFC PATCH v2 3/4] hw/i386/acpi-build: Turn off support of PCIe native hot-plug and SHPC in _OSC

2020-08-21 Thread Igor Mammedov
On Tue, 18 Aug 2020 23:52:26 +0200 Julia Suvorova wrote: > Other methods may be used if the system is capable of this and the _OSC bit > is set. Disable them explicitly to force ACPI PCI hot-plug use. The older > versions will still use PCIe native. > > Signed-off-by: Julia Suvorova > --- > hw

Re: [PATCH 0/3] nvdimm: read-only file support

2020-08-21 Thread Stefan Hajnoczi
On Tue, Aug 04, 2020 at 11:12:41AM +0100, Stefan Hajnoczi wrote: > There is currently no way to back an NVDIMM with a read-only file so it can be > safely shared between untrusted guests. > > Introduce an -object memory-backend-file,readonly=on|off option. > > Julio Montes sent an earlier patch h

Re: [PATCH v3 05/10] migration/dirtyrate: Record hash results for each sampled page

2020-08-21 Thread Zheng Chuan
On 2020/8/21 1:55, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: >> On Thu, Aug 20, 2020 at 06:30:09PM +0100, Dr. David Alan Gilbert wrote: >>> * Chuan Zheng (zhengch...@huawei.com) wrote: Record hash results for each sampled page. Signed-off-b

Re: [RFC PATCH v2 4/4] hw/acpi/ich9: Enable ACPI PCI hot-plug

2020-08-21 Thread Igor Mammedov
On Tue, 18 Aug 2020 23:52:27 +0200 Julia Suvorova wrote: > Add acpi_pcihp to ich9_pm and use ACPI PCI hot-plug by default. I don't see anything related to migrating hotplug state within series, see VMSTATE_PCI_HOTPLUG for example. > Signed-off-by: Julia Suvorova > --- > Note: New pc_compats

Re: [RFC PATCH v2 0/4] Use ACPI PCI hot-plug for q35

2020-08-21 Thread Igor Mammedov
On Fri, 21 Aug 2020 12:30:07 +0200 Igor Mammedov wrote: > On Tue, 18 Aug 2020 23:52:23 +0200 > Julia Suvorova wrote: > > > PCIe native hot-plug has numerous problems with racing events and > > unpredictable > > guest behaviour (Windows). > Documenting these misterious problems I've asked for

Re: [PATCH v3 05/10] migration/dirtyrate: Record hash results for each sampled page

2020-08-21 Thread Daniel P . Berrangé
On Fri, Aug 21, 2020 at 08:22:06PM +0800, Zheng Chuan wrote: > > > On 2020/8/21 1:55, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > >> On Thu, Aug 20, 2020 at 06:30:09PM +0100, Dr. David Alan Gilbert wrote: > >>> * Chuan Zheng (zhengch...@huawei.com) wrote

qcow2 merge_cow() question

2020-08-21 Thread Vladimir Sementsov-Ogievskiy
Hi! I'm sorry, I feel I already asked about it, but can't now find the answer. What are these ifs for? /* The data (middle) region must be immediately after the * start region */ if (l2meta_cow_start(m) + m->cow_start.nb_bytes != offset) { continue;

Re: [PULL v7 000/151] Meson-based build system

2020-08-21 Thread Paolo Bonzini
On 21/08/20 12:58, Howard Spoelstra wrote: > I investigated a bit further and saw: > ldd in Fedora tells me the executable is "not a dynamic executable". How are you executing ldd? I cross built a mingw executable from Fedora and it was definitely using system DLLs. PIE builds and doesn't start

Re: [PATCH V6] Introduce a new flag for i440fx to disable PCI hotplug on the root bus

2020-08-21 Thread Igor Mammedov
On Fri, 21 Aug 2020 16:43:37 +0530 Ani Sinha wrote: > On Fri, Aug 21, 2020 at 2:46 PM Igor Mammedov wrote: > > > > On Thu, 20 Aug 2020 22:11:41 +0530 > > Ani Sinha wrote: > > > > > > On Aug 20, 2020, at 9:11 PM, Ani Sinha wrote: > > > > > > > > On Thu, Aug 20, 2020 at 7:37 PM Igor Mammedov

Re: [PATCH v3 05/10] migration/dirtyrate: Record hash results for each sampled page

2020-08-21 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, Aug 21, 2020 at 08:22:06PM +0800, Zheng Chuan wrote: > > > > > > On 2020/8/21 1:55, Dr. David Alan Gilbert wrote: > > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > >> On Thu, Aug 20, 2020 at 06:30:09PM +0100, Dr. David Alan Gi

Re: [PATCH 02/10] numa: introduce MachineClass::forbid_asymmetrical_numa

2020-08-21 Thread Daniel Henrique Barboza
On 8/21/20 5:55 AM, Igor Mammedov wrote: On Thu, 20 Aug 2020 12:51:03 -0400 Eduardo Habkost wrote: On Thu, Aug 20, 2020 at 02:15:04PM +1000, David Gibson wrote: On Wed, Aug 19, 2020 at 10:11:28PM -0400, Eduardo Habkost wrote: On Thu, Aug 20, 2020 at 11:17:26AM +1000, David Gibson wrote:

Re: [PATCH 2/3] hostmem-file: add readonly=on|off option

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/4/20 12:12 PM, Stefan Hajnoczi wrote: > Let -object memory-backend-file work on read-only files when the > readonly=on option is given. This can be used to share the contents of a > file between multiple guests while preventing them from consuming > Copy-on-Write memory if guests dirty the pag

Re: [PATCH v1 0/2] Add timeout mechanism to qmp actions

2020-08-21 Thread Stefan Hajnoczi
On Tue, Aug 11, 2020 at 09:54:08PM +0800, Zhenyu Ye wrote: > Hi Kevin, > > On 2020/8/10 23:38, Kevin Wolf wrote: > > Am 10.08.2020 um 16:52 hat Zhenyu Ye geschrieben: > >> Before doing qmp actions, we need to lock the qemu_global_mutex, > >> so the qmp actions should not take too long time. > >> >

Re: qcow2 merge_cow() question

2020-08-21 Thread Alberto Garcia
On Fri 21 Aug 2020 02:32:00 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > Hi! > > I'm sorry, I feel I already asked about it, but can't now find the answer. > > What are these ifs for? > >/* The data (middle) region must be immediately after the > * start region */ >

Re: [PATCH v2] configure: add support for pseudo-"in source tree" builds

2020-08-21 Thread Paolo Bonzini
On 21/08/20 12:54, Kevin Wolf wrote: >>> Sounds like it will be painful to switch between branches based on make >>> and branches based on meson. By extension, it will also be painful to >>> check out and build old versions for comparison, or doing that even more >>> than once during git bisect. :-

Re: [PATCH 0/1] qcow2: Skip copy-on-write when allocating a zero cluster

2020-08-21 Thread Brian Foster
On Fri, Aug 21, 2020 at 01:42:52PM +0200, Alberto Garcia wrote: > On Fri 21 Aug 2020 01:05:06 PM CEST, Brian Foster wrote: > >> > 1) off: for every write request QEMU initializes the cluster (64KB) > >> > with fallocate(ZERO_RANGE) and then writes the 4KB of data. > >> > > >> > 2) off w/o

Re: [PATCH 3/3] nvdimm: honor -object memory-backend-file, readonly=on option

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/4/20 12:12 PM, Stefan Hajnoczi wrote: > Make it possible to present read-only files to the guest as "unarmed" > NVDIMMs. The Linux NVDIMM device (/dev/pmemX) is read-only. > > Signed-off-by: Stefan Hajnoczi > --- > docs/nvdimm.txt | 8 +++- > hw/mem/nvdimm.c | 4 > 2 files changed,

Re: [RFC qemu 0/6] mirror: implement incremental and bitmap modes

2020-08-21 Thread Max Reitz
On 18.02.20 11:07, Fabian Grünbichler wrote: [Sorry :/] > picking up on John's in-progress patch series from last summer, this is > a stab at rebasing and adding test cases for the low-hanging fruits: > > - bitmap mirror mode with always/on-success/never bitmap sync mode > - incremental mirror m

Re: [PATCH v3 05/10] migration/dirtyrate: Record hash results for each sampled page

2020-08-21 Thread Zheng Chuan
On 2020/8/21 20:39, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: >> On Fri, Aug 21, 2020 at 08:22:06PM +0800, Zheng Chuan wrote: >>> >>> >>> On 2020/8/21 1:55, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu,

Re: recursive locks (in general)

2020-08-21 Thread Paolo Bonzini
On 21/08/20 13:12, Christian Schoenebeck wrote: > There is a golden rule with recursive locks: You always have to preserve a > clear hierarchy. Say you have the following recursive mutexes: > > RecursiveMutex mutex0; > RecursiveMutex mutex1; > RecursiveMutex mutex2; > ... > RecursiveMutex mutexN;

Re: [PATCH v5 15/15] block/nvme: Use an array of EventNotifier

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/21/20 12:29 PM, Stefano Garzarella wrote: > On Thu, Aug 20, 2020 at 06:59:01PM +0200, Philippe Mathieu-Daudé wrote: >> In preparation of using multiple IRQ (thus multiple eventfds) >> make BDRVNVMeState::irq_notifier an array (for now of a single >> element, the admin queue notifier). >> >>

Re: [PATCH v5 1/1] audio/jack: fix use after free segfault

2020-08-21 Thread Paolo Bonzini
On 20/08/20 14:00, Christian Schoenebeck wrote: > One way would be a recursive type and logging a warning, which you obviously > don't like; another option would be an assertion fault instead to make > developers immediately aware about the double lock on early testing. Because > on a large scal

Re: [PATCH v5 1/1] audio/jack: fix use after free segfault

2020-08-21 Thread Paolo Bonzini
On 21/08/20 13:28, Geoffrey McRae wrote: > >> My suggestion is to work towards protecting the audio code with its own >> mutex(es) and ignore the existence of the BQL for subsystems that can do >> so (audio is a prime candidate).  Also please add comments to >> audio_int.h about which functions ar

Re: [PATCH v5 12/15] block/nvme: Replace BDRV_POLL_WHILE by AIO_WAIT_WHILE

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/21/20 12:15 PM, Stefano Garzarella wrote: > On Thu, Aug 20, 2020 at 06:58:58PM +0200, Philippe Mathieu-Daudé wrote: >> BDRV_POLL_WHILE() is defined as: >> >> #define BDRV_POLL_WHILE(bs, cond) ({ \ >> BlockDriverState *bs_ = (bs); \ >> AIO_WAIT_WHILE(bdrv_g

Re: [PATCH v5 08/15] block/nvme: Use union of NvmeIdCtrl / NvmeIdNs structures

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/21/20 12:03 PM, Stefano Garzarella wrote: > On Thu, Aug 20, 2020 at 06:58:54PM +0200, Philippe Mathieu-Daudé wrote: >> We allocate an unique chunk of memory then use it for two >> different structures. By using an union, we make it clear >> the data is overlapping (and we can remove the cas

Re: [PATCH v5 03/15] block/nvme: Let nvme_create_queue_pair() fail gracefully

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/21/20 11:44 AM, Stefano Garzarella wrote: > On Thu, Aug 20, 2020 at 06:58:49PM +0200, Philippe Mathieu-Daudé wrote: >> As nvme_create_queue_pair() is allowed to fail, replace the >> alloc() calls by try_alloc() to avoid aborting QEMU. >> >> Reviewed-by: Stefan Hajnoczi >> Signed-off-by: Ph

Re: [PATCH] virtiofsd: add -o allow_directio|no_directio option

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/21/20 1:58 PM, Daniel P. Berrangé wrote: > On Fri, Aug 21, 2020 at 11:41:26AM +0800, Jiachen Zhang wrote: >> Due to the commit 65da4539803373ec4eec97ffc49ee90083e56efd, the O_DIRECT >> open flag of guest applications will be discarded by virtiofsd. While >> this behavior makes it consistent wi

Re: [PULL v9 000/152] Meson-based build system

2020-08-21 Thread Peter Maydell
On Fri, 21 Aug 2020 at 12:35, Paolo Bonzini wrote: > > The following changes since commit 1d806cef0e38b5db8347a8e12f214d543204a314: > > Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-08-11' > into staging (2020-08-19 22:19:11 +0100) > > are available in the Git repository a

Re: qcow2 merge_cow() question

2020-08-21 Thread Vladimir Sementsov-Ogievskiy
21.08.2020 15:52, Alberto Garcia wrote: On Fri 21 Aug 2020 02:32:00 PM CEST, Vladimir Sementsov-Ogievskiy wrote: Hi! I'm sorry, I feel I already asked about it, but can't now find the answer. What are these ifs for? /* The data (middle) region must be immediately after the

[PATCH v8 0/1] audio/jack: fix use after free segfault

2020-08-21 Thread Geoffrey McRae
v8: * use a local mutex instead of the BQL Geoffrey McRae (1): audio/jack: fix use after free segfault audio/jackaudio.c | 55 --- 1 file changed, 42 insertions(+), 13 deletions(-) -- 2.20.1

Re: [PATCH v5 15/15] block/nvme: Use an array of EventNotifier

2020-08-21 Thread Stefano Garzarella
On Fri, Aug 21, 2020 at 03:09:13PM +0200, Philippe Mathieu-Daudé wrote: > On 8/21/20 12:29 PM, Stefano Garzarella wrote: > > On Thu, Aug 20, 2020 at 06:59:01PM +0200, Philippe Mathieu-Daudé wrote: > >> In preparation of using multiple IRQ (thus multiple eventfds) > >> make BDRVNVMeState::irq_not

[PATCH v8 1/1] audio/jack: fix use after free segfault

2020-08-21 Thread Geoffrey McRae
This change registers a bottom handler to close the JACK client connection when a server shutdown signal is recieved. Without this libjack2 attempts to "clean up" old clients and causes a use after free segfault. Signed-off-by: Geoffrey McRae --- audio/jackaudio.c | 55 ++

Re: [PATCH v3 1/7] x86: lpc9: let firmware negotiate 'CPU hotplug with SMI' features

2020-08-21 Thread Laszlo Ersek
Hi Igor, On 08/20/20 16:56, Igor Mammedov wrote: > It will allow firmware to notify QEMU that firmware requires SMI > being triggered on CPU hot[un]plug, so that it would be able to account > for hotplugged CPU and relocate it to new SMM base and/or safely remove > CPU on unplug. > > Using negoti

Re: [PATCH v5 12/15] block/nvme: Replace BDRV_POLL_WHILE by AIO_WAIT_WHILE

2020-08-21 Thread Stefano Garzarella
On Fri, Aug 21, 2020 at 03:15:58PM +0200, Philippe Mathieu-Daudé wrote: > On 8/21/20 12:15 PM, Stefano Garzarella wrote: > > On Thu, Aug 20, 2020 at 06:58:58PM +0200, Philippe Mathieu-Daudé wrote: > >> BDRV_POLL_WHILE() is defined as: > >> > >> #define BDRV_POLL_WHILE(bs, cond) ({ \ >

Re: [PATCH] hw/arm/sbsa-ref.c : Add a fake embedded controller

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/20/20 3:32 PM, Graeme Gregory wrote: > A difference between sbsa platform and the virt platform is PSCI is > handled by ARM-TF in the sbsa platform. This means that the PSCI code > there needs to communicate some of the platform power changes down > to the qemu code for things like shutdown/re

ANNOUNCE: build system conversion to Meson has landed

2020-08-21 Thread Peter Maydell
Hi; we've just merged Paolo's patchset that converts the build system to use Meson. This should mostly be fairly seamless for the average developer (we hope) but there are a few things to be aware of: * you probably want to do a distclean or otherwise do a clean build when you first update you

Re: [PATCH v5 08/15] block/nvme: Use union of NvmeIdCtrl / NvmeIdNs structures

2020-08-21 Thread Stefano Garzarella
On Fri, Aug 21, 2020 at 03:27:15PM +0200, Philippe Mathieu-Daudé wrote: > On 8/21/20 12:03 PM, Stefano Garzarella wrote: > > On Thu, Aug 20, 2020 at 06:58:54PM +0200, Philippe Mathieu-Daudé wrote: > >> We allocate an unique chunk of memory then use it for two > >> different structures. By using

[PATCH V7] Introduce a new flag for i440fx to disable PCI hotplug on the root bus

2020-08-21 Thread Ani Sinha
We introduce a new global flag 'acpi-root-pci-hotplug' for i440fx with which we can turn on or off PCI device hotplug on the root bus. This flag can be used to prevent all PCI devices from getting hotplugged or unplugged from the root PCI bus. This feature is targetted mostly towards Windows VMs. I

Re: [PATCH V6] Introduce a new flag for i440fx to disable PCI hotplug on the root bus

2020-08-21 Thread Ani Sinha
On Fri, Aug 21, 2020 at 6:07 PM Igor Mammedov wrote: > > On Fri, 21 Aug 2020 16:43:37 +0530 > Ani Sinha wrote: > > > On Fri, Aug 21, 2020 at 2:46 PM Igor Mammedov wrote: > > > > > > On Thu, 20 Aug 2020 22:11:41 +0530 > > > Ani Sinha wrote: > > > > > > > > On Aug 20, 2020, at 9:11 PM, Ani Sinha

Re: [PATCH v5 03/15] block/nvme: Let nvme_create_queue_pair() fail gracefully

2020-08-21 Thread Stefano Garzarella
On Fri, Aug 21, 2020 at 03:36:47PM +0200, Philippe Mathieu-Daudé wrote: > On 8/21/20 11:44 AM, Stefano Garzarella wrote: > > On Thu, Aug 20, 2020 at 06:58:49PM +0200, Philippe Mathieu-Daudé wrote: > >> As nvme_create_queue_pair() is allowed to fail, replace the > >> alloc() calls by try_alloc()

Re: [PATCH 1/2] fdmon-poll: reset npfd when upgrading to fdmon-epoll

2020-08-21 Thread Philippe Mathieu-Daudé
On 8/21/20 12:12 PM, Stefan Hajnoczi wrote: > npfd keeps track of how many pollfds are currently being monitored. It > must be reset to 0 when fdmon_poll_wait() returns. > > When npfd reaches a treshold we switch to fdmon-epoll because it scales > better. > > This patch resets npfd in the case wh

Re: [PATCH] cirrus: handle wraparound in cirrus_invalidate_region

2020-08-21 Thread Alexander Bulekov
On 200821 1251, Philippe Mathieu-Daudé wrote: > On 8/21/20 10:26 AM, Gerd Hoffmann wrote: > > Code simply asserts that there is no wraparound instead of handling > > it properly. The assert() can be triggered by the guest (must be > > privilidged inside the guest though). Fix it. > > Thanks for

Re: [PATCH 1/1] spapr_vscsi: do not allow device hotplug

2020-08-21 Thread Daniel Henrique Barboza
On 8/21/20 8:08 AM, Philippe Mathieu-Daudé wrote: Cc'ing Markus On 8/20/20 9:06 PM, Daniel Henrique Barboza wrote: We do not implement hotplug in the vscsi bus, but we forgot to tell qdev about it. The result is that users are able to hotplug devices in the vscsi bus, the devices appear in q

[PULL 01/14] iotests: add test for QCOW2 header dump

2020-08-21 Thread Eric Blake
From: Andrey Shinkevich The simple script creates a QCOW2 image and fills it with some data. Two bitmaps are created as well. Then the script reads the image header with extensions from the disk by running the script qcow2.py and dumps the information to the output. Other entities, such as snapsh

[PULL 10/14] qcow2_format.py: support dumping metadata in JSON format

2020-08-21 Thread Eric Blake
From: Andrey Shinkevich Implementation of dumping QCOW2 image metadata. The sample output: { "Header_extensions": [ { "name": "Feature table", "magic": 1745090647, "length": 192, "data_str": "" }, { "name": "B

[PULL 04/14] qcow2_format.py: dump bitmap flags in human readable way.

2020-08-21 Thread Eric Blake
From: Andrey Shinkevich Introduce the class BitmapFlags that parses a bitmap flags mask. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <1596742557-320265-5-git-send-email-andrey.shinkev...@virtuozzo.com> Signe

[PULL 02/14] qcow2_format.py: make printable data an extension class member

2020-08-21 Thread Eric Blake
From: Andrey Shinkevich Let us differ binary data type from string one for the extension data variable and keep the string as the QcowHeaderExtension class member. Signed-off-by: Andrey Shinkevich Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <1596742557-320265

[PULL 07/14] qcow2_format.py: Dump bitmap table serialized entries

2020-08-21 Thread Eric Blake
From: Andrey Shinkevich Add bitmap table information to the QCOW2 metadata dump. Bitmap name bitmap-1 ... Bitmap table typesize offset 0 serialized 6553610092544 1 all-zeroes 00 2 all-zeroes

[PULL 00/14] bitmaps patches for 2020-08-21

2020-08-21 Thread Eric Blake
The following changes since commit 7fd51e68c34fcefdb4d6fd646ed3346f780f89f4: Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2020-08-21 12:42:49 +0100) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-bitmaps-2020-08-2

[PULL 06/14] qcow2_format.py: pass cluster size to substructures

2020-08-21 Thread Eric Blake
From: Andrey Shinkevich The cluster size of an image is the QcowHeader class member and may be obtained by dependent extension structures such as Qcow2BitmapExt for further bitmap table details print. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <15967

[PULL 12/14] migration: Add block-bitmap-mapping parameter

2020-08-21 Thread Eric Blake
From: Max Reitz This migration parameter allows mapping block node names and bitmap names to aliases for the purpose of block dirty bitmap migration. This way, management tools can use different node and bitmap names on the source and destination and pass the mapping of how bitmaps are to be tra

[PULL 11/14] iotests: dump QCOW2 header in JSON in #303

2020-08-21 Thread Eric Blake
From: Andrey Shinkevich Extend the test case #303 by dumping QCOW2 image metadata in JSON format. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <1596742557-320265-12-git-send-email-andrey.shinkev...@virtuozzo.com> Signed-off-by: Eric Blake --- tests/

[PULL 03/14] qcow2_format.py: change Qcow2BitmapExt initialization method

2020-08-21 Thread Eric Blake
From: Andrey Shinkevich There are two ways to initialize a class derived from Qcow2Struct: 1. Pass a block of binary data to the constructor. 2. Pass the file descriptor to allow reading the file from constructor. Let's change the Qcow2BitmapExt initialization method from 1 to 2 to support a scat

[PATCH v5 01/10] block: simplify comment to BDRV_REQ_SERIALISING

2020-08-21 Thread Vladimir Sementsov-Ogievskiy
1. BDRV_REQ_NO_SERIALISING doesn't exist already, don't mention it. 2. We are going to add one more user of BDRV_REQ_SERIALISING, so comment about backup becomes a bit confusing here. The use case in backup is documented in block/backup.c, so let's just drop duplication here. 3. The fact

[PULL 05/14] qcow2_format.py: Dump bitmap directory information

2020-08-21 Thread Eric Blake
From: Andrey Shinkevich Read and dump entries from the bitmap directory of QCOW2 image. Header extension: magic 0x23852875 (Bitmaps) ... Bitmap name bitmap-1 bitmap_table_offset 0xf bitmap_table_size 1 flags 0x2 (['auto']) t

<    1   2   3   4   5   6   >