Re: [Qemu-devel] [PATCH] make check-unit: use after free in test-opts-visitor

2019-08-01 Thread Markus Armbruster
Andrey Shinkevich writes: > In struct OptsVisitor, repeated_opts member points to a list in the > unprocessed_opts hash table after the list has been destroyed. A > subsequent call to visit_type_int() references the deleted list. It > results in use-after-free issue. Also, the Visitor object call

[Qemu-devel] [RFC PATCH] numa: add auto_enable_numa to fix broken check in spapr

2019-08-01 Thread Tao Xu
Introduce MachineClass::auto_enable_numa for one implicit NUMA node, and enable it to fix broken check in spapr_validate_node_memory(), when spapr_populate_memory() creates a implicit node and info then use nb_numa_nodes which is 0. Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost Signe

Re: [Qemu-devel] [PATCH v5] net: tap: replace snprintf with g_strdup_printf calls

2019-08-01 Thread P J P
+-- On Wed, 31 Jul 2019, Markus Armbruster wrote --+ | However, the code is still rather ugly, and I'd be tempted to use the | opportunity to clean up some more. Untested sketch: Patch v3 did a similar change -> https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg00578.html Thank you. --

Re: [Qemu-devel] [PATCH] migration: always initial RAMBlock.bmap to 1 for new migration

2019-08-01 Thread Ivan Ren
>>- * Here we didn't set RAMBlock.bmap simply because it is already >>- * set in ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION] in >>- * ram_block_add, and that's where we'll sync the dirty bitmaps. >>- * Here setting RAMBlock.bmap would be fine too bu

Re: [Qemu-devel] [PATCH v2] docs/nvdimm: add example on persistent backend setup

2019-08-01 Thread Stefan Hajnoczi
On Thu, Aug 1, 2019 at 1:41 AM Wei Yang wrote: > Persistent backend setup requires some knowledge about nvdimm and ndctl > tool. Some users report they may struggle to gather these knowledge and > have difficulty to setup it properly. > > Here we provide two examples for persistent backend and giv

Re: [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device

2019-08-01 Thread Thomas Huth
On 31/07/2019 17.59, Philippe Mathieu-Daudé wrote: > On Wed, Jul 31, 2019 at 5:55 PM Philippe Mathieu-Daudé > wrote: >> On 7/31/19 1:50 PM, Thomas Huth wrote: >>> On 31/07/2019 13.47, Philippe Mathieu-Daudé wrote: On 7/31/19 9:56 AM, Thomas Huth wrote: > The device is only used by some fe

Re: [Qemu-devel] [PATCH] migration: always initial ram_counters for a new migration

2019-08-01 Thread Ivan Ren
>> s->iteration_start_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME); >>+/* >>+ * Update s->iteration_initial_bytes to match s->iteration_start_time. >>+ */ >>+s->iteration_initial_bytes = migration_total_bytes(s); > >Is this one necessary? We have sent out nothing yet. Yes, cur

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-08-01 Thread Cornelia Huck
On Wed, 31 Jul 2019 15:06:11 -0400 "Michael S. Tsirkin" wrote: > On Wed, Jul 31, 2019 at 03:55:51PM +0200, Cornelia Huck wrote: > > On Tue, 30 Jul 2019 16:18:52 -0400 > > "Michael S. Tsirkin" wrote: > > > Make sure your guests > > > are all up to date in preparation to the day when legacy will

Re: [Qemu-devel] [PATCH-for-4.2 v8 3/9] hw/acpi: Add ACPI Generic Event Device Support

2019-08-01 Thread Shameerali Kolothum Thodi
Hi Igor, > -Original Message- > From: Qemu-devel > [mailto:qemu-devel-bounces+shameerali.kolothum.thodi=huawei.com@nongn > u.org] On Behalf Of Igor Mammedov > Sent: 30 July 2019 16:25 > To: Shameerali Kolothum Thodi > Cc: peter.mayd...@linaro.org; sa...@linux.intel.com; > ard.biesheu...@l

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-08-01 Thread Sergio Lopez
Laszlo Ersek writes: > On 07/29/19 14:57, Sergio Lopez wrote: >> Implement the modern (v2) personality, according to the VirtIO 1.0 >> specification. >> >> Support for v2 among guests is not as widespread as it'd be >> desirable. While the Linux driver has had it for a while, support is >> miss

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-08-01 Thread Linus Walleij
Hi Geert! Thanks for this very interesting patch! On Fri, Jul 5, 2019 at 6:05 PM Geert Uytterhoeven wrote: > GPIO controllers are exported to userspace using /dev/gpiochip* > character devices. Access control to these devices is provided by > standard UNIX file system permissions, on an all-or

[Qemu-devel] [Bug 1838312] Re: Qemu virt-manager Segmentation fault

2019-08-01 Thread Thomas Huth
** No longer affects: qemu -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1838312 Title: Qemu virt-manager Segmentation fault Status in virt-manager package in Ubuntu: Incomplete Bug description

Re: [Qemu-devel] [PATCH 4/5] virtiofsd: drop lo_dirp->fd field

