Re: [PATCH] CHANGELOG: remove disused file

2020-10-22 Thread Thomas Huth
On 22/10/2020 18.28, John Snow wrote: > There's no reason to keep this here; the versions described are > ancient. Everything here is still mirrored on > https://wiki.qemu.org/ChangeLog/old if anyone is curious; otherwise, use > the git history. > > Signed-off-by: John Snow > --- > Changelog |

Re: [PATCH v5 2/2] hw/block/nvme: add the dataset management command

2020-10-22 Thread Klaus Jensen
On Oct 22 23:02, Philippe Mathieu-Daudé wrote: > Hi Klaus, > Hi Philippe, Thanks for your comments! > On 10/22/20 8:49 PM, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add support for the Dataset Management command and the Deallocate > > attribute. Deallocation results in discards

Re: [PATCH v3 00/15] raspi: add the bcm2835 cprman clock manager

2020-10-22 Thread Guenter Roeck
On 10/22/20 3:06 PM, Philippe Mathieu-Daudé wrote: > Cc'ing Guenter who had a similar patch and might be interested > to test :) > I applied the series on top of qemu mainline and ran all my test with it (raspi2 with qemu-system-arm as well as qemu-system-aarch64, and raspi3 in both big endian

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread David Gibson
On Thu, 22 Oct 2020 11:01:04 -0400 "Michael S. Tsirkin" wrote: > On Thu, Oct 22, 2020 at 05:50:51PM +0300, Marcel Apfelbaum wrote: > [...] > > Right. After detecting just failing unconditionally it a bit too > simplistic IMHO. There's also another factor here, which I thought I'd mentioned

Enable MSI-X support in PCIe device.

2020-10-22 Thread Douglas Su
To use MSI-X interrupt in my PCIe device, In realize() function I make a MSIX initialization like this: #define MYDEV_MSIX_VEC_NUM 5 void realize() { memory_region_init(>msix, OBJECT(edu), "mydev-msix", MYDEV_MSIX_SIZE); pci_register_bar(pdev, MYDEV_MSIX_IDX,

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread David Gibson
On Thu, 22 Oct 2020 16:55:10 +0300 Marcel Apfelbaum wrote: > Hi David, Michael, > > On Thu, Oct 22, 2020 at 3:56 PM David Gibson wrote: > > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread David Gibson
On Thu, 22 Oct 2020 09:15:28 -0400 "Michael S. Tsirkin" wrote: > On Thu, Oct 22, 2020 at 11:56:32PM +1100, David Gibson wrote: > [...] > [...] > [...] > > > > > > Probably the only way to handle for existing machine types. > > > For new ones, can't we queue it in host memory somewhere?

Re: [PULL 22/23] hw/sd: Fix incorrect populated function switch status data structure

2020-10-22 Thread Bin Meng
Hi Niek, On Thu, Oct 22, 2020 at 11:20 PM Niek Linnenbank wrote: > > Hi Bin, Philippe, > > If im correct the acceptance tests for orange pi need to be run with a flag > ARMBIAN_ARTIFACTS_CACHED set that explicitly allows them to be run using the > armbian mirror. So if you pass that flag on

Re: Emulation for riscv

2020-10-22 Thread Alistair Francis
On Thu, Oct 22, 2020 at 4:58 PM Moises Arreola wrote: > > Hello everyone, my name is Moses and I'm trying to set up a VM for a risc-v > processor, I'm using the Risc-V Getting Started Guide and on the final step > I'm getting an error while trying to launch the virtual machine using the cmd:

RE: [PATCH] i386/cpu: Expose the PTWRITE to the guest

2020-10-22 Thread Kang, Luwei
> > PTWRITE provides a mechanism by which software can instrument the > > Intel PT trace. The current implementation will mask off this feature > > when the PTWRITE is supported on the host because of the Intel PT > > CPUID is a constant value(ICX CPUID) in qemu. This patch will expose > > the

Emulation for riscv

2020-10-22 Thread Moises Arreola
Hello everyone, my name is Moses and I'm trying to set up a VM for a risc-v processor, I'm using the Risc-V Getting Started Guide and on the final step I'm getting an error while trying to launch the virtual machine using the cmd: sudo qemu-system-riscv64 -nographic -machine virt \ -kernel

Re: [PATCH v3 00/15] raspi: add the bcm2835 cprman clock manager

2020-10-22 Thread Guenter Roeck
Hi, On 10/22/20 3:06 PM, Philippe Mathieu-Daudé wrote: > Cc'ing Guenter who had a similar patch and might be interested > to test :) > great. I think my patch doesn't work anymore since qemu 5.0 (at least not for raspi3), and it was pretty hackish anyway. I'll give the series a try. Guenter >

[PATCH 4/4] pc: Use object_class_property_add_bool_ptr()

