[PULL 00/12] Block layer patches for 5.1.0-rc1

2020-07-17 Thread Kevin Wolf
The following changes since commit 151f76c689b1ff4c2c59e6d8469a0d4fe5346f55: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2020-07-16 21:46:18 +0100) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[PULL 03/12] qemu-img resize: Require --shrink for shrinking all image formats

2020-07-17 Thread Kevin Wolf
QEMU 2.11 introduced the --shrink option for qemu-img resize to avoid accidentally shrinking images (commit 4ffca8904a3). However, for compatibility reasons, it was not enforced for raw images yet, but only a deprecation warning was printed. This warning has existed for long enough that we can now

[PULL 05/12] iotests/030: Reduce job speed to make race less likely

2020-07-17 Thread Kevin Wolf
It can happen that the throttling of the stream job doesn't make it slow enough that we can be sure that it still exists when it is referenced again. Just use a much smaller speed to make this very unlikely to happen again. Reported-by: Peter Maydell Signed-off-by: Kevin Wolf Message-Id: <202007

[PULL 07/12] iotests: test shutdown when bitmap is exported through NBD

2020-07-17 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Test shutdown when bitmap is exported through NBD and active client exists. The previous patch fixes a crash, provoked by this scenario. Signed-off-by: Vladimir Sementsov-Ogievskiy Tested-by: Eric Blake Reviewed-by: Eric Blake Message-Id: <20200714162234.131

[PULL 06/12] nbd: make nbd_export_close_all() synchronous

2020-07-17 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Consider nbd_export_close_all(). The call-stack looks like this: nbd_export_close_all() -> nbd_export_close -> call client_close() for each client. client_close() doesn't guarantee that client is closed: nbd_trip() keeps reference to it. So, nbd_export_close_a

[PULL 10/12] file-posix: Move check_hdev_writable() up

2020-07-17 Thread Kevin Wolf
We'll need to call it in raw_open_common(), so move the function to avoid a forward declaration. Signed-off-by: Kevin Wolf Message-Id: <20200717105426.51134-2-kw...@redhat.com> Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/file-posix.c | 66 +++-

[PULL 08/12] block: Require aligned image size to avoid assertion failure

2020-07-17 Thread Kevin Wolf
Unaligned requests will automatically be aligned to bl.request_alignment and we can't extend write requests to access space beyond the end of the image without resizing the image, so if we have the WRITE permission, but not the RESIZE one, it's required that the image size is aligned. Failing to m

[PULL 11/12] file-posix: Fix check_hdev_writable() with auto-read-only

2020-07-17 Thread Kevin Wolf
For Linux block devices, being able to open the device read-write doesn't necessarily mean that the device is actually writable (one example is a read-only LV, as you get with lvchange -pr ). We have check_hdev_writable() to check this condition and fail opening the image read-write if it's not act

[PULL 12/12] file-posix: Fix leaked fd in raw_open_common() error path

2020-07-17 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Message-Id: <20200717105426.51134-4-kw...@redhat.com> Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/file-posix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index 996e45ab95..8cc39a1ef6 100644 --- a/block/

[PULL 04/12] crypto: use a stronger private key for tests

2020-07-17 Thread Kevin Wolf
From: Daniel P. Berrangé The unit tests using the x509 crypto functionality have started failing in Fedora 33 rawhide with a message like The certificate uses an insecure algorithm This is result of Fedora changes to support strong crypto [1]. RSA with 1024 bit key is viewed as legacy and

[PATCH v1 0/1] hyperv: Enable SCONTROL if SYNIC is enabled

2020-07-17 Thread Jon Doron
Based on an analysis of the HyperV firmwares (Gen1 and Gen2) it seems like the SCONTROL is not being set to the ENABLED state as like we have thought. Also from a test done by Vitaly Kuznetsov, running a nested HyperV it was concluded that the first access to the SCONTROL MSR with a read resulted

Re: [PATCH v2] linux-user: Fix "print_fdset()" in "strace.c" to not print ", " after last value

2020-07-17 Thread Laurent Vivier
Le 02/07/2020 à 18:09, Filip Bozuta a écrit : > Function "print_fdset()" in "strace.c" is used to print the file descriptor > values in "print__newselect()" which prints arguments of syscall _newselect(). > Until changes from this patch, this function was printing "," even after the > last value of

[PULL 09/12] file-posix: Allow byte-aligned O_DIRECT with NFS

2020-07-17 Thread Kevin Wolf
Since commit a6b257a08e3 ('file-posix: Handle undetectable alignment'), we assume that if we open a file with O_DIRECT and alignment probing returns 1, we just couldn't find out the real alignment requirement because some filesystems make the requirement only for allocated blocks. In this case, a s

[PATCH v1 1/1] hyperv: Enable SCONTROL if SYNIC is enabled

2020-07-17 Thread Jon Doron
Based on an analysis of the HyperV firmwares (Gen1 and Gen2) it seems like the SCONTROL is not being set to the ENABLED state as like we have thought. Also from a test done by Vitaly Kuznetsov, running a nested HyperV it was concluded that the first access to the SCONTROL MSR with a read resulted

Re: [PATCH] gitlab-ci.yml: Add oss-fuzz build tests

