Re: [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup

2019-11-13 Thread Sergio Lopez
Sergio Lopez writes: > no-re...@patchew.org writes: > >> Patchew URL: https://patchew.org/QEMU/20191112113012.71136-1-...@redhat.com/ >> >> >> >> Hi, >> >> This series failed the docker-quick@centos7 build test. Please find the >> testing commands and >> their output below. If you have Docker

[PATCH 08/16] qom: introduce object_register_sugar_prop

2019-11-13 Thread Paolo Bonzini
Similar to the existing "-rtc driftfix" option, we will convert some legacy "-machine" command line options to global properties on accelerators. Because accelerators are not devices, we cannot use qdev_prop_register_global. Instead, provide a slot in the generic object_compat_props arrays for

[PATCH 10/16] accel: pass object to accel_init_machine

2019-11-13 Thread Paolo Bonzini
We will have to set QOM properties before accel_init_machine, based on the options provided to -accel. Construct the object outside it so that it will be possible to insert the iteration between object_new_with_class and accel_init_machine. Signed-off-by: Paolo Bonzini --- accel/accel.c

Re: [PATCH v2] WHPX: support for xcr0

2019-11-13 Thread Paolo Bonzini
On 12/11/19 19:52, Sunil Muthuswamy wrote: > > >> -Original Message- >> From: Sunil Muthuswamy >> Sent: Thursday, November 7, 2019 11:49 AM >> To: Paolo Bonzini ; Richard Henderson >> ; Eduardo Habkost >> Cc: qemu-devel@nongnu.org >> Subject: [PATCH v2] WHPX: support for xcr0 >> >>

Re: [PATCH] spapr/kvm: Set default cpu model for all machine classes

2019-11-13 Thread Jiri Denemark
Hi David. On Wed, Oct 30, 2019 at 17:32:43 +0100, David Gibson wrote: > We have to set the default model of all machine classes, not just for the > active one. Otherwise, "query-machines" will indicate the wrong CPU model > ("qemu-s390x-cpu" instead of "host-s390x-cpu") as "default-cpu-type". >

Re: [SeaBIOS] Re: [PATCH] ahci: zero-initialize port struct

2019-11-13 Thread Sam Eiderman
Hi, Does this fix a bug that actually happened? I just noticed that in my lchs patches I assumed that lchs struct is zeroed out in all devices (not only ahci): 9caa19be0e53 (geometry: Apply LCHS values for boot devices) Seems like this is not the case but why only ahci is affected? The list

Re: [RFC v4 PATCH 32/49] multi-process: Use separate MMIO communication channel

2019-11-13 Thread Jag Raman
On 11/11/2019 11:21 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:13AM -0400, Jagannathan Raman wrote: Using a separate communication channel for MMIO helps with improving Performance Why? Typical initiation of IO operations involves multiple MMIO accesses per IO operation. In

Re: [PATCH] virtio: fix IO request length in virtio SCSI/block #PSBM-78839

2019-11-13 Thread Michael S. Tsirkin
On Wed, Nov 13, 2019 at 12:38:48PM +, Denis Plotnikov wrote: > > > On 06.11.2019 15:03, Michael S. Tsirkin wrote: > > On Thu, Oct 24, 2019 at 11:34:34AM +, Denis Lunev wrote: > >> On 10/24/19 12:28 AM, Michael S. Tsirkin wrote: > >>> On Fri, Oct 18, 2019 at 02:55:47PM +0300, Denis

Re: [PATCH] qmp: Reset mon->commands on CHR_EVENT_CLOSED

2019-11-13 Thread Marc-André Lureau
Hi On Wed, Nov 13, 2019 at 4:41 PM Markus Armbruster wrote: > > Jason Andryuk writes: > > > Currently, mon->commands is uninitialized until CHR_EVENT_OPENED where > > it is set to _cap_negotiation_commands. After capability > > negotiation, it is set to _commands. If the chardev is closed, >

Re: [PATCH v1 5/5] .travis.yml: drop 32 bit systems from MAIN_SOFTMMU_TARGETS

2019-11-13 Thread Thomas Huth
On 13/11/2019 12.59, Alex Bennée wrote: > The older clangs are still struggling to build and run everything > withing the 50 minute timeout so lets lighten the load a bit more. We > still have coverage for GCC and hopefully no obscure 32 bit guest only > breakages slip through the cracks. > >

Re: [RFC PATCH 18/18] qemu-storage-daemon: Add --monitor option

2019-11-13 Thread Markus Armbruster
Kevin Wolf writes: > Am 12.11.2019 um 15:25 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > This adds and parses the --monitor option, so that a QMP monitor can be >> > used in the storage daemon. The monitor offers commands defined in the >> > QAPI schema at

[PULL 0/1] Seabios 20191113 patches

2019-11-13 Thread Gerd Hoffmann
The following changes since commit 9f2ce35dfa4ea4a31dbb765dd02bed2500891887: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-2019' into staging (2019-11-11 16:54:16 +) are available in the Git repository at: git://git.kraxel.org/qemu tags/seabios-20191113-pull-request

[PATCH 04/16] vl: move icount configuration earlier

2019-11-13 Thread Paolo Bonzini
Once qemu_tcg_configure is turned into a QOM property setter, it will not be able to set a default value for mttcg_enabled. Setting the default will move to the TCG init_machine method, which currently runs after "-icount" is processed. However, it is harmless to do configure_icount for all

[PATCH 12/16] tcg: add "-accel tcg,tb-size" and deprecate "-tb-size"

2019-11-13 Thread Paolo Bonzini
-tb-size fits nicely in the new framework for accelerator-specific options. It is a very niche option, so insta-deprecate the old version. Signed-off-by: Paolo Bonzini --- accel/tcg/tcg-all.c| 40 +--- include/sysemu/accel.h | 2 -- qemu-deprecated.texi

[PATCH 15/16] kvm: introduce kvm_kernel_irqchip_* functions

2019-11-13 Thread Paolo Bonzini
The KVMState struct is opaque, so provide accessors for the fields that will be moved from current_machine to the accelerator. For now they just forward to the machine object, but this will change. Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 23 +++

[PATCH 16/16] kvm: convert "-machine kernel_irqchip" to an accelerator property

2019-11-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 59 ++- hw/core/machine.c | 61 - include/hw/boards.h | 3 --- qemu-options.hx | 9 +--- vl.c| 3 ++- 5 files

Re: [SeaBIOS] Re: [PATCH] ahci: zero-initialize port struct

2019-11-13 Thread Gerd Hoffmann
On Wed, Nov 13, 2019 at 10:35:03AM +0100, Laszlo Ersek wrote: > On 11/13/19 10:18, Gerd Hoffmann wrote: > > Specifically port->driver.lchs needs clearing, otherwise seabios will > > s/driver/drive/ > Reviewed-by: Laszlo Ersek Typo fixed & pushed. thanks, Gerd

[PATCH 07/16] vl: warn for unavailable accelerators, clarify messages

2019-11-13 Thread Paolo Bonzini
So far, specifying an accelerator that was not compiled in did not result in an error; fix that. While at it, clarify the mysterious "Back to TCG" message. Signed-off-by: Paolo Bonzini --- vl.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vl.c b/vl.c index

[PATCH for-5.0 00/16] Complete the implementation of -accel

2019-11-13 Thread Paolo Bonzini
This series completes the implementation of -accel: - Alternative accelerators can be specified with multiple -accel options, and each -accel option will configure the respective accelerator. This is implemented in patches 1 to 6, with a small addendum in patch 7. - Accelerators can now

[PATCH 02/16] vl: extract accelerator option processing to a separate function

2019-11-13 Thread Paolo Bonzini
As a first step towards supporting multiple "-accel" options, push -icount and -accel semantics into a new function, and use qemu_opts_foreach to retrieve the key/value lists instead of stashing them into globals. Signed-off-by: Paolo Bonzini --- vl.c | 40

[PATCH 01/16] memory: do not look at current_machine->accel

2019-11-13 Thread Paolo Bonzini
"info mtree" prints the wrong accelerator name if used with for example "-machine accel=kvm:tcg". The right thing to do is to fetch the name from the AccelClass, which will also work nicely once current_machine->accel stops existing. Signed-off-by: Paolo Bonzini --- memory.c | 5 + 1 file

[PATCH 09/16] qom: add object_new_with_class

2019-11-13 Thread Paolo Bonzini
Similar to CPU and machine classes, "-accel" class names are mangled, so we have to first get a class via accel_find and then instantiate it. Provide a new function to instantiate a class without going through object_class_get_name, and use it for CPUs and machines already. Signed-off-by: Paolo

Re: [PATCH] WHPX: refactor load library

2019-11-13 Thread Paolo Bonzini
On 08/11/19 21:31, Sunil Muthuswamy wrote: > > +typedef enum WHPFunctionList { > +WINHV_PLATFORM_FNS_DEFAULT, > +WINHV_EMULATION_FNS_DEFAULT, > +} WHPFunctionList; > What does "default" stand for? I assume you have more changes to this function in the future. > + * Load the functions

Re: [RFC v4 PATCH 02/49] multi-process: util: Add qemu_thread_cancel() to cancel running thread

2019-11-13 Thread Stefan Hajnoczi
On Thu, Oct 24, 2019 at 05:08:43AM -0400, Jagannathan Raman wrote: > qemu_thread_cancel() added to destroy a given running thread. > This will be needed in the following patches. > > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > Signed-off-by: Elena Ufimtseva > --- >

Re: [RFC v4 PATCH 02/49] multi-process: util: Add qemu_thread_cancel() to cancel running thread

2019-11-13 Thread Jag Raman
On 11/13/2019 10:30 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:08:43AM -0400, Jagannathan Raman wrote: qemu_thread_cancel() added to destroy a given running thread. This will be needed in the following patches. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman

Re: [RFC v4 PATCH 09/49] multi-process: setup PCI host bridge for remote device

2019-11-13 Thread Stefan Hajnoczi
On Thu, Oct 24, 2019 at 05:08:50AM -0400, Jagannathan Raman wrote: > +static void remote_host_realize(DeviceState *dev, Error **errp) > +{ > +PCIHostState *pci = PCI_HOST_BRIDGE(dev); > +RemPCIHost *s = REMOTE_HOST_DEVICE(dev); > + > +/* > + * TODO: the name of the bus would be

[PATCH v2 0/5] MAINTAINERS: Fine adjustment for (mostly mips) content

2019-11-13 Thread Aleksandar Markovic
From: Aleksandar Markovic v1->v2: - removed patch on new git infrastructure section - added a patch that adds two files in Malta section The goal of this series is to: * reduce the amount of "unmainatined" files (not having their maintainer in "MAINTAINERS") * reduce the amount of

[PATCH v2 4/5] MAINTAINERS: Adjust maintainership for R4000 systems

2019-11-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Change the maintainership for R4000 systems to improve its quality. Acked-by: Aurelien Jarno Signed-off-by: Aleksandar Markovic --- MAINTAINERS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 6afec32..ba9ca98

[PATCH v2 1/5] MAINTAINERS: Add a section on UI translation

2019-11-13 Thread Aleksandar Markovic
From: Aleksandar Markovic There should be a person who will quickly evaluate new UI translation, and find a way to update existing ones should something changes in UI. Signed-off-by: Aleksandar Markovic --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS

[PATCH v2 2/5] MAINTAINERS: Adjust maintainership for Fulong 2E board

2019-11-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Change the maintainership for Fulong 2E board to improve its quality. Signed-off-by: Aleksandar Markovic --- MAINTAINERS | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index fd9ba32..3bf2144 100644 ---

[PATCH 06/16] vl: configure accelerators from -accel options

2019-11-13 Thread Paolo Bonzini
Drop the "accel" property from MachineState, and instead desugar "-machine accel=" to a list of "-accel" options. This has a semantic change due to removing merge_lists from -accel. For example: - "-accel kvm -accel tcg" all but ignored "-accel kvm". This is a bugfix. - "-accel kvm -accel

[PATCH 03/16] vl: merge -accel processing into configure_accelerators

2019-11-13 Thread Paolo Bonzini
The next step is to move the parsing of "-machine accel=..." into vl.c, unifying it with the configure_accelerators() function that has just been introduced. This way, we will be able to desugar it into multiple "-accel" options, without polluting accel/accel.c. The CONFIG_TCG and CONFIG_KVM

[PATCH 05/16] vl: introduce object_parse_property_opt

2019-11-13 Thread Paolo Bonzini
We will reuse the parsing loop of machine_set_property soon for "-accel", but we do not want the "_" -> "-" conversion since "-accel" can just standardize on dashes. We will also add a bunch of legacy option handling to keep the QOM machine object clean. Extract the loop into a separate

[PATCH 11/16] tcg: convert "-accel threads" to a QOM property

2019-11-13 Thread Paolo Bonzini
Replace the ad-hoc qemu_tcg_configure with generic code invoking QOM property getters and setters. This will be extended in the next patches, which will turn accelerator-related "-machine" options into QOM properties as well. Signed-off-by: Paolo Bonzini --- accel/tcg/tcg-all.c | 111

Re: [SeaBIOS] Re: [PATCH] ahci: zero-initialize port struct

2019-11-13 Thread Sam Eiderman
We should make sure drive.lchs is zeroed out for the following devices: git grep "drive_s drive" src/hw/ata.h:struct drive_s drive; src/hw/esp-scsi.c:struct drive_s drive; src/hw/lsi-scsi.c:struct drive_s drive; src/hw/megasas.c:struct drive_s drive; src/hw/mpt-scsi.c:struct

Re: [RFC v4 PATCH 47/49] multi-process: Enable support for multiple devices in remote

2019-11-13 Thread Jag Raman
On 11/11/2019 11:15 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:28AM -0400, Jagannathan Raman wrote: @@ -93,7 +94,8 @@ static void process_config_write(MPQemuMsg *msg) struct conf_data_msg *conf = (struct conf_data_msg *)msg->data2; qemu_mutex_lock_iothread(); -

[RFC PATCH] scripts/tap-driver: report "slow" tests (HACK)

2019-11-13 Thread Alex Bennée
Some tests seem to run slower on CI systems but we don't really get visibility of which it is unless we happen to hang the test at the end of a run. This hacky change exposes "slow" tests in the tap output. [AJB: my perl is rusty, I'm sure this could be more idiomatic] Signed-off-by: Alex Bennée

Re: [RFC v4 PATCH 03/49] multi-process: add a command line option for debug file

2019-11-13 Thread Stefan Hajnoczi
On Thu, Oct 24, 2019 at 05:08:44AM -0400, Jagannathan Raman wrote: > From: Elena Ufimtseva > > Can be used with -d rdebug command options when starting qemu. > > Signed-off-by: Elena Ufimtseva > Signed-off-by: Jagannathan Raman > Signed-off-by: John G Johnson > --- > include/qemu/log.h | 1

Re: [RFC v4 PATCH 30/49] multi-process: send heartbeat messages to remote

2019-11-13 Thread Jag Raman
On 11/11/2019 11:27 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:11AM -0400, Jagannathan Raman wrote: +static void broadcast_msg(MPQemuMsg *msg, bool need_reply) +{ +PCIProxyDev *entry; +unsigned int pid; +int wait; + +QLIST_FOREACH(entry, _dev_list.devices, next)

Re: [PATCH] spapr/kvm: Set default cpu model for all machine classes

2019-11-13 Thread Greg Kurz
On Wed, 13 Nov 2019 15:31:58 + Peter Maydell wrote: > On Wed, 13 Nov 2019 at 15:10, Greg Kurz wrote: > > David is away until the 19th of November, which is the release date > > of rc2 according to the planning [*]. Then we have rc3 the 26th, and > > final release (or rc4) the 3rd of

Re: [RFC v4 PATCH 02/49] multi-process: util: Add qemu_thread_cancel() to cancel running thread

2019-11-13 Thread Jag Raman
On 11/13/2019 10:51 AM, Daniel P. Berrangé wrote: On Wed, Nov 13, 2019 at 10:38:06AM -0500, Jag Raman wrote: On 11/13/2019 10:30 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:08:43AM -0400, Jagannathan Raman wrote: qemu_thread_cancel() added to destroy a given running thread.

Re: [PATCH v9 Kernel 1/5] vfio: KABI for migration interface for device state

2019-11-13 Thread Alex Williamson
On Thu, 14 Nov 2019 00:59:52 +0530 Kirti Wankhede wrote: > On 11/13/2019 11:57 PM, Alex Williamson wrote: > > On Wed, 13 Nov 2019 11:24:17 +0100 > > Cornelia Huck wrote: > > > >> On Tue, 12 Nov 2019 15:30:05 -0700 > >> Alex Williamson wrote: > >> > >>> On Tue, 12 Nov 2019 22:33:36 +0530 >

Re: [PATCH v9 Kernel 3/5] vfio iommu: Add ioctl defination to unmap IOVA and return dirty bitmap

2019-11-13 Thread Alex Williamson
On Thu, 14 Nov 2019 01:22:39 +0530 Kirti Wankhede wrote: > On 11/13/2019 4:00 AM, Alex Williamson wrote: > > On Tue, 12 Nov 2019 22:33:38 +0530 > > Kirti Wankhede wrote: > > > >> With vIOMMU, during pre-copy phase of migration, while CPUs are still > >> running, IO virtual address unmap can

[PATCH] tests: fix modules-test 'duplicate test case' error

2019-11-13 Thread Cole Robinson
./configure --enable-sdl --audio-drv-list=sdl --enable-modules Will generate two identical test names: /$arch/module/load/sdl Which generates an error like: (tests/modules-test:23814): GLib-ERROR **: 18:23:06.359: duplicate test case path: /aarch64//module/load/sdl Add the subsystem prefix in

Re: QEMU for Qualcomm Hexagon - KVM Forum talk and code available

2019-11-13 Thread Peter Maydell
On Wed, 13 Nov 2019 at 10:32, Alex Bennée wrote: > I don't see including flex/bison as a dependency > being a major issue (in fact we have it in our docker images so I guess > something uses it). They're used by the dtc submodule, so only in setups where you need to use the submodule rather than

[PATCH 2/2] tests: Add tests for query-netdevs command

2019-11-13 Thread Alexey Kirillov
Signed-off-by: Alexey Kirillov --- tests/Makefile.include | 2 + tests/test-query-netdevs.c | 114 + 2 files changed, 116 insertions(+) create mode 100644 tests/test-query-netdevs.c diff --git a/tests/Makefile.include b/tests/Makefile.include index

Re: [PATCH 0/2] Introducing QMP query-netdevs command

2019-11-13 Thread Alexey Kirillov
That's a good idea, thanks! I'll do this in V2. 14.11.2019, 00:32, "Eric Blake" : > > Can we rewrite the existing HMP command to call into the new QMP command? > -- Alex Kirillov Yandex.Cloud

Re: [PATCH v14 03/11] tests: Add test for QAPI builtin type time

2019-11-13 Thread Eduardo Habkost
On Wed, Nov 13, 2019 at 09:01:29AM +0800, Tao Xu wrote: > On 11/13/2019 4:15 AM, Eduardo Habkost wrote: > > On Fri, Nov 08, 2019 at 09:05:52AM +0100, Markus Armbruster wrote: > > > Tao Xu writes: > > > > > > > On 11/7/2019 9:31 PM, Eduardo Habkost wrote: > > > > > On Thu, Nov 07, 2019 at

[PATCH v3 4/4] watchdog/aspeed: Fix AST2600 frequency behaviour

2019-11-13 Thread Joel Stanley
The AST2600 control register sneakily changed the meaning of bit 4 without anyone noticing. It no longer controls the 1MHz vs APB clock select, and instead always runs at 1MHz. The AST2500 was always 1MHz too, but it retained bit 4, making it read only. We can model both using the same fixed 1MHz

[PATCH v5 19/20] fuzz: add virtio-net fuzz target

2019-11-13 Thread Oleinik, Alexander
The virtio-net fuzz target feeds inputs to all three virtio-net virtqueues, and uses forking to avoid leaking state between fuzz runs. Signed-off-by: Alexander Bulekov --- tests/fuzz/Makefile.include | 1 + tests/fuzz/virtio_net_fuzz.c | 100 +++ 2 files

Re: virtio,iommu_platform=on

2019-11-13 Thread Alexey Kardashevskiy
On 13/11/2019 21:00, Michael S. Tsirkin wrote: > On Wed, Nov 13, 2019 at 03:44:28PM +1100, Alexey Kardashevskiy wrote: >> >> >> On 12/11/2019 18:08, Michael S. Tsirkin wrote: >>> On Tue, Nov 12, 2019 at 02:53:49PM +1100, Alexey Kardashevskiy wrote: Hi! I am enabling IOMMU for

[PATCH v5 01/20] softmmu: split off vl.c:main() into main.c

2019-11-13 Thread Oleinik, Alexander
A program might rely on functions implemented in vl.c, but implement its own main(). By placing main into a separate source file, there are no complaints about duplicate main()s when linking against vl.o. For example, the virtual-device fuzzer uses a main() provided by libfuzzer, and needs to

RE: QEMU for Qualcomm Hexagon - KVM Forum talk and code available

2019-11-13 Thread Taylor Simpson
Responses below ... Taylor Taylor Simpson writes: > I had discussions with several people at the KVM Forum, and I’ve been > thinking about how to divide up the code for community review. Here is my > proposal for the steps. > > 1. linux-user changes + linux-user/hexagon + skeleton of >

Re: QEMU for Qualcomm Hexagon - KVM Forum talk and code available

2019-11-13 Thread Richard Henderson
On 11/13/19 8:31 PM, Taylor Simpson wrote: > [Taylor] Currently, I have the generator and the generated code sitting in > the source tree. I'm flexible on this if the decision is to regenerate it > every time. I would prefer to regenerate every time, and not store the generated code in the

Re: [PATCH 0/2] Introducing QMP query-netdevs command

2019-11-13 Thread Eric Blake
On 11/13/19 3:25 PM, Alexey Kirillov wrote: This patch introduces a new QMP command "query-netdevs" to get information about currently attached network devices. Potentially, this patch makes the "info_str" field of "struct NetClientState" and HMP command "info network" obsolete as new command

[PATCH v3 1/4] aspeed/sdmc: Make ast2600 default 1G

2019-11-13 Thread Joel Stanley
Most boards have this much. Reviewed-by: Cédric Le Goater Reviewed-by: Alex Bennée Signed-off-by: Joel Stanley --- hw/misc/aspeed_sdmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c index f3a63a2e01db..2df3244b53c8

[PATCH v3 2/4] aspeed/scu: Fix W1C behavior

2019-11-13 Thread Joel Stanley
This models the clock write one to clear registers, and fixes up some incorrect behavior in all of the write to clear registers. There was also a typo in one of the register definitions. Reviewed-by: Cédric Le Goater Reviewed-by: Alex Bennée Signed-off-by: Joel Stanley --- v3: Beef up the

[PATCH v3 0/4] arm/aspeed: Watchdog and SDRAM fixes

2019-11-13 Thread Joel Stanley
Three of these are fixes for ast2600 models that I found when testing master. The forth is a usability improvement that is helpful when diagnosing why a watchdog is biting. v3 adds some comments and fixes whitespace, and r-b from Alex. Thanks for the review Alex. v2 fixes some review comments

[PATCH v5 02/20] libqos: Rename i2c_send and i2c_recv

2019-11-13 Thread Oleinik, Alexander
The names i2c_send and i2c_recv collide with functions defined in hw/i2c/core.c. This causes an error when linking against libqos and softmmu simultaneously (for example when using qtest inproc). Rename the libqos functions to avoid this. Signed-off-by: Alexander Bulekov --- tests/libqos/i2c.c

[PATCH v5 12/20] libqtest: add in-process qtest.c tx/rx handlers

2019-11-13 Thread Oleinik, Alexander
Signed-off-by: Alexander Bulekov --- tests/libqtest.c | 54 tests/libqtest.h | 3 ++- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 6d3bcb6766..da0e5c7ef8 100644 --- a/tests/libqtest.c

Re: [PATCH v9 Kernel 1/5] vfio: KABI for migration interface for device state

2019-11-13 Thread Kirti Wankhede
On 11/13/2019 11:57 PM, Alex Williamson wrote: On Wed, 13 Nov 2019 11:24:17 +0100 Cornelia Huck wrote: On Tue, 12 Nov 2019 15:30:05 -0700 Alex Williamson wrote: On Tue, 12 Nov 2019 22:33:36 +0530 Kirti Wankhede wrote: - Defined MIGRATION region type and sub-type. - Used 3 bits to

Re: [PULL 04/11] target/arm/cpu64: max cpu: Introduce sve properties

2019-11-13 Thread Richard Henderson
On 11/12/19 11:23 AM, Peter Maydell wrote: >> +static uint32_t sve_zcr_get_valid_len(ARMCPU *cpu, uint32_t start_len) >> +{ >> +uint32_t start_vq = (start_len & 0xf) + 1; >> + >> +return arm_cpu_vq_map_next_smaller(cpu, start_vq + 1) - 1; > > "Subtract operation overflows on operands >

Re: [PATCH v9 Kernel 1/5] vfio: KABI for migration interface for device state

2019-11-13 Thread Alex Williamson
On Thu, 14 Nov 2019 01:47:04 +0530 Kirti Wankhede wrote: > On 11/14/2019 1:18 AM, Alex Williamson wrote: > > On Thu, 14 Nov 2019 00:59:52 +0530 > > Kirti Wankhede wrote: > > > >> On 11/13/2019 11:57 PM, Alex Williamson wrote: > >>> On Wed, 13 Nov 2019 11:24:17 +0100 > >>> Cornelia Huck

[PATCH v5 00/20] Add virtual device fuzzing support

2019-11-13 Thread Oleinik, Alexander
This series adds a framework for coverage-guided fuzzing of virtual-devices. Fuzzing targets are based on qtest and can make use of the libqos abstractions. V5: * misc fixes addressing V4 comments * cleanup in-process handlers/globals in libqtest.c * small fixes to fork-based fuzzing and

[PATCH v5 04/20] qtest: add qtest_server_send abstraction

2019-11-13 Thread Oleinik, Alexander
qtest_server_send is a function pointer specifying the handler used to transmit data to the qtest client. In the standard configuration, this calls the CharBackend handler, but now it is possible for other types of handlers, e.g direct-function calls if the qtest client and server exist within the

Re: [PATCH v9 Kernel 3/5] vfio iommu: Add ioctl defination to unmap IOVA and return dirty bitmap

2019-11-13 Thread Kirti Wankhede
On 11/13/2019 4:00 AM, Alex Williamson wrote: On Tue, 12 Nov 2019 22:33:38 +0530 Kirti Wankhede wrote: With vIOMMU, during pre-copy phase of migration, while CPUs are still running, IO virtual address unmap can happen while device still keeping reference of guest pfns. Those pages should

Re: [PATCH v9 Kernel 2/5] vfio iommu: Add ioctl defination to get dirty pages bitmap.

2019-11-13 Thread Alex Williamson
On Thu, 14 Nov 2019 01:07:21 +0530 Kirti Wankhede wrote: > On 11/13/2019 4:00 AM, Alex Williamson wrote: > > On Tue, 12 Nov 2019 22:33:37 +0530 > > Kirti Wankhede wrote: > > > >> All pages pinned by vendor driver through vfio_pin_pages API should be > >> considered as dirty during migration.

Re: [PATCH v9 Kernel 1/5] vfio: KABI for migration interface for device state

2019-11-13 Thread Kirti Wankhede
On 11/14/2019 1:18 AM, Alex Williamson wrote: On Thu, 14 Nov 2019 00:59:52 +0530 Kirti Wankhede wrote: On 11/13/2019 11:57 PM, Alex Williamson wrote: On Wed, 13 Nov 2019 11:24:17 +0100 Cornelia Huck wrote: On Tue, 12 Nov 2019 15:30:05 -0700 Alex Williamson wrote: On Tue, 12 Nov

[PATCH v3 3/4] watchdog/aspeed: Improve watchdog timeout message

2019-11-13 Thread Joel Stanley
Users benefit from knowing which watchdog timer has expired. The address of the watchdog's registers unambiguously indicates which has expired, so log that. Reviewed-by: Cédric Le Goater Reviewed-by: Alex Bennée Signed-off-by: Joel Stanley --- v2: Use HWADDR_PRIx v3: Fix spacing ---

Re: About MONITOR/MWAIT in i386 CPU model

2019-11-13 Thread Eduardo Habkost
On Wed, Nov 13, 2019 at 04:42:25PM +0800, Tao Xu wrote: > Hi Eduardo, > > After kvm use "-overcommit cpu-pm=on" to expose MONITOR/MWAIT > (commit id 6f131f13e68d648a8e4f083c667ab1acd88ce4cd), the MONITOR/MWAIT > feature in CPU model (phenom core2duo coreduo n270 Opteron_G3 EPYC Snowridge >

Re: [PATCH v9 Kernel 2/5] vfio iommu: Add ioctl defination to get dirty pages bitmap.

2019-11-13 Thread Kirti Wankhede
On 11/13/2019 4:00 AM, Alex Williamson wrote: On Tue, 12 Nov 2019 22:33:37 +0530 Kirti Wankhede wrote: All pages pinned by vendor driver through vfio_pin_pages API should be considered as dirty during migration. IOMMU container maintains a list of all such pinned pages. Added an ioctl

Re: [PULL 04/11] target/arm/cpu64: max cpu: Introduce sve properties

2019-11-13 Thread Peter Maydell
On Wed, 13 Nov 2019 at 20:17, Richard Henderson wrote: > > On 11/12/19 11:23 AM, Peter Maydell wrote: > >> +static uint32_t sve_zcr_get_valid_len(ARMCPU *cpu, uint32_t start_len) > >> +{ > >> +uint32_t start_vq = (start_len & 0xf) + 1; > >> + > >> +return arm_cpu_vq_map_next_smaller(cpu,

Re: [PATCH 1/2] qapi: net: Add query-netdevs command

2019-11-13 Thread Eric Blake
On 11/13/19 3:25 PM, Alexey Kirillov wrote: Add a qmp command that provides information about currently attached network devices and their configuration. Signed-off-by: Alexey Kirillov --- +++ b/qapi/net.json @@ -754,3 +754,88 @@ ## { 'event': 'FAILOVER_NEGOTIATED', 'data':

[PATCH v5 06/20] module: check module wasn't already initialized

2019-11-13 Thread Oleinik, Alexander
The virtual-device fuzzer must initialize QOM, prior to running vl:qemu_init, so that it can use the qos_graph to identify the arguments required to initialize a guest for libqos-assisted fuzzing. This change prevents errors when vl:qemu_init tries to (re)initialize the previously initialized QOM

[PATCH v5 05/20] libqtest: Add a layer of abstraciton to send/recv

2019-11-13 Thread Oleinik, Alexander
This makes it simple to swap the transport functions for qtest commands to and from the qtest client. For example, now it is possible to directly pass qtest commands to a server handler that exists within the same process, without the standard way of writing to a file descriptor. Signed-off-by:

[PATCH 1/2] qapi: net: Add query-netdevs command

2019-11-13 Thread Alexey Kirillov
Add a qmp command that provides information about currently attached network devices and their configuration. Signed-off-by: Alexey Kirillov --- include/net/net.h | 1 + net/hub.c | 8 +++ net/l2tpv3.c | 19 +++ net/net.c | 80 +

[PATCH 0/2] Introducing QMP query-netdevs command

2019-11-13 Thread Alexey Kirillov
This patch introduces a new QMP command "query-netdevs" to get information about currently attached network devices. Potentially, this patch makes the "info_str" field of "struct NetClientState" and HMP command "info network" obsolete as new command gives out more information in a structured way.

[PATCH v5 08/20] tests: provide test variables to other targets

2019-11-13 Thread Oleinik, Alexander
Before, when tests/Makefile.include was included, the contents would be ignored if config-host.mak was defined. Moving the ifneq responsible for this allows a target to depend on both testing-related and host-related objects. For example the virtual-device fuzzer relies on both libqtest/libqos

[PATCH v5 07/20] qtest: add in-process incoming command handler

2019-11-13 Thread Oleinik, Alexander
The handler allows a qtest client to send commands to the server by directly calling a function, rather than using a file/CharBackend Signed-off-by: Alexander Bulekov --- include/sysemu/qtest.h | 1 + qtest.c| 13 + 2 files changed, 14 insertions(+) diff --git

[PATCH v5 13/20] fuzz: add configure flag --enable-fuzzing

2019-11-13 Thread Oleinik, Alexander
Signed-off-by: Alexander Bulekov --- configure | 39 +++ 1 file changed, 39 insertions(+) diff --git a/configure b/configure index 3be9e92a24..aeca632dd9 100755 --- a/configure +++ b/configure @@ -501,6 +501,7 @@ libxml2="" debug_mutex="no" libpmem=""

[PATCH v5 03/20] fuzz: Add FUZZ_TARGET module type

2019-11-13 Thread Oleinik, Alexander
Signed-off-by: Alexander Bulekov --- include/qemu/module.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/qemu/module.h b/include/qemu/module.h index 65ba596e46..684753d808 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -46,6 +46,7 @@ typedef

[PATCH v5 20/20] fuzz: add documentation to docs/devel/

2019-11-13 Thread Oleinik, Alexander
Signed-off-by: Alexander Bulekov --- docs/devel/fuzzing.txt | 119 + 1 file changed, 119 insertions(+) create mode 100644 docs/devel/fuzzing.txt diff --git a/docs/devel/fuzzing.txt b/docs/devel/fuzzing.txt new file mode 100644 index

[PATCH v5 11/20] libqtest: make bufwrite rely on the TransportOps

2019-11-13 Thread Oleinik, Alexander
When using qtest "in-process" communication, qtest_sendf directly calls a function in the server (qtest.c). Previously, bufwrite used socket_send, which bypasses the TransportOps enabling the call into qtest.c. This change replaces the socket_send calls with ops->send, maintaining the benefits of

[PATCH v5 10/20] libqos: move useful qos-test funcs to qos_external

2019-11-13 Thread Oleinik, Alexander
The moved functions are not specific to qos-test and might be useful elsewhere. For example the virtual-device fuzzer makes use of them for qos-assisted fuzz-targets. Signed-off-by: Alexander Bulekov --- tests/Makefile.include | 1 + tests/libqos/qos_external.c | 168

[PATCH v5 09/20] libqos: split qos-test and libqos makefile vars

2019-11-13 Thread Oleinik, Alexander
Most qos-related objects were specified in the qos-test-obj-y variable. qos-test-obj-y also included qos-test.o which defines a main(). This made it difficult to repurpose qos-test-obj-y to link anything beside tests/qos-test against libqos. This change separates objects that are libqos-specific

[PATCH v5 16/20] fuzz: add support for fork-based fuzzing.

2019-11-13 Thread Oleinik, Alexander
fork() is a simple way to ensure that state does not leak in between fuzzing runs. Unfortunately, the fuzzer mutation engine relies on bitmaps which contain coverage information for each fuzzing run, and these bitmaps should be copied from the child to the parent(where the mutation occurs). These

[PATCH v5 15/20] fuzz: add fuzzer skeleton

2019-11-13 Thread Oleinik, Alexander
tests/fuzz/fuzz.c serves as the entry point for the virtual-device fuzzer. Namely, libfuzzer invokes the LLVMFuzzerInitialize and LLVMFuzzerTestOneInput functions, both of which are defined in this file. This change adds a "FuzzTarget" struct, along with the fuzz_add_target function, which should

Re: [PATCH v3 for-4.2 0/4] Better NBD string length handling

2019-11-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191114024635.11363-1-ebl...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

[PATCH v5 17/20] fuzz: add support for qos-assisted fuzz targets

2019-11-13 Thread Oleinik, Alexander
Signed-off-by: Alexander Bulekov --- tests/fuzz/qos_fuzz.c | 232 ++ tests/fuzz/qos_fuzz.h | 33 ++ 2 files changed, 265 insertions(+) create mode 100644 tests/fuzz/qos_fuzz.c create mode 100644 tests/fuzz/qos_fuzz.h diff --git

Re: [PATCH v14 03/11] tests: Add test for QAPI builtin type time

2019-11-13 Thread Tao Xu
On 11/14/2019 6:06 AM, Eduardo Habkost wrote: On Wed, Nov 13, 2019 at 09:01:29AM +0800, Tao Xu wrote: On 11/13/2019 4:15 AM, Eduardo Habkost wrote: On Fri, Nov 08, 2019 at 09:05:52AM +0100, Markus Armbruster wrote: Tao Xu writes: On 11/7/2019 9:31 PM, Eduardo Habkost wrote: On Thu, Nov

Re: [PATCH v3 for-4.2 0/4] Better NBD string length handling

2019-11-13 Thread Eric Blake
On 11/13/19 9:00 PM, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20191114024635.11363-1-ebl...@redhat.com/ from /tmp/qemu-test/src/include/qemu/osdep.h:140, from /tmp/qemu-test/src/nbd/server.c:20: /tmp/qemu-test/src/nbd/server.c: In

Re: [PATCH v9 Kernel 1/5] vfio: KABI for migration interface for device state

2019-11-13 Thread Yan Zhao
On Thu, Nov 14, 2019 at 03:02:55AM +0800, Kirti Wankhede wrote: > > > On 11/13/2019 8:53 AM, Yan Zhao wrote: > > On Wed, Nov 13, 2019 at 06:30:05AM +0800, Alex Williamson wrote: > >> On Tue, 12 Nov 2019 22:33:36 +0530 > >> Kirti Wankhede wrote: > >> > >>> - Defined MIGRATION region type and

[PATCH v5 14/20] fuzz: Add target/fuzz makefile rules

2019-11-13 Thread Oleinik, Alexander
Signed-off-by: Alexander Bulekov --- Makefile| 15 ++- Makefile.objs | 4 +++- Makefile.target | 18 +- tests/fuzz/Makefile.include | 4 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644

[PATCH v5 18/20] fuzz: add i440fx fuzz targets

2019-11-13 Thread Oleinik, Alexander
These three targets should simply fuzz reads/writes to a couple ioports, but they mostly serve as examples of different ways to write targets. They demonstrate using qtest and qos for fuzzing, as well as using rebooting and forking to reset state, or not resetting it at all. Signed-off-by:

Re: About MONITOR/MWAIT in i386 CPU model

2019-11-13 Thread Tao Xu
On 11/14/2019 6:47 AM, Eduardo Habkost wrote: On Wed, Nov 13, 2019 at 04:42:25PM +0800, Tao Xu wrote: Hi Eduardo, After kvm use "-overcommit cpu-pm=on" to expose MONITOR/MWAIT (commit id 6f131f13e68d648a8e4f083c667ab1acd88ce4cd), the MONITOR/MWAIT feature in CPU model (phenom core2duo coreduo

[PATCH v3 3/4] nbd: Don't send oversize strings

2019-11-13 Thread Eric Blake
Qemu as server currently won't accept export names larger than 256 bytes, nor create dirty bitmap names longer than 1023 bytes, so most uses of qemu as client or server have no reason to get anywhere near the NBD spec maximum of a 4k limit per string. However, we weren't actually enforcing

[PATCH v3 2/4] bitmap: Enforce maximum bitmap name length

2019-11-13 Thread Eric Blake
We document that for qcow2 persistent bitmaps, the name cannot exceed 1023 bytes. It is inconsistent if transient bitmaps do not have to abide by the same limit, and it is unlikely that any existing client even cares about using bitmap names this long. It's time to codify that ALL bitmaps

Re: [PATCH v3 for-4.2 0/4] Better NBD string length handling

2019-11-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191114024635.11363-1-ebl...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [PATCH v3 1/4] nbd/server: Prefer heap over stack for parsing client names

2019-11-13 Thread Eric Blake
On 11/13/19 8:46 PM, Eric Blake wrote: As long as we limit NBD names to 256 bytes (the bare minimum permitted by the standard), stack-allocation works for parsing a name received from the client. But as mentioned in a comment, we eventually want to permit up to the 4k maximum of the NBD

Re: [PATCH RFC] virtio-pci: disable vring processing when bus-mastering is disabled

2019-11-13 Thread Michael Roth
Quoting Michael S. Tsirkin (2019-11-13 04:09:02) > On Tue, Nov 12, 2019 at 11:43:01PM -0600, Michael Roth wrote: > > Currently the SLOF firmware for pseries guests will disable/re-enable > > a PCI device multiple times via IO/MEM/MASTER bits of PCI_COMMAND > > register after the initial

<    1   2   3   >