Re: [PATCH] configure: warn if not using a separate build directory

2020-03-31 Thread BALATON Zoltan
On Tue, 31 Mar 2020, Eric Blake wrote: On 3/31/20 5:37 AM, Daniel P. Berrangé wrote: Running configure directly from the source directory is a build configuration that will go away in future. It is also not currently covered by any automated testing. Display a deprecation warning if the user

Re: deprecation of in-tree builds

2020-03-31 Thread BALATON Zoltan
On Tue, 31 Mar 2020, Daniel P. Berrangé wrote: On Tue, Mar 31, 2020 at 02:33:46PM +0200, BALATON Zoltan wrote: We will have to ask developers to change habits anyway when we switch to Meson. I agree with Daniel's recommendation to delay changes requiring habit-changes until then. However,

Re: [PATCH v2] migration/throttle: Add cpu-throttle-tailslow migration parameter

2020-03-31 Thread Eric Blake
On 3/15/20 11:29 PM, Keqian Zhu wrote: At the tail stage of throttling, the Guest is very sensitive to CPU percentage while the @cpu-throttle-increment is excessive usually at tail stage. If this parameter is true, we will compute the ideal CPU percentage used by the Guest, which may exactly

Re: [PATCH for-5.0 2/3] fw_cfg: Migrate ACPI table mr sizes separately

2020-03-31 Thread Michael S. Tsirkin
On Tue, Mar 31, 2020 at 04:50:38PM +0200, Igor Mammedov wrote: > On Mon, 30 Mar 2020 17:49:08 +0100 > Shameer Kolothum wrote: > > > Any sub-page size update to ACPI MRs will be lost during > > migration, as we use aligned size in ram_load_precopy() -> > > qemu_ram_resize() path. This will result

[PULL 09/10] acpi: add acpi=OnOffAuto machine property to x86 and arm virt

2020-03-31 Thread Michael S. Tsirkin
From: Gerd Hoffmann Remove the global acpi_enabled bool and replace it with an acpi OnOffAuto machine property. qemu throws an error now if you use -no-acpi while the machine type you are using doesn't support acpi in the first place. Signed-off-by: Gerd Hoffmann Message-Id:

[PULL 10/10] vhost-vsock: fix double close() in the realize() error path

2020-03-31 Thread Michael S. Tsirkin
From: Stefano Garzarella vhost_dev_cleanup() closes the vhostfd parameter passed to vhost_dev_init(), so this patch avoids closing it twice in the vhost_vsock_device_realize() error path. Signed-off-by: Stefano Garzarella Message-Id: <20200331075910.42529-1-sgarz...@redhat.com> Reviewed-by:

[PULL 08/10] fix vhost_user_blk_watch crash

2020-03-31 Thread Michael S. Tsirkin
From: Li Feng the G_IO_HUP is watched in tcp_chr_connect, and the callback vhost_user_blk_watch is not needed, because tcp_chr_hup is registered as callback. And it will close the tcp link. Signed-off-by: Li Feng Message-Id: <20200323052924.29286-1-fen...@smartx.com> Reviewed-by: Michael S.

Re: [PULL for-5.0 00/10] tcg patch queue

2020-03-31 Thread Philippe Mathieu-Daudé
On 3/31/20 2:53 PM, Alex Bennée wrote: Peter Maydell writes: On Tue, 31 Mar 2020 at 04:54, Richard Henderson wrote: My tcg patch queue, plus one mips patch on request of Aleksander. r~ The following changes since commit 5acad5bf480321f178866dc28e38eeda5a3f19bb: Merge

Re: [PATCH for-5.0 2/3] fw_cfg: Migrate ACPI table mr sizes separately

2020-03-31 Thread Michael S. Tsirkin
On Mon, Mar 30, 2020 at 05:49:08PM +0100, Shameer Kolothum wrote: > Any sub-page size update to ACPI MRs will be lost during > migration, as we use aligned size in ram_load_precopy() -> > qemu_ram_resize() path. This will result in inconsistency in > FWCfgEntry sizes between source and

[PULL 04/10] acpi: pcihp: fix left shift undefined behavior in acpi_pcihp_eject_slot()

2020-03-31 Thread Michael S. Tsirkin
From: Igor Mammedov Coverity spots subj in following guest triggered code path pci_write(, data = 0) -> acpi_pcihp_eject_slot(,slots = 0) uinst32_t slot = ctz32(slots) ... ... = ~(1U << slot) where 'slot' value is 32 in case 'slots' bitmap is empty. 'slots' is a bitmap and empty

[PULL 06/10] virtio-iommu: avoid memleak in the unrealize

2020-03-31 Thread Michael S. Tsirkin
From: Pan Nengyuan req_vq/event_vq forgot to free in unrealize. Fix that. And also do clean 's->as_by_busptr' hash table in unrealize to fix another leak. Signed-off-by: Pan Nengyuan Acked-by: Eric Auger Message-Id: <20200328005705.29898-3-pannengy...@huawei.com> Reviewed-by: Michael S.

[PULL 05/10] virtio-blk: delete vqs on the error path in realize()

2020-03-31 Thread Michael S. Tsirkin
From: Pan Nengyuan virtio_vqs forgot to free on the error path in realize(). Fix that. The asan stack: Direct leak of 14336 byte(s) in 1 object(s) allocated from: #0 0x7f58b93fd970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970) #1 0x7f58b858249d in g_malloc0

