Re: [PATCH 5/7] pc-bios: s390x: Replace lowcore offsets with pointers in dasd-ipl.c

2020-07-21 Thread Thomas Huth
On 15/07/2020 11.40, Janosch Frank wrote: > Let's replace some more constant offsets with references into the > lowcore for better readability. > > Signed-off-by: Janosch Frank > --- > pc-bios/s390-ccw/dasd-ipl.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git

Re: [PATCH] pc-bios: s390x: Add a comment to the io and external new PSW setup

2020-07-21 Thread Thomas Huth
On 15/07/2020 16.08, Janosch Frank wrote: > Normally they don't need to be set up before waiting for an interrupt > but are set up on boot. The BIOS however might overwrite the lowcore > (and hence the PSWs) when loading a blob into memory and therefore > needs to set up those PSWs more often. > >

Re: Intended purpose of virtio-rng's QOM link "rng"?

2020-07-21 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Mon, Jul 20, 2020 at 05:07:08PM +0200, Markus Armbruster wrote: >> What is the intended purpose of object_property_set_link() in >> >> static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error >> **errp) >> { >> VirtIORngPCI *vrng = VIR

Re: [PATCH 6/7] pc-bios: s390x: Use PSW constants in start.S

2020-07-21 Thread Thomas Huth
On 15/07/2020 11.40, Janosch Frank wrote: > Let's decrease the number of magic numbers. > > Signed-off-by: Janosch Frank > Reviewed-by: Pierre Morel > --- > pc-bios/s390-ccw/s390-arch.h | 25 +++-- > pc-bios/s390-ccw/start.S | 9 + > 2 files changed, 20 insertio

Re: [PATCH 3/7] pc-bios: s390x: Remove unneeded dasd-ipl.c reset psw mask changes

2020-07-21 Thread Thomas Huth
On 20/07/2020 14.16, Janosch Frank wrote: > On 7/20/20 1:45 PM, Thomas Huth wrote: >> On 15/07/2020 11.40, Janosch Frank wrote: >>> jump_to_low_kernel() and the functions that it calls will already or >>> 64 bit addressing into the reset psw mask when executing >>> jump_to_IPL_2() after the diag308

Testing the virtio-vhost-user QEMU patch

2020-07-21 Thread Alyssa Ross
Hi -- I hope it's okay me reaching out like this. I've been trying to test out the virtio-vhost-user implementation that's been posted to this list a couple of times, but have been unable to get it to boot a kernel following the steps listed either on

aarch64: Crash with qemu master when starting Jailhouse

2020-07-21 Thread Jan Kiszka
Hi, I've seen this first a couple of weeks ago, ignored it, but it's still there today with master: Thread 13 "qemu-system-aar" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f90e2ffd700 (LWP 26883)] 0x560ef0bddda7 in get_phys_addr_lpae (env=, address=address@entry=109

[Bug 1886811] Re: systemd complains Failed to enqueue loopback interface start request: Operation not supported

2020-07-21 Thread Bug Watch Updater
** Changed in: qemu (Debian) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1886811 Title: systemd complains Failed to enqueue loopback interface start reque

Re: [PATCH v2 1/3] migration: Add block-bitmap-mapping parameter

2020-07-21 Thread Max Reitz
On 20.07.20 18:31, Vladimir Sementsov-Ogievskiy wrote: > 16.07.2020 16:53, Max Reitz wrote: >> 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

Re: [PATCH v9] qga: add command guest-get-devices for reporting VirtIO devices

2020-07-21 Thread Tomáš Golembiovský
Ping. Can we get this merged finally? Thanks, Tomas On Thu, 9 Jan 2020 13:39:36 +0100 Tomáš Golembiovský wrote: > Add command for reporting devices on Windows guest. The intent is not so > much to report the devices but more importantly the driver (and its > version) that is assigned to t

Re: [PATCH v2 2/3] iotests.py: Add wait_for_runstate()

2020-07-21 Thread Max Reitz
On 20.07.20 18:46, Vladimir Sementsov-Ogievskiy wrote: > 16.07.2020 16:53, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >>   tests/qemu-iotests/iotests.py | 4 >>   1 file changed, 4 insertions(+) >> >> diff --git a/tests/qemu-iotests/iotests.py >> b/tests/qemu-iotests/iotests.py >> ind

[PULL 05/10] docs/fuzz: describe building fuzzers with enable-sanitizers

2020-07-21 Thread Thomas Huth
From: Alexander Bulekov Signed-off-by: Alexander Bulekov Message-Id: <20200706195534.14962-3-alx...@bu.edu> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- docs/devel/fuzzing.txt | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --

[PULL 00/10] qtest / fuzzer patches

2020-07-21 Thread Thomas Huth
Hi Peter, the following changes since commit af3d69058e09bede9900f266a618ed11f76f49f3: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200720' into staging (2020-07-20 15:58:07 +0100) are available in the Git repository at: https://gitlab.com/huth/qemu.git tags/pull-

[PULL 01/10] scripts/oss-fuzz: Limit target list to i386-softmmu

2020-07-21 Thread Thomas Huth
The build.sh script only copies qemu-fuzz-i386 to the destination folder, so we can speed up the compilation step quite a bit by not compiling the other targets here. Signed-off-by: Thomas Huth --- scripts/oss-fuzz/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scri

[PULL 03/10] gitlab-ci.yml: Add oss-fuzz build tests

2020-07-21 Thread Thomas Huth
From: Alexander Bulekov 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 fuzzer vars, but it can catch changes that are not compatible with the th

[PULL 04/10] fuzz: build without AddressSanitizer, by default

2020-07-21 Thread Thomas Huth
From: Alexander Bulekov We already have a nice --enable-sanitizers option to enable AddressSanitizer. There is no reason to duplicate and force this functionality in --enable-fuzzing. In the future, if more sanitizers are added to --enable-sanitizers, it might be impossible to build with both --e

[PULL 02/10] fuzz: Fix leak when assembling datadir path string

2020-07-21 Thread Thomas Huth
From: 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 Message-Id: <20200717163523.1591-1-alx...@bu.edu> Si

[PULL 07/10] docs/fuzz: add instructions for generating a coverage report

2020-07-21 Thread Thomas Huth
From: Alexander Bulekov Signed-off-by: Alexander Bulekov Message-Id: <20200706195534.14962-5-alx...@bu.edu> [thuth: Replaced --enable-sanitizers with --enable-fuzzing] Signed-off-by: Thomas Huth --- docs/devel/fuzzing.txt | 19 +++ 1 file changed, 19 insertions(+) diff --git a

[PULL 06/10] docs/fuzz: add information about useful libFuzzer flags

2020-07-21 Thread Thomas Huth
From: Alexander Bulekov Signed-off-by: Alexander Bulekov Message-Id: <20200706195534.14962-4-alx...@bu.edu> Signed-off-by: Thomas Huth --- docs/devel/fuzzing.txt | 37 + 1 file changed, 37 insertions(+) diff --git a/docs/devel/fuzzing.txt b/docs/devel/fuzzi

[PULL 08/10] MAINTAINERS: Extend the device fuzzing section

2020-07-21 Thread Thomas Huth
The file docs/devel/fuzzing.txt should be in this section, too, and add myself as a reviewer (since I often take the fuzzer patches through the qtest-next tree, I should be notified on patches, too). Message-Id: <20200721053926.17197-1-th...@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS

[PULL 09/10] msf2: Unbreak device-list-properties for "msf-soc"

2020-07-21 Thread Thomas Huth
From: Markus Armbruster Watch this: $ qemu-system-aarch64 -M ast2600-evb -S -display none -qmp stdio {"QMP": {"version": {"qemu": {"micro": 50, "minor": 0, "major": 5}, "package": "v5.0.0-2464-g3a9163af4e"}, "capabilities": ["oob"]}} {"execute": "qmp_capabilities"} {"return": {}

Re: [PATCH-for-5.1] hw/misc/aspeed_sdmc: Fix incorrect memory size

2020-07-21 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 7/20/20 6:07 PM, Cédric Le Goater wrote: >> On 7/20/20 11:58 AM, Philippe Mathieu-Daudé wrote: >>> The SDRAM Memory Controller has a 32-bit address bus, thus >>> supports up to 4 GiB of DRAM. There is a signed to unsigned >>> conversion error with the AST2600 m

[PULL 10/10] hw: Mark nd_table[] misuse in realize methods FIXME

2020-07-21 Thread Thomas Huth
From: Markus Armbruster nd_table[] contains NIC configuration for boards to pick up. Device code has no business looking there. Several devices do it anyway. Two of them already have a suitable FIXME comment: "allwinner-a10" and "msf2-soc". Copy it to the others: "allwinner-h3", "xlnx-versal",

Re: [PATCH-for-5.1] hw/isa/isa-superio: Fix IDE controller realization

2020-07-21 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > When realizing a Super I/O with IDE controller [*], we get: > > qom/object.c:1684: object_property_try_add_child: Assertion > `!child->parent' failed. > Aborted (core dumped) > > This is because the device is already realized when we try to > add the QOM prop

Re: migration: broken snapshot saves appear on s390 when small fields in migration stream removed

2020-07-21 Thread Claudio Fontana
On 7/20/20 8:24 PM, Claudio Fontana wrote: > I have now been able to reproduce this on X86 as well. > > It happens much more rarely, about once every 10 times. > > I will sort out the data and try to make it even more reproducible, then post > my findings in detail. > > Overall I proceeded as f

Re: [PATCH 2/3] exec: posix_madvise usage on SunOS.

2020-07-21 Thread David Hildenbrand
On 20.07.20 21:13, Dr. David Alan Gilbert wrote: > (Copies in Dave Hildenbrand) > > * Peter Maydell (peter.mayd...@linaro.org) wrote: >> On Sat, 18 Jul 2020 at 14:21, David CARLIER wrote: >>> >>> From a9e3cced279ae55a59847ba232f7828bc2479367 Mon Sep 17 00:00:00 2001 >>> From: David Carlier >>> D

Re: [PATCH v2 4/9] prep: add ppc-parity write method

2020-07-21 Thread Philippe Mathieu-Daudé
On 6/29/20 1:22 PM, Li Qiang wrote: > P J P 于2020年6月25日周四 上午3:00写道: >> >> From: Prasad J Pandit >> >> Add ppc-parity mmio write method to avoid NULL pointer dereference >> issue. >> >> Reported-by: Lei Sun >> Signed-off-by: Prasad J Pandit >> --- >> hw/ppc/prep_systemio.c | 8 >> 1 fi

Re: [PATCH] MAINTAINERS: Extend the device fuzzing section

2020-07-21 Thread Stefan Hajnoczi
On Tue, Jul 21, 2020 at 07:39:26AM +0200, Thomas Huth wrote: > The file docs/devel/fuzzing.txt should be in this section, too, and add > myself as a reviewer (since I often take the fuzzer patches through the > qtest-next tree, I should be notified on patches, too). > > Signed-off-by: Thomas Huth

Re: Testing the virtio-vhost-user QEMU patch

2020-07-21 Thread Stefan Hajnoczi
On Tue, Jul 21, 2020 at 07:14:38AM +, Alyssa Ross wrote: > Hi -- I hope it's okay me reaching out like this. > > I've been trying to test out the virtio-vhost-user implementation that's > been posted to this list a couple of times, but have been unable to get > it to boot a kernel following th

Re: [PATCH-for-5.1] hw/nvram/fw_cfg: Let fw_cfg_add_from_generator() return boolean value

2020-07-21 Thread Markus Armbruster
Laszlo Ersek writes: > On 07/20/20 14:35, Philippe Mathieu-Daudé wrote: >> Commits b6d7e9b66f..a43770df5d simplified the error propagation. >> Similarly to commit 6fd5bef10b "qom: Make functions taking Error** >> return bool, not void", let fw_cfg_add_from_generator() return a >> boolean value, n

Re: [PATCH v2 5/9] nvram: add nrf51_soc flash read method

2020-07-21 Thread Philippe Mathieu-Daudé
On 7/21/20 8:47 AM, P J P wrote: > +-- On Thu, 16 Jul 2020, Peter Maydell wrote --+ > | > P J P ���2020���6���25� ��3:01� > | > > +static uint64_t flash_read(void *opaque, hwaddr offset, unsigned size) > | > > +{ > | > > +NRF51NVMState *s = NRF51_NVM(opaque); > | > > + > |

Re: [PATCH v2 3/3] iotests: Test node/bitmap aliases during migration

2020-07-21 Thread Max Reitz
On 20.07.20 20:02, Vladimir Sementsov-Ogievskiy wrote: > 16.07.2020 16:53, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >>   tests/qemu-iotests/300 | 511 + >>   tests/qemu-iotests/300.out |   5 + >>   tests/qemu-iotests/group   |   1 + >>   3 files ch

[PATCH for-5.1] xhci: fix valid.max_access_size to access address registers

2020-07-21 Thread Laurent Vivier
QEMU XHCI advertises AC64 (64-bit addressing) but doesn't allow 64-bit mode access in "runtime" and "operational" MemoryRegionOps. Set the max_access_size based on sizeof(dma_addr_t) as AC64 is set. XHCI specs: "If the xHC supports 64-bit addressing (AC64 = ‘1’), then software should write 64-bit

Re: [PATCH v4 3/8] s390/sclp: rework sclp boundary and length checks

2020-07-21 Thread David Hildenbrand
[...] >>> +switch (code & SCLP_CMD_CODE_MASK) { >>> +default: >>> +if (sccb_max_addr < sccb_boundary) { >>> +return true; >>> +} >>> +} >> >> ^ what is that? >> >> if ((code & SCLP_CMD_CODE_MASK) && sccb_max_addr < sccb_boundary) { >> return true

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

2020-07-21 Thread Max Reitz
On 17.07.20 17:24, Vladimir Sementsov-Ogievskiy wrote: > 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/bloc

Re: [PATCH] MAINTAINERS: Extend the device fuzzing section

2020-07-21 Thread Philippe Mathieu-Daudé
On 7/21/20 7:39 AM, Thomas Huth wrote: > The file docs/devel/fuzzing.txt should be in this section, too, and add > myself as a reviewer (since I often take the fuzzer patches through the > qtest-next tree, I should be notified on patches, too). > > Signed-off-by: Thomas Huth > --- > MAINTAINERS

Re: [PATCH-for-5.1] hw/isa/isa-superio: Fix IDE controller realization

2020-07-21 Thread Philippe Mathieu-Daudé
On 7/21/20 10:15 AM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> When realizing a Super I/O with IDE controller [*], we get: >> >> qom/object.c:1684: object_property_try_add_child: Assertion >> `!child->parent' failed. >> Aborted (core dumped) >> >> This is because the dev

Re: [PATCH for-5.2 1/3] qga/qapi-schema: Document -1 for invalid PCI address fields

2020-07-21 Thread Daniel P . Berrangé
On Mon, Jul 20, 2020 at 01:01:31PM +0200, Thomas Huth wrote: > The "guest-get-fsinfo" could also be used for non-PCI devices in the > future. And the code in GuestPCIAddress() in qga/commands-win32.c seems > to be using "-1" for fields that it can not determine already. Thus > let's properly docume

Re: [PATCH for-5.2 2/3] qga/commands-posix: Rework build_guest_fsinfo_for_real_device() function

2020-07-21 Thread Daniel P . Berrangé
On Mon, Jul 20, 2020 at 01:01:32PM +0200, Thomas Huth wrote: > We are going to support non-PCI devices soon. For this we need to split > the generic GuestDiskAddress and GuestDiskAddressList memory allocation > and chaining into a separate function first. > > Signed-off-by: Thomas Huth > --- > q

[RFC PATCH-for-5.1?] tests/tcg/multiarch/linux-test: Skip test if nanosleep missing (Travis)

2020-07-21 Thread Philippe Mathieu-Daudé
The time test sometimes fails on Travis-CI [*]: TESTlinux-test on aarch64 tests/tcg/multiarch/linux-test.c:237: nanosleep make[2]: *** [run-linux-test] Error 1 make: *** [run-tcg-tests-aarch64-linux-user] Error 2 As this seems due to a container limitation on Travis-CI, simply skip

Re: [PATCH] i386/kvm: correct the meaning of '0xffffffff' value for hv-spinlocks

2020-07-21 Thread Vitaly Kuznetsov
Eduardo Habkost writes: > On Fri, May 15, 2020 at 01:48:47PM +0200, Vitaly Kuznetsov wrote: >> Hyper-V TLFS prior to version 6.0 had a mistake in it: special value >> '0x' for CPUID 0x4004.EBX was called 'never to retry', this >> looked weird (like why it's not '0' which supposedly ha

Re: [PATCH for-5.2 3/3] qga/commands-posix: Move the udev code from the pci to the generic function

2020-07-21 Thread Daniel P . Berrangé
On Mon, Jul 20, 2020 at 01:01:33PM +0200, Thomas Huth wrote: > The libudev-related code is independent from the other pci-related code > and can be re-used for non-pci devices (like ccw devices on s390x). Thus > move this part to the generic function. > > Buglink: https://bugzilla.redhat.com/show_

Re: [PATCH-for-5.1] hw/misc/aspeed_sdmc: Fix incorrect memory size

2020-07-21 Thread Philippe Mathieu-Daudé
On 7/21/20 10:13 AM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> On 7/20/20 6:07 PM, Cédric Le Goater wrote: >>> On 7/20/20 11:58 AM, Philippe Mathieu-Daudé wrote: The SDRAM Memory Controller has a 32-bit address bus, thus supports up to 4 GiB of DRAM. There is a sign

Re: [PATCH for-5.1] xhci: fix valid.max_access_size to access address registers

2020-07-21 Thread Philippe Mathieu-Daudé
On 7/21/20 10:33 AM, Laurent Vivier wrote: > QEMU XHCI advertises AC64 (64-bit addressing) but doesn't allow > 64-bit mode access in "runtime" and "operational" MemoryRegionOps. > > Set the max_access_size based on sizeof(dma_addr_t) as AC64 is set. > > XHCI specs: > "If the xHC supports 64-bit a

Re: aarch64: Crash with qemu master when starting Jailhouse

2020-07-21 Thread Peter Maydell
On Tue, 21 Jul 2020 at 08:22, Jan Kiszka wrote: > > Hi, > > I've seen this first a couple of weeks ago, ignored it, but it's still there > today with master: Richard, this looks like an issue with your recent rearrangement of the cacheattrs handling: we get into get_phys_addr_lpae() with a NULL

Re: [PATCH 2/3] exec: posix_madvise usage on SunOS.

2020-07-21 Thread Peter Maydell
On Tue, 21 Jul 2020 at 09:22, David Hildenbrand wrote: > virtio-mem depends on Linux (hw/virtio/Kconfig). I guess > userfaultfd/postcopy is also not relevant in the context of SunOS. So > what remains is virtio-balloon. > > virito-balloon ideally wants to discard the actual mapped pages to free >

Re: [PATCH 2/3] exec: posix_madvise usage on SunOS.

2020-07-21 Thread David Hildenbrand
On 21.07.20 11:31, Peter Maydell wrote: > On Tue, 21 Jul 2020 at 09:22, David Hildenbrand wrote: >> virtio-mem depends on Linux (hw/virtio/Kconfig). I guess >> userfaultfd/postcopy is also not relevant in the context of SunOS. So >> what remains is virtio-balloon. >> >> virito-balloon ideally want

Re: [PATCH v2 5/9] nvram: add nrf51_soc flash read method

2020-07-21 Thread P J P
+-- On Tue, 21 Jul 2020, Philippe Mathieu-Daudé wrote --+ | On 7/21/20 8:47 AM, P J P wrote: | > +-- On Thu, 16 Jul 2020, Peter Maydell wrote --+ | > | > The 'flash_ops' is for ROM, though I don't see where it calls | > | > 'memory_region_rom_device_set_romd' to ROMD, so this MR is in MMIO | > |

Re: [PATCH-for-5.1] hw/misc/aspeed_sdmc: Fix incorrect memory size

2020-07-21 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 7/21/20 10:13 AM, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> On 7/20/20 6:07 PM, Cédric Le Goater wrote: On 7/20/20 11:58 AM, Philippe Mathieu-Daudé wrote: > The SDRAM Memory Controller has a 32-bit address bus, thus > supp

Re: [PATCH-for-5.1] hw/isa/isa-superio: Fix IDE controller realization

2020-07-21 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 7/21/20 10:15 AM, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> When realizing a Super I/O with IDE controller [*], we get: >>> >>> qom/object.c:1684: object_property_try_add_child: Assertion >>> `!child->parent' failed. >>> Aborted (

Re: [PATCH for-5.1] block: fix bdrv_aio_cancel() for ENOMEDIUM requests

2020-07-21 Thread Max Reitz
On 20.07.20 12:01, Stefan Hajnoczi wrote: > bdrv_aio_cancel() calls aio_poll() on the AioContext for the given I/O > request until it has completed. ENOMEDIUM requests are special because > there is no BlockDriverState when the drive has no medium! > > Define a .get_aio_context() function for BlkA

Re: [PATCH 2/3] hw/arm/virt: Move kvm pmu setup to virt_cpu_post_init

2020-07-21 Thread Peter Maydell
On Sat, 11 Jul 2020 at 11:10, Andrew Jones wrote: > > Move the KVM PMU setup part of fdt_add_pmu_nodes() to > virt_cpu_post_init(), which is a more appropriate location. Now > fdt_add_pmu_nodes() is also named more appropriately, because it > no longer does anything but fdt node creation. > > No f

Re: [PATCH 1/3] hw/arm/virt: Move post cpu realize check into its own function

2020-07-21 Thread Peter Maydell
On Sat, 11 Jul 2020 at 11:10, Andrew Jones wrote: > > We'll add more to this new function in coming patches so we also > state the gic must be created and call it below create_gic(). > > No functional change intended. > > Signed-off-by: Andrew Jones > --- > hw/arm/virt.c | 43 +++

Re: [PATCH for-5.1 1/2] qcow2: Implement v2 zero writes with discard if possible

2020-07-21 Thread Max Reitz
On 20.07.20 15:18, Kevin Wolf wrote: > qcow2 version 2 images don't support the zero flag for clusters, so for > write_zeroes requests, we return -ENOTSUP and get explicit zero buffer > writes. If the image doesn't have a backing file, we can do better: Just > discard the respective clusters. > >

Re: [PATCH for-5.1 2/2] iotests: Test sparseness for qemu-img convert -n

2020-07-21 Thread Max Reitz
On 20.07.20 15:18, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/122 | 34 ++ > tests/qemu-iotests/122.out | 17 + > 2 files changed, 51 insertions(+) > > diff --git a/tests/qemu-iotests/122 b/tests/qemu-iotests/122 >

Re: [PATCH for-5.1] xhci: fix valid.max_access_size to access address registers

2020-07-21 Thread Laurent Vivier
On 21/07/2020 11:17, Philippe Mathieu-Daudé wrote: > On 7/21/20 10:33 AM, Laurent Vivier wrote: >> QEMU XHCI advertises AC64 (64-bit addressing) but doesn't allow >> 64-bit mode access in "runtime" and "operational" MemoryRegionOps. >> >> Set the max_access_size based on sizeof(dma_addr_t) as AC64

[PATCH 1/1] s390x/protvirt: allow to IPL secure execution guests with -no-reboot

2020-07-21 Thread Christian Borntraeger
Right now -no-reboot does prevent secure execution guests from running. This is right from an implementation aspect, as we have modeled the transition from non-secure to secure as a program directed IPL. >From a user perspective, this is not the behavior of least surprise. We should implement the

Re: [PATCH 3/3] hw/arm/virt: Implement kvm-steal-time

2020-07-21 Thread Peter Maydell
On Sat, 11 Jul 2020 at 11:10, Andrew Jones wrote: > > We add the kvm-steal-time CPU property and implement it for machvirt. > A tiny bit of refactoring was also done to allow pmu and pvtime to > use the same vcpu device helper functions. > > Signed-off-by: Andrew Jones > --- > docs/system/arm/cp

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

2020-07-21 Thread Alex Bennée
Stefan Hajnoczi writes: > Thank you everyone who joined! > > I didn't take notes but two things stood out: > > 1. The ivshmem v2 and virtio-vhost-user use cases are quite different > so combining them does not seem realistic. ivshmem v2 needs to be as > simple for the hypervisor to implement as

Re: Memory leak in bitmap code?

2020-07-21 Thread Stefan Hajnoczi
On Mon, Jul 20, 2020 at 10:50:23AM +0300, Vladimir Sementsov-Ogievskiy wrote: > 20.07.2020 09:16, Thomas Huth wrote: > > > > Hi, > > > > looks like the LeakSanitizer spotted a memory leak in the bitmap related > > code ... not sure why it just triggered with Richard's pull request, and > > I ca

Re: [PATCH 1/1] s390x/protvirt: allow to IPL secure execution guests with -no-reboot

2020-07-21 Thread Viktor Mihajlovski
On 7/21/20 12:32 PM, Christian Borntraeger wrote: Right now -no-reboot does prevent secure execution guests from running. This is right from an implementation aspect, as we have modeled the transition from non-secure to secure as a program directed IPL. From a user perspective, this is not th

Re: [PATCH 1/1] s390x/protvirt: allow to IPL secure execution guests with -no-reboot

2020-07-21 Thread David Hildenbrand
On 21.07.20 12:32, Christian Borntraeger wrote: > Right now -no-reboot does prevent secure execution guests from running. > This is right from an implementation aspect, as we have modeled the > transition from non-secure to secure as a program directed IPL. > From a user perspective, this is not th

Re: [PATCH for-5.1 2/2] iotests: Test sparseness for qemu-img convert -n

2020-07-21 Thread Kevin Wolf
Am 21.07.2020 um 12:19 hat Max Reitz geschrieben: > On 20.07.20 15:18, Kevin Wolf wrote: > > Signed-off-by: Kevin Wolf > > --- > > tests/qemu-iotests/122 | 34 ++ > > tests/qemu-iotests/122.out | 17 + > > 2 files changed, 51 insertions(+) > >

Re: [PATCH for-5.1 2/2] iotests: Test sparseness for qemu-img convert -n

2020-07-21 Thread Max Reitz
On 21.07.20 13:20, Kevin Wolf wrote: > Am 21.07.2020 um 12:19 hat Max Reitz geschrieben: >> On 20.07.20 15:18, Kevin Wolf wrote: >>> Signed-off-by: Kevin Wolf >>> --- >>> tests/qemu-iotests/122 | 34 ++ >>> tests/qemu-iotests/122.out | 17 + >>>

Re: [PATCH v9] qga: add command guest-get-devices for reporting VirtIO devices

2020-07-21 Thread Marc-André Lureau
Hi On Tue, Jul 21, 2020 at 12:03 PM Tomáš Golembiovský wrote: > Ping. Can we get this merged finally? > We missed the feature deadline by a week: https://wiki.qemu.org/Planning/5.1 > Thanks, > > Tomas > > On Thu, 9 Jan 2020 13:39:36 +0100 > Tomáš Golembiovský wrote: > > > Add command fo

Re: [RFC PATCH-for-5.1?] tests/tcg/multiarch/linux-test: Skip test if nanosleep missing (Travis)

2020-07-21 Thread Laurent Vivier
Le 21/07/2020 à 10:57, Philippe Mathieu-Daudé a écrit : > The time test sometimes fails on Travis-CI [*]: > > TESTlinux-test on aarch64 > tests/tcg/multiarch/linux-test.c:237: nanosleep > make[2]: *** [run-linux-test] Error 1 > make: *** [run-tcg-tests-aarch64-linux-user] Error 2 >

Re: [PATCH v9] qga: add command guest-get-devices for reporting VirtIO devices

2020-07-21 Thread Daniel P . Berrangé
On Tue, Jul 21, 2020 at 03:31:52PM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Jul 21, 2020 at 12:03 PM Tomáš Golembiovský > wrote: > > > Ping. Can we get this merged finally? > > > > We missed the feature deadline by a week: > https://wiki.qemu.org/Planning/5.1 Note, if a patch series fr

Re: [PATCH v7 30/47] block: Report data child for query-blockstats

2020-07-21 Thread Andrey Shinkevich
On 25.06.2020 18:21, Max Reitz wrote: It makes no sense to report the block stats of a purely metadata-storing child in query-blockstats. So if the primary child does not have any data, try to find a unique data-storing child. Signed-off-by: Max Reitz --- block/qapi.c | 31 ++

[PULL 0/3] Block patches for 5.1

2020-07-21 Thread Max Reitz
The following changes since commit af3d69058e09bede9900f266a618ed11f76f49f3: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200720' into staging (2020-07-20 15:58:07 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git tags/pull-block-202

[PULL 3/3] block: fix bdrv_aio_cancel() for ENOMEDIUM requests

2020-07-21 Thread Max Reitz
From: Stefan Hajnoczi bdrv_aio_cancel() calls aio_poll() on the AioContext for the given I/O request until it has completed. ENOMEDIUM requests are special because there is no BlockDriverState when the drive has no medium! Define a .get_aio_context() function for BlkAioEmAIOCB requests so that b

[PULL 2/3] qemu-iotests: add testcase for bz #1857490

2020-07-21 Thread Max Reitz
From: Maxim Levitsky Test that we can't write-share raw luks images by default, but we still can with share-rw=on Signed-off-by: Maxim Levitsky Message-Id: <20200719122059.59843-3-mlevi...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/296 | 44 +++

[PULL 1/3] block/crypto: disallow write sharing by default

2020-07-21 Thread Max Reitz
From: Maxim Levitsky My commit 'block/crypto: implement the encryption key management' accidently allowed raw luks images to be shared between different qemu processes without share-rw=on explicit override. Fix that. Fixes: bbfdae91fb ("block/crypto: implement the encryption key management") Bug

Re: [PATCH] MAINTAINERS: Extend the device fuzzing section

2020-07-21 Thread Alexander Bulekov
On 200721 0739, Thomas Huth wrote: > The file docs/devel/fuzzing.txt should be in this section, too, and add > myself as a reviewer (since I often take the fuzzer patches through the > qtest-next tree, I should be notified on patches, too). > > Signed-off-by: Thomas Huth Reviewed-by: Alexander B

Re: [REPORT] [GSoC - TCG Continuous Benchmarking] [#5] Finding Commits Affecting QEMU Performance

2020-07-21 Thread Alex Bennée
Ahmed Karaman writes: > Hi, > > The fifth report of the TCG Continuous Benchmarking project concludes > a mini-series of three reports that dealt with the performance > comparison and analysis of QEMU 5.0 and 5.1-pre-soft-freeze. > > The report presents a new Python script that utilizes "git bi

Re: [PATCH v1] migration: tls: unref creds after used

2020-07-21 Thread Daniel P . Berrangé
On Fri, Jul 17, 2020 at 05:19:43PM +0800, Zhenyu Ye wrote: > We add the reference of creds in migration_tls_get_creds(), > but there was no place to unref it. So the OBJECT(creds) will > never be freed and result in memory leak. > > Unref the creds after creating the tls-channel server/client. >

Re: Memory leak in bitmap code?

2020-07-21 Thread Stefan Hajnoczi
On Mon, Jul 20, 2020 at 10:50:23AM +0300, Vladimir Sementsov-Ogievskiy wrote: > 20.07.2020 09:16, Thomas Huth wrote: > > > > Hi, > > > > looks like the LeakSanitizer spotted a memory leak in the bitmap related > > code ... not sure why it just triggered with Richard's pull request, and > > I ca

[PATCH] virtio: Drop broken and superfluous object_property_set_link()

2020-07-21 Thread Markus Armbruster
virtio_crypto_pci_realize() and copies the value of vcrypto->vdev's property "cryptodev" to vcrypto's property: object_property_set_link(OBJECT(vrng), "rng", OBJECT(vrng->vdev.conf.rng), NULL); Since it does so only after realize, this always fails, but the error

[Bug 1886362] Re: Heap use-after-free in lduw_he_p through e1000e_write_to_rx_buffers

2020-07-21 Thread P J P
Another reproducer: (just to record) cat << EOF | ./i386-softmmu/qemu-system-i386 -M pc-q35-5.0 \ -netdev user,id=qtest-bn0 -device e1000e,netdev=qtest-bn0 \ -display none -nodefaults -nographic -qtest stdio outl 0xcf8 0x8810 outl 0xcfc 0xe000 outl 0xcf8 0x8804 outw 0xcfc 0x7 write 0xe

Re: [PATCH] virtio: Drop broken and superfluous object_property_set_link()

2020-07-21 Thread Philippe Mathieu-Daudé
On 7/21/20 2:11 PM, Markus Armbruster wrote: Is there a line missing here? > virtio_crypto_pci_realize() and copies the value of vcrypto->vdev's ^^^ > property "cryptodev" to vcrypto's property: > > object_property_set_link(OBJECT(vrng), "rng", OBJECT(vrng->vd

Re: [RFC PATCH-for-5.1?] tests/tcg/multiarch/linux-test: Skip test if nanosleep missing (Travis)

2020-07-21 Thread Laurent Vivier
Le 21/07/2020 à 13:38, Laurent Vivier a écrit : > Le 21/07/2020 à 10:57, Philippe Mathieu-Daudé a écrit : >> The time test sometimes fails on Travis-CI [*]: >> >> TESTlinux-test on aarch64 >> tests/tcg/multiarch/linux-test.c:237: nanosleep >> make[2]: *** [run-linux-test] Error 1 >> m

Re: [PATCH 1/1] s390x/protvirt: allow to IPL secure execution guests with -no-reboot

2020-07-21 Thread Janosch Frank
On 7/21/20 12:32 PM, Christian Borntraeger wrote: > Right now -no-reboot does prevent secure execution guests from running. s/-no-reboot/--no-reboot/ > This is right from an implementation aspect, as we have modeled the > transition from non-secure to secure as a program directed IPL. s/secure/p

Re: [RFC PATCH-not-for-5.1? v2] hw/isa/isa-bus: Ensure ISA I/O regions are 8/16-bit accessible

2020-07-21 Thread Philippe Mathieu-Daudé
On 7/20/20 9:45 PM, Michael Tokarev wrote: > 20.07.2020 21:57, Philippe Mathieu-Daudé пишет: >> Since commit 5d971f9e67 we don't accept mismatching sizes >> in memory_region_access_valid(). This gives troubles when >> a device is on an ISA bus, because the CPU is free to use >> 8/16-bit accesses on

Re: [PATCH v7 31/47] block: Use child access functions for QAPI queries

2020-07-21 Thread Andrey Shinkevich
On 25.06.2020 18:21, Max Reitz wrote: query-block, query-named-block-nodes, and query-blockstats now return any filtered child under "backing", not just bs->backing or COW children. This is so that filters do not interrupt the reported backing chain. This changes the output for iotest 184, as t

[RFC PATCH-for-5.1? v3 1/2] memory: Allow monkey-patching MemoryRegion access sizes

2020-07-21 Thread Philippe Mathieu-Daudé
To fixes CVE-2020-13754, commit 5d971f9e67 refuses mismatching sizes in memory_region_access_valid(). This gives troubles when a device is on an ISA bus, because the CPU is free to use 8/16-bit accesses on the bus (or up to 32-bit on EISA bus), regardless what range is valid for the device. To all

[RFC PATCH-for-5.1? v3 0/2] hw/isa: Allow 8/16/32 bit access on ISA bus after CVE-2020-13754 fix

2020-07-21 Thread Philippe Mathieu-Daudé
Surgical attempt to fix the issue, as we are in freeze... If such kludge is tolerable, it must be reverted first thing after release. Fixes: - https://lore.kernel.org/xen-devel/20200630170913.123646-1-anthony.per...@citrix.com/T/ - https://bugs.debian.org/964793 - https://bugs.debian.org/cgi-bin

Re: [Bug 1886362] [NEW] Heap use-after-free in lduw_he_p through e1000e_write_to_rx_buffers

2020-07-21 Thread Peter Maydell
On Wed, 15 Jul 2020 at 09:36, Jason Wang wrote: > I think the point is to make DMA to MMIO work as real hardware. I wouldn't care to give a 100% guarantee that asking a real h/w device to DMA to itself didn't cause it to misbehave :-) It's more likely to happen-to-work because the DMA engine bit

Re: [PATCH 1/1] s390x/protvirt: allow to IPL secure execution guests with -no-reboot

2020-07-21 Thread Christian Borntraeger
On 21.07.20 14:25, Janosch Frank wrote: > On 7/21/20 12:32 PM, Christian Borntraeger wrote: >> Right now -no-reboot does prevent secure execution guests from running. > > s/-no-reboot/--no-reboot/ Actually qemu --help gives the parameters with just one "-" Not sure about secure vs protected.

Re: [RFC PATCH-for-5.1? v3 1/2] memory: Allow monkey-patching MemoryRegion access sizes

2020-07-21 Thread Peter Maydell
On Tue, 21 Jul 2020 at 13:31, Philippe Mathieu-Daudé wrote: > > To fixes CVE-2020-13754, commit 5d971f9e67 refuses mismatching > sizes in memory_region_access_valid(). This gives troubles when > a device is on an ISA bus, because the CPU is free to use > 8/16-bit accesses on the bus (or up to 32-b

[RFC PATCH-for-5.1? v3 2/2] hw/isa/isa-bus: Ensure ISA I/O regions are 8/16/32-bit accessible

2020-07-21 Thread Philippe Mathieu-Daudé
Since commit 5d971f9e67 we don't accept mismatching sizes in memory_region_access_valid(). This gives troubles when a device is on an ISA bus, because the CPU is free to use 8/16-bit accesses on the bus (or up to 32-bit on EISA bus), regardless what range is valid for the device. Monkey-patch the

Re: [PATCH v2 1/4] scripts/tracetool: Fix dtrace generation for macOS

2020-07-21 Thread Stefan Hajnoczi
On Fri, Jul 17, 2020 at 12:35:14PM +0300, Roman Bolshakov wrote: > dtrace USDT is fully supported since OS X 10.6. There are a few > peculiarities compared to other dtrace flavors. > > 1. It doesn't accept empty files. > 2. It doesn't recognize bool type but accepts C99 _Bool. > 3. It converts int

Re: [PATCH v2 2/4] scripts/tracetool: Use void pointer for vcpu

2020-07-21 Thread Stefan Hajnoczi
On Fri, Jul 17, 2020 at 12:35:15PM +0300, Roman Bolshakov wrote: > dtrace on macOS complains that CPUState * is used for a few probes: > > dtrace: failed to compile script trace-dtrace-root.dtrace: line 130: syntax > error near "CPUState" > > A comment in scripts/tracetool/__init__.py mentions

Re: [RFC PATCH-for-5.1?] tests/tcg/multiarch/linux-test: Skip test if nanosleep missing (Travis)

2020-07-21 Thread Alex Bennée
Laurent Vivier writes: > Le 21/07/2020 à 10:57, Philippe Mathieu-Daudé a écrit : >> The time test sometimes fails on Travis-CI [*]: >> >> TESTlinux-test on aarch64 >> tests/tcg/multiarch/linux-test.c:237: nanosleep >> make[2]: *** [run-linux-test] Error 1 >> make: *** [run-tcg-te

Re: [PATCH v2 0/4] Add dtrace support on macOS

2020-07-21 Thread Stefan Hajnoczi
On Fri, Jul 17, 2020 at 12:35:13PM +0300, Roman Bolshakov wrote: > Hi, > > This is a small series that enables dtrace tracing backend on macOS. > Whether or not it should go to 5.1 is up to discretion of tracing > maintainers. Thanks for the patches. I would like to apply them for QEMU 5.2. I ha

Re: [PATCH v2 3/4] build: Don't make object files for dtrace on macOS

2020-07-21 Thread Stefan Hajnoczi
On Fri, Jul 17, 2020 at 12:35:16PM +0300, Roman Bolshakov wrote: > dtrace on macOS uses unresolved symbols with a special prefix to define > probes [1], only headers should be generated for USDT (dtrace(1)). But > it doesn't support backwards compatible no-op -G flag [2] and implicit > build rules

Re: [RFC PATCH-for-5.1? v3 1/2] memory: Allow monkey-patching MemoryRegion access sizes

2020-07-21 Thread Philippe Mathieu-Daudé
On 7/21/20 2:33 PM, Peter Maydell wrote: > On Tue, 21 Jul 2020 at 13:31, Philippe Mathieu-Daudé wrote: >> >> To fixes CVE-2020-13754, commit 5d971f9e67 refuses mismatching >> sizes in memory_region_access_valid(). This gives troubles when >> a device is on an ISA bus, because the CPU is free to us

Re: [PATCH for-5.1] qapi: Fix visit_type_STRUCT() not to fail for null object

2020-07-21 Thread Markus Armbruster
Li Qiang writes: > Markus Armbruster 于2020年7月16日周四 下午11:07写道: >> >> To make deallocating partially constructed objects work, the >> visit_type_STRUCT() need to succeed without doing anything when passed >> a null object. >> >> Commit cdd2b228b9 "qapi: Smooth visitor error checking in generated >

[PATCH v3 0/3] Fix some PMP implementation

2020-07-21 Thread Zong Li
This patch set contains the fixes for wrong index of pmpcfg CSR on rv64, and the pmp range in CSR function table. After 3rd version of this patch series, we also fix the PMP wrong checking problem. Changed in v3: - Refine the implementation. Suggested by Bin Meng. - Add fix for PMP wrong checkin

[PATCH v3 1/3] target/riscv: Fix the range of pmpcfg of CSR funcion table

2020-07-21 Thread Zong Li
The range of Physical Memory Protection should be from CSR_PMPCFG0 to CSR_PMPCFG3, not to CSR_PMPADDR9. Signed-off-by: Zong Li Reviewed-by: Alistair Francis Reviewed-by: Bin Meng --- target/riscv/csr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/csr.c b/tar

[PATCH v3 2/3] target/riscv/pmp.c: Fix the index offset on RV64

2020-07-21 Thread Zong Li
On RV64, the reg_index is 2 (pmpcfg2 CSR) after the seventh pmp entry, it is not 1 (pmpcfg1 CSR) like RV32. In the original implementation, the second parameter of pmp_write_cfg is "reg_index * sizeof(target_ulong)", and we get the the result which is started from 16 if reg_index is 2, but we expec

[PATCH v3 3/3] target/riscv: Fix the translation of physical address

2020-07-21 Thread Zong Li
The real physical address should add the 12 bits page offset. It also causes the PMP wrong checking due to the minimum granularity of PMP is 4 byte, but we always get the physical address which is 4KB alignment, that means, we always use the start address of the page to check PMP for all addresses

  1   2   3   >