2020-10-22 Thread Eduardo Habkost
Get rid of manually written property getters/setters. Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Cc: qemu-devel@nongnu.org --- hw/i386/pc.c | 57

[PATCH 2/4] autz/listfile: Use object_class_property_add_bool_ptr()

2020-10-22 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- Cc: "Daniel P. Berrangé" Cc: qemu-devel@nongnu.org --- authz/listfile.c | 27 +++ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/authz/listfile.c b/authz/listfile.c index aaf930453d..911c4e45f2 100644 ---

[PATCH 3/4] machine: Use object_class_property_add_bool_ptr() when possible

2020-10-22 Thread Eduardo Habkost
Get rid if some manually written properties getters/setters. Not all properties could be converted because they have extra logic in the property setter. Signed-off-by: Eduardo Habkost --- Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: qemu-devel@nongnu.org --- hw/core/machine.c | 78

[PATCH 1/4] qom: object*_property_add_bool_ptr() functions

2020-10-22 Thread Eduardo Habkost
Provide helpers for registering boolean properties that simply read/write a struct field, to reduce the need to manually write property getters and setters. Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org ---

[PATCH 0/4] qom: Introduce object*_property_add_bool_ptr() functions

2020-10-22 Thread Eduardo Habkost
Based-on: 20201009160122.1662082-1-ehabk...@redhat.com Git branch: https://github.com/ehabkost/qemu work/qom-bool-ptr-prop This series introduces a helper to make it easier to register simple boolan QOM properties. It will be useful for simplifying existing property code in some types that can't

[Bug 1894869] Re: Chelsio T4 has old MSIX PBA offset bug

2020-10-22 Thread Bug Watch Updater
** Changed in: debian Status: In Progress => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1894869 Title: Chelsio T4 has old MSIX PBA offset bug Status in QEMU: Invalid Status in

Re: [PATCH v27 17/17] qapi: Add VFIO devices migration stats in Migration stats

2020-10-22 Thread Alex Williamson
On Thu, 22 Oct 2020 16:42:07 +0530 Kirti Wankhede wrote: > Added amount of bytes transferred to the VM at destination by all VFIO > devices > > Signed-off-by: Kirti Wankhede > Reviewed-by: Dr. David Alan Gilbert > --- > hw/vfio/common.c| 20 >

Re: [PATCH v3 00/15] raspi: add the bcm2835 cprman clock manager

2020-10-22 Thread Philippe Mathieu-Daudé
Cc'ing Guenter who had a similar patch and might be interested to test :) patch 16/15 fixup: https://www.mail-archive.com/qemu-devel@nongnu.org/msg752113.html On 10/10/20 3:57 PM, Luc Michel wrote: v2 -> v3: - patch 03: moved clock_new definition to hw/core/clock.c [Phil] - patch 03:

[RFC PATCH] hw/nvme: Move NVMe emulation out of hw/block/ directory

2020-10-22 Thread Philippe Mathieu-Daudé
As IDE used to be, NVMe emulation is becoming an active subsystem. Move it into its own namespace. Signed-off-by: Philippe Mathieu-Daudé --- sent as RFC, it case it helps NVMe developers. As nvme-next has patches queues, if the idea of moving seems useful, this patch can resend later. ---

Re: [PATCH v4 2/7] nbd: Add new qemu:allocation-depth metadata context

2020-10-22 Thread Eric Blake
On 10/14/20 6:52 AM, Vladimir Sementsov-Ogievskiy wrote: >>   docs/interop/nbd.txt | 27 ++--- > > [..] > >> +In the allocation depth context, bits 0 and 1 form a tri-state value: >> + >> +    bits 0-1: 00: NBD_STATE_DEPTH_UNALLOC, the extent is unallocated >> +  01:

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-22 Thread Eduardo Habkost
On Thu, Oct 22, 2020 at 07:06:58AM +0200, Markus Armbruster wrote: [...] > > I don't love object*_property_add_*_ptr() either. I consider the > > qdev property API better. But we need a reasonable alternative, > > because the qdev API can't be used by non-device objects yet. > > Emphasis on

Re: [PATCH v27 00/17] Add migration support for VFIO devices

2020-10-22 Thread Alex Williamson
On Thu, 22 Oct 2020 16:41:50 +0530 Kirti Wankhede wrote: > Hi, > > This Patch set adds migration support for VFIO devices in QEMU. We're cutting it pretty close for the 5.2 soft freeze, but clearly we've seen this series a few times. The key points for me are that I no longer see anything

Re: [PATCH v5 2/2] hw/block/nvme: add the dataset management command