2020-07-17 Thread Alexander Bulekov
On 200717 0740, Thomas Huth wrote: > On 16/07/2020 18.33, Alexander Bulekov wrote: > > This tries to build and run the fuzzers with the same build-script used > > by oss-fuzz. This doesn't guarantee that the builds on oss-fuzz will > > also succeed, since oss-fuzz provides its own compiler and fuzz

Re: [PATCH v2 02/20] iotests: 129 don't check backup "busy"

2020-07-17 Thread Max Reitz
On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: > Busy is racy, job has it's "pause-points" when it's not busy. Drop this > check. Possible, though I have to admit I don’t think I’ve ever seen 129 fail because of that, but rather because of: https://lists.nongnu.org/archive/html/qemu-block

Re: [RFC 2/3] x86: cphp: prevent guest crash on CPU hotplug when broadcast SMI is in use

2020-07-17 Thread Igor Mammedov
On Tue, 14 Jul 2020 12:56:50 +0200 Laszlo Ersek wrote: > On 07/10/20 18:17, Igor Mammedov wrote: [...] > > @@ -1508,6 +1508,17 @@ static void pc_cpu_pre_plug(HotplugHandler > > *hotplug_dev, > > return; > > } > > > > +if (pcms->acpi_dev) { > > +Error *local_err = NULL;

Re: [PULL 28/53] Makefile: simplify MINIKCONF rules

2020-07-17 Thread Peter Maydell
On Fri, 17 Jul 2020 at 12:20, Paolo Bonzini wrote: > Il ven 17 lug 2020, 13:03 Peter Maydell ha scritto: >> There doesn't seem to be any machinery for creating .d >> files for make to include to tell it that Kconfig has a >> dependency on hw/Kconfig which has a dependency on hw/i2c/Kconfig etc. >

tests/vm infrastructure fails to notice that QEMU dying is a failure

2020-07-17 Thread Peter Maydell
If you run vm-build-openbsd, our makefile/scripting infrastructure seems to fail to notice that death of the QEMU process that's running the VM should be a failure, and ends up allowing make to return a success condition. I have a script which runs a VM build which basically does: #!/bin/sh -e

[Bug 1887854] Re: Spurious Data Abort on qemu-system-aarch64

2020-07-17 Thread K
Ok, thanks for rooting this out. I could swear that I checked that address several times and I clearly remember 0x4010ca28, but I don't remember ever seeing 0x10 ahead of it. I'll dig into it a bit and hopefully find the root cause in my code. ** Changed in: qemu Status: New => Invalid --

Re: [RFC 3/3] x68: acpi: trigger SMI before scanning for hotplugged CPUs

2020-07-17 Thread Igor Mammedov
On Tue, 14 Jul 2020 14:28:29 +0200 Laszlo Ersek wrote: > (CC'ing Peter Krempa due to virsh setvcpu (singular) / setvcpus (plural) > references) > > On 07/10/20 18:17, Igor Mammedov wrote: [...] > (3) Just a thought: I wonder if we should reserve both ports (0xB2 and > 0xB3 too). For now we don'

Re: [PATCH v2 03/20] qapi: backup: add x-use-copy-range parameter

2020-07-17 Thread Max Reitz
On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: > Add parameter to enable/disable copy_range. Keep current default for > now (enabled). Why x-, though? I can’t think of a reason why we would have to remove this. > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > qapi/block-core.json

Re: [PATCH] gitlab-ci.yml: Add oss-fuzz build tests

2020-07-17 Thread Alexander Bulekov
On 200717 0951, Thomas Huth wrote: > On 17/07/2020 07.40, Thomas Huth wrote: > > On 16/07/2020 18.33, Alexander Bulekov wrote: > >> This tries to build and run the fuzzers with the same build-script used > >> by oss-fuzz. This doesn't guarantee that the builds on oss-fuzz will > >> also succeed, si

Re: tests/vm infrastructure fails to notice that QEMU dying is a failure

2020-07-17 Thread Philippe Mathieu-Daudé
Cc'ing John & Cleber. On 7/17/20 3:08 PM, Peter Maydell wrote: > If you run vm-build-openbsd, our makefile/scripting infrastructure > seems to fail to notice that death of the QEMU process that's > running the VM should be a failure, and ends up allowing make > to return a success condition. > >

Re: tests/vm infrastructure fails to notice that QEMU dying is a failure

2020-07-17 Thread Philippe Mathieu-Daudé
On 7/17/20 3:22 PM, Philippe Mathieu-Daudé wrote: > Cc'ing John & Cleber. > > On 7/17/20 3:08 PM, Peter Maydell wrote: >> If you run vm-build-openbsd, our makefile/scripting infrastructure >> seems to fail to notice that death of the QEMU process that's >> running the VM should be a failure, and e

Re: [PATCH v1 4/5] util: add qemu_get_host_physmem utility function

2020-07-17 Thread BALATON Zoltan
On Fri, 17 Jul 2020, Alex Bennée wrote: This will be used in a future patch. For POSIX systems _SC_PHYS_PAGES isn't standardised but at least appears in the man pages for Open/FreeBSD. The result is advisory so any users of it shouldn't just fail if we can't work it out. The win32 stub currently

Re: [PULL 28/53] Makefile: simplify MINIKCONF rules

2020-07-17 Thread Paolo Bonzini
Il ven 17 lug 2020, 15:01 Peter Maydell ha scritto: > When you do a "make clean" those .d files get deleted > (but the config-devices.mak files do not). I think that's the bug, both should be removed by "make clean" (since the .mak files are built by "make" and not "configure"). Paolo

[RFC PATCH-for-5.1 v2] hw/ide: Avoid #DIV/0! FPU exception by setting CD-ROM sector count

2020-07-17 Thread Philippe Mathieu-Daudé
libFuzzer found an undefined behavior (#DIV/0!) in ide_set_sector() when using a CD-ROM (reproducer available on the BugLink): UndefinedBehaviorSanitizer:DEADLYSIGNAL ==12163==ERROR: UndefinedBehaviorSanitizer: FPE on unknown address 0x5616279cffdc (pc 0x5616279cffdc bp 0x7ffcdaabae90 sp 0x7f

Re: TB Cache size grows out of control with qemu 5.0

2020-07-17 Thread Christian Ehrhardt
On Thu, Jul 16, 2020 at 6:27 PM Alex Bennée wrote: > > Christian Ehrhardt writes: > > > On Wed, Jul 15, 2020 at 5:58 PM BALATON Zoltan > wrote: > > > >> See commit 47a2def4533a2807e48954abd50b32ecb1aaf29a and the next two > >> following it. > >> > > > > Thank you Zoltan for pointing out this co

Re: [PATCH v2 04/20] block/block-copy: More explicit call_state

2020-07-17 Thread Max Reitz
On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: > Refactor common path to use BlockCopyCallState pointer as parameter, to > prepare it for use in asynchronous block-copy (at least, we'll need to > run block-copy in a coroutine, passing the whole parameters as one > pointer). > > Signed-off-

Re: [PATCH] docs/s390x: fix vfio-ccw type

2020-07-17 Thread Cornelia Huck
On Thu, 16 Jul 2020 16:50:31 +0200 Cornelia Huck wrote: > Fix the type name in the mdevctl example. > > Signed-off-by: Cornelia Huck > --- > > I always seem to get this one wrong, and mdevctl does not complain until > it wants to start the device... > > --- > docs/system/s390x/vfio-ccw.rst |

[PULL 1/1] docs/s390x: fix vfio-ccw type

2020-07-17 Thread Cornelia Huck
Fix the type name in the mdevctl example. Signed-off-by: Cornelia Huck Reviewed-by: Eric Farman Message-Id: <20200716145031.771476-1-coh...@redhat.com> --- docs/system/s390x/vfio-ccw.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system/s390x/vfio-ccw.rst b/docs/sy

Re: [PULL 0/6] Leak fixes for qtests + fuzzer CI

2020-07-17 Thread Peter Maydell
On Fri, 17 Jul 2020 at 10:56, Thomas Huth wrote: > > Hi Peter, > > the following changes since commit 95d1fbabae0cd44156ac4b96d512d143ca7dfd5e: > > Merge remote-tracking branch > 'remotes/kraxel/tags/fixes-20200716-pull-request' into staging (2020-07-16 > 18:50:51 +0100) > > are available in

[PULL 0/1] s390x: documentation fix

2020-07-17 Thread Cornelia Huck
The following changes since commit 151f76c689b1ff4c2c59e6d8469a0d4fe5346f55: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2020-07-16 21:46:18 +0100) are available in the Git repository at: https://github.com/cohuck/qemu tags/s390x-202

Re: [PATCH v2 05/20] block/block-copy: implement block_copy_async

2020-07-17 Thread Max Reitz
On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: > We'll need async block-copy invocation to use in backup directly. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block-copy.h | 13 + > block/block-copy.c | 40

[PATCH 2/4] linux-user: Add support for two btrfs ioctls used for subvolume

2020-07-17 Thread Filip Bozuta
This patch implements functionality for following ioctl: BTRFS_IOC_DEFAULT_SUBVOL - Setting a default subvolume Set a default subvolume for a btrfs filesystem. The third ioctl's argument is a '__u64' (unsigned long long) which represents the id of a subvolume that is to be set as

[PATCH 4/4] linux-user: Add support for btrfs ioctls used to scrub a filesystem

2020-07-17 Thread Filip Bozuta
This patch implements functionality for following ioctls: BTRFS_IOC_SCRUB - Starting a btrfs filesystem scrub Start a btrfs filesystem scrub. The third ioctls argument is a pointer to a following type: struct btrfs_ioctl_scrub_args { __u64 devid;/*

[PATCH 1/4] linux-user: Add support for a group of btrfs inode ioctls

2020-07-17 Thread Filip Bozuta
This patch implements functionality of following ioctls: BTRFS_IOC_INO_LOOKUP - Reading tree root id and path Read tree root id and path for a given file or directory. The name and tree root id are returned in an ioctl's third argument that represents a pointer to a following type:

[PATCH] accel/tcg: reduce default code gen buffer on small hosts

2020-07-17 Thread Christian Ehrhardt
Since v5.0.0 and 600e17b2 "accel/tcg: increase default code gen buffer size for 64 bit" in particular qemu with TCG regularly gets OOM Killed on small hosts. The former 47a2def4 "accel/tcg: remove link between guest ram and TCG cache size" removed the link to guest size which is right, but at leas

[PATCH 3/4] linux-user: Add support for btrfs ioctls used to manage quota

2020-07-17 Thread Filip Bozuta
This patch implements functionality for following ioctls: BTRFS_IOC_QUOTA_CTL - Enabling/Disabling quota support Enable or disable quota support for a btrfs filesystem. Quota support is enabled or disabled using the ioctls third argument which represents a pointer to a following type:

Re: [PATCH] accel/tcg: reduce default code gen buffer on small hosts

2020-07-17 Thread Christian Ehrhardt
On Fri, Jul 17, 2020 at 4:07 PM Christian Ehrhardt < christian.ehrha...@canonical.com> wrote: > Since v5.0.0 and 600e17b2 "accel/tcg: increase default code gen buffer > size for 64 bit" in particular qemu with TCG regularly gets OOM Killed > on small hosts. > > The former 47a2def4 "accel/tcg: remo

Re: [RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-07-17 Thread Peter Xu
On Thu, Jul 16, 2020 at 10:54:31AM +0800, Jason Wang wrote: > > On 2020/7/16 上午9:00, Peter Xu wrote: > > On Mon, Jul 13, 2020 at 12:04:16PM +0800, Jason Wang wrote: > > > On 2020/7/10 下午9:30, Peter Xu wrote: > > > > On Fri, Jul 10, 2020 at 02:34:11PM +0800, Jason Wang wrote: > > > > > On 2020/7/9

[PATCH 0/4] Add support for a group of btrfs ioctls - 2

2020-07-17 Thread Filip Bozuta
This series covers support for following btrfs ioctls *BTRFS_IOC_DEFAULT_SUBVOL*BTRFS_IOC_QUOTA_RESCAN *BTRFS_IOC_GET_SUBVOL_ROOTREF*BTRFS_IOC_QUOTA_RESCAN_WAIT *BTRFS_IOC_QUOTA_CTL *BTRFS_IOC_SCRUB *BTRFS_IOC_QGROUP_CREATE *BTRFS_IOC_SCRUB_CANCEL

Re: [PATCH v1 5/5] accel/tcg: better handle memory constrained systems

2020-07-17 Thread Christian Ehrhardt
On Fri, Jul 17, 2020 at 12:51 PM Alex Bennée wrote: > It turns out there are some 64 bit systems that have relatively low > amounts of physical memory available to them (typically CI system). > Even with swapping available a 1GB translation buffer that fills up > can put the machine under increas

Re: [PATCH v1 4/5] util: add qemu_get_host_physmem utility function

2020-07-17 Thread Christian Ehrhardt
On Fri, Jul 17, 2020 at 3:32 PM BALATON Zoltan wrote: > On Fri, 17 Jul 2020, Alex Bennée wrote: > > This will be used in a future patch. For POSIX systems _SC_PHYS_PAGES > > isn't standardised but at least appears in the man pages for > > Open/FreeBSD. The result is advisory so any users of it sh

Re: TB Cache size grows out of control with qemu 5.0

2020-07-17 Thread Alex Bennée
Christian Ehrhardt writes: > On Thu, Jul 16, 2020 at 6:27 PM Alex Bennée wrote: > >> >> Christian Ehrhardt writes: >> >> > On Wed, Jul 15, 2020 at 5:58 PM BALATON Zoltan >> wrote: >> > >> >> See commit 47a2def4533a2807e48954abd50b32ecb1aaf29a and the next two >> >> following it. >> >> >> > >

Re: [PATCH v1 5/5] accel/tcg: better handle memory constrained systems

2020-07-17 Thread Daniel P . Berrangé
On Fri, Jul 17, 2020 at 11:51:39AM +0100, Alex Bennée wrote: > It turns out there are some 64 bit systems that have relatively low > amounts of physical memory available to them (typically CI system). > Even with swapping available a 1GB translation buffer that fills up > can put the machine under

[PATCH v2 0/4] Add support for a group of btrfs ioctls - 2

2020-07-17 Thread Filip Bozuta
This series covers support for following btrfs ioctls *BTRFS_IOC_DEFAULT_SUBVOL*BTRFS_IOC_QUOTA_RESCAN *BTRFS_IOC_GET_SUBVOL_ROOTREF*BTRFS_IOC_QUOTA_RESCAN_WAIT *BTRFS_IOC_QUOTA_CTL *BTRFS_IOC_SCRUB *BTRFS_IOC_QGROUP_CREATE *BTRFS_IOC_SCRUB_CANCEL

[PATCH v2 2/4] linux-user: Add support for two btrfs ioctls used for subvolume

2020-07-17 Thread Filip Bozuta
This patch implements functionality for following ioctl: BTRFS_IOC_DEFAULT_SUBVOL - Setting a default subvolume Set a default subvolume for a btrfs filesystem. The third ioctl's argument is a '__u64' (unsigned long long) which represents the id of a subvolume that is to be set as

[PATCH v2 4/4] linux-user: Add support for btrfs ioctls used to scrub a filesystem

2020-07-17 Thread Filip Bozuta
This patch implements functionality for following ioctls: BTRFS_IOC_SCRUB - Starting a btrfs filesystem scrub Start a btrfs filesystem scrub. The third ioctls argument is a pointer to a following type: struct btrfs_ioctl_scrub_args { __u64 devid;/*

[PATCH v2 3/4] linux-user: Add support for btrfs ioctls used to manage quota

2020-07-17 Thread Filip Bozuta
This patch implements functionality for following ioctls: BTRFS_IOC_QUOTA_CTL - Enabling/Disabling quota support Enable or disable quota support for a btrfs filesystem. Quota support is enabled or disabled using the ioctls third argument which represents a pointer to a following type:

[PATCH v2 1/4] linux-user: Add support for a group of btrfs inode ioctls

2020-07-17 Thread Filip Bozuta
This patch implements functionality of following ioctls: BTRFS_IOC_INO_LOOKUP - Reading tree root id and path Read tree root id and path for a given file or directory. The name and tree root id are returned in an ioctl's third argument that represents a pointer to a following type:

Re: [PATCH] linux-user: Add strace support for printing arguments for ioctls used for terminals and serial lines

2020-07-17 Thread Laurent Vivier
Le 14/07/2020 à 22:04, Filip Bozuta a écrit : > Functions "print_ioctl()" and "print_syscall_ret_ioctl()" are used > to print arguments of "ioctl()" with "-strace". These functions > use "thunk_print()", which is defined in "thunk.c", to print the > contents of ioctl's third arguments that are not

[PATCH] file-posix: Handle `EINVAL` fallocate return value

2020-07-17 Thread Antoine Damhet
From: Antoine Damhet The `detect-zeroes=unmap` option may issue unaligned `FALLOC_FL_PUNCH_HOLE` requests, raw block devices can (and will) return `EINVAL`, qemu should then write the zeroes to the blockdev instead of issuing an `IO_ERROR`. Signed-off-by: Antoine Damhet --- block/file-posix.c

[PATCH RESEND] file-posix: Handle `EINVAL` fallocate return value

2020-07-17 Thread antoine . damhet
From: Antoine Damhet The `detect-zeroes=unmap` option may issue unaligned `FALLOC_FL_PUNCH_HOLE` requests, raw block devices can (and will) return `EINVAL`, qemu should then write the zeroes to the blockdev instead of issuing an `IO_ERROR`. Signed-off-by: Antoine Damhet --- I am resending this

Re: [PATCH v1 5/5] accel/tcg: better handle memory constrained systems

2020-07-17 Thread Alex Bennée
Daniel P. Berrangé writes: > On Fri, Jul 17, 2020 at 11:51:39AM +0100, Alex Bennée wrote: >> It turns out there are some 64 bit systems that have relatively low >> amounts of physical memory available to them (typically CI system). >> Even with swapping available a 1GB translation buffer that f

Re: device compatibility interface for live migration with assigned devices

2020-07-17 Thread Alex Williamson
On Wed, 15 Jul 2020 16:20:41 +0800 Yan Zhao wrote: > On Tue, Jul 14, 2020 at 02:59:48PM -0600, Alex Williamson wrote: > > On Tue, 14 Jul 2020 18:19:46 +0100 > > "Dr. David Alan Gilbert" wrote: > > > > > * Alex Williamson (alex.william...@redhat.com) wrote: > > > > On Tue, 14 Jul 2020 11:21:

Re: [PATCH v3 for-5.1 0/2] Fix crash due to NBD export leak

2020-07-17 Thread Vladimir Sementsov-Ogievskiy
17.07.2020 15:01, Kevin Wolf wrote: Am 14.07.2020 um 18:22 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi all! We've faced crash bug, which is reproducing on master branch as well. The case is described in 01, where fix is suggested. New iotest in 02 crashes without that fix. v3: resend for

Re: [PATCH v1 5/5] accel/tcg: better handle memory constrained systems

2020-07-17 Thread Daniel P . Berrangé
On Fri, Jul 17, 2020 at 03:55:15PM +0100, Alex Bennée wrote: > > Daniel P. Berrangé writes: > > > On Fri, Jul 17, 2020 at 11:51:39AM +0100, Alex Bennée wrote: > >> It turns out there are some 64 bit systems that have relatively low > >> amounts of physical memory available to them (typically CI

Re: [PATCH 1/7] pc-bios: s390x: Fix bootmap.c zipl component entry data handling

2020-07-17 Thread Thomas Huth
On 15/07/2020 11.40, Janosch Frank wrote: > The two main types of zipl component entries are execute and > load/data. The last member of the component entry struct therefore > denotes either a PSW or an address. Let's make this a bit more clear > by introducing a union and cleaning up the code that

Re: [PATCH 2/7] pc-bios: s390x: Cleanup jump to ipl code

2020-07-17 Thread Thomas Huth
On 15/07/2020 11.40, Janosch Frank wrote: > jump_to_IPL_code takes a 64 bit address, masks it with the short psw > address mask and later branches to it using a full 64 bit register. > > * As the masking is not necessary, let's remove it > * Without the mask we can save the ipl address to a static

[PULL 0/1] bitmaps patches for 2020-07-17 [-rc1]

2020-07-17 Thread Eric Blake
The following changes since commit 151f76c689b1ff4c2c59e6d8469a0d4fe5346f55: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2020-07-16 21:46:18 +0100) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-bitmaps-2020-0

[PULL 1/1] migration/block-dirty-bitmap: fix add_bitmaps_to_list

2020-07-17 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We shouldn't fail when finding an unnamed bitmap in a unnamed node or node with auto-generated node name, as bitmap migration ignores such bitmaps in the first place. Fixes: 82640edb88faa Fixes: 4ff5cc121b089 Signed-off-by: Vladimir Sementsov-Ogievskiy Message

[RFC PATCH-for-5.1] hw/isa/lpc_ich9: Ignore reserved/invalid SCI IRQ

2020-07-17 Thread Philippe Mathieu-Daudé
libFuzzer triggered the following assertion: cat << EOF | qemu-system-i386 -M pc-q35-5.0 \ -nographic -monitor none -serial none \ -qtest stdio -d guest_errors -trace pci\* outl 0xcf8 0x8400f841 outl 0xcfc 0xebed205d outl 0x5d02 0xedf82049 EOF pci_cfg_write ICH9-LPC 31:0 @0x41

Re: [PATCH v2 03/20] qapi: backup: add x-use-copy-range parameter

2020-07-17 Thread Vladimir Sementsov-Ogievskiy
17.07.2020 16:15, Max Reitz wrote: On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: Add parameter to enable/disable copy_range. Keep current default for now (enabled). Why x-, though? I can’t think of a reason why we would have to remove this. I add some x- arguments in these series:

Re: device compatibility interface for live migration with assigned devices

2020-07-17 Thread Alex Williamson
On Wed, 15 Jul 2020 15:37:19 +0800 Alex Xu wrote: > Alex Williamson 于2020年7月15日周三 上午5:00写道: > > > On Tue, 14 Jul 2020 18:19:46 +0100 > > "Dr. David Alan Gilbert" wrote: > > > > > * Alex Williamson (alex.william...@redhat.com) wrote: > > > > On Tue, 14 Jul 2020 11:21:29 +0100 > > > > Daniel

Re: [PATCH v2 05/20] block/block-copy: implement block_copy_async

2020-07-17 Thread Vladimir Sementsov-Ogievskiy
17.07.2020 17:00, Max Reitz wrote: On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: We'll need async block-copy invocation to use in backup directly. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 13 + block/block-copy.c | 40

[PATCH for-5.1] Makefile: Remove config-devices.mak on "make clean"

2020-07-17 Thread Peter Maydell
The config-devices.mak files are generated by "make", and so they should be deleted by "make clean". (This is different from config-host.mak and config-all-disas.mak, which are created by "configure" and so only deleted by "make distclen".) If we don't delete these files on "make clean", then the

[Bug 1887309] Re: Floating-point exception in ide_set_sector

2020-07-17 Thread Philippe Mathieu-Daudé
Proposed fix: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg05528.html ** Changed in: qemu Status: New => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1887309 Title: F

[Bug 1878642] Re: Assertion failure in pci_bus_get_irq_level

2020-07-17 Thread Philippe Mathieu-Daudé
Proposed fix: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg05564.html ** Changed in: qemu Status: New => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1878642 Title: A

Re: Implement standard file operation with QEMU

2020-07-17 Thread casmac
Hello Phil,    What I want to realize is to be able to call standard file operations (open, read, write etc) in the application program, and execute such programs in QEMU. But I am building under system mode.    TI provide copilation toolchain and a library that provide partial functionality fro

Re: [PATCH for-5.1] Makefile: Remove config-devices.mak on "make clean"

2020-07-17 Thread Philippe Mathieu-Daudé
On 7/17/20 5:25 PM, Peter Maydell wrote: > The config-devices.mak files are generated by "make", and so they > should be deleted by "make clean". > > (This is different from config-host.mak and config-all-disas.mak, > which are created by "configure" and so only deleted by > "make distclen".) typ

Re: [PATCH] gitlab-ci.yml: Add oss-fuzz build tests

2020-07-17 Thread Thomas Huth
On 17/07/2020 15.20, Alexander Bulekov wrote: > On 200717 0951, Thomas Huth wrote: >> On 17/07/2020 07.40, Thomas Huth wrote: [...] >> I think I've got it basically working like this: >> >> build-oss-fuzz: >> <<: *native_build_job_definition >> variables: >> IMAGE: fedora >> script: >>

Re: [RFC PATCH] tcg/cpu-exec: precise single-stepping after an exception

2020-07-17 Thread Richard Henderson
On 7/17/20 4:01 AM, Luc Michel wrote: > I wrote a small test case for the interrupt side that can be run on the > virt board: ... > This is with your fix. Without it, the second stepi stops on 0x284. Awesome, thanks. > Do you want me to send it? If yes, how should I give credit to you? > Should I

Re: Implement standard file operation with QEMU

2020-07-17 Thread Peter Maydell
On Fri, 17 Jul 2020 at 16:28, casmac wrote: >What I want to realize is to be able to call standard file operations > (open, read, write etc) in the application program, and execute such programs > in QEMU. But I am building under system mode. >TI provide copilation toolchain and a librar

Re: [PATCH] e1000e: using bottom half to send packets

2020-07-17 Thread Li Qiang
Jason Wang 于2020年7月17日周五 下午1:39写道: > > > On 2020/7/17 下午12:46, Li Qiang wrote: > > Jason Wang 于2020年7月17日周五 上午11:10写道: > >> > >> On 2020/7/17 上午12:14, Li Qiang wrote: > >>> Alexander Bulekov reported a UAF bug related e1000e packets send. > >>> > >>> -->https://bugs.launchpad.net/qemu/+bug/188636

Re: [PATCH] e1000e: using bottom half to send packets

2020-07-17 Thread Peter Maydell
On Fri, 17 Jul 2020 at 04:11, Jason Wang wrote: > I think several things were missed in this patch (take virtio-net as a > reference), do we need the following things: > > - Cancel the bh when VM is stopped. Similarly, what should we do with the bh when the device is reset ? > - A throttle to pr

Re: [PATCH v3 3/9] vfio: add quirk device write method

2020-07-17 Thread Alex Williamson
On Thu, 16 Jul 2020 18:46:33 +0100 Peter Maydell wrote: > On Tue, 30 Jun 2020 at 13:30, P J P wrote: > > > > From: Prasad J Pandit > > > > Add vfio quirk device mmio write method to avoid NULL pointer > > dereference issue. > > > > Reported-by: Lei Sun > > Reviewed-by: Li Qiang > > Signed-off

Re: [PATCH v3 3/9] vfio: add quirk device write method

2020-07-17 Thread Peter Maydell
On Fri, 17 Jul 2020 at 16:54, Alex Williamson wrote: > > On Thu, 16 Jul 2020 18:46:33 +0100 > Peter Maydell wrote: > > > Alex (Williamson) -- as the vfio maintainer, do you have a view > > on whether we should be logging write accesses to port 0x3c3 > > here as guest-errors or unimplemented-QEMU-

Re: device compatibility interface for live migration with assigned devices

2020-07-17 Thread Alex Williamson
On Thu, 16 Jul 2020 16:32:30 +0800 Yan Zhao wrote: > On Thu, Jul 16, 2020 at 12:16:26PM +0800, Jason Wang wrote: > > > > On 2020/7/14 上午7:29, Yan Zhao wrote: > > > hi folks, > > > we are defining a device migration compatibility interface that helps > > > upper > > > layer stack like openstac

Re: [virtio-comment] [RFC] ivshmem v2: Shared memory device specification

2020-07-17 Thread Jan Kiszka
On 15.07.20 15:27, Stefan Hajnoczi wrote: On Mon, May 25, 2020 at 09:58:28AM +0200, Jan Kiszka wrote: IVSHMEM Device Specification ** NOTE: THIS IS WORK-IN-PROGRESS, NOT YET A STABLE INTERFACE SPECIFICATION! ** Hi Jan, Thanks for posting this! I have a posted comm

Re: [PATCH v3 3/9] vfio: add quirk device write method

2020-07-17 Thread Alex Williamson
On Fri, 17 Jul 2020 16:57:40 +0100 Peter Maydell wrote: > On Fri, 17 Jul 2020 at 16:54, Alex Williamson > wrote: > > > > On Thu, 16 Jul 2020 18:46:33 +0100 > > Peter Maydell wrote: > > > > > Alex (Williamson) -- as the vfio maintainer, do you have a view > > > on whether we should be logging

Re: sysbus_create_simple Vs qdev_create

2020-07-17 Thread Eduardo Habkost
On Fri, Jul 17, 2020 at 07:10:57AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > I'd also note that the use of "parent" in the code is also > > ambiguous. It can mean: > > > > * QOM parent type, i.e. TypeInfo.parent. Related fields: > > * parent_class members of class struct

[PATCH] tcg/cpu-exec: precise single-stepping after an interrupt

2020-07-17 Thread Richard Henderson
When single-stepping with a debugger attached to QEMU, and when an interrupt is raised, the debugger misses the first instruction after the interrupt. Buglink: https://bugs.launchpad.net/qemu/+bug/757702 Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 8 +++- 1 file changed, 7 in

Re: sysbus_create_simple Vs qdev_create

2020-07-17 Thread Daniel P . Berrangé
On Fri, Jul 17, 2020 at 12:23:12PM -0400, Eduardo Habkost wrote: > On Fri, Jul 17, 2020 at 07:10:57AM +0200, Markus Armbruster wrote: > > Eduardo Habkost writes: > > > > > I'd also note that the use of "parent" in the code is also > > > ambiguous. It can mean: > > > > > > * QOM parent type, i.e.

Re: [PATCH] target/i386: floatx80: avoid compound literals in static initializers

2020-07-17 Thread Laszlo Ersek
On 07/17/20 11:26, Laszlo Ersek wrote: > On 07/16/20 17:09, Philippe Mathieu-Daudé wrote: >> On 7/16/20 4:42 PM, Laszlo Ersek wrote: >>> Quoting ISO C99 6.7.8p4, "All the expressions in an initializer for an >>> object that has static storage duration shall be constant expressions or >>> string lit

Re: [PATCH] fuzz: Fix leak when assembling datadir path string

2020-07-17 Thread Thomas Huth
On 17/07/2020 18.35, Alexander Bulekov wrote: > We freed the string containing the final datadir path, but did not free > the path to the executable's directory that we get from > g_path_get_dirname(). Fix that. > > Reported-by: Thomas Huth > Signed-off-by: Alexander Bulekov > --- > > I ran it

[GIT PULL] IPMI updates

2020-07-17 Thread Corey Minyard
The following changes since commit 95d1fbabae0cd44156ac4b96d512d143ca7dfd5e: Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20200716-pull-request' into staging (2020-07-16 18:50:51 +0100) are available in the Git repository at: https://github.com/cminyard/qemu.git tags/for-qemu-ip

[PATCH] fuzz: Fix leak when assembling datadir path string

2020-07-17 Thread Alexander Bulekov
We freed the string containing the final datadir path, but did not free the path to the executable's directory that we get from g_path_get_dirname(). Fix that. Reported-by: Thomas Huth Signed-off-by: Alexander Bulekov --- I ran it with Thomas' fixed build-oss-fuzz job: https://gitlab.com/a1xndr

Re: [PATCH] fuzz: Fix leak when assembling datadir path string

2020-07-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200717163523.1591-1-alx...@bu.edu/ Hi, This series failed the docker-mingw@fedora 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 === #! /bin

Re: [PATCH v6 04/13] hw/arm: Add NPCM730 and NPCM750 SoC models

2020-07-17 Thread Havard Skinnemoen
+Markus Armbruster On Fri, Jul 17, 2020 at 5:20 AM Cédric Le Goater wrote: > > On 7/17/20 8:02 AM, Havard Skinnemoen wrote: > > The Nuvoton NPCM7xx SoC family are used to implement Baseboard > > Management Controllers in servers. While the family includes four SoCs, > > this patch implements limi

Re: [PATCH] fuzz: Fix leak when assembling datadir path string

2020-07-17 Thread Alexander Bulekov
On 200717 1847, Thomas Huth wrote: > On 17/07/2020 18.35, Alexander Bulekov wrote: > > We freed the string containing the final datadir path, but did not free > > the path to the executable's directory that we get from > > g_path_get_dirname(). Fix that. > > > > Reported-by: Thomas Huth > > Signe

Re: Inter-VM device emulation (call on Mon 20th July 2020)

2020-07-17 Thread Stefan Hajnoczi
On Fri, Jul 17, 2020 at 11:58:40AM +0300, Nikos Dragazis wrote: > On 15/7/20 7:44 μ.μ., Alex Bennée wrote: > > > Stefan Hajnoczi writes: > > > > > On Wed, Jul 15, 2020 at 01:28:07PM +0200, Jan Kiszka wrote: > > > > On 15.07.20 13:23, Stefan Hajnoczi wrote: > > > > > Let's have a call to figure o

Re: sysbus_create_simple Vs qdev_create

2020-07-17 Thread Peter Maydell
On Fri, 17 Jul 2020 at 17:32, Daniel P. Berrangé wrote: > Personally I've not seen a problem with the term "parent" in > this scenario. The class inheritance metaphor maps reasonably > clearly to a parent/child metaphor. It's not bad in itself; it's just that it means almost all of our objects ar

[RFC PATCH-for-5.1] hw/ide: Do not block for AIO while resetting a drive

2020-07-17 Thread Philippe Mathieu-Daudé
libFuzzer triggered the following assertion: cat << EOF | qemu-system-i386 -M pc-q35-5.0 \ -nographic -monitor none -serial none \ -qtest stdio -trace ide\* outl 0xcf8 0x8000fa24 outl 0xcfc 0xe106c000 outl 0xcf8 0x8000fa04 outw 0xcfc 0x7 outl 0xcf8 0x8000fb20 write 0x0 0x3 0x

Re: [RFC PATCH-for-5.1] hw/ide: Do not block for AIO while resetting a drive

2020-07-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200717171938.1249-1-f4...@amsat.org/ 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 === #!/b

[PATCH for-5.2] spapr: Simplify error handling in spapr_phb_realize()

2020-07-17 Thread Greg Kurz
The spapr_phb_realize() function has a local_err variable which is used to: 1) check failures of spapr_irq_findone() and spapr_irq_claim() 2) prepend extra information to the error message Recent work from Markus Armbruster highlighted we get better code when testing the return value of a functi

[Bug 1878043] Re: memcpy param-overlap in Slirp ip_stripoptions through e1000e

2020-07-17 Thread Dr. David Alan Gilbert
Created patch and merge request in upstream libslirp: https://gitlab.freedesktop.org/dgilbert/libslirp/-/commit/d620bac888923524f8b8407dbf35f6d2b3b7ddb2 ** Changed in: qemu Assignee: (unassigned) => Dr. David Alan Gilbert (dgilbert-h) ** Changed in: qemu Status: New => In Progress -

Re: [PATCH v1 2/5] semihosting: defer connect_chardevs a little more to use serialx

2020-07-17 Thread Richard Henderson
On 7/17/20 3:51 AM, Alex Bennée wrote: > From: KONRAD Frederic > > With that we can just use -semihosting-config chardev=serial0. > > Signed-off-by: KONRAD Frederic > Message-Id: <1592215252-26742-1-git-send-email-frederic.kon...@adacore.com> > [AJB: tweak commit message] > Signed-off-by: Alex

Re: [PATCH v1 3/5] semihosting: don't send the trailing '\0'

2020-07-17 Thread Richard Henderson
On 7/17/20 3:51 AM, Alex Bennée wrote: > From: KONRAD Frederic > > Don't send the trailing 0 from the string. > > Signed-off-by: KONRAD Frederic > Signed-off-by: Alex Bennée > Reviewed-by: Philippe Mathieu-Daudé > Message-Id: <1592215252-26742-2-git-send-email-frederic.kon...@adacore.com> > -

<    1   2   3   >