[PULL 01/10] checkpatch: enforce process for expected files

2020-03-31 Thread Michael S. Tsirkin
If the process documented in tests/qtest/bios-tables-test.c is followed, then same patch never touches both expected files and code. Teach checkpatch to enforce this rule. Tested-by: Igor Mammedov Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael S. Tsirkin --- scripts/checkpatch.pl | 25

RE: [PATCH v2 08/22] vfio/common: provide PASID alloc/free hooks

2020-03-31 Thread Liu, Yi L
Hi Eric, > From: Auger Eric > Sent: Tuesday, March 31, 2020 7:16 PM > To: Liu, Yi L ; qemu-devel@nongnu.org; > Subject: Re: [PATCH v2 08/22] vfio/common: provide PASID alloc/free hooks > > Hi Yi, > On 3/31/20 12:59 PM, Liu, Yi L wrote: > > Hi Eric, > > > >> From: Auger Eric > >> Sent: Tuesday,

[PULL 03/10] virtio-serial-bus: Plug memory leak on realize() error paths

2020-03-31 Thread Michael S. Tsirkin
From: Pan Nengyuan We neglect to free port->bh on the error paths. Fix that. Reproducer: {'execute': 'device_add', 'arguments': {'id': 'virtio_serial_pci0', 'driver': 'virtio-serial-pci', 'bus': 'pci.0', 'addr': '0x5'}, 'id': 'yVkZcGgV'} {'execute': 'device_add', 'arguments': {'id':

[PULL 00/10] virtio, pci, pc: bugfixes, checkpatch, maintainers

2020-03-31 Thread Michael S. Tsirkin
The following changes since commit 5acad5bf480321f178866dc28e38eeda5a3f19bb: Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging (2020-03-28 00:27:04 +) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git

[PULL 07/10] hw/i386/amd_iommu.c: Fix corruption of log events passed to guest

2020-03-31 Thread Michael S. Tsirkin
From: Peter Maydell In the function amdvi_log_event(), we write an event log buffer entry into guest ram, whose contents are passed to the function via the "uint64_t *evt" argument. Unfortunately, a spurious '&' in the call to dma_memory_write() meant that instead of writing the event to the

[PULL 02/10] MAINTAINERS: Add myself as virtio-balloon co-maintainer

2020-03-31 Thread Michael S. Tsirkin
From: David Hildenbrand As suggested by Michael, let's add me as co-maintainer of virtio-balloon. While at it, also add "balloon.c" and "include/sysemu/balloon.h" to the file list. Cc: Michael S. Tsirkin Cc: Peter Maydell Signed-off-by: David Hildenbrand Message-Id:

Re: [PATCH] configure: warn if not using a separate build directory

2020-03-31 Thread Daniel P . Berrangé
On Tue, Mar 31, 2020 at 09:44:37AM -0500, Eric Blake wrote: > On 3/31/20 5:37 AM, Daniel P. Berrangé wrote: > > Running configure directly from the source directory is a build > > configuration that will go away in future. It is also not currently > > covered by any automated testing. Display a

Re: bdrv_drained_begin deadlock with io-threads

2020-03-31 Thread Vladimir Sementsov-Ogievskiy
31.03.2020 17:32, Dietmar Maurer wrote: After a few iteration the VM freeze inside bdrv_drained_begin(): Thread 1 (Thread 0x7fffe9291080 (LWP 30949)): #0 0x75cb3916 in __GI_ppoll (fds=0x7fff63d30c40, nfds=2, timeout=, timeout@entry=0x0, sigmask=sigmask@entry=0x0) at

Re: [PATCH for-5.0 2/3] fw_cfg: Migrate ACPI table mr sizes separately

2020-03-31 Thread Igor Mammedov
On Mon, 30 Mar 2020 17:49:08 +0100 Shameer Kolothum wrote: > Any sub-page size update to ACPI MRs will be lost during > migration, as we use aligned size in ram_load_precopy() -> > qemu_ram_resize() path. This will result in inconsistency in > FWCfgEntry sizes between source and destination. In

Re: [PATCH v13 3/4] qcow2: add zstd cluster compression

2020-03-31 Thread Vladimir Sementsov-Ogievskiy
31.03.2020 16:17, Denis Plotnikov wrote: zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of the compression ratio in comparison with zlib, which, at the moment, is the only compression method available. The performance

Re: [PATCH v6 07/42] nvme: refactor nvme_addr_read

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 14:48 +0200, Klaus Birkelund Jensen wrote: > On Mar 31 13:41, Maxim Levitsky wrote: > > On Tue, 2020-03-31 at 07:39 +0200, Klaus Birkelund Jensen wrote: > > > On Mar 25 12:38, Maxim Levitsky wrote: > > > > Note that this patch still contains a bug that it removes the check >

Re: [PATCH v6 12/42] nvme: add support for the get log page command

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 14:49 +0200, Klaus Birkelund Jensen wrote: > On Mar 31 12:45, Maxim Levitsky wrote: > > On Tue, 2020-03-31 at 07:41 +0200, Klaus Birkelund Jensen wrote: > > > On Mar 25 12:40, Maxim Levitsky wrote: > > > > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > > > > From:

Re: [PATCH] vhost-vsock: fix double close() in the realize() error path

2020-03-31 Thread Stefan Hajnoczi
On Tue, Mar 31, 2020 at 09:59:10AM +0200, Stefano Garzarella wrote: > vhost_dev_cleanup() closes the vhostfd parameter passed to > vhost_dev_init(), so this patch avoids closing it twice in > the vhost_vsock_device_realize() error path. > > Signed-off-by: Stefano Garzarella > --- >

Re: [PATCH] configure: warn if not using a separate build directory

2020-03-31 Thread Eric Blake
On 3/31/20 5:37 AM, Daniel P. Berrangé wrote: Running configure directly from the source directory is a build configuration that will go away in future. It is also not currently covered by any automated testing. Display a deprecation warning if the user attempts to use an in-srcdir build setup,

Re: [PATCH v1] usb: Add read support for HCIVERSION register to XHCI

2020-03-31 Thread Gerd Hoffmann
On Tue, Mar 31, 2020 at 02:57:56AM -0700, Cameron Esfahani wrote: > Philippe - > From what I've seen, access size has nothing to do with alignment. > > What the code in access_with_adjusted_size() will do is make sure that "size" > is >= min_access_size and <= max_access_size. > > So reading

Re: [PULL V2 00/14] Net patches

2020-03-31 Thread Peter Maydell
On Tue, 31 Mar 2020 at 14:21, Jason Wang wrote: > > The following changes since commit 2a95551e8b1456aa53ce54fac573df18809340a6: > > Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20200330' into > staging (2020-03-31 11:20:21 +0100) > > are available in the git repository at: > >

[PATCH] target/arm: Remove obsolete TODO note from get_phys_addr_lpae()

2020-03-31 Thread Peter Maydell
An old comment in get_phys_addr_lpae() claims that the code does not support the different format TCR for VTCR_EL2. This used to be true but it is not true now (in particular the aa64_va_parameters() and aa32_va_parameters() functions correctly handle the different register format by checking

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-31 Thread David Hildenbrand
On 31.03.20 16:29, David Hildenbrand wrote: > On 31.03.20 16:18, Michael S. Tsirkin wrote: >> On Tue, Mar 31, 2020 at 04:09:59PM +0200, David Hildenbrand wrote: >> >> ... >> >> So if we want to address this, IMHO this calls for a new API. >> Along the lines of

Re: bdrv_drained_begin deadlock with io-threads

2020-03-31 Thread Dietmar Maurer
> > After a few iteration the VM freeze inside bdrv_drained_begin(): > > > > Thread 1 (Thread 0x7fffe9291080 (LWP 30949)): > > #0 0x75cb3916 in __GI_ppoll (fds=0x7fff63d30c40, nfds=2, > > timeout=, timeout@entry=0x0, sigmask=sigmask@entry=0x0) at > >

Re: [PATCH-for-5.0] ui/input-linux: Do not ignore ioctl() return value

2020-03-31 Thread Philippe Mathieu-Daudé
On 3/22/20 5:12 PM, Philippe Mathieu-Daudé wrote: Fix warnings reported by Clang static code analyzer: CC ui/input-linux.o ui/input-linux.c:343:9: warning: Value stored to 'rc' is never read rc = ioctl(il->fd, EVIOCGBIT(EV_REL, sizeof(relmap)), ); ^

Re: [PATCH v2 10/22] vfio/pci: set host iommu context to vIOMMU

2020-03-31 Thread Auger Eric
Yi, On 3/30/20 6:24 AM, Liu Yi L wrote: > For vfio-pci devices, it could use pci_device_set/unset_iommu() to > expose host iommu context to vIOMMU emulators. vIOMMU emulators > could make use the methods provided by host iommu context. e.g. > propagate requests to host iommu. I think I would

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-31 Thread David Hildenbrand
On 31.03.20 16:18, Michael S. Tsirkin wrote: > On Tue, Mar 31, 2020 at 04:09:59PM +0200, David Hildenbrand wrote: > > ... > > So if we want to address this, IMHO this calls for a new API. > Along the lines of > >struct page

Re: [PULL for-5.0 07/10] configure: Support -static-pie if requested

2020-03-31 Thread Richard Henderson
On 3/31/20 6:44 AM, Laurent Vivier wrote: >> QEMU_LDFLAGS -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -static-pie >> -m64 -fstack-protector-strong ... >> $ file m68k-linux-user/qemu-m68k >> m68k-linux-user/qemu-m68k: ELF 64-bit LSB pie executable, x86-64, >> version 1 (GNU/Linux), dynamically

Re: [PATCH v7 0/7] reference implementation of RSS and hash report

2020-03-31 Thread Michael S. Tsirkin
On Sun, Mar 29, 2020 at 06:09:46PM +0300, Yuri Benditovich wrote: > Support for VIRTIO_NET_F_RSS and VIRTIO_NET_F_HASH_REPORT > features in QEMU for reference purpose. > Implements Toeplitz hash calculation for incoming > packets according to configuration provided by driver. > Uses calculated

[PATCH] qemu-options.hx: 9p: clarify -virtfs vs. -fsdev

2020-03-31 Thread Christian Schoenebeck
The docs are ambiguous about the difference (or actually their equality) between options '-virtfs' vs. '-fsdev'. So clarify that '-virtfs' is actually just a convenience shortcut for its generalized form '-fsdev' in conjunction with '-device virtio-9p-pci'. And as we're at it, also be a bit more

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-31 Thread Michael S. Tsirkin
On Tue, Mar 31, 2020 at 04:09:59PM +0200, David Hildenbrand wrote: ... > >>> So if we want to address this, IMHO this calls for a new API. > >>> Along the lines of > >>> > >>>struct page *alloc_page_range(gfp_t gfp, unsigned int > >>> min_order, >

Re: [PATCH-for-5.0 v2 4/4] qga: Restrict guest-file-read count to 10 MB to avoid crashes

2020-03-31 Thread Philippe Mathieu-Daudé
On 3/31/20 4:15 PM, Daniel P. Berrangé wrote: On Tue, Mar 31, 2020 at 04:06:38PM +0200, Philippe Mathieu-Daudé wrote: On https://www.mail-archive.com/qemu-devel@nongnu.org/msg693176.html Daniel Berrangé commented: The QEMU guest agent protocol is not sensible way to access huge files

Re: [PATCH-for-5.0 v2 4/4] qga: Restrict guest-file-read count to 10 MB to avoid crashes

2020-03-31 Thread Daniel P . Berrangé
On Tue, Mar 31, 2020 at 04:06:38PM +0200, Philippe Mathieu-Daudé wrote: > On https://www.mail-archive.com/qemu-devel@nongnu.org/msg693176.html > Daniel Berrangé commented: > > The QEMU guest agent protocol is not sensible way to access huge > files inside the guest. It requires the

Re: [PATCH-for-5.0 v2 1/4] Revert "prevent crash when executing guest-file-read with large count"

2020-03-31 Thread Philippe Mathieu-Daudé
On 3/31/20 4:12 PM, Daniel P. Berrangé wrote: On Tue, Mar 31, 2020 at 04:06:35PM +0200, Philippe Mathieu-Daudé wrote: By using g_try_malloc() instead of g_malloc() the qemu-guest-agent Denial-of-Service attack referred in commit 807e2b6fce is reduced, but still triggerable: As explained

Re: [PATCH-for-5.0 v2 1/4] Revert "prevent crash when executing guest-file-read with large count"

2020-03-31 Thread Daniel P . Berrangé
On Tue, Mar 31, 2020 at 04:06:35PM +0200, Philippe Mathieu-Daudé wrote: > By using g_try_malloc() instead of g_malloc() the qemu-guest-agent > Denial-of-Service attack referred in commit 807e2b6fce is reduced, > but still triggerable: As explained previously, I believe there is *no* denial of

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-31 Thread David Hildenbrand
On 31.03.20 16:07, Michael S. Tsirkin wrote: > On Tue, Mar 31, 2020 at 04:03:18PM +0200, David Hildenbrand wrote: >> On 31.03.20 15:37, Michael S. Tsirkin wrote: >>> On Tue, Mar 31, 2020 at 03:32:05PM +0200, David Hildenbrand wrote: On 31.03.20 15:24, Michael S. Tsirkin wrote: > On Tue,

[PATCH-for-5.0 v2 4/4] qga: Restrict guest-file-read count to 10 MB to avoid crashes

2020-03-31 Thread Philippe Mathieu-Daudé
On https://www.mail-archive.com/qemu-devel@nongnu.org/msg693176.html Daniel Berrangé commented: The QEMU guest agent protocol is not sensible way to access huge files inside the guest. It requires the inefficient process of reading the entire data into memory than duplicating it again in

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-31 Thread Michael S. Tsirkin
On Tue, Mar 31, 2020 at 04:03:18PM +0200, David Hildenbrand wrote: > On 31.03.20 15:37, Michael S. Tsirkin wrote: > > On Tue, Mar 31, 2020 at 03:32:05PM +0200, David Hildenbrand wrote: > >> On 31.03.20 15:24, Michael S. Tsirkin wrote: > >>> On Tue, Mar 31, 2020 at 12:35:24PM +0200, David

[PATCH-for-5.0 v2 2/4] qga: Extract guest_file_handle_find() to commands-common.h

2020-03-31 Thread Philippe Mathieu-Daudé
As we are going to reuse this method, declare it in common header. Signed-off-by: Philippe Mathieu-Daudé --- qga/commands-common.h | 18 ++ qga/commands-posix.c | 7 --- qga/commands-win32.c | 7 --- 3 files changed, 26 insertions(+), 6 deletions(-) create mode

[PATCH-for-5.0 v2 3/4] qga: Extract qmp_guest_file_read() to common commands.c

2020-03-31 Thread Philippe Mathieu-Daudé
Extract the common code shared by both POSIX/Win32 implementations. Signed-off-by: Philippe Mathieu-Daudé --- qga/commands-common.h | 3 +++ qga/commands-posix.c | 22 +++--- qga/commands-win32.c | 20 +++- qga/commands.c| 25 +

[PATCH-for-5.0 v2 0/4] qga: Restrict guest-file-read count to 10 MB to avoid crashes

2020-03-31 Thread Philippe Mathieu-Daudé
Fakhri Zulkifli reported BZ#1594054 https://bugzilla.redhat.com/show_bug.cgi?id=1594054 Dietmar Maurer noticed the fix from 807e2b6fce0 doesn't help as error_setg() also calls malloc(). Daniel Berrangé suggested a clever fix, restrict the guest-agent command size to avoid heap mayhem. v1:

[PATCH-for-5.0 v2 1/4] Revert "prevent crash when executing guest-file-read with large count"

2020-03-31 Thread Philippe Mathieu-Daudé
By using g_try_malloc() instead of g_malloc() the qemu-guest-agent Denial-of-Service attack referred in commit 807e2b6fce is reduced, but still triggerable: - bisect file size S until g_try_malloc(S) fails, - use S - 1: g_try_malloc(S - 1) succeeds, but g_new0() few lines later will

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-31 Thread David Hildenbrand
On 31.03.20 15:37, Michael S. Tsirkin wrote: > On Tue, Mar 31, 2020 at 03:32:05PM +0200, David Hildenbrand wrote: >> On 31.03.20 15:24, Michael S. Tsirkin wrote: >>> On Tue, Mar 31, 2020 at 12:35:24PM +0200, David Hildenbrand wrote: On 26.03.20 10:49, Michael S. Tsirkin wrote: > On Thu,

Re: [PATCH v10 10/14] iotests: add hmp helper with logging

2020-03-31 Thread Kevin Wolf
Am 31.03.2020 um 12:21 hat Max Reitz geschrieben: > On 31.03.20 02:00, John Snow wrote: > > Minor cleanup for HMP functions; helps with line length and consolidates > > HMP helpers through one implementation function. > > > > Although we are adding a universal toggle to turn QMP logging on or

[Bug 1869782] Re: qemu-arm-static crashes "segmentation fault" when running "svn checkout"

2020-03-31 Thread Manuel Reimer
Managed to get a coredump. Coredumps usually tell me nothing but maybe someone here can find something useful in there... ** Attachment added: "core.1001.13055.1585661762.bz2" https://bugs.launchpad.net/qemu/+bug/1869782/+attachment/5343797/+files/core.1001.13055.1585661762.bz2 -- You

Re: [PATCH 1/6] scripts/coccinelle: add error-use-after-free.cocci

2020-03-31 Thread Vladimir Sementsov-Ogievskiy
31.03.2020 16:14, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 31.03.2020 12:00, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add script to find and fix trivial use-after-free of Error objects. How to use: spatch --sp-file

Re: [PULL for-5.0 07/10] configure: Support -static-pie if requested

2020-03-31 Thread Laurent Vivier
On 31/03/2020 15:34, Laurent Vivier wrote: > On 31/03/2020 05:54, Richard Henderson wrote: >> Recent toolchains support static and pie at the same time. >> >> As with normal dynamic builds, allow --static to default to PIE >> if supported by the toolchain. Allow --enable/--disable-pie to >>

Re: [PATCH v10 14/14] iotests: use python logging for iotests.log()

2020-03-31 Thread Kevin Wolf
Am 31.03.2020 um 02:00 hat John Snow geschrieben: > We can turn logging on/off globally instead of per-function. > > Remove use_log from run_job, and use python logging to turn on > diffable output when we run through a script entry point. > > iotest 245 changes output order due to buffering

[PATCH] fcntl: Add 32bit filesystem mode

2020-03-31 Thread Linus Walleij
It was brought to my attention that this bug from 2018 was still unresolved: 32 bit emulators like QEMU were given 64 bit hashes when running 32 bit emulation on 64 bit systems. This adds a fcntl() operation to set the underlying filesystem into 32bit mode even if the file hanle was opened using

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-31 Thread David Hildenbrand
On 31.03.20 15:24, Michael S. Tsirkin wrote: > On Tue, Mar 31, 2020 at 12:35:24PM +0200, David Hildenbrand wrote: >> On 26.03.20 10:49, Michael S. Tsirkin wrote: >>> On Thu, Mar 26, 2020 at 08:54:04AM +0100, David Hildenbrand wrote: > Am 26.03.2020 um 08:21 schrieb Michael S. Tsirkin

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-31 Thread Michael S. Tsirkin
On Tue, Mar 31, 2020 at 03:32:05PM +0200, David Hildenbrand wrote: > On 31.03.20 15:24, Michael S. Tsirkin wrote: > > On Tue, Mar 31, 2020 at 12:35:24PM +0200, David Hildenbrand wrote: > >> On 26.03.20 10:49, Michael S. Tsirkin wrote: > >>> On Thu, Mar 26, 2020 at 08:54:04AM +0100, David

[Bug 1869782] Re: qemu-arm-static crashes "segmentation fault" when running "svn checkout"

2020-03-31 Thread Manuel Reimer
This is a "Ubuntu Bionic" thing. I've tried again on a VM with up-to-date Ubuntu Bionic and get the same segfault. For comparison I've placed the Debian build of qemu-user-static version 4.2 to my Arch Linux VM and have no crash there. So either the kernel version or some kernel configuration.

Re: [PULL for-5.0 07/10] configure: Support -static-pie if requested

2020-03-31 Thread Laurent Vivier
On 31/03/2020 05:54, Richard Henderson wrote: > Recent toolchains support static and pie at the same time. > > As with normal dynamic builds, allow --static to default to PIE > if supported by the toolchain. Allow --enable/--disable-pie to > override the default. > > Reviewed-by: Alex Bennée >

[PULL V2 13/14] hw/net/allwinner-sun8i-emac.c: Fix REG_ADDR_HIGH/LOW reads

2020-03-31 Thread Jason Wang
From: Peter Maydell Coverity points out (CID 1421926) that the read code for REG_ADDR_HIGH reads off the end of the buffer, because it does a 32-bit read from byte 4 of a 6-byte buffer. The code also has an endianness issue for both REG_ADDR_HIGH and REG_ADDR_LOW, because it will do the wrong

Re: [PATCH-for-5.0] qga-posix: Avoid crashing process when failing to allocate memory

2020-03-31 Thread Philippe Mathieu-Daudé
On 3/30/20 7:06 PM, Daniel P. Berrangé wrote: On Mon, Mar 30, 2020 at 06:04:49PM +0200, Philippe Mathieu-Daudé wrote: Cc'ing the ppl who responded the thread you quoted. On 3/30/20 4:11 PM, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: --- qga/commands-posix.c | 8 +++- 1

[PULL V2 14/14] qtest: add tulip test case

2020-03-31 Thread Jason Wang
From: Li Qiang The tulip networking card emulation has an OOB issue in 'tulip_copy_tx_buffers' when the guest provide malformed descriptor. This test will trigger a ASAN heap overflow crash. To trigger this issue we can construct the data as following: 1. construct a 'tulip_descriptor'. Its

[PULL V2 09/14] hw/net/can: Make CanBusClientInfo::can_receive() return a boolean

2020-03-31 Thread Jason Wang
From: Philippe Mathieu-Daudé The CanBusClientInfo::can_receive handler return whether the device can or can not receive new frames. Make it obvious by returning a boolean type. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Cédric Le Goater Signed-off-by:

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-31 Thread Michael S. Tsirkin
On Tue, Mar 31, 2020 at 12:35:24PM +0200, David Hildenbrand wrote: > On 26.03.20 10:49, Michael S. Tsirkin wrote: > > On Thu, Mar 26, 2020 at 08:54:04AM +0100, David Hildenbrand wrote: > >> > >> > >>> Am 26.03.2020 um 08:21 schrieb Michael S. Tsirkin : > >>> > >>> On Thu, Mar 12, 2020 at

Re: [PATCH-for-5.0 00/12] hw: Add missing error-propagation code

2020-03-31 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > This series is inspired of Peter fix: > "hw/arm/xlnx-zynqmp.c: fix some error-handling code" > https://www.mail-archive.com/qemu-devel@nongnu.org/msg691636.html > > Add a cocci script to fix the other places. > > Based-on:

[PULL V2 07/14] hw/net/rtl8139: Update coding style to make checkpatch.pl happy

2020-03-31 Thread Jason Wang
From: Philippe Mathieu-Daudé We will modify this code in the next commit. Clean it up first to avoid checkpatch.pl errors. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Cédric Le Goater Signed-off-by: Jason Wang --- hw/net/rtl8139.c | 10 ++ 1

[PULL V2 08/14] hw/net: Make NetCanReceive() return a boolean

2020-03-31 Thread Jason Wang
From: Philippe Mathieu-Daudé The NetCanReceive handler return whether the device can or can not receive new packets. Make it obvious by returning a boolean type. Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson Reviewed-by: Alistair Francis Reviewed-by: Cédric Le Goater

[PULL V2 06/14] hw/net/rtl8139: Simplify if/else statement

2020-03-31 Thread Jason Wang
From: Philippe Mathieu-Daudé Rewrite: if (E) { return A; } else { return B; } /* EOF */ } as: if (E) { return A; } return B; } Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Cédric

[PULL V2 12/14] net: tulip: check frame size and r/w data length

2020-03-31 Thread Jason Wang
From: Prasad J Pandit Tulip network driver while copying tx/rx buffers does not check frame size against r/w data length. This may lead to OOB buffer access. Add check to avoid it. Limit iterations over descriptors to avoid potential infinite loop issue in tulip_xmit_list_update. Reported-by:

[PULL V2 10/14] net/colo-compare.c: Expose "compare_timeout" to users

2020-03-31 Thread Jason Wang
From: Zhang Chen The "compare_timeout" determines the maximum time to hold the primary net packet. This patch expose the "compare_timeout", make user have ability to adjest the value according to application scenarios. QMP command demo: { "execute": "qom-get", "arguments": {

[PULL V2 05/14] hw/net/smc91c111: Let smc91c111_can_receive() return a boolean

2020-03-31 Thread Jason Wang
From: Philippe Mathieu-Daudé The smc91c111_can_receive() function simply returns a boolean value. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Cédric Le Goater Signed-off-by: Jason Wang --- hw/net/smc91c111.c | 8 1 file changed, 4

[PULL V2 02/14] hw/net/i82596.c: Avoid reading off end of buffer in i82596_receive()

2020-03-31 Thread Jason Wang
From: Peter Maydell The i82596_receive() function attempts to pass the guest a buffer which is effectively the concatenation of the data it is passed and a 4 byte CRC value. However, rather than implementing this as "write the data; then write the CRC" it instead bumps the length value of the

[PULL V2 11/14] net/colo-compare.c: Expose "expired_scan_cycle" to users

2020-03-31 Thread Jason Wang
From: Zhang Chen The "expired_scan_cycle" determines period of scanning expired primary node net packets. Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- net/colo-compare.c | 48 +--- qemu-options.hx| 4 +++- 2 files changed, 48

[PULL V2 04/14] hw/net/e1000e_core: Let e1000e_can_receive() return a boolean

2020-03-31 Thread Jason Wang
From: Philippe Mathieu-Daudé The e1000e_can_receive() function simply returns a boolean value. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Paolo Bonzini Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 2 +- hw/net/e1000e_core.h | 2 +- 2 files

[PULL V2 00/14] Net patches

2020-03-31 Thread Jason Wang
The following changes since commit 2a95551e8b1456aa53ce54fac573df18809340a6: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20200330' into staging (2020-03-31 11:20:21 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for

[PULL V2 03/14] Fixed integer overflow in e1000e

2020-03-31 Thread Jason Wang
From: Andrew Melnychenko Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1737400 Fixed setting max_queue_num if there are no peers in NICConf. qemu_new_nic() creates NICState with 1 NetClientState(index 0) without peers, set max_queue_num to 0 - It prevents undefined behavior and possible

[PULL V2 01/14] hw/net/i82596: Correct command bitmask (CID 1419392)

2020-03-31 Thread Jason Wang
From: Philippe Mathieu-Daudé The command is 32-bit, but we are loading the 16 upper bits with the 'get_uint16(s->scb + 2)' call. Once shifted by 16, the command bits match the status bits: - Command Bit 31 ACK-CX Acknowledges that the CU completed an Action Command. Bit 30 ACK-FR

[PATCH v13 1/4] qcow2: introduce compression type feature

2020-03-31 Thread Denis Plotnikov
The patch adds some preparation parts for incompatible compression type feature to qcow2 allowing the use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image creation and can be changed only later by image conversion, thus

[PATCH v13 0/4] qcow2: Implement zstd cluster compression method

2020-03-31 Thread Denis Plotnikov
v13: * 03: add progress sanity check to decompression loop [Vladimir] 03: add successful decompression check [Me] v12: * 03: again, rework compression and decompression loops to make them more correct [Vladimir] 03: move assert in compression to more appropriate place

[PATCH v13 4/4] iotests: 287: add qcow2 compression type test

2020-03-31 Thread Denis Plotnikov
The test checks fulfilling qcow2 requiriements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/287 | 128 + tests/qemu-iotests/287.out

[PATCH v13 2/4] qcow2: rework the cluster compression routine

2020-03-31 Thread Denis Plotnikov
The patch enables processing the image compression type defined for the image and chooses an appropriate method for image clusters (de)compression. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- block/qcow2-threads.c | 71

[PATCH v13 3/4] qcow2: add zstd cluster compression

2020-03-31 Thread Denis Plotnikov
zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of the compression ratio in comparison with zlib, which, at the moment, is the only compression method available. The performance test results: Test compresses and

Re: [PATCH 1/6] scripts/coccinelle: add error-use-after-free.cocci

2020-03-31 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 31.03.2020 12:00, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> Add script to find and fix trivial use-after-free of Error objects. >>> How to use: >>> spatch --sp-file scripts/coccinelle/auto-propagated-errp.cocci \ >>>

Re: bdrv_drained_begin deadlock with io-threads

2020-03-31 Thread Kevin Wolf
[ CC qemu-block ] Am 31.03.2020 um 10:46 hat Dietmar Maurer geschrieben: > I can see and reproduce this error with latest code from today. > But I also see it on stable 4.1.1 (sometimes). > > I guess this is a similar problem as reported earlier: >

Re: [PATCH v2 07/22] intel_iommu: add set/unset_iommu_context callback

2020-03-31 Thread Auger Eric
Hi Yi, On 3/31/20 2:25 PM, Liu, Yi L wrote: > Hi Eric, > >> From: Auger Eric < eric.au...@redhat.com> >> Sent: Tuesday, March 31, 2020 4:24 AM >> To: Liu, Yi L ; qemu-devel@nongnu.org; >> Subject: Re: [PATCH v2 07/22] intel_iommu: add set/unset_iommu_context >> callback >> >> Yi, >> >> On

Re: [PATCH] configure: warn if not using a separate build directory

2020-03-31 Thread Philippe Mathieu-Daudé
On 3/31/20 1:41 PM, Daniel P. Berrangé wrote: On Tue, Mar 31, 2020 at 01:11:45PM +0200, Philippe Mathieu-Daudé wrote: On 3/31/20 12:37 PM, Daniel P. Berrangé wrote: Running configure directly from the source directory is a build configuration that will go away in future. It is also not

Re: deprecation of in-tree builds

2020-03-31 Thread BALATON Zoltan
On Tue, 31 Mar 2020, Paolo Bonzini wrote: On 30/03/20 16:37, Kevin Wolf wrote: If manually dealing with separate build directories is inconvenient today, it will still be inconvenient with Meson, so this would mean introducing the automatic directly creation together with the other changes to

Re: [PULL for-5.0 00/10] tcg patch queue

2020-03-31 Thread Alex Bennée
Peter Maydell writes: > On Tue, 31 Mar 2020 at 04:54, Richard Henderson > wrote: >> >> My tcg patch queue, plus one mips patch on request of Aleksander. >> >> >> r~ >> >> >> The following changes since commit 5acad5bf480321f178866dc28e38eeda5a3f19bb: >> >> Merge remote-tracking branch

Re: deprecation of in-tree builds

2020-03-31 Thread Daniel P . Berrangé
On Tue, Mar 31, 2020 at 02:33:46PM +0200, BALATON Zoltan wrote: > > We will have to ask developers to change habits anyway when we switch to > > Meson. I agree with Daniel's recommendation to delay changes requiring > > habit-changes until then. However, telling people to stay clear of the > >

Re: [PATCH v6 12/42] nvme: add support for the get log page command

2020-03-31 Thread Klaus Birkelund Jensen
On Mar 31 12:45, Maxim Levitsky wrote: > On Tue, 2020-03-31 at 07:41 +0200, Klaus Birkelund Jensen wrote: > > On Mar 25 12:40, Maxim Levitsky wrote: > > > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > > > From: Klaus Jensen > > > > > > > > Add support for the Get Log Page command

Re: [PATCH v6 07/42] nvme: refactor nvme_addr_read

2020-03-31 Thread Klaus Birkelund Jensen
On Mar 31 13:41, Maxim Levitsky wrote: > On Tue, 2020-03-31 at 07:39 +0200, Klaus Birkelund Jensen wrote: > > On Mar 25 12:38, Maxim Levitsky wrote: > > > Note that this patch still contains a bug that it removes the check > > > against the accessed > > > size, which you fix in later patch. > > >

RE: [PATCH v2 04/22] hw/iommu: introduce HostIOMMUContext

2020-03-31 Thread Liu, Yi L
Hi Eric, > From: Auger Eric > Sent: Tuesday, March 31, 2020 3:48 PM > To: Liu, Yi L ; qemu-devel@nongnu.org; > Subject: Re: [PATCH v2 04/22] hw/iommu: introduce HostIOMMUContext > > Yi, > > On 3/31/20 6:10 AM, Liu, Yi L wrote: > > Hi Eric, > > > >> From: Auger Eric < eric.au...@redhat.com > >

Re: [PATCH v3 10/16] hw/i386/vmport: Add support for CMD_GETTIME

2020-03-31 Thread Liran Alon
On 22/03/2020 13:22, Liran Alon wrote: On 15/03/2020 13:56, Liran Alon wrote: On 14/03/2020 22:56, Michael S. Tsirkin wrote: On Sat, Mar 14, 2020 at 10:05:20PM +0200, Liran Alon wrote: Michael, you can also refer to this VMware time-keeping whitepaper:

Re: deprecation of in-tree builds

2020-03-31 Thread BALATON Zoltan
On Tue, 31 Mar 2020, Markus Armbruster wrote: Peter Maydell writes: On Mon, 30 Mar 2020 at 14:26, Markus Armbruster wrote: Peter Maydell writes: AIUI from Paolo, the intention is to deprecate and eventually stop supporting "in-tree" builds, so that the only option is building in a

Re: deprecation of in-tree builds

2020-03-31 Thread Peter Maydell
On Tue, 31 Mar 2020 at 13:24, Kevin Wolf wrote: > > Am 31.03.2020 um 14:05 hat Peter Maydell geschrieben: > > On Tue, 31 Mar 2020 at 13:02, Kevin Wolf wrote: > > > Mainly because it allows me to start everything (most importantly: my > > > editor, git and make) from the same directory. > > > >

Re: [PATCH v2] migration/throttle: Add cpu-throttle-tailslow migration parameter

2020-03-31 Thread zhukeqian
Friendly ping... Hi all, Could you please review this patch. Thanks very much. Thanks, Keqian On 2020/3/16 12:29, Keqian Zhu wrote: > At the tail stage of throttling, the Guest is very sensitive to > CPU percentage while the @cpu-throttle-increment is excessive > usually at tail stage. > > If

Re: [PATCH/RFC] vl/s390: fixup ram sizes for compat machines

2020-03-31 Thread Christian Borntraeger
On 31.03.20 14:19, David Hildenbrand wrote: > On 31.03.20 14:16, Christian Borntraeger wrote: >> >> >> On 31.03.20 14:13, David Hildenbrand wrote: >>> On 31.03.20 14:02, Christian Borntraeger wrote: compat machines did fixup the ram size to match what can be reported via sclp. We need

RE: [PATCH v2 07/22] intel_iommu: add set/unset_iommu_context callback

2020-03-31 Thread Liu, Yi L
Hi Eric, > From: Auger Eric < eric.au...@redhat.com> > Sent: Tuesday, March 31, 2020 4:24 AM > To: Liu, Yi L ; qemu-devel@nongnu.org; > Subject: Re: [PATCH v2 07/22] intel_iommu: add set/unset_iommu_context > callback > > Yi, > > On 3/30/20 6:24 AM, Liu Yi L wrote: > > This patch adds

Re: deprecation of in-tree builds

2020-03-31 Thread Kevin Wolf
Am 31.03.2020 um 14:05 hat Peter Maydell geschrieben: > On Tue, 31 Mar 2020 at 13:02, Kevin Wolf wrote: > > Mainly because it allows me to start everything (most importantly: my > > editor, git and make) from the same directory. > > You can use 'make -C build/whatever' to avoid having to change

<    1   2   3   4   >