2020-10-22 Thread Keith Busch
On Thu, Oct 22, 2020 at 11:02:04PM +0200, Philippe Mathieu-Daudé wrote: > On 10/22/20 8:49 PM, Klaus Jensen wrote: > > +static uint16_t nvme_dsm(NvmeCtrl *n, NvmeRequest *req) > > +{ > > +NvmeNamespace *ns = req->ns; > > +NvmeDsmCmd *dsm = (NvmeDsmCmd *) >cmd; > > +NvmeDsmRange *range

Re: [PATCH v2 15/20] iotests: 219: prepare for backup over block-copy

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
23.07.2020 11:35, Max Reitz wrote: On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: The further change of moving backup to be a on block-copy call will -on? make copying chunk-size and cluster-size a separate things. So, even s/a/two/ with 64k cluster sized qcow2 image, default

Re: Ramping up Continuous Fuzzing of Virtual Devices in QEMU

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/22/20 6:39 PM, Daniel P. Berrangé wrote: On Thu, Oct 22, 2020 at 12:24:16PM -0400, Alexander Bulekov wrote: +CC Prasad On 201022 1219, Alexander Bulekov wrote: Hello, QEMU was accepted into Google's oss-fuzz continuous-fuzzing platform [1] earlier this year. The fuzzers currently

Re: [PATCH v2 14/20] iotests: 185: prepare for backup over block-copy

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
23.07.2020 11:19, Max Reitz wrote: On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: The further change of moving backup to be a on block-copy call will -on? one :) make copying chunk-size and cluster-size a separate things. So, even s/a/two/ with 64k cluster sized qcow2 image,

Re: [PATCH v2 13/20] iotests: 129: prepare for backup over block-copy

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
23.07.2020 11:03, Max Reitz wrote: On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: After introducing parallel async copy requests instead of plain cluster-by-cluster copying loop, backup job may finish earlier than final assertion in do_test_stop. Let's require slow backup explicitly by

Re: [PATCH 1/2] target/m68k: remove useless qregs array

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/22/20 10:29 PM, Laurent Vivier wrote: They are unused since the target has been converted to TCG. Fixes: e1f3808e03f7 ("Convert m68k target to TCG.") Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé --- target/m68k/cpu.h | 4 1 file changed, 4 deletions(-)

Re: [PATCH v5 2/2] hw/block/nvme: add the dataset management command

2020-10-22 Thread Philippe Mathieu-Daudé
Hi Klaus, On 10/22/20 8:49 PM, Klaus Jensen wrote: From: Klaus Jensen Add support for the Dataset Management command and the Deallocate attribute. Deallocation results in discards being sent to the underlying block device. Whether of not the blocks are actually deallocated is affected by the

Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-22 Thread Peter Xu
On Thu, Oct 22, 2020 at 06:39:37PM +0200, Jean-Philippe Brucker wrote: > So what I'd like to do for next version: > > * Set qemu_real_host_page_mask as the default page mask, instead of the > rather arbitrary TARGET_PAGE_MASK. Oh, I thought TARGET_PAGE_MASK was intended - kernel committ

Re: [PATCH v3 12/17] hw/block/nvme: add support for scatter gather lists

2020-10-22 Thread Philippe Mathieu-Daudé
On 9/22/20 10:45 AM, Klaus Jensen wrote: From: Klaus Jensen For now, support the Data Block, Segment and Last Segment descriptor types. See NVM Express 1.3d, Section 4.4 ("Scatter Gather List (SGL)"). Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch --- include/block/nvme.h | 6 +-

Re: [PATCH v2 08/20] block/block-copy: add block_copy_cancel

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
22.07.2020 14:28, Max Reitz wrote: On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: Add function to cancel running async block-copy call. It will be used in backup. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 7 +++ block/block-copy.c |

Re: [PATCH v2 11/20] qapi: backup: add x-max-chunk and x-max-workers parameters

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
22.07.2020 15:22, Max Reitz wrote: On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: Add new parameters to configure future backup features. The patch doesn't introduce aio backup requests (so we actually have only one worker) neither requests larger than one cluster. Still, formally we

Re: [PATCH v27 14/17] vfio: Dirty page tracking when vIOMMU is enabled

2020-10-22 Thread Alex Williamson
On Thu, 22 Oct 2020 16:42:04 +0530 Kirti Wankhede wrote: > When vIOMMU is enabled, register MAP notifier from log_sync when all > devices in container are in stop and copy phase of migration. Call replay > and get dirty pages from notifier callback. > > Suggested-by: Alex Williamson >

[PATCH 2/2] target/m68k: Add vmstate definition for M68kCPU

2020-10-22 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- target/m68k/cpu.h| 1 + target/m68k/cpu.c| 193 ++- target/m68k/fpu_helper.c | 10 +- 3 files changed, 198 insertions(+), 6 deletions(-) diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index

[PATCH 0/2] target/m68k: add vmstate structure to migrate M68kCPU