2019-08-01 Thread Stefan Hajnoczi
On Wed, Jul 31, 2019 at 06:27:16PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > fdopendir(3) takes ownership of the file descriptor. The presence of > > the lo_dirp->fd field could lead to someone incorrectly adding a > > close(d->fd) cleanup call in th

Re: [Qemu-devel] [PATCH 5/5] virtiofsd: prevent races with lo_dirp_put()

2019-08-01 Thread Stefan Hajnoczi
On Wed, Jul 31, 2019 at 06:44:52PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > Introduce lo_dirp_put() so that FUSE_RELEASEDIR does not cause > > use-after-free races with other threads that are accessing lo_dirp. > > > > Also make lo_releasedir() atom

Re: [Qemu-devel] [PATCH 1/5] virtiofsd: take lo->mutex around lo_add_fd_mapping()

2019-08-01 Thread Stefan Hajnoczi
On Wed, Jul 31, 2019 at 07:45:38PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > The lo_add_fd_mapping() function assumes lo->mutex is held, so we should > > acquire it. > > > > Signed-off-by: Stefan Hajnoczi > > Thanks, applied > > Would it make sens

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-08-01 Thread Damien Hedde
On 7/31/19 12:17 PM, Christophe de Dinechin wrote: > > Peter Maydell writes: > >> On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: >>> >>> On Tue, 30 Jul 2019 14:44:21 +0100 >>> Peter Maydell wrote: >>> On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: > I'm having a hard time fi

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-08-01 Thread Christophe de Dinechin
> On 1 Aug 2019, at 11:19, Damien Hedde wrote: > > > On 7/31/19 12:17 PM, Christophe de Dinechin wrote: >> >> Peter Maydell writes: >> >>> On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: On Tue, 30 Jul 2019 14:44:21 +0100 Peter Maydell wrote: > On Tue, 30 Jul

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-08-01 Thread Damien Hedde
On 7/31/19 7:46 AM, David Gibson wrote: > On Tue, Jul 30, 2019 at 04:08:59PM +0200, Damien Hedde wrote: >> >> On 7/30/19 3:59 PM, Peter Maydell wrote: >>> On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: On Tue, 30 Jul 2019 14:44:21 +0100 Peter Maydell wrote: > On Tue

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] spapr: quantify error messages regarding capability settings

2019-08-01 Thread Greg Kurz
On Thu, 1 Aug 2019 13:38:19 +1000 Daniel Black wrote: > Its not immediately obvious how cap-X=Y setting need to be applied > to the command line so, for spapr capability error messages, this > has been clarified to: > > ..[try] appending -machine cap-X=Y > > The wrong value messages have bee

[Qemu-devel] [PATCH for-4.1] target/arm: Avoid bogus NSACR traps on M-profile without Security Extension

2019-08-01 Thread Peter Maydell
In Arm v8.0 M-profile CPUs without the Security Extension and also in v7M CPUs, there is no NSACR register. However, the code we have to handle the FPU does not always check whether the ARM_FEATURE_M_SECURITY bit is set before testing whether env->v7m.nsacr permits access to the FPU. This means tha

[Qemu-devel] [Bug 1838475] Re: qemu-system-arm exits when cortex-m4 floating point used and irq occurs

2019-08-01 Thread Peter Maydell
I think this patch should fix this bug: https://patchew.org/QEMU/20190801105742.20036-1-peter.mayd...@linaro.org/ ** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.la

Re: [Qemu-devel] [PATCH 5/5] virtiofsd: prevent races with lo_dirp_put()

2019-08-01 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Jul 31, 2019 at 06:44:52PM +0100, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > Introduce lo_dirp_put() so that FUSE_RELEASEDIR does not cause > > > use-after-free races with other threads that are acc

Re: [Qemu-devel] [PATCH 1/3] block/backup: deal with zero detection

2019-08-01 Thread Max Reitz
On 30.07.19 20:40, John Snow wrote: > > > On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: >> We have detect_zeroes option, so at least for blockdev-backup user >> should define it if zero-detection is needed. For drive-backup leave >> detection enabled by default but do it through existi

Re: [Qemu-devel] [PATCH 1/3] block/backup: deal with zero detection

2019-08-01 Thread Max Reitz
On 30.07.19 18:32, Vladimir Sementsov-Ogievskiy wrote: > We have detect_zeroes option, so at least for blockdev-backup user > should define it if zero-detection is needed. For drive-backup leave > detection enabled by default but do it through existing option instead > of open-coding. > > Signed-o

Re: [Qemu-devel] [PATCH] vhost-vsock: report QMP event when set running

2019-08-01 Thread Eric Blake
On 8/1/19 2:28 AM, Ning Bo wrote: > Report vsock running event so that the upper application can > control boot sequence. > see https://github.com/kata-containers/runtime/pull/1918 > > Signed-off-by: Ning Bo > --- Since this is an update to an earlier version you posted, it is helpful to include

Re: [Qemu-devel] [PATCH 2/3] block/backup: disable copy_range for compressed backup

