Re: [PATCH v2 0/6] target/ppc: Various clean-up and fixes for radix64

2020-05-14 Thread Greg Kurz
On Thu, 14 May 2020 16:52:49 +1000 David Gibson wrote: > On Thu, May 14, 2020 at 12:56:42AM +0200, Greg Kurz wrote: > > First three patches of this series are simple cleanups. The other > > ones fix some regressions introduced by Cedric's recent addition > > of partition-scoped translation. > >

Re: [PATCH Kernel v20 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-05-14 Thread Kirti Wankhede
On 5/15/2020 11:17 AM, Alex Williamson wrote: On Fri, 15 May 2020 09:46:43 +0530 Kirti Wankhede wrote: On 5/15/2020 8:57 AM, Alex Williamson wrote: On Fri, 15 May 2020 02:07:45 +0530 Kirti Wankhede wrote: DMA mapped pages, including those pinned by mdev vendor drivers, might get unpi

Re: [PATCH v2] cpus: Fix botched configure_icount() error API violation fix

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/15/20 6:22 AM, Markus Armbruster wrote: Before recent commit abc9bf69a66, configure_icount() returned early when option "shift" was absent: succeed when option "align" was also absent, else fail. Since then, it still errors out when only "align" is present, but continues when both are absen

Re: [PATCH v2 0/1] qemu-nbd: Close inherited stderr

2020-05-14 Thread Raphael Pour
On 5/14/20 4:55 PM, Eric Blake wrote: > On 5/14/20 9:29 AM, Eric Blake wrote: > >>> WARNING: Block comments use a leading /* on a separate line >>> #20: FILE: qemu-nbd.c:919: >>> +    /* Remember parents stderr only if the fork option is set. >>> > >> The comment could use some grammar he

Re: [PATCH v2 8/9] riscv/opentitan: Connect the UART device

2020-05-14 Thread Bin Meng
On Fri, May 8, 2020 at 3:24 AM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > hw/riscv/opentitan.c | 24 ++-- > include/hw/riscv/opentitan.h | 13 + > 2 files changed, 35 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH v2 9/9] target/riscv: Use a smaller guess size for no-MMU PMP

2020-05-14 Thread Bin Meng
On Fri, May 8, 2020 at 3:29 AM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > target/riscv/pmp.c | 19 ++- > 1 file changed, 14 insertions(+), 5 deletions(-) > > diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c > index 0e6b640fbd..5aba4d13ea 100644 > ---

Re: [PATCH v2 7/9] riscv/opentitan: Connect the PLIC device

2020-05-14 Thread Bin Meng
On Fri, May 8, 2020 at 3:22 AM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > hw/riscv/opentitan.c | 19 +-- > include/hw/riscv/opentitan.h | 3 +++ > 2 files changed, 20 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng

[PULL 12/21] hw/arm/bcm2835: Drop futile attempts at QOM-adopting memory

2020-05-14 Thread Markus Armbruster
The "bcm2835-peripherals" device's .instance_init() method bcm2835_peripherals_init() attempts to make two memory regions QOM children of the device. This is futile, because memory_region_init() already did. The errors are ignored (a later commit will change that). Drop the useless calls. Cc: P

RE: [PATCH 4/6] migration/colo.c: Relaunch failover even if there was an error

2020-05-14 Thread Zhanghailiang
Reviewed-by: zhanghailiang > -Original Message- > From: Lukas Straub [mailto:lukasstra...@web.de] > Sent: Monday, May 11, 2020 7:11 PM > To: qemu-devel > Cc: Zhanghailiang ; Juan Quintela > ; Dr. David Alan Gilbert > Subject: [PATCH 4/6] migration/colo.c: Relaunch failover even if there

Re: [PATCH v6 04/14] block/amend: separate amend and create options for qemu-img

2020-05-14 Thread Max Reitz
On 14.05.20 18:10, Eric Blake wrote: > On 5/14/20 7:28 AM, Max Reitz wrote: >> On 10.05.20 15:40, Maxim Levitsky wrote: >>> Some options are only useful for creation >>> (or hard to be amended, like cluster size for qcow2), while some other >>> options are only useful for amend, like upcoming keysl

[PULL 20/21] various: Remove unnecessary OBJECT() cast

2020-05-14 Thread Markus Armbruster
From: Philippe Mathieu-Daudé The OBJECT() macro is defined as: #define OBJECT(obj) ((Object *)(obj)) Remove the unnecessary OBJECT() casts when we already know the pointer is of Object type. Patch created mechanically using spatch with this script: @@ typedef Object; Object *o; @@

[PULL 21/21] hw: Remove unnecessary DEVICE() cast

2020-05-14 Thread Markus Armbruster
From: Philippe Mathieu-Daudé The DEVICE() macro is defined as: #define DEVICE(obj) OBJECT_CHECK(DeviceState, (obj), TYPE_DEVICE) which expands to: ((DeviceState *)object_dynamic_cast_assert((Object *)(obj), (name), __FILE__, __LINE__,

[PULL 19/21] target: Remove unnecessary CPU() cast

2020-05-14 Thread Markus Armbruster
From: Philippe Mathieu-Daudé The CPU() macro is defined as: #define CPU(obj) ((CPUState *)(obj)) which expands to: ((CPUState *)object_dynamic_cast_assert((Object *)(obj), (name), __FILE__, __LINE__, __func__)) This assertion can only fail when @o

[PULL 16/21] qdev: Unrealize must not fail

2020-05-14 Thread Markus Armbruster
Devices may have component devices and buses. Device realization may fail. Realization is recursive: a device's realize() method realizes its components, and device_set_realized() realizes its buses (which should in turn realize the devices on that bus, except bus_set_realized() doesn't implement

[PULL 15/21] Drop more @errp parameters after previous commit

2020-05-14 Thread Markus Armbruster
Several functions can't fail anymore: ich9_pm_add_properties(), device_add_bootindex_property(), ppc_compat_add_property(), spapr_caps_add_properties(), PropertyInfo.create(). Drop their @errp parameter. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Paolo Bonzini Messag

[PULL 09/21] s390x/cpumodel: Fix UI to CPU features pcc-cmac-{aes, eaes}-256

2020-05-14 Thread Markus Armbruster
Both s390_features[S390_FEAT_PCC_CMAC_AES_256].name and s390_features[S390_FEAT_PCC_CMAC_EAES_256].name is "pcc-cmac-eaes-256". The former is obviously a pasto. Impact: * s390_feat_bitmap_to_ascii() misidentifies S390_FEAT_PCC_CMAC_AES_256 as "pcc-cmac-eaes-256". Affects QMP commands query-cp

[PULL 06/21] qom: Make all the object_property_add_FOO() return the property

2020-05-14 Thread Markus Armbruster
Some object_property_add_FOO() return the newly added property, some don't. Clean that up. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Paolo Bonzini Message-Id: <20200505152926.18877-7-arm...@redhat.com> --- include/qom/object.h | 50 ++--- qom/object.c

Re: [PATCH Kernel v20 5/8] vfio iommu: Implementation of ioctl for dirty pages tracking

2020-05-14 Thread Alex Williamson
On Thu, 14 May 2020 21:27:20 -0600 Alex Williamson wrote: > On Fri, 15 May 2020 02:07:44 +0530 > Kirti Wankhede wrote: > > > VFIO_IOMMU_DIRTY_PAGES ioctl performs three operations: > > - Start dirty pages tracking while migration is active > > - Stop dirty pages tracking. > > - Get dirty pages

[PULL 10/21] hw/isa/superio: Make the components QOM children

2020-05-14 Thread Markus Armbruster
isa_superio_realize() attempts to make isa-parallel and isa-serial QOM children, but this does not work, because it calls object_property_add_child() after realizing with qdev_init_nofail(). Realizing a device without a parent gives it one: it gets put into the "/machine/unattached/" orphanage. Th

[PULL 04/21] qom: Simplify object_property_get_enum()

2020-05-14 Thread Markus Armbruster
Reuse object_property_get_str(). Switches from the string to the qobject visitor under the hood. Signed-off-by: Markus Armbruster Message-Id: <20200505152926.18877-5-arm...@redhat.com> Reviewed-by: Paolo Bonzini --- qom/object.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-)

[PULL 17/21] spapr_pci: Drop some dead error handling

2020-05-14 Thread Markus Armbruster
chassis_from_bus() uses object_property_get_uint() to get property "chassis_nr" of the bridge device. Failure would be a programming error. Pass &error_abort, and simplify its callers. Cc: David Gibson Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster Acked-by: David Gibson Reviewed-by

[PULL 07/21] qom: Drop object_property_set_description() parameter @errp

2020-05-14 Thread Markus Armbruster
object_property_set_description() and object_class_property_set_description() fail only when property @name is not found. There are 85 calls of object_property_set_description() and object_class_property_set_description(). None of them can fail: * 84 immediately follow the creation of the proper

[PULL 18/21] qom: Drop @errp parameter of object_property_del()

2020-05-14 Thread Markus Armbruster
Same story as for object_property_add(): the only way object_property_del() can fail is when the property with this name does not exist. Since our property names are all hardcoded, failure is a programming error, and the appropriate way to handle it is passing &error_abort. Most callers do that,

[PULL 08/21] tests/check-qom-proplist: Improve iterator coverage

2020-05-14 Thread Markus Armbruster
The tests' "qemu-dummy" device has only class properties. Turn one of them into an instance property. test_dummy_class_iterator() expects one fewer property than test_dummy_iterator(). Rewrite test_dummy_prop_iterator() to take expected properties as argument. Signed-off-by: Markus Armbruster

[PULL 13/21] qdev: Clean up qdev_connect_gpio_out_named()

2020-05-14 Thread Markus Armbruster
Both qdev_connect_gpio_out_named() and device_set_realized() put objects without a parent into the "/machine/unattached/" orphanage. qdev_connect_gpio_out_named() needs a lengthy comment to explain how it works. It exploits that object_property_add_child() can fail only when we got a parent alrea

Re: [PATCH v2 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h'

2020-05-14 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > We use the Object type all over the place. > Forward declare it in "qemu/typedefs.h". > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/qemu/typedefs.h | 1 + > include/qom/object.h | 2 -- > include/qom/qom-qobject.h | 2 -- > include/sysemu/syse

[PULL 11/21] e1000: Don't run e1000_instance_init() twice

2020-05-14 Thread Markus Armbruster
QOM object initialization runs .instance_init() for the type and all its supertypes; see object_init_with_type(). Both TYPE_E1000_BASE and its concrete subtypes set .instance_init() to e1000_instance_init(). For the concrete subtypes, it duly gets run twice. The second run fails, but the error g

[PULL 03/21] qom: Drop object_property_del_child()'s unused parameter @errp

2020-05-14 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Paolo Bonzini Message-Id: <20200505152926.18877-4-arm...@redhat.com> --- qom/object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qom/object.c b/qom/object.c index 07762cc331..3d65658059 100644 ---

[PULL 00/21] QOM patches for 2020-05-15

2020-05-14 Thread Markus Armbruster
The following changes since commit 013a18edbbc59cdad019100c7d03c0494642b74c: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200514' into staging (2020-05-14 16:17:55 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-q

[PULL 01/21] qom: Clearer reference counting in object_initialize_childv()

2020-05-14 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Paolo Bonzini Message-Id: <20200505152926.18877-2-arm...@redhat.com> --- qom/object.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qom/object.c b/qom/object.c index be700e831f..55116495

[PULL 02/21] qom: Clean up inconsistent use of gchar * vs. char *

2020-05-14 Thread Markus Armbruster
Uses of gchar * in qom/object.h: * ObjectProperty member @name Functions that take a property name argument all use char *. Change the member to match. * ObjectProperty member @type Functions that take a property type argument or return it all use char *. Change the member to match.

[PULL 05/21] qom: Drop convenience method object_property_get_uint16List()

2020-05-14 Thread Markus Armbruster
qom/object.c provides object_property_get_TYPE() and object_property_set_TYPE() for a number of common types. These are all convenience wrappers around object_property_get_qobject() and object_property_set_qobject(). Except for object_property_get_uint16List(), which is unusual in two ways: * It

Re: [PATCH v3 0/3] various: Remove unnecessary casts

2020-05-14 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Remove unnecessary casts using coccinelle scripts. > > The CPU()/OBJECT() patches don't introduce logical change, > The DEVICE() one removes various OBJECT_CHECK() calls. Queued, thanks! Managing expecations: I'm not a QOM maintainer, I don't want to become one,

Re: [PATCH v2 00/18] qom: Spring cleaning

2020-05-14 Thread Markus Armbruster
Markus Armbruster writes: > Paolo, would you like me to do the pull request myself? I take that as a "yes" :) I'll throw in Philippe's "[PATCH v3 0/3] various: Remove unnecessary casts". Simple and amply reviewed.

Re: proposal: deprecate -readconfig/-writeconfig

2020-05-14 Thread Markus Armbruster
Paolo Bonzini writes: > On 14/05/20 10:56, Daniel P. Berrangé wrote: >> On Thu, May 14, 2020 at 10:09:21AM +0200, Paolo Bonzini wrote: >>> IMHO configuration files are in general a failed experiment. In >>> practice, they do not add much value over just a shell script because >>> they don't allo

Re: [PATCH v2 0/5] fix migration with bitmaps and mirror

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
14.05.2020 21:29, Eric Blake wrote: reviving this thread... On 4/3/20 6:23 AM, Peter Krempa wrote: On Fri, Apr 03, 2020 at 14:02:47 +0300, Vladimir Sementsov-Ogievskiy wrote: 19.12.2019 13:36, Peter Krempa wrote: On Thu, Dec 19, 2019 at 11:51:01 +0300, Vladimir Sementsov-Ogievskiy wrote: Hi

Re: proposal: deprecate -readconfig/-writeconfig

2020-05-14 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, May 14, 2020 at 10:40:40AM -0400, John Snow wrote: >> >> >> On 5/14/20 4:56 AM, Daniel P. Berrangé wrote: >> > On Thu, May 14, 2020 at 10:09:21AM +0200, Paolo Bonzini wrote: >> >> IMHO configuration files are in general a failed experiment. In >> >> practic

Re: [PATCH Kernel v20 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-05-14 Thread Alex Williamson
On Fri, 15 May 2020 09:46:43 +0530 Kirti Wankhede wrote: > On 5/15/2020 8:57 AM, Alex Williamson wrote: > > On Fri, 15 May 2020 02:07:45 +0530 > > Kirti Wankhede wrote: > > > >> DMA mapped pages, including those pinned by mdev vendor drivers, might > >> get unpinned and unmapped while migrati

Re: proposal: deprecate -readconfig/-writeconfig

2020-05-14 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, May 14, 2020 at 05:51:02PM +0200, Paolo Bonzini wrote: >> On 14/05/20 17:34, Daniel P. Berrangé wrote: >> > Yeah, the key thing is that you really want to be able to provide the >> > whole initial config in one go as an atomic action. I don't want to >> > issu

Re: [PATCH v2] bitmaps: Update maintainer

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
14.05.2020 21:00, Eric Blake wrote: Dirty bitmaps are important to incremental backups, including exposure over NBD where I'm already maintainer. Also, I'm aware that lately I have been doing as much code/review on bitmaps as John Snow who is trying to scale back in order to focus elsewhere; and

Re: proposal: deprecate -readconfig/-writeconfig

2020-05-14 Thread Markus Armbruster
Gerd Hoffmann writes: > On Thu, May 14, 2020 at 10:09:21AM +0200, Paolo Bonzini wrote: >> IMHO configuration files are in general a failed experiment. In >> practice, they do not add much value over just a shell script because >> they don't allow configuring all QEMU options, they are very much

Re: [PATCH v2 4/9] riscv: Initial commit of OpenTitan machine

2020-05-14 Thread Bin Meng
On Fri, May 8, 2020 at 3:26 AM Alistair Francis wrote: > > This adds a barebone OpenTitan machine to QEMU. > > Signed-off-by: Alistair Francis > --- > MAINTAINERS | 10 ++ > default-configs/riscv32-softmmu.mak | 1 + > default-configs/riscv64-softmmu.mak | 11 +- > hw

Re: [PATCH v2 1/9] riscv/boot: Add a missing header include

2020-05-14 Thread Bin Meng
Hi Alistair, On Thu, May 14, 2020 at 11:38 PM Alistair Francis wrote: > > On Thu, May 14, 2020 at 8:34 AM Bin Meng wrote: > > > > On Fri, May 8, 2020 at 3:24 AM Alistair Francis > > wrote: > > > > > > Signed-off-by: Alistair Francis > > > --- > > > include/hw/riscv/boot.h | 1 + > > > 1 file

Re: [PATCH v2 3/9] target/riscv: Add the lowRISC Ibex CPU

2020-05-14 Thread Bin Meng
On Fri, May 8, 2020 at 3:23 AM Alistair Francis wrote: > Please include some commit message to have a brief introduction of this new CPU. > Signed-off-by: Alistair Francis > --- > target/riscv/cpu.c | 10 ++ > target/riscv/cpu.h | 1 + > 2 files changed, 11 insertions(+) > > diff --gi

Re: [PATCH v2 2/9] target/riscv: Don't overwrite the reset vector

2020-05-14 Thread Bin Meng
On Fri, May 15, 2020 at 5:51 AM Alistair Francis wrote: > > On Thu, May 14, 2020 at 10:54 AM Philippe Mathieu-Daudé > wrote: > > > > On 5/7/20 9:13 PM, Alistair Francis wrote: > > > If the reset vector is set in the init function don't set it again in > > > realise. > > > > typo "realize". > > It

Re: [Virtio-fs] [PATCH] virtiofsd: remove symlink fallbacks

2020-05-14 Thread Miklos Szeredi
On Fri, May 15, 2020 at 5:43 AM Liu Bo wrote: > > On Thu, May 14, 2020 at 04:07:36PM +0200, Miklos Szeredi wrote: > > Path lookup in the kernel has special rules for looking up magic symlinks > > under /proc. If a filesystem operation is instructed to follow symlinks > > (e.g. via AT_SYMLINK_FOLL

[PATCH 3/3] migration/colo: Merge multi checkpoint request into one.

2020-05-14 Thread Zhang Chen
From: Zhang Chen When COLO guest occur issues, COLO-compare will catch lots of different network packet and trigger notification multi times, force periodic may happen at the same time. So this can be efficient merge checkpoint request within COLO_CHECKPOINT_INTERVAL. Signed-off-by: Zhang Chen

[PATCH 2/3] migration/colo: Update checkpoint time lately

2020-05-14 Thread Zhang Chen
From: Zhang Chen Previous operation(like vm_start and replication_start_all) will consume extra time for first forced synchronization, so reduce it in this patch. Signed-off-by: Zhang Chen --- migration/colo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/migration/c

Re: [PATCH v3 2/3] various: Remove unnecessary OBJECT() cast

2020-05-14 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > The OBJECT() macro is defined as: > > #define OBJECT(obj) ((Object *)(obj)) > > Remove the unnecessary OBJECT() casts when we already know the > pointer is of Object type. > > Patch created mechanically using spatch with this script: > > @@ > typedef Object;

[PATCH 0/3] migration/colo: Optimize COLO framework code

2020-05-14 Thread Zhang Chen
From: Zhang Chen This series optimize some code of COLO, please review. Zhang Chen (3): migration/colo: Optimize COLO boot code path migration/colo: Update checkpoint time lately migration/colo: Merge multi checkpoint request into one. migration/colo.c | 29 ++---

[PATCH 1/3] migration/colo: Optimize COLO boot code path

2020-05-14 Thread Zhang Chen
From: Zhang Chen No need to reuse MIGRATION_STATUS_ACTIVE boot COLO. Signed-off-by: Zhang Chen --- migration/colo.c | 2 -- migration/migration.c | 17 ++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index d015d4f84e..

[PATCH v4 2/3] tests/util-sockets: add abstract unix socket cases

2020-05-14 Thread xiaoqiang zhao
add cases to test tight and non-tight for abstract address type Signed-off-by: xiaoqiang zhao --- tests/test-util-sockets.c | 91 +++ 1 file changed, 91 insertions(+) diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c index 5fd947c7bf..c21a906

[PATCH v4 1/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-14 Thread xiaoqiang zhao
unix_listen/connect_saddr now support abstract address types two aditional BOOL switches are introduced: tight: whether to set @addrlen to the minimal string length, or the maximum sun_path length. default is TRUE abstract: whether we use abstract address. default is FALSE cli example: -mo

[PATCH v4 3/3] qemu-options: updates for abstract unix sockets

2020-05-14 Thread xiaoqiang zhao
add options documents changes for -chardev Signed-off-by: xiaoqiang zhao Reviewed-by: Daniel P. Berrangé --- qemu-options.hx | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index e2dca8a4e9..e63cc1b4b4 100644 --- a/qemu-options.hx +

[PATCH v4 0/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-14 Thread xiaoqiang zhao
qemu does not support abstract UNIX domain socket address. Add this ability to make qemu handy when abstract address is needed. Changes since v3: * rebase on master * refine qapi document statement * use random names to avoid name clash in unit test Xiaoqiang Zhao (3): qemu-sockets: add abstra

Re: Questionable aspects of QEMU Error's design

2020-05-14 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 28.04.2020 08:20, Vladimir Sementsov-Ogievskiy wrote: >> 27.04.2020 18:36, Markus Armbruster wrote: >>> Markus Armbruster writes: >>> Markus Armbruster writes: > QEMU's Error was patterned after GLib's GError.  Differences include: [...]

[PATCH v2] cpus: Fix botched configure_icount() error API violation fix

2020-05-14 Thread Markus Armbruster
Before recent commit abc9bf69a66, configure_icount() returned early when option "shift" was absent: succeed when option "align" was also absent, else fail. Since then, it still errors out when only "align" is present, but continues when both are absent. Crashes when examining the value of "shift"

Re: [PATCH Kernel v20 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-05-14 Thread Kirti Wankhede
On 5/15/2020 8:57 AM, Alex Williamson wrote: On Fri, 15 May 2020 02:07:45 +0530 Kirti Wankhede wrote: DMA mapped pages, including those pinned by mdev vendor drivers, might get unpinned and unmapped while migration is active and device is still running. For example, in pre-copy phase while

Re: [PATCH] vhost-user: add support for VHOST_USER_SET_STATUS

2020-05-14 Thread Jason Wang
On 2020/5/14 下午6:14, Maxime Coquelin wrote: On 5/14/20 9:53 AM, Jason Wang wrote: On 2020/5/14 下午3:33, Maxime Coquelin wrote: It is usefull for the Vhost-user backend to know about about the Virtio device status updates, especially when the driver sets the DRIVER_OK bit. With that informati

Re: [Virtio-fs] [PATCH] virtiofsd: remove symlink fallbacks

2020-05-14 Thread Liu Bo
On Thu, May 14, 2020 at 04:07:36PM +0200, Miklos Szeredi wrote: > Path lookup in the kernel has special rules for looking up magic symlinks > under /proc. If a filesystem operation is instructed to follow symlinks > (e.g. via AT_SYMLINK_FOLLOW or lack of AT_SYMLINK_NOFOLLOW), and the final > compo

RE: About migration/colo issue

2020-05-14 Thread Zhang, Chen
From: Zhanghailiang Sent: Friday, May 15, 2020 11:29 AM To: Zhang, Chen ; Dr . David Alan Gilbert ; qemu-devel ; Li Zhijian Cc: Jason Wang ; Lukas Straub Subject: RE: About migration/colo issue Hi Zhang Chen, >From your tracing log, it seems to be hanged in colo_flush_ram_cache()? Does it

Re: [PATCH Kernel v20 0/8] Add UAPIs to support migration for VFIO devices

2020-05-14 Thread Alex Williamson
Hi Yan & Intel folks, I'm starting to run out of comments on this series, where are you with porting GVT-g migration to this API? Are there remaining blocking issues? Are we satisfied that the API is sufficient to support vIOMMU now? Thanks, Alex On Fri, 15 May 2020 02:07:39 +0530 Kirti Wank

RE: About migration/colo issue

2020-05-14 Thread Zhanghailiang
Hi Zhang Chen, >From your tracing log, it seems to be hanged in colo_flush_ram_cache()? Does it come across a dead loop there ? I'll test it by using the new qemu. Thanks, Hailiang From: Zhang, Chen [mailto:chen.zh...@intel.com] Sent: Friday, May 15, 2020 11:16 AM To: Zhanghailiang ; Dr . David

Re: [PATCH Kernel v20 5/8] vfio iommu: Implementation of ioctl for dirty pages tracking

2020-05-14 Thread Alex Williamson
On Fri, 15 May 2020 02:07:44 +0530 Kirti Wankhede wrote: > VFIO_IOMMU_DIRTY_PAGES ioctl performs three operations: > - Start dirty pages tracking while migration is active > - Stop dirty pages tracking. > - Get dirty pages bitmap. Its user space application's responsibility to > copy content of

Re: [PATCH v3 1/2] chardev: enable distinct input for -chardev file

2020-05-14 Thread Markus Armbruster
Alexander Bulekov writes: > char-file already supports distinct paths for input/output but it was > only possible to specify a distinct input through QMP. With this change, > we can also specify a distinct input with the -chardev file argument: > qemu -chardev file,id=char1,path=/out/file,pat

Re: [PATCH Kernel v20 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-05-14 Thread Alex Williamson
On Fri, 15 May 2020 02:07:45 +0530 Kirti Wankhede wrote: > DMA mapped pages, including those pinned by mdev vendor drivers, might > get unpinned and unmapped while migration is active and device is still > running. For example, in pre-copy phase while guest driver could access > those pages, host

About migration/colo issue

2020-05-14 Thread Zhang, Chen
Hi Hailiang/Dave. I found a urgent problem in current upstream code, COLO will stuck on secondary checkpoint and later. The guest will stuck by this issue. I have bisect upstream code, this issue caused by Hailiang's optimize patch: >From 0393031a16735835a441b6d6e0495a1bd14adb90 Mon Sep 17 00:00

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-05-14 Thread Jan Klos
The problem is that disabled cores are not taken into account.. ALL Zen2 CPUs have L3 cache group per CCX and every CCX has 4 cores, the problem is that some cores in each CCX (1 for 6 and 12-core CPUs, 2 for 3100) are disabled for some models, but they still use their core ids (as can be seen in v

RE: [PATCH 6/6] migration/colo.c: Move colo_notify_compares_event to the right place

2020-05-14 Thread Zhanghailiang
Reviewed-by: zhanghailiang > -Original Message- > From: Lukas Straub [mailto:lukasstra...@web.de] > Sent: Monday, May 11, 2020 7:11 PM > To: qemu-devel > Cc: Zhanghailiang ; Juan Quintela > ; Dr. David Alan Gilbert > Subject: [PATCH 6/6] migration/colo.c: Move colo_notify_compares_event

Re: [RFC 16/18] use errp for gmpo kvm_init

2020-05-14 Thread David Gibson
On Thu, May 14, 2020 at 06:09:46PM +0100, Dr. David Alan Gilbert wrote: > Dave: > You've got some screwy mail headers here, the qemu-devel@nongnu.-rg is > the best one anmd the p...@us.redhat.com is weird as well. Yeah, apparently I forgot how to type when I entered my git-publish command line :

Re: [RFC 16/18] use errp for gmpo kvm_init

2020-05-14 Thread David Gibson
On Thu, May 14, 2020 at 06:09:46PM +0100, Dr. David Alan Gilbert wrote: > * David Gibson (da...@gibson.dropbear.id.au) wrote: [snip] > > @@ -649,20 +649,20 @@ static int sev_kvm_init(GuestMemoryProtection *gmpo) > > devname = object_property_get_str(OBJECT(sev), "sev-device", NULL); > > s

RE: [PATCH 6/6] migration/colo.c: Move colo_notify_compares_event to the right place

2020-05-14 Thread Zhanghailiang
> -Original Message- > From: Lukas Straub [mailto:lukasstra...@web.de] > Sent: Thursday, May 14, 2020 10:31 PM > To: Zhanghailiang > Cc: qemu-devel ; Zhang Chen > ; Juan Quintela ; Dr. David > Alan Gilbert > Subject: Re: [PATCH 6/6] migration/colo.c: Move > colo_notify_compares_event to t

Re: [virtio-dev] Re: Fwd: Qemu Support for Virtio Video V4L2 driver

2020-05-14 Thread Nicolas Dufresne
Le lundi 11 mai 2020 à 20:49 +0900, Keiichi Watanabe a écrit : > Hi, > > Thanks Saket for your feedback. As Dmitry mentioned, we're focusing on > video encoding and decoding, not camera. So, my reply was about how to > implement paravirtualized video codec devices. > > On Mon, May 11, 2020 at 8:2

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-05-14 Thread Jan Klos
Same problem here on 5.0 and 3900x (3 cores per CCX). And as stated before - declaring NUMA nodes is definitely not the right solution if the aim is to emulate the host CPU as close as possible. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed

Re: Ping Re: [PATCH 0/5] target/i386: fxtract, fscale fixes

2020-05-14 Thread Paolo Bonzini
On 14/05/20 20:25, Joseph Myers wrote: > Ping for this patch series > . > > Although my three patch series so far for floatx80 and i386 floating-point > instructions fixes are independent of each other, it's likely future patch

Re: [PATCH v2 5/9] hw/char: Initial commit of Ibex UART

2020-05-14 Thread Alistair Francis
On Thu, May 14, 2020 at 11:00 AM Philippe Mathieu-Daudé wrote: > > Hi Alistair, > > On 5/7/20 9:13 PM, Alistair Francis wrote: > > This is the initial commit of the Ibex UART device. Serial TX is > > working, while RX has been implemeneted but untested. > > > > This is based on the documentation f

[PATCH v2 1/1] virtio-ccw: auto-manage VIRTIO_F_IOMMU_PLATFORM if PV

2020-05-14 Thread Halil Pasic
The virtio specification tells that the device is to present VIRTIO_F_ACCESS_PLATFORM (a.k.a. VIRTIO_F_IOMMU_PLATFORM) when the device "can only access certain memory addresses with said access specified and/or granted by the platform". This is the case for a protected VMs, as the device can access

Re: [PATCH v2 6/9] hw/intc: Initial commit of lowRISC Ibex PLIC

2020-05-14 Thread Alistair Francis
On Thu, May 14, 2020 at 11:40 AM Philippe Mathieu-Daudé wrote: > > On 5/7/20 9:13 PM, Alistair Francis wrote: > > The Ibex core contains a PLIC that although similar to the RISC-V spec > > is not RISC-V spec compliant. > > > > This patch implements a Ibex PLIC in a somewhat generic way. > > > > As

[Bug 1878134] Re: Assertion failures in ati_reg_read_offs/ati_reg_write_offs

2020-05-14 Thread Rafael David Tinoco
Hello Alexander, I believe your fuzz test result was meant to the upstream project so I moved it. o/ ** Also affects: qemu Importance: Undecided Status: New ** No longer affects: qemu-kvm (Ubuntu) -- You received this bug notification because you are a member of qemu- devel-ml, whic

Re: [PATCH v2 2/9] target/riscv: Don't overwrite the reset vector

2020-05-14 Thread Alistair Francis
On Thu, May 14, 2020 at 10:54 AM Philippe Mathieu-Daudé wrote: > > On 5/7/20 9:13 PM, Alistair Francis wrote: > > If the reset vector is set in the init function don't set it again in > > realise. > > typo "realize". It's not a typo, just correct English :) I have changed it. > > > > > Signed-o

[PATCH 5/6] target/arm: Split helper_crypto_sha1_3reg

2020-05-14 Thread Richard Henderson
Rather than passing an opcode to a helper, fully decode the operation at translate time. Use clear_tail_16 to zap the balance of the SVE register with the AdvSIMD write. Signed-off-by: Richard Henderson --- target/arm/helper.h | 5 +- target/arm/neon-dp.decode | 6 +- target

[PATCH 4/6] target/arm: Convert sha1 and sha256 to gvec helpers

2020-05-14 Thread Richard Henderson
Do not yet convert the helpers to loop over opr_sz, but the descriptor allows the vector tail to be cleared. Which fixes an existing bug vs SVE. Signed-off-by: Richard Henderson --- target/arm/helper.h | 12 ++-- target/arm/neon-dp.decode | 12 ++-- target/arm/crypto_helper.

[PATCH 6/6] target/arm: Split helper_crypto_sm3tt

2020-05-14 Thread Richard Henderson
Rather than passing an opcode to a helper, fully decode the operation at translate time. Use clear_tail_16 to zap the balance of the SVE register with the AdvSIMD write. Signed-off-by: Richard Henderson --- target/arm/helper.h| 5 - target/arm/crypto_helper.c | 24 +

[PATCH 3/6] target/arm: Convert sha512 and sm3 to gvec helpers

2020-05-14 Thread Richard Henderson
Do not yet convert the helpers to loop over opr_sz, but the descriptor allows the vector tail to be cleared. Which fixes an existing bug vs SVE. Signed-off-by: Richard Henderson --- target/arm/helper.h| 15 +++- target/arm/crypto_helper.c | 37 +++- targe

[PATCH 0/6] target/arm: Convert crypto to gvec

2020-05-14 Thread Richard Henderson
In addition, this fixes the missing tail clearing for SVE. The sha1, sha256, sm3 routines that are not fully generalized are not used by sve -- it only supports the newer algorithms. I'm not sure that this: Based-on: <20200508151055.5832-1-richard.hender...@linaro.org> ("tcg vector rotate operat

[PATCH 1/6] target/arm: Convert aes and sm4 to gvec helpers

2020-05-14 Thread Richard Henderson
With this conversion, we will be able to use the same helpers with sve. In particular, pass 3 vector parameters for the 3-operand operations; for advsimd the destination register is also an input. This also fixes a bug in which we failed to clear the high bits of the SVE register after an AdvSIMD

[PATCH 2/6] target/arm: Convert rax1 to gvec helpers

2020-05-14 Thread Richard Henderson
With this conversion, we will be able to use the same helpers with sve. This also fixes a bug in which we failed to clear the high bits of the SVE register after an AdvSIMD operation. Signed-off-by: Richard Henderson --- target/arm/helper.h| 2 ++ target/arm/translate-a64.h | 3 ++ ta

Re: [PATCH v3 1/1] qemu_img: add cvtnum_full to print error reports

2020-05-14 Thread Eric Blake
On 5/13/20 8:36 AM, Eyal Moscovici wrote: All calls to cvtnum check the return value and print the same error message more or less. And so error reporting moved to cvtnum_full to reduce code duplication and provide a single error message. Additionally, cvtnum now wraps cvtnum_full with the existi

[PATCH Kernel v20 8/8] vfio: Selective dirty page tracking if IOMMU backed device pins pages

2020-05-14 Thread Kirti Wankhede
Added a check such that only singleton IOMMU groups can pin pages. >From the point when vendor driver pins any pages, consider IOMMU group dirty page scope to be limited to pinned pages. To optimize to avoid walking list often, added flag pinned_page_dirty_scope to indicate if all of the vfio_grou

[PATCH Kernel v20 3/8] vfio iommu: Cache pgsize_bitmap in struct vfio_iommu

2020-05-14 Thread Kirti Wankhede
Calculate and cache pgsize_bitmap when iommu->domain_list is updated and iommu->external_domain is set for mdev device. Add iommu->lock protection when cached pgsize_bitmap is accessed. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- drivers/vfio/vfio_iommu_type1.c | 88 +

[PATCH Kernel v20 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-05-14 Thread Kirti Wankhede
DMA mapped pages, including those pinned by mdev vendor drivers, might get unpinned and unmapped while migration is active and device is still running. For example, in pre-copy phase while guest driver could access those pages, host device or vendor driver can dirty these mapped pages. Such pages s

[PATCH Kernel v20 2/8] vfio iommu: Remove atomicity of ref_count of pinned pages

2020-05-14 Thread Kirti Wankhede
vfio_pfn.ref_count is always updated while holding iommu->lock, using atomic variable is overkill. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Reviewed-by: Eric Auger Reviewed-by: Cornelia Huck --- drivers/vfio/vfio_iommu_type1.c | 9 + 1 file changed, 5 insertions(+), 4 deleti

[PATCH Kernel v20 5/8] vfio iommu: Implementation of ioctl for dirty pages tracking

2020-05-14 Thread Kirti Wankhede
VFIO_IOMMU_DIRTY_PAGES ioctl performs three operations: - Start dirty pages tracking while migration is active - Stop dirty pages tracking. - Get dirty pages bitmap. Its user space application's responsibility to copy content of dirty pages from source to destination during migration. To prevent

[PATCH Kernel v20 4/8] vfio iommu: Add ioctl definition for dirty pages tracking

2020-05-14 Thread Kirti Wankhede
IOMMU container maintains a list of all pages pinned by vfio_pin_pages API. All pages pinned by vendor driver through this API should be considered as dirty during migration. When container consists of IOMMU capable device and all pages are pinned and mapped, then all pages are marked dirty. Added

[PATCH Kernel v20 7/8] vfio iommu: Add migration capability to report supported features

2020-05-14 Thread Kirti Wankhede
Added migration capability in IOMMU info chain. User application should check IOMMU info chain for migration capability to use dirty page tracking feature provided by kernel module. User application must check page sizes supported and maximum dirty bitmap size returned by this capability structure

[PATCH Kernel v20 0/8] Add UAPIs to support migration for VFIO devices

2020-05-14 Thread Kirti Wankhede
Hi, This patch set adds: * IOCTL VFIO_IOMMU_DIRTY_PAGES to get dirty pages bitmap with respect to IOMMU container rather than per device. All pages pinned by vendor driver through vfio_pin_pages external API has to be marked as dirty during migration. When IOMMU capable device is present in

[PATCH Kernel v20 1/8] vfio: UAPI for migration interface for device state

2020-05-14 Thread Kirti Wankhede
- Defined MIGRATION region type and sub-type. - Defined vfio_device_migration_info structure which will be placed at the 0th offset of migration region to get/set VFIO device related information. Defined members of structure and usage on read/write access. - Defined device states and state tr

Re: [PATCH 3/3] MAINTAINERS: Add myself as fulong2e co-maintainer

2020-05-14 Thread Aleksandar Markovic
сре, 8. апр 2020. у 11:08 Huacai Chen је написао/ла: > > I submitted the MIPS/fulong2e support about ten years ago, and after > that I became a MIPS kernel developer. Last year, Philippe Mathieu- > Daudé asked me that whether I can be a reviewer of MIPS/fulong2e, and I > promised that I will do so

[PATCH v1 2/2] sifive_e: Support the revB machine

2020-05-14 Thread Alistair Francis
Signed-off-by: Alistair Francis --- hw/riscv/sifive_e.c | 35 +++ include/hw/riscv/sifive_e.h | 1 + 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c index 472a98970b..cb7818341b 100644 --- a/hw/risc

[PATCH v1 1/2] riscv: sifive_e: Manually define the machine

2020-05-14 Thread Alistair Francis
Signed-off-by: Alistair Francis --- hw/riscv/sifive_e.c | 41 +++-- include/hw/riscv/sifive_e.h | 4 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c index b53109521e..472a98970b 100644 --- a/h

  1   2   3   4   5   >