2020-10-22 Thread Laurent Vivier
First patch is a cleanup patch. The second patch defines the vmstate structure for M68kCPU. I have tested the migration with my experimental machine virt-m68k. I didn't check if q800 machine type has all the needed vmstates for all the hardware devices it uses. Thanks, Laurent Laurent Vivier

[PATCH 1/2] target/m68k: remove useless qregs array

2020-10-22 Thread Laurent Vivier
They are unused since the target has been converted to TCG. Fixes: e1f3808e03f7 ("Convert m68k target to TCG.") Signed-off-by: Laurent Vivier --- target/m68k/cpu.h | 4 1 file changed, 4 deletions(-) diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 521ac67cdd04..9a6f0400fcfe

Re: [PATCH v27 10/17] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled

2020-10-22 Thread Alex Williamson
Paolo, I think this would need your ack. Thanks, Alex On Thu, 22 Oct 2020 16:42:00 +0530 Kirti Wankhede wrote: > mr->ram_block is NULL when mr->is_iommu is true, then fr.dirty_log_mask > wasn't set correctly due to which memory listener's log_sync doesn't > get called. > This patch returns

Re: [PATCH v27 09/17] vfio: Add load state functions to SaveVMHandlers

2020-10-22 Thread Alex Williamson
On Thu, 22 Oct 2020 16:41:59 +0530 Kirti Wankhede wrote: > Sequence during _RESUMING device state: > While data for this device is available, repeat below steps: > a. read data_offset from where user application should write data. > b. write data of data_size to migration region from

Re: [PATCH] gitlab-ci: Clone from GitLab itself

2020-10-22 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Let GitLab runners use GitLab repository directly. Queued to testing/next, thanks. > Suggested-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé > --- > .gitlab-ci.yml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.gitlab-ci.yml

Re: [PATCH v3] virtiofsd: add container-friendly -o sandbox=chroot option

2020-10-22 Thread Vivek Goyal
On Thu, Oct 22, 2020 at 08:19:54PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > virtiofsd cannot run in a container because CAP_SYS_ADMIN is required to > > create namespaces. > > > > Introduce a weaker sandbox mode that is sufficient in container > >

Re: [PATCH v3] virtiofsd: add container-friendly -o sandbox=chroot option

2020-10-22 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > virtiofsd cannot run in a container because CAP_SYS_ADMIN is required to > create namespaces. > > Introduce a weaker sandbox mode that is sufficient in container > environments because the container runtime already sets up namespaces. > Use chroot

[PATCH RFC v5 12/12] iotests: rename and move 169 and 199 tests

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
Rename bitmaps migration tests and move them to tests subdirectory to demonstrate new human-friendly test naming. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/{199 => tests/migrate-bitmaps-postcopy-test} | 0 .../{199.out => tests/migrate-bitmaps-postcopy-test.out}

[PATCH v5 11/12] iotests: rewrite check into python

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
Just use classes introduced in previous three commits. Behavior difference is described in these three commits. Drop group file, as it becomes unused. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/check | 977 ++-

[PATCH v5 07/12] iotests: define group in each iotest

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
We are going to drop group file. Define group in tests as a preparatory step. The patch is generated by cd tests/qemu-iotests grep '^[0-9]\{3\} ' group | while read line; do file=$(awk '{print $1}' <<< "$line"); groups=$(sed -e 's/^... //' <<< "$line"); awk

[PATCH v5 10/12] iotests: add testrunner.py

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
Add TestRunner class, which will run tests in a new python iotests running framework. There are some differences with current ./check behavior, most significant are: - Consider all tests self-executable, just run them, don't run python by hand. - Elapsed time is cached in json file - Elapsed

[PATCH v5 04/12] iotests/283: make executable

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
All other test files are executable, except for this one. Fix that. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- tests/qemu-iotests/283 | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755

[PATCH v5 09/12] iotests: add testenv.py

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
Add TestEnv class, which will handle test environment in a new python iotests running framework. Difference with current ./check interface: - -v (verbose) option dropped, as it is unused - -xdiff option is dropped, until somebody complains that it is needed - same for -n option Signed-off-by:

[PATCH v5 03/12] iotests: fix some whitespaces in test output files

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
We are going to be stricter about comparing test result with .out files. So, fix some whitespaces now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/175.out | 2 +- tests/qemu-iotests/271.out | 12 ++-- tests/qemu-iotests/287.out | 10 +- 3 files changed,

[PATCH v5 06/12] iotests/294: add shebang line

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/294 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/294 b/tests/qemu-iotests/294 index 9c95ed8c9a..4bdb7364af 100755 --- a/tests/qemu-iotests/294 +++ b/tests/qemu-iotests/294 @@ -1,3 +1,4 @@ +#!/usr/bin/env