2019-08-01 Thread Max Reitz
On 30.07.19 18:32, Vladimir Sementsov-Ogievskiy wrote: > Enabled by default copy_range ignores compress option. It's definitely > unexpected for user. > > It's broken since introduction of copy_range usage in backup in > 9ded4a011496. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > bloc

Re: [Qemu-devel] [PATCH 3/3] block/backup: refactor write_flags

2019-08-01 Thread Max Reitz
On 30.07.19 18:32, Vladimir Sementsov-Ogievskiy wrote: > write flags are constant, let's store it in BackupBlockJob instead of > recalculating. It also makes two boolean fields to be unused, so, > drop them. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/backup.c | 24

Re: [Qemu-devel] [PATCH 3/3] block/backup: refactor write_flags

2019-08-01 Thread Max Reitz
On 31.07.19 18:01, Vladimir Sementsov-Ogievskiy wrote: > 30.07.2019 21:28, John Snow wrote: >> >> >> On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: >>> write flags are constant, let's store it in BackupBlockJob instead of >>> recalculating. It also makes two boolean fields to be unused, s

Re: [Qemu-devel] [PATCH 3/3] block/backup: refactor write_flags

2019-08-01 Thread Vladimir Sementsov-Ogievskiy
01.08.2019 14:28, Max Reitz wrote: > On 31.07.19 18:01, Vladimir Sementsov-Ogievskiy wrote: >> 30.07.2019 21:28, John Snow wrote: >>> >>> >>> On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: write flags are constant, let's store it in BackupBlockJob instead of recalculating. It al

Re: [Qemu-devel] [PATCH 3/3] block/backup: refactor write_flags

2019-08-01 Thread Max Reitz
On 01.08.19 13:32, Vladimir Sementsov-Ogievskiy wrote: > 01.08.2019 14:28, Max Reitz wrote: >> On 31.07.19 18:01, Vladimir Sementsov-Ogievskiy wrote: >>> 30.07.2019 21:28, John Snow wrote: On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: > write flags are constant, let's

Re: [Qemu-devel] [PATCH RESEND v8 00/11] Build ACPI Heterogeneous Memory Attribute Table (HMAT)

2019-08-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190731011209.22538-1-tao3...@intel.com/ Hi, This series failed the asan 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/bash make d

Re: [Qemu-devel] [PATCH 1/3] iotests/118: Test media change for scsi-cd

2019-08-01 Thread Max Reitz
On 31.07.19 22:42, Kevin Wolf wrote: > The test covered only floppy and ide-cd. Add scsi-cd as well. > > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/118 | 20 > tests/qemu-iotests/118.out | 4 ++-- > 2 files changed, 22 insertions(+), 2 deletions(-) Reviewed-b

Re: [Qemu-devel] [PATCH 2/5] virtiofsd: take lo->mutex around lo_add_dirp_mapping()

2019-08-01 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > The lo_add_dirp_mapping() function assumes lo->mutex is held, so we > should acquire it. > > Signed-off-by: Stefan Hajnoczi Squashed into: passthrough_ll: add dirp_map to hide lo_dirp pointers > --- > contrib/virtiofsd/passthrough_ll.c | 2 ++ >

Re: [Qemu-devel] [PATCH 2/3] iotests/118: Create test classes dynamically

2019-08-01 Thread Max Reitz
On 31.07.19 22:42, Kevin Wolf wrote: > We're getting a ridiculous number of child classes of > TestInitiallyFilled and TestInitiallyEmpty that differ only in a few > attributes that we want to test in all combinations. > > Instead of explicitly writing down every combination, let's use a loop > an

Re: [Qemu-devel] [PATCH 3/5] virtiofsd: rename inode->refcount to inode->nlookup

2019-08-01 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > This reference counter plays a specific role in the FUSE protocol. It's > not a generic object reference counter and the FUSE kernel code calls it > "nlookup". > > Signed-off-by: Stefan Hajnoczi Reviewed-by: Dr. David Alan Gilbert > --- > con

Re: [Qemu-devel] [PATCH 3/3] block/backup: refactor write_flags

2019-08-01 Thread Vladimir Sementsov-Ogievskiy
01.08.2019 14:37, Max Reitz wrote: > On 01.08.19 13:32, Vladimir Sementsov-Ogievskiy wrote: >> 01.08.2019 14:28, Max Reitz wrote: >>> On 31.07.19 18:01, Vladimir Sementsov-Ogievskiy wrote: 30.07.2019 21:28, John Snow wrote: > > > On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wr

Re: [Qemu-devel] [PATCH 3/3] iotests/118: Add -blockdev based tests

2019-08-01 Thread Max Reitz
On 31.07.19 22:42, Kevin Wolf wrote: > The code path for -device drive= or without a drive=... > option for empty drives, which is supposed to be used with -blockdev > differs enough from the -drive based path with a user-owned > BlockBackend, so we want to test both paths at least for the basic te

Re: [Qemu-devel] [PATCH for-4.2 v10 14/15] virtio-iommu-pci: Add virtio iommu pci support