[PATCH v5 05/12] iotests/299: make executable

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/299 | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tests/qemu-iotests/299 diff --git a/tests/qemu-iotests/299 b/tests/qemu-iotests/299 old mode 100644 new mode 100755 -- 2.21.3

[PATCH v5 08/12] iotests: add findtests.py

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
Add python script with new logic of searching for tests: Current ./check behavior: - tests are named [0-9][0-9][0-9] - tests must be registered in group file (even if test doesn't belong to any group, like 142) Behavior of findtests.py: - group file is dropped - tests are all files in

[PATCH v5 01/12] iotests/277: use dot slash for nbd-fault-injector.py running

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
If you run './check 277', check includes common.config which adjusts $PATH to include '.' first, and therefore finds nbd-fault-injector.py on PATH. But if you run './277' directly, there is nothing to adjust PATH, and if '.' is not already on your PATH by other means, the test fails because the

Re: [PATCH v27 07/17] vfio: Register SaveVMHandlers for VFIO device

2020-10-22 Thread Alex Williamson
On Thu, 22 Oct 2020 16:41:57 +0530 Kirti Wankhede wrote: > Define flags to be used as delimiter in migration stream for VFIO devices. > Added .save_setup and .save_cleanup functions. Map & unmap migration > region from these functions at source during saving or pre-copy phase. > > Set VFIO

[PATCH v5 00/12] Rework iotests/check

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
Hi all! These series has 3 goals: - get rid of group file - introduce human-readable names for tests - rewrite check into python v5: [rebase on master] 02: new 03: updated 05,06: new 07: updated 09: rebased on master: vxhs removed qemu_prog path changed build_iotests path calculation

[PATCH v5 02/12] iotests/303: use dot slash for qcow2.py running

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
If you run './check 303', check includes common.config which adjusts $PATH to include '.' first, and therefore finds qcow2.py on PATH. But if you run './303' directly, there is nothing to adjust PATH, and if '.' is not already on your PATH by other means, the test fails because the executable is

[PATCH v5 2/2] hw/block/nvme: add the dataset management command

2020-10-22 Thread Klaus Jensen
From: Klaus Jensen Add support for the Dataset Management command and the Deallocate attribute. Deallocation results in discards being sent to the underlying block device. Whether of not the blocks are actually deallocated is affected by the same factors as Write Zeroes (see previous commit).

[PATCH v5 1/2] hw/block/nvme: add dulbe support

2020-10-22 Thread Klaus Jensen
From: Klaus Jensen Add support for reporting the Deallocated or Unwritten Logical Block Error (DULBE). Rely on the block status flags reported by the block layer and consider any block with the BDRV_BLOCK_ZERO flag to be deallocated. Multiple factors affect when a Write Zeroes command result

[PATCH v5 0/2] hw/block/nvme: dulbe and dsm support

2020-10-22 Thread Klaus Jensen
From: Klaus Jensen This adds support for the Deallocated or Unwritten Logical Block error recovery feature as well as the Dataset Management command. I wanted to add support for the NPDG and NPDA fields such that the host could get a hint on how many blocks to request deallocation of for the

Re: [PATCH v4 2/2] hw/block/nvme: add the dataset management command

2020-10-22 Thread Klaus Jensen
On Oct 22 10:50, Keith Busch wrote: > On Thu, Oct 22, 2020 at 07:43:33PM +0200, Klaus Jensen wrote: > > On Oct 22 08:01, Keith Busch wrote: > > > On Thu, Oct 22, 2020 at 09:33:13AM +0200, Klaus Jensen wrote: > > > > +if (--(*discards)) { > > > > +status = NVME_NO_COMPLETE; > >

Re: [PATCH v8 2/2] hw/misc/sifive_u_otp: Add backend drive support

2020-10-22 Thread Alistair Francis
On Mon, Oct 19, 2020 at 8:37 PM Green Wan wrote: > > Add '-drive' support to OTP device. Allow users to assign a raw file > as OTP image. > > test commands for 16k otp.img filled with zero: > > $ dd if=/dev/zero of=./otp.img bs=1k count=16 > $ ./qemu-system-riscv64 -M sifive_u -m 256M -nographic

[PATCH v12 12/14] copy-on-read: skip non-guest reads if no copy needed

2020-10-22 Thread Andrey Shinkevich via
If the flag BDRV_REQ_PREFETCH was set, skip idling read/write operations in COR-driver. It can be taken into account for the COR-algorithms optimization. That check is being made during the block stream job by the moment. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 12

Re: [PATCH v27 05/17] vfio: Add VM state change handler to know state of VM

2020-10-22 Thread Alex Williamson
On Thu, 22 Oct 2020 23:11:39 +0530 Kirti Wankhede wrote: > On 10/22/2020 10:05 PM, Alex Williamson wrote: > > On Thu, 22 Oct 2020 16:41:55 +0530 > > Kirti Wankhede wrote: > > > >> VM state change handler is called on change in VM's state. Based on > >> VM state, VFIO device state should be

[PATCH v12 13/14] stream: skip filters when writing backing file name to QCOW2 header

2020-10-22 Thread Andrey Shinkevich via
Avoid writing a filter JSON file name and a filter format name to QCOW2 image when the backing file is changed after the block stream job. A user is still able to assign the 'backing-file' parameter for a block-stream job keeping in mind the possible issue mentioned above. If the user does not

[PATCH v12 08/14] iotests: add #310 to test bottom node in COR driver

2020-10-22 Thread Andrey Shinkevich via
The test case #310 is similar to #216 by Max Reitz. The difference is that the test #310 involves a bottom node to the COR filter driver. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/310 | 109 + tests/qemu-iotests/310.out | 15 +++

[PATCH v12 05/14] qapi: create BlockdevOptionsCor structure for COR driver

2020-10-22 Thread Andrey Shinkevich via
Create the BlockdevOptionsCor structure for COR driver specific options splitting it off form the BlockdevOptionsGenericFormat. The only option 'bottom' node in the structure denotes an image file that limits the COR operations in the backing chain. Suggested-by: Max Reitz Signed-off-by: Andrey

[PATCH v12 10/14] block: include supported_read_flags into BDS structure

2020-10-22 Thread Andrey Shinkevich via
Add the new member supported_read_flags to the BlockDriverState structure. It will control the flags set for copy-on-read operations. Make the block generic layer evaluate supported read flags before they go to a block driver. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey

[PATCH v12 06/14] copy-on-read: pass bottom node name to COR driver

2020-10-22 Thread Andrey Shinkevich via
We are going to use the COR-filter for a block-stream job. To limit COR operations by the base node in the backing chain during stream job, pass the bottom node name, that is the first non-filter overlay of the base, to the copy-on-read driver as the base node itself may change due to possible

[PATCH v12 14/14] block: apply COR-filter to block-stream jobs

2020-10-22 Thread Andrey Shinkevich via
This patch completes the series with the COR-filter insertion for block-stream operations. Adding the filter makes it possible for copied regions to be discarded in backing files during the block-stream job, what will reduce the disk overuse. The COR-filter insertion incurs changes in the iotests

[PATCH v12 00/14] Apply COR-filter to the block-stream permanently

2020-10-22 Thread Andrey Shinkevich via
The node insert/remove functions were added at the block generic layer. COR-filter options structure was added to the QAPI. The test case #310 was added to check the 'bottom' node limit for COR. The 'supported_read_flags' member was added to the BDS structure (with the flags check at the block

[PATCH v12 09/14] block: modify the comment for BDRV_REQ_PREFETCH flag

2020-10-22 Thread Andrey Shinkevich via
Modify the comment for the flag BDRV_REQ_PREFETCH as we are going to use it alone and pass it to the COR-filter driver for further processing. Signed-off-by: Andrey Shinkevich --- include/block/block.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH v12 01/14] copy-on-read: support preadv/pwritev_part functions

2020-10-22 Thread Andrey Shinkevich via
Add support for the recently introduced functions bdrv_co_preadv_part() and bdrv_co_pwritev_part() to the COR-filter driver. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/copy-on-read.c | 28 1 file changed, 16 insertions(+),

[PATCH v12 03/14] copy-on-read: add filter drop function

2020-10-22 Thread Andrey Shinkevich via
Provide API for the COR-filter removal. Also, drop the filter child permissions for an inactive state when the filter node is being removed. This function may be considered as an intermediate solution before we are able to use bdrv_remove_node(). It will be possible once the QEMU permission update

[PATCH v12 02/14] block: add insert/remove node functions

2020-10-22 Thread Andrey Shinkevich via
Provide API for a node insertion to and removal from a backing chain. Suggested-by: Max Reitz Signed-off-by: Andrey Shinkevich --- block.c | 49 + include/block/block.h | 3 +++ 2 files changed, 52 insertions(+) diff --git

[PATCH v12 07/14] copy-on-read: limit COR operations to bottom node

2020-10-22 Thread Andrey Shinkevich via
Limit COR operations to the bottom node (inclusively) in the backing chain when the bottom node name is given. It will be useful for a block stream job when the COR-filter is applied. The bottom node is passed as the base itself may change due to concurrent commit jobs on the same backing chain.

[PATCH v12 04/14] qapi: add filter-node-name to block-stream

2020-10-22 Thread Andrey Shinkevich via
Provide the possibility to pass the 'filter-node-name' parameter to the block-stream job as it is done for the commit block job. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/monitor/block-hmp-cmds.c | 4 ++-- block/stream.c | 4 +++-

[PATCH v12 11/14] copy-on-read: add support for read flags to COR-filter

2020-10-22 Thread Andrey Shinkevich via
Add the BDRV_REQ_COPY_ON_READ and BDRV_REQ_PREFETCH flags to the supported_read_flags of the COR-filter. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/copy-on-read.c b/block/copy-on-read.c index 8178a91..a2b180a 100644 ---

Re: Ramping up Continuous Fuzzing of Virtual Devices in QEMU

2020-10-22 Thread Alexander Bulekov
On 201022 1739, Daniel P. Berrangé wrote: > On Thu, Oct 22, 2020 at 12:24:16PM -0400, Alexander Bulekov wrote: > > +CC Prasad > > > > On 201022 1219, Alexander Bulekov wrote: > > > Hello, > > > QEMU was accepted into Google's oss-fuzz continuous-fuzzing platform [1] > > > earlier this year. The

Re: [PATCH v4 2/2] hw/block/nvme: add the dataset management command

2020-10-22 Thread Keith Busch
On Thu, Oct 22, 2020 at 07:43:33PM +0200, Klaus Jensen wrote: > On Oct 22 08:01, Keith Busch wrote: > > On Thu, Oct 22, 2020 at 09:33:13AM +0200, Klaus Jensen wrote: > > > +if (--(*discards)) { > > > +status = NVME_NO_COMPLETE; > > > +} else { > > > +

Re: [PATCH 0/2] hw/block/nvme: two fixes for create sq/cq

2020-10-22 Thread Klaus Jensen
On Oct 22 08:20, Keith Busch wrote: > On Thu, Oct 22, 2020 at 03:24:02PM +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > The first patch is a follow up to "hw/block/nvme: fix prp mapping status > > codes" and fixes some status codes in the nvme_create_{sq,cq} functions. > > > > The

Re: [PATCH v4 2/2] hw/block/nvme: add the dataset management command

2020-10-22 Thread Klaus Jensen
On Oct 22 08:01, Keith Busch wrote: > On Thu, Oct 22, 2020 at 09:33:13AM +0200, Klaus Jensen wrote: > > +if (--(*discards)) { > > +status = NVME_NO_COMPLETE; > > +} else { > > +g_free(discards); > > +req->opaque = NULL; > > This case needs a >

Re: [PATCH v27 05/17] vfio: Add VM state change handler to know state of VM

2020-10-22 Thread Kirti Wankhede
On 10/22/2020 10:05 PM, Alex Williamson wrote: On Thu, 22 Oct 2020 16:41:55 +0530 Kirti Wankhede wrote: VM state change handler is called on change in VM's state. Based on VM state, VFIO device state should be changed. Added read/write helper functions for migration region. Added function

Re: [RFC] Using gitlab for upstream qemu repo?

2020-10-22 Thread Eric Blake
On 10/22/20 11:47 AM, Paolo Bonzini wrote: > Hi all, > > now that Gitlab is the primary CI infrastructure for QEMU, and that all > QEMU git repositories (including mirrors) are available on Gitlab, I > would like to propose that committers use Gitlab when merging commits to > QEMU repositories. >

[Bug 1901068] [NEW] Deleted tests are still run if they exist in the build tree

2020-10-22 Thread Havard Skinnemoen
Public bug reported: Steps to reproduce: 1. Add a new device along with a qtest to exercise it. 2. Run make check-qtest. It passes. 3. Revert the commit that added the device and qtest. 4. Run make check-qtest again. It now fails because the device no longer exists, but the test is somehow still

[RFC] Using gitlab for upstream qemu repo?

2020-10-22 Thread Paolo Bonzini
Hi all, now that Gitlab is the primary CI infrastructure for QEMU, and that all QEMU git repositories (including mirrors) are available on Gitlab, I would like to propose that committers use Gitlab when merging commits to QEMU repositories. There are four reasons for this: - this would be a

Re: [PATCH v6 3/6] migration: Maintain postcopy faulted addresses

2020-10-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Maintain a list of faulted addresses on the destination host for which we're > waiting on. This is implemented using a GTree rather than a real list to make > sure even there're plenty of vCPUs/threads that are faulting, the lookup will > still be fast with

[PATCH] target/arm: Get correct MMU index for other-security-state

2020-10-22 Thread Peter Maydell
In arm_v7m_mmu_idx_for_secstate() we get the 'priv' level to pass to armv7m_mmu_idx_for_secstate_and_priv() by calling arm_current_el(). This is incorrect when the security state being queried is not the current one, because arm_current_el() uses the current security state to determine which of

Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-22 Thread Jean-Philippe Brucker
On Fri, Oct 16, 2020 at 03:08:03PM +0200, Auger Eric wrote: > > +static int virtio_iommu_set_page_size_mask(IOMMUMemoryRegion *mr, > > + uint64_t page_size_mask, > > + Error **errp) > > +{ > > +int new_granule,

Re: [PATCH v10 07/10] memory: Add interface to set iommu page size mask

2020-10-22 Thread Jean-Philippe Brucker
On Fri, Oct 16, 2020 at 11:24:08AM +0200, Auger Eric wrote: > > +/* > > + * Set supported IOMMU page size > > + * > > + * If supported, allows to restrict the page size mask that can be > > supported > To match other docs: Optional method: > > + * with a given IOMMU memory

Re: [PATCH v10 05/10] virtio-iommu: Add replay() memory region callback

2020-10-22 Thread Jean-Philippe Brucker
On Fri, Oct 16, 2020 at 11:12:35AM +0200, Auger Eric wrote: > > +static gboolean virtio_iommu_remap(gpointer key, gpointer value, gpointer > > data) > > +{ > > +VirtIOIOMMUMapping *mapping = (VirtIOIOMMUMapping *) value; > > +VirtIOIOMMUInterval *interval = (VirtIOIOMMUInterval *) key; >

Re: [PATCH v10 03/10] virtio-iommu: Add memory notifiers for map/unmap

2020-10-22 Thread Jean-Philippe Brucker
On Fri, Oct 16, 2020 at 09:58:28AM +0200, Auger Eric wrote: > > +static void virtio_iommu_notify_map(IOMMUMemoryRegion *mr, hwaddr > > virt_start, > > +hwaddr virt_end, hwaddr paddr) > > +{ > > +IOMMUTLBEntry entry; > > +IOMMUNotifierFlag flags =

Re: [PATCH] CHANGELOG: remove disused file

2020-10-22 Thread Daniel P . Berrangé
On Thu, Oct 22, 2020 at 12:28:43PM -0400, John Snow wrote: > There's no reason to keep this here; the versions described are > ancient. Everything here is still mirrored on > https://wiki.qemu.org/ChangeLog/old if anyone is curious; otherwise, use > the git history. > > Signed-off-by: John Snow

Re: Ramping up Continuous Fuzzing of Virtual Devices in QEMU

2020-10-22 Thread Daniel P . Berrangé
On Thu, Oct 22, 2020 at 12:24:16PM -0400, Alexander Bulekov wrote: > +CC Prasad > > On 201022 1219, Alexander Bulekov wrote: > > Hello, > > QEMU was accepted into Google's oss-fuzz continuous-fuzzing platform [1] > > earlier this year. The fuzzers currently running on oss-fuzz are based on my > >

Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-22 Thread Jean-Philippe Brucker
On Mon, Oct 19, 2020 at 05:35:39PM -0400, Peter Xu wrote: > > +/* > > + * Disallow shrinking the page size. For example if an endpoint only > > + * supports 64kB pages, we can't globally enable 4kB pages. But that > > + * shouldn't happen, the host is unlikely to setup differing

Re: [PATCH v27 05/17] vfio: Add VM state change handler to know state of VM

2020-10-22 Thread Alex Williamson
On Thu, 22 Oct 2020 16:41:55 +0530 Kirti Wankhede wrote: > VM state change handler is called on change in VM's state. Based on > VM state, VFIO device state should be changed. > Added read/write helper functions for migration region. > Added function to set device_state. > > Signed-off-by:

Re: [PATCH v1 0/2] Add timeout mechanism to qmp actions

2020-10-22 Thread Fam Zheng
On Tue, 2020-10-20 at 09:34 +0800, Zhenyu Ye wrote: > On 2020/10/19 21:25, Paolo Bonzini wrote: > > On 19/10/20 14:40, Zhenyu Ye wrote: > > > The kernel backtrace for io_submit in GUEST is: > > > > > > guest# ./offcputime -K -p `pgrep -nx fio` > > > b'finish_task_switch' > > >

[PATCH] CHANGELOG: remove disused file

2020-10-22 Thread John Snow
There's no reason to keep this here; the versions described are ancient. Everything here is still mirrored on https://wiki.qemu.org/ChangeLog/old if anyone is curious; otherwise, use the git history. Signed-off-by: John Snow --- Changelog | 580

Re: Ramping up Continuous Fuzzing of Virtual Devices in QEMU

2020-10-22 Thread Alexander Bulekov
+CC Prasad On 201022 1219, Alexander Bulekov wrote: > Hello, > QEMU was accepted into Google's oss-fuzz continuous-fuzzing platform [1] > earlier this year. The fuzzers currently running on oss-fuzz are based on my > 2019 Google Summer of Code Project, which leveraged libfuzzer, qtest and >

  1   2   3   4   >