2019-08-01 Thread Auger Eric
Hi Michael, On 7/30/19 9:35 PM, Michael S. Tsirkin wrote: > On Tue, Jul 30, 2019 at 07:21:36PM +0200, Eric Auger wrote: >> This patch adds virtio-iommu-pci, which is the pci proxy for >> the virtio-iommu device. >> >> Signed-off-by: Eric Auger > > This part I'm not sure we should merge just yet.

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-08-01 Thread Michael S. Tsirkin
On Wed, Jul 31, 2019 at 01:02:13PM +0200, Sergio Lopez wrote: > > Andrea Bolognani writes: > > > On Mon, 2019-07-29 at 14:57 +0200, Sergio Lopez wrote: > > [...] > >> /* virtio-mmio device */ > >> > >> static Property virtio_mmio_properties[] = { > >> DEFINE_PROP_BOOL("format_transport_

Re: [Qemu-devel] [PATCH 3/3] block/backup: refactor write_flags

2019-08-01 Thread Max Reitz
On 01.08.19 14:02, Vladimir Sementsov-Ogievskiy wrote: > 01.08.2019 14:37, Max Reitz wrote: >> On 01.08.19 13:32, Vladimir Sementsov-Ogievskiy wrote: >>> 01.08.2019 14:28, Max Reitz wrote: On 31.07.19 18:01, Vladimir Sementsov-Ogievskiy wrote: > 30.07.2019 21:28, John Snow wrote: >> >>

[Qemu-devel] [PATCH for 4.2 v5 07/15] linux-user: Add support for HDIO_GET_WCACHE and HDIO_SET_WCACHE ioctls

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic Add support for HDIO_GET_WCACHE and HDIO_SET_WCACHE ioctls. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 895ba3

[Qemu-devel] [PATCH for 4.2 v5 02/15] linux-user: Add support for FDMSGON and FDMSGOFF ioctls

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic FDMSGON and FDMSGOFF switch informational messages of floppy drives on and off. Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux

[Qemu-devel] [PATCH for 4.2 v5 01/15] linux user: Add support for FDFLUSH ioctl

2019-08-01 Thread Aleksandar Markovic
From: Yunqiang Su FDFLUSH is used for flushing buffers of floppy drives. Support in QEMU is needed because some of Debian packages use this ioctl while running post-build tests. One such example is 'tar' package. Signed-off-by: Yunqiang Su Signed-off-by: Aleksandar Markovic Reviewed-by: Lauren

[Qemu-devel] [PATCH for 4.2 v5 06/15] linux-user: Add support for HDIO_GET_NICE and HDIO_SET_NICE ioctls

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic Add support for HDIO_GET_NICE and HDIO_SET_NICE ioctls. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 6551938..8

[Qemu-devel] [PATCH for 4.2 v5 12/15] linux-user: Fix support for KDGKBLED and KDSKBLED ioctls

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic Fix support for KDGKBLED and KDSKBLED ioctls. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 2100cf4..ea92eea 100644 --- a/linux-user/io

[Qemu-devel] [PATCH for 4.2 v5 08/15] linux-user: Add support for HDIO_GET_ACOUSTIC and HDIO_SET_ACOUSTIC ioctls

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic Add support for HDIO_GET_ACOUSTIC and HDIO_SET_ACOUSTIC ioctls. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index b5

[Qemu-devel] [PATCH for 4.2 v5 03/15] linux-user: Add support for FDRESET, FDRAWCMD, FDTWADDLE, and FDEJECT ioctls

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic FDRESET, FDRAWCMD, FDTWADDLE, and FDEJECT ioctls are misc commands for controlling a floppy drive. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 4 linux-user/syscall_defs.h | 4 2 files changed, 8 insertions(+) diff --git a/linux-user/

[Qemu-devel] [PATCH for 4.2 v5 00/15] linux-user: Misc patches for 4.2

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic A set of misc linux user patches for 4.2. v4->v5: - added a patch containing support for two additional ioctls - added two patches containing fixes for four additional ioctls v3->v4: - reworked the patch on semtimedop() - added five patches containing support

[Qemu-devel] [PATCH for 4.2 v5 13/15] linux-user: Fix support for KDGETLED and KDSETLED ioctls

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic Fix support for KDGETLED and KDSETLED ioctls. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index ea92eea..7a4e85b 100644 --- a/linux-user/io

[Qemu-devel] [PATCH for 4.2 v5 09/15] linux-user: Add support for HDIO_GET_ADDRESS and HDIO_SET_ADDRESS ioctls

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic Add support for HDIO_GET_ADDRESS and HDIO_SET_ADDRESS ioctls. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index c9b8

[Qemu-devel] [PATCH for 4.2 v5 10/15] linux-user: Add support for HDIO_GET_BUSSTATE and HDIO_SET_BUSSTATE ioctls

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic Add support for HDIO_GET_BUSSTATE and HDIO_SET_BUSSTATE ioctls. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index b9

[Qemu-devel] [PATCH for 4.2 v5 05/15] linux-user: Add support for FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls are commands for controlling error reporting of a floppy drive. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h| 2 ++ linux-user/syscall_defs.h | 19 +++ linux-user/syscall_typ

[Qemu-devel] [PATCH for 4.2 v5 11/15] linux-user: Add support for KDGKBMETA and KDSKBMETA ioctls

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic Add support for KDGKBMETA and KDSKBMETA ioctls. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 3796ee6..2100cf4 1

[Qemu-devel] [PATCH for 4.2 v5 04/15] linux-user: Add support for FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls provide means for controlling formatting of a floppy drive. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h| 3 +++ linux-user/syscall_defs.h | 3 +++ linux-user/syscall_types.h | 5 + 3 files changed, 11

[Qemu-devel] [PATCH for 4.2 v5 14/15] linux-user: Add support for RNDRESEEDCRNG ioctl

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Markovic RNDRESEEDCRNG is a newer ioctl (added in kernel 4.17), and an "ifdef" guard is used for that reason in this patch. Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier --- linux-user/ioctls.h | 3 +++ linux-user/syscall_defs.h | 1 + 2 files changed,

[Qemu-devel] [PATCH for 4.2 v5 15/15] linux-user: Add support for semtimedop() syscall

2019-08-01 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add support for semtimedop() emulation. It is based on invocation of safe_semtimedop(). Conversion is left out of safe_semtimedop(), since other safe_xxx() usually don't contain similar conversions. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic --

Re: [Qemu-devel] [PATCH 3/3] block/backup: refactor write_flags

2019-08-01 Thread Vladimir Sementsov-Ogievskiy
01.08.2019 15:21, Max Reitz wrote: > On 01.08.19 14:02, Vladimir Sementsov-Ogievskiy wrote: >> 01.08.2019 14:37, Max Reitz wrote: >>> On 01.08.19 13:32, Vladimir Sementsov-Ogievskiy wrote: 01.08.2019 14:28, Max Reitz wrote: > On 31.07.19 18:01, Vladimir Sementsov-Ogievskiy wrote: >> 30

[Qemu-devel] [PATCH] vhost-vsock: report QMP event when set running

2019-08-01 Thread Ning Bo
Report vsock running event so that the upper application can control boot sequence. see https://github.com/kata-containers/runtime/pull/1918 Signed-off-by: Ning Bo --- hw/virtio/vhost-vsock.c | 3 +++ qapi/char.json | 22 ++ 2 files changed, 25 insertions(+) diff -

[Qemu-devel] [Bug 1805913] Re: readdir() returns NULL (errno=EOVERFLOW) for 32-bit user-static qemu on 64-bit host

2019-08-01 Thread diddly
After studying linux-user/syscall.c a bit, would it be possible to work around this issue by doing something like the following: Add a new #define EMULATE_GETDENTS64_WITH_GETDENTS, and enable this iff we have getdents, and the target is 32, while the host is 64 bits. Something similar, but complem

Re: [Qemu-devel] [PATCH for-4.2 v10 14/15] virtio-iommu-pci: Add virtio iommu pci support

2019-08-01 Thread Michael S. Tsirkin
On Thu, Aug 01, 2019 at 02:15:03PM +0200, Auger Eric wrote: > Hi Michael, > > On 7/30/19 9:35 PM, Michael S. Tsirkin wrote: > > On Tue, Jul 30, 2019 at 07:21:36PM +0200, Eric Auger wrote: > >> This patch adds virtio-iommu-pci, which is the pci proxy for > >> the virtio-iommu device. > >> > >> Sign

Re: [Qemu-devel] [PATCH v4 04/54] target/arm: remove run time semihosting checks

2019-08-01 Thread Aaron Lindsay OS via Qemu-devel
On Jul 31 17:06, Alex Bennée wrote: > Now we do all our checking and use a common EXCP_SEMIHOST for > semihosting operations we can make helper code a lot simpler. > > Signed-off-by: Alex Bennée > > --- > v2 > - fix re-base conflicts > - hoist EXCP_SEMIHOST check > - comment cleanups > ---

Re: [Qemu-devel] [PATCH v4 04/54] target/arm: remove run time semihosting checks

2019-08-01 Thread Peter Maydell
On Thu, 1 Aug 2019 at 14:27, Aaron Lindsay OS wrote: > > On Jul 31 17:06, Alex Bennée wrote: > > @@ -8371,11 +8315,13 @@ void arm_cpu_do_interrupt(CPUState *cs) > > return; > > } > > > > -/* Semihosting semantics depend on the register width of the > > - * code that caused t

[Qemu-devel] [Bug 1805913] Re: readdir() returns NULL (errno=EOVERFLOW) for 32-bit user-static qemu on 64-bit host

2019-08-01 Thread Peter Maydell
Unfortunately there is no kernel API which we can use on the host to say "give me inodes and offsets which will fit into a 32 bit field". The 'getdents' syscall uses the "unsigned long" type for the d_ino and d_off fields, so on a 64-bit host these will be the same size as the ino64_t and off64_t u

Re: [Qemu-devel] [PATCH for-4.2 v10 14/15] virtio-iommu-pci: Add virtio iommu pci support

2019-08-01 Thread Auger Eric
Hi Michael, On 8/1/19 3:06 PM, Michael S. Tsirkin wrote: > On Thu, Aug 01, 2019 at 02:15:03PM +0200, Auger Eric wrote: >> Hi Michael, >> >> On 7/30/19 9:35 PM, Michael S. Tsirkin wrote: >>> On Tue, Jul 30, 2019 at 07:21:36PM +0200, Eric Auger wrote: This patch adds virtio-iommu-pci, which is

Re: [Qemu-devel] RFC raspberry pi sd-card reset

2019-08-01 Thread Damien Hedde
On 7/31/19 5:45 PM, Philippe Mathieu-Daudé wrote: > On Wed, Jul 31, 2019 at 5:43 PM Philippe Mathieu-Daudé > wrote: >> On 7/31/19 4:21 PM, Damien Hedde wrote: >>> Concerning the reset on the raspi2/3 machine, I ran into an issue with >>> the sd-card. >>> >>> Here follows a subset of the qbus/qde

Re: [Qemu-devel] [PATCH v3 1/9] block: add .bdrv_need_rw_file_child_during_reopen_rw handler

2019-08-01 Thread Vladimir Sementsov-Ogievskiy
31.07.2019 15:09, Max Reitz wrote: > On 25.07.19 11:18, Vladimir Sementsov-Ogievskiy wrote: >> On reopen to rw parent may need rw access to child in .prepare, for >> example qcow2 needs to write IN_USE flags into stored bitmaps >> (currently it is done in a hacky way after commit and don't work). >

Re: [Qemu-devel] [PATCH v4 24/54] plugins: implement helpers for resolving hwaddr

2019-08-01 Thread Aaron Lindsay OS via Qemu-devel
On Jul 31 17:06, Alex Bennée wrote: > We need to keep a local per-cpu copy of the data as other threads may > be running. We use a automatically growing array and re-use the space > for subsequent queries. [...] > +bool tlb_plugin_lookup(CPUState *cpu, target_ulong addr, int mmu_idx, > +

Re: [Qemu-devel] [PATCH] riscv: rv32: Root page table address can be larger than 32-bit

2019-08-01 Thread Richard Henderson
On 7/31/19 6:53 PM, Bin Meng wrote: > I am not sure how (idx * ptesize) could overflow. It represents the > offset by a page table which is [0, 4096). You're right, I mis-read what was going on there. However, lower down, "target_ulong ppn" needs to be promoted to hwaddr, so that ppn = pte >

Re: [Qemu-devel] [Virtio-fs] [PATCH] virtiofsd: fix compile error if 'F_OFD_GETLK' not defined

2019-08-01 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 7/29/19 7:27 PM, piaojun wrote: > > Use F_GETLK for fcntl when F_OFD_GETLK not defined. > > Which system are you hitting this problem on? > > The problem with F_GETLK is that it is NOT as safe as F_OFD_GETLK. > > We already have fcntl_op_getlk and qem

Re: [Qemu-devel] [PATCH v4 00/54] plugins for TCG

2019-08-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190731160719.11396-1-alex.ben...@linaro.org/ Hi, This series failed the asan 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/bash

Re: [Qemu-devel] [PATCH for-4.1] target/arm: Avoid bogus NSACR traps on M-profile without Security Extension

2019-08-01 Thread Damien Hedde
On 8/1/19 12:57 PM, Peter Maydell wrote: > In Arm v8.0 M-profile CPUs without the Security Extension and also in > v7M CPUs, there is no NSACR register. However, the code we have to handle > the FPU does not always check whether the ARM_FEATURE_M_SECURITY bit > is set before testing whether env->

Re: [Qemu-devel] [Virtio-fs] [PATCH] virtiofsd: fix compile error if 'F_OFD_GETLK' not defined

2019-08-01 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Eric Blake (ebl...@redhat.com) wrote: > > On 7/29/19 7:27 PM, piaojun wrote: > > > Use F_GETLK for fcntl when F_OFD_GETLK not defined. > > > > Which system are you hitting this problem on? > > > > The problem with F_GETLK is that it is NOT

Re: [Qemu-devel] [PATCH v4 50/54] tests/plugin: add instruction execution breakdown

2019-08-01 Thread Aaron Lindsay OS via Qemu-devel
On Jul 31 17:07, Alex Bennée wrote: > + * Attempt to measure the amount of vectorisation that has been done > + * on some code by counting classes of instruction. This is very much > + * ARM specific. I suspect some of my plugins will also be architecture-specific. Does it make sense to have a plu

Re: [Qemu-devel] [PATCH for-4.1] target/arm: Avoid bogus NSACR traps on M-profile without Security Extension

2019-08-01 Thread Peter Maydell
On Thu, 1 Aug 2019 at 15:20, Damien Hedde wrote: > > > On 8/1/19 12:57 PM, Peter Maydell wrote: > > In Arm v8.0 M-profile CPUs without the Security Extension and also in > > v7M CPUs, there is no NSACR register. However, the code we have to handle > > the FPU does not always check whether the ARM_

Re: [Qemu-devel] [PATCH v4 04/54] target/arm: remove run time semihosting checks

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > -static inline bool check_for_semihosting(CPUState *cs) > +/* > + * Do semihosting call and set the appropriate return value. All the > + * permission and validity checks have been done at translate time. > + * > + * We only see semihosting exceptions in TCG

Re: [Qemu-devel] [PATCH v4 05/54] includes: remove stale [smp|max]_cpus externs

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > Commit a5e0b3311 removed these in favour of querying machine > properties. Remove the extern declarations as well. > > Signed-off-by: Alex Bennée > Cc: Like Xu > Message-Id: <20190711130546.18578-1-alex.ben...@linaro.org> > --- > include/sysemu/sysemu.h

Re: [Qemu-devel] [PATCH] riscv: rv32: Root page table address can be larger than 32-bit

2019-08-01 Thread Bin Meng
On Thu, Aug 1, 2019 at 10:16 PM Richard Henderson wrote: > > On 7/31/19 6:53 PM, Bin Meng wrote: > > I am not sure how (idx * ptesize) could overflow. It represents the > > offset by a page table which is [0, 4096). > > You're right, I mis-read what was going on there. > > However, lower down, "ta

Re: [Qemu-devel] [PATCH v4 06/54] trace: expand mem_info:size_shift to 4 bits

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > From: "Emilio G. Cota" > > This will allow us to trace 32k-long memory accesses (although our > maximum is something like 256 bytes at the moment). > > Reviewed-by: Alex Bennée > Signed-off-by: Emilio G. Cota > [AJB: expanded to 3->4 bits] > Signed-off-

[Qemu-devel] [PATCH for-4.1 0/2] backup: Copy only dirty areas

2019-08-01 Thread Max Reitz
Hi, In a discussion with Vladimir today, we noticed that the backup job currently is pretty broken when using copy offloading. I don’t know about you, but my local filesystem (XFS) supports copy offloading, so the job uses it automatically. That means, that backup is broken and has been broken f

[Qemu-devel] [PATCH for-4.1 2/2] iotests: Test backup job with two guest writes

2019-08-01 Thread Max Reitz
Perform two guest writes to not yet backed up areas of an image, where the former touches an inner area of the latter. Before HEAD^, copy offloading broke this in two ways: (1) The output differs from the reference output (what the source was before the guest writes). (2) But you will not see

[Qemu-devel] [PATCH for-4.1 1/2] backup: Copy only dirty areas

2019-08-01 Thread Max Reitz
The backup job must only copy areas that the copy_bitmap reports as dirty. This is always the case when using traditional non-offloading backup, because it copies each cluster separately. When offloading the copy operation, we sometimes copy more than one cluster at a time, but we only check whet

[Qemu-devel] [PATCH 1/3] iotests: Move migration helpers to iotests.py

2019-08-01 Thread Kevin Wolf
234 implements functions that are useful for doing migration between two VMs. Move them to iotests.py so that other test cases can use them, too. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/234| 30 +++--- tests/qemu-iotests/iotests.py | 16

[Qemu-devel] [PATCH 2/3] iotests: Enable -d for Python non-unittest tests

2019-08-01 Thread Kevin Wolf
The part of iotests.main() that is related to the implementation of the debug option -d and enables QEMU and QMP logging is not only useful in tests that use the Python unittest framework, but also in tests that work by comparing with a reference output. Factor these parts out into iotests.init()

Re: [Qemu-devel] [PATCH v4 07/54] trace: add mmu_index to mem_info

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > We are going to re-use mem_info later for plugins and will need to > track the mmu_idx for softmmu code. > > [TODO: convert everything to use TCGMemOpIdx?] Probably easier. At the moment, > +#define ATOMIC_MMU_IDX oi this is mis-named. It works because

[Qemu-devel] [PATCH 0/3] iotests: Test migration with filter nodes

2019-08-01 Thread Kevin Wolf
This is the testcase for the copy-on-read fix I merged in a hurry for 4.1.0-rc3. Kevin Wolf (3): iotests: Move migration helpers to iotests.py iotests: Enable -d for Python non-unittest tests iotests: Test migration with all kinds of filter nodes tests/qemu-iotests/194| 1 + tests

[Qemu-devel] [PATCH 3/3] iotests: Test migration with all kinds of filter nodes

2019-08-01 Thread Kevin Wolf
This test case is motivated by commit 2b23f28639 ('block/copy-on-read: Fix permissions for inactive node'). Instead of just testing copy-on-read on migration, let's stack all sorts of filter nodes on top of each other and try if the resulting VM can still migrate successfully. For good measure, put

Re: [Qemu-devel] [PATCH v4 10/54] translate-all: use cpu_in_exclusive_work_context() in tb_flush

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > From: "Emilio G. Cota" > > tb_flush will be called by the plugin module from a safe > work environment. Prepare for that. > > Suggested-by: Alex Bennée > Reviewed-by: Alex Bennée > Signed-off-by: Emilio G. Cota > Signed-off-by: Alex Bennée > --- > ac

Re: [Qemu-devel] [PATCH] vhost-vsock: report QMP event when set running

2019-08-01 Thread Markus Armbruster
Ning Bo writes: > Report vsock running event so that the upper application can > control boot sequence. > see https://github.com/kata-containers/runtime/pull/1918 Please provide a more complete summary of the use case in the commit message. What exactly is the problem? What is the proposed sol

Re: [Qemu-devel] [PATCH v4 09/54] cpu: introduce cpu_in_exclusive_context()

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > From: "Emilio G. Cota" > > Suggested-by: Alex Bennée > Reviewed-by: Alex Bennée > Signed-off-by: Emilio G. Cota > [AJB: moved inside start/end_exclusive fns + cleanup] > Signed-off-by: Alex Bennée > > --- > v4 > - -> cpu_in_exclusive_context > - m

Re: [Qemu-devel] [PATCH v4 12/54] configure: add --enable-plugins (MOVE TO END)

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > This adds the basic boilerplate feature enable option for the build. > We shall expand it later. > > XXX: currently this patch is included at the start of development to > aid with incremental building. It should be moved to the end once the > plugins are f

Re: [Qemu-devel] [PATCH v4 11/54] docs/devel: add plugins.rst design document

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > This is mostly extracted from Emilio's more verbose commit comments > with some additional verbiage from me. > > Signed-off-by: Alex Bennée > > --- > v4 > - some rewording and tweaks > - made non-atomicity of inline ops more explicit > - expanded de

Re: [Qemu-devel] [PATCH for-4.1 1/2] backup: Copy only dirty areas

2019-08-01 Thread Vladimir Sementsov-Ogievskiy
01.08.2019 18:12, Max Reitz wrote: > The backup job must only copy areas that the copy_bitmap reports as > dirty. This is always the case when using traditional non-offloading > backup, because it copies each cluster separately. When offloading the > copy operation, we sometimes copy more than on

Re: [Qemu-devel] [PULL 04/32] target/riscv: Implement riscv_cpu_unassigned_access

2019-08-01 Thread Peter Maydell
On Wed, 3 Jul 2019 at 09:41, Palmer Dabbelt wrote: > > From: Michael Clark > > This patch adds support for the riscv_cpu_unassigned_access call > and will raise a load or store access fault. > > Signed-off-by: Michael Clark > [Changes by AF: > - Squash two patches and rewrite commit message >

Re: [Qemu-devel] [PATCH v4 13/54] plugin: add user-facing API

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > From: "Emilio G. Cota" > > Add the API first to ease review. > > Signed-off-by: Emilio G. Cota > Signed-off-by: Alex Bennée > > --- > v3 > - merge in changes to plugin install/reset/uninstall > - split api file > v4 > - s/is/it/ > - more docstr

Re: [Qemu-devel] [PATCH v4 14/54] plugin: add core code

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > +static inline struct qemu_plugin_insn * qemu_plugin_insn_alloc(void) > +{ > +int i, j; > +struct qemu_plugin_insn *insn = g_new0(struct qemu_plugin_insn, 1); > +insn->data = g_byte_array_sized_new(4); > + > +for (i = 0; i < PLUGIN_N_CB_TYPES

Re: [Qemu-devel] [PATCH for-4.1 2/2] iotests: Test backup job with two guest writes

2019-08-01 Thread Vladimir Sementsov-Ogievskiy
01.08.2019 18:12, Max Reitz wrote: > Perform two guest writes to not yet backed up areas of an image, where > the former touches an inner area of the latter. > > Before HEAD^, copy offloading broke this in two ways: > (1) The output differs from the reference output (what the source was > bef

Re: [Qemu-devel] [PATCH v4 15/54] plugin: add implementation of the api

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > +uint64_t qemu_plugin_hwaddr_to_raddr(const struct qemu_plugin_hwaddr *haddr) > +{ > +#if 0 /* XXX FIXME should be SOFTMMU */ > +ram_addr_t ram_addr; > + > +g_assert(haddr); > +ram_addr = qemu_ram_addr_from_host(haddr); > +if (ram_addr == RAM

Re: [Qemu-devel] [PATCH v4 16/54] queue: add QTAILQ_REMOVE_SEVERAL

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > From: "Emilio G. Cota" > > This is faster than removing elements one by one. > > Will gain a user soon. > > Signed-off-by: Emilio G. Cota > Signed-off-by: Alex Bennée > --- > include/qemu/queue.h | 10 ++ > 1 file changed, 10 insertions(+)

Re: [Qemu-devel] [PATCH v4 16/54] queue: add QTAILQ_REMOVE_SEVERAL

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > From: "Emilio G. Cota" > > This is faster than removing elements one by one. > > Will gain a user soon. > > Signed-off-by: Emilio G. Cota > Signed-off-by: Alex Bennée > --- > include/qemu/queue.h | 10 ++ > 1 file changed, 10 insertions(+) Re

Re: [Qemu-devel] [PATCH for 4.2 v4 0/6] target/mips: Misc patches for 4.2

2019-08-01 Thread Philippe Mathieu-Daudé
Hi Aleksandar, On 7/30/19 9:27 PM, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > This series includes misc MIPS patches intended to be integrated after > 4.1 release. > > Yongbok Kim (4): > target/mips: Add support for DSPRAM > target/mips: Amend CP0 WatchHi register implementa

  1   2   3   >