Re: [PATCH] vhost-vdpa: negotiate VIRTIO_NET_F_STATUS with driver

2020-10-15 Thread Jason Wang
On 2020/10/2 上午4:09, Si-Wei Liu wrote: Vendor driver may not support or implement config interrupt delivery for link status notifications. In this event, vendor driver is expected to NACK the feature, but guest will keep link always up. Signed-off-by: Si-Wei Liu --- net/vhost-vdpa.c | 1 +

Re: [PATCH] arm/trace: Fix hex printing

2020-10-15 Thread Auger Eric
Hi Dave, On 10/14/20 9:33 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Use of 0x%d - make up our mind as 0x%x > > Signed-off-by: Dr. David Alan Gilbert Acked-by: Eric Auger Thanks Eric > --- > hw/arm/trace-events | 2 +- > 1 file changed, 1 insertion(+), 1 d

Re: network buffering in fault tolerance

2020-10-15 Thread Jason Wang
On 2020/9/30 下午1:12, Shivam Mehra wrote: I came across this documentation with source code for providing network buffering to applications https://www.nfradead.org/~tgr/libnl/doc/api/route_2qdisc_2plug_8c_source.html

Re: [PATCH] hw/usb/hcd-dwc2: fix divide-by-zero in dwc2_handle_packet()

2020-10-15 Thread Paul Zimmerman
On Wed, Oct 14, 2020 at 12:55 PM Mauro Matteo Cascella wrote: > > On Tue, Oct 13, 2020 at 10:41 AM Gerd Hoffmann wrote: > > > > > > Also: What would be the effect of simply returning here? Would dwc2 > > > > emulation simply stop processing queues? Should we maybe raise an > > > > error IRQ? > >

Re: [PATCH 0/7] build: replace ninjatool with ninja

2020-10-15 Thread Howard Spoelstra
On Thu, Oct 15, 2020 at 8:34 AM Paolo Bonzini wrote: > On 15/10/20 08:15, Howard Spoelstra wrote: > > ERROR: meson setup failed > > > > When I set --ninja=ninja explicitly, this error does not occur: > > Found ninja.EXE-1.10.1 at C:\msys64\mingw64\bin/ninja.EXE > > That is fixed by Meson 0.55.2,

Re: [PATCH] monitor: Fix order in monitor_cleanup()

2020-10-15 Thread Kevin Wolf
Am 14.10.2020 um 19:20 hat Alex Bennée geschrieben: > > Kevin Wolf writes: > > > We can only destroy Monitor objects after we're sure that they are not > > in use by the dispatcher coroutine any more. This fixes crashes like the > > following where we tried to destroy a monitor mutex while the

Re: [PATCH] pci: advertise a page aligned ATS

2020-10-15 Thread Jason Wang
On 2020/9/9 下午4:17, Jason Wang wrote: After Linux kernel commit 61363c1474b1 ("iommu/vt-d: Enable ATS only if the device uses page aligned address."), ATS will be only enabled if device advertises a page aligned request. Unfortunately, vhost-net is the only user and we don't advertise the alig

Re: [PATCH 5/5] memory: Skip bad range assertion if notifier is DEVIOTLB_UNMAP type

2020-10-15 Thread Jason Wang
On 2020/10/4 上午1:38, Michael S. Tsirkin wrote: On Mon, Sep 28, 2020 at 01:48:57PM -0400, Peter Xu wrote: On Mon, Sep 28, 2020 at 11:05:01AM +0200, Eugenio Perez Martin wrote: On Fri, Sep 4, 2020 at 6:34 AM Jason Wang wrote: On 2020/9/4 上午12:14, Eugenio Pérez wrote: Device IOTLB invalidati

Re: [PATCH 00/10] COLO project queued patches 20-Oct

2020-10-15 Thread Jason Wang
On 2020/10/14 下午3:25, Zhang Chen wrote: From: Zhang Chen Hi Jason, this series include latest COLO related patches. please check and merge it. Thanks Zhang Chen Hi: I want to merge but I don't get patch 10/10. Is that lost during posting? Thanks Li Zhijian (2): colo-compare: fix

[PATCH 10/10] net/colo-compare.c: Increase default queued packet scan frequency

2020-10-15 Thread Zhang Chen
From: Zhang Chen In my test, use this default parameter looks better. Signed-off-by: Zhang Chen --- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index c22f2af941..36f8199bbb 100644 --- a/net/colo-compare.c +++ b/

RE: [PATCH 00/10] COLO project queued patches 20-Oct

2020-10-15 Thread Zhang, Chen
> -Original Message- > From: Jason Wang > Sent: Thursday, October 15, 2020 3:56 PM > To: Zhang, Chen ; qemu-dev de...@nongnu.org> > Cc: Zhang Chen > Subject: Re: [PATCH 00/10] COLO project queued patches 20-Oct > > > On 2020/10/14 下午3:25, Zhang Chen wrote: > > From: Zhang Chen > > >

Re: [RFC PATCH 00/12] hw/arm/virt: Introduce cpu and cache topology support

2020-10-15 Thread Andrew Jones
On Thu, Oct 15, 2020 at 10:07:16AM +0800, Ying Fang wrote: > > > On 10/14/2020 2:08 AM, Andrew Jones wrote: > > On Tue, Oct 13, 2020 at 12:11:20PM +, Zengtao (B) wrote: > > > Cc valentin > > > > > > > -Original Message- > > > > From: Qemu-devel > > > > [mailto:qemu-devel-bounces+prim

Re: [RFC PATCH v7 1/2] hw/misc/sifive_u_otp: Add write function and write-once protection

2020-10-15 Thread Bin Meng
On Thu, Oct 15, 2020 at 12:15 PM Green Wan wrote: > > - Add write operation to update fuse data bit when PWE bit is on. > - Add array, fuse_wo, to store the 'written' status for all bits >of OTP to block the write operation. > > Signed-off-by: Green Wan > Reviewed-by: Alistair Francis > --

[PATCH v2] hw/usb/hcd-dwc2: fix divide-by-zero in dwc2_handle_packet()

2020-10-15 Thread Mauro Matteo Cascella
Check the value of mps to avoid potential divide-by-zero later in the function. Since HCCHAR_MPS is guest controllable, this prevents a malicious/buggy guest from crashing the QEMU process on the host. Signed-off-by: Mauro Matteo Cascella Reviewed-by: Paul Zimmerman Reported-by: Gaoning Pan Rep

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

2020-10-15 Thread Bin Meng
On Thu, Oct 15, 2020 at 12:15 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

Re: [PATCH v3 2/4] Jobs based on custom runners: build environment docs and playbook

2020-10-15 Thread Daniel P . Berrangé
On Wed, Oct 14, 2020 at 03:19:47PM -0400, Cleber Rosa wrote: > On Wed, Oct 14, 2020 at 02:59:58PM -0400, Cleber Rosa wrote: > > On Wed, Oct 14, 2020 at 06:30:09PM +0100, Daniel P. Berrangé wrote: > > > > > > This needs updating to add meson, and with Paolo's series today you > > > might as well go

Re: [PATCH v3 4/4] Jobs based on custom runners: add job definitions for QEMU's machines

2020-10-15 Thread Daniel P . Berrangé
On Wed, Oct 14, 2020 at 07:24:30PM -0400, Cleber Rosa wrote: > On Wed, Oct 14, 2020 at 05:14:01PM -0400, Cleber Rosa wrote: > > On Wed, Oct 14, 2020 at 06:46:55PM +0100, Daniel P. Berrangé wrote: > > > > > > This bug links to > > > > > > https://bugs.launchpad.net/ubuntu/+source/libssh/+bug/184

Re: [PATCH v3 4/4] Jobs based on custom runners: add job definitions for QEMU's machines

2020-10-15 Thread Daniel P . Berrangé
On Wed, Oct 14, 2020 at 05:13:56PM -0400, Cleber Rosa wrote: > On Wed, Oct 14, 2020 at 06:46:55PM +0100, Daniel P. Berrangé wrote: > > On Wed, Oct 14, 2020 at 01:21:40AM -0400, Cleber Rosa wrote: > > > The QEMU project has two machines (aarch64 and s390) that can be used > > > for jobs that do buil

Re: [PATCH v2] fuzz: Disable QEMU's SIG{INT,HUP,TERM} handlers

2020-10-15 Thread Darren Kenny
On Wednesday, 2020-10-14 at 10:21:57 -04, Alexander Bulekov wrote: > Prior to this patch, the only way I found to terminate the fuzzer was > either to: > 1. Explicitly specify the number of fuzzer runs with the -runs= flag > 2. SIGKILL the process with "pkill -9 qemu-fuzz-*" or similar > > In add

Re: [PATCH v2 02/20] fuse: Allow exporting BDSs via FUSE

2020-10-15 Thread Kevin Wolf
Am 22.09.2020 um 12:49 hat Max Reitz geschrieben: > block-export-add type=fuse allows mounting block graph nodes via FUSE on > some existing regular file. That file should then appears like a raw > disk image, and accesses to it result in accesses to the exported BDS. > > Right now, we only imple

Re: [PATCH v11 11/13] stream: mark backing-file argument as deprecated

2020-10-15 Thread Andrey Shinkevich
On 14.10.2020 18:43, Vladimir Sementsov-Ogievskiy wrote: 14.10.2020 18:03, Max Reitz wrote: On 12.10.20 19:43, Andrey Shinkevich wrote: Whereas the block-stream job starts using a backing file name of the base node overlay after the block-stream job completes, mark the QMP 'backing-file' argume

Re: [PULL 00/10] migration queue

2020-10-15 Thread Thomas Huth
On 14/10/2020 22.01, Peter Xu wrote: > On Sun, Oct 11, 2020 at 07:29:25PM +0100, Peter Maydell wrote: >>> Migration: >>> Dirtyrate measurement API cleanup >>> Postcopy recovery fixes >>> >>> Virtiofsd: >>> Missing qemu_init_exec_dir call >>> Support for setting the group on socket creation

Re: [PATCH v4 08/12] tests/9pfs: change qtest name prefix to synth

2020-10-15 Thread Christian Schoenebeck
On Mittwoch, 14. Oktober 2020 21:38:16 CEST Greg Kurz wrote: > On Wed, 14 Oct 2020 17:25:35 +0200 > > Christian Schoenebeck wrote: > > On Donnerstag, 8. Oktober 2020 20:34:56 CEST Christian Schoenebeck wrote: > > > All existing 9pfs test cases are using the 'synth' fs driver so far, > > > which >

Re: [PATCH 0/7] build: replace ninjatool with ninja

2020-10-15 Thread Paolo Bonzini
On 15/10/20 09:39, Howard Spoelstra wrote: > > > Thanks Paolo, > > Then only the issue regarding the pcbios/optionrom stuff remains ;-) > > make[1]: *** No rule to make target 'multiboot.bin', needed by 'all'.  Stop. > make: *** [Makefile:171: pc-bios/optionrom/all] Error 2 > make: *** Waiting

Re: [PATCH v2 03/20] fuse: Implement standard FUSE operations

2020-10-15 Thread Kevin Wolf
Am 22.09.2020 um 12:49 hat Max Reitz geschrieben: > This makes the export actually useful instead of only producing errors > whenever it is accessed. > > Signed-off-by: Max Reitz > --- > block/export/fuse.c | 226 > 1 file changed, 226 insertions(+) >

[PATCH] loads-stores.rst: add footnote that clarifies GETPC usage

2020-10-15 Thread Emanuele Giuseppe Esposito
Current documentation is not too clear on the GETPC usage. In particular, when used outside the top level helper function it causes unexpected behavior. Signed-off-by: Emanuele Giuseppe Esposito --- docs/devel/loads-stores.rst | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --

Re: [PATCH] hw/usb/hcd-dwc2: fix divide-by-zero in dwc2_handle_packet()

2020-10-15 Thread Gerd Hoffmann
Hi, > So I think the patch works fine, and I don't think we need to do > anything fancier. Cool, thanks for checking. take care, Gerd

Re: [PATCH v2] hw/usb/hcd-dwc2: fix divide-by-zero in dwc2_handle_packet()

2020-10-15 Thread Gerd Hoffmann
On Thu, Oct 15, 2020 at 09:59:57AM +0200, Mauro Matteo Cascella wrote: > Check the value of mps to avoid potential divide-by-zero later in the > function. > Since HCCHAR_MPS is guest controllable, this prevents a malicious/buggy guest > from crashing the QEMU process on the host. > > Signed-off-b

Re: [PATCH v2 04/20] fuse: Allow growable exports

2020-10-15 Thread Kevin Wolf
Am 22.09.2020 um 12:49 hat Max Reitz geschrieben: > These will behave more like normal files in that writes beyond the EOF > will automatically grow the export size. > > Signed-off-by: Max Reitz > --- > qapi/block-export.json | 6 +- > block/export/fuse.c| 12 +++- > 2 files cha

Re: [PATCH 10/15] block/nvme: Use definitions instead of magic values in add_io_queue()

2020-10-15 Thread Philippe Mathieu-Daudé
On 10/14/20 5:58 PM, Philippe Mathieu-Daudé wrote: Replace magic values by definitions, and simplifiy since the number of queues will never reach 64K. Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/block/nvm

Re: [PATCH] qemu-palcode: Changes to support booting NetBSD/alpha

2020-10-15 Thread Philippe Mathieu-Daudé
On 10/15/20 5:32 AM, Richard Henderson wrote: On 10/14/20 4:16 PM, Jason Thorpe wrote: On Oct 14, 2020, at 2:52 PM, Richard Henderson wrote: I'm certainly open to these changes. But it'll need to be split up -- one patch per bullet, basically. That's fine. What's the convention for patc

Re: [PATCH v2] hw/usb/hcd-dwc2: fix divide-by-zero in dwc2_handle_packet()

2020-10-15 Thread Philippe Mathieu-Daudé
On Thu, Oct 15, 2020 at 10:03 AM Mauro Matteo Cascella wrote: > > Check the value of mps to avoid potential divide-by-zero later in the > function. > Since HCCHAR_MPS is guest controllable, this prevents a malicious/buggy guest > from crashing the QEMU process on the host. > > Signed-off-by: Maur

Re: [PATCH 02/10] Optimize seq_sorter function for colo-compare

2020-10-15 Thread Philippe Mathieu-Daudé
On 10/14/20 9:25 AM, Zhang Chen wrote: From: "Rao, Lei" The seq of tcp has been filled in fill_pkt_tcp_info, it can be used directly here. Signed-off-by: leirao "Signed-off-by: Lei Rao "? Signed-off-by: Zhang Chen Reviewed-by: Li Zhijian Reviewed-by: Zhang Chen --- net/colo-compare.c

Re: [PATCH 08/10] net/colo-compare.c: Change the timer clock type

2020-10-15 Thread Philippe Mathieu-Daudé
On 10/14/20 9:25 AM, Zhang Chen wrote: From: Zhang Chen The virtual clock only runs during the emulation. It stops when the virtual machine is stopped. The host clock should be used for device models that emulate accurate real time sources. It will continue to run when the virtual machine is su

Re: [PATCH 05/10] colo-compare: fix missing compare_seq initialization

2020-10-15 Thread Philippe Mathieu-Daudé
On 10/14/20 9:25 AM, Zhang Chen wrote: From: Li Zhijian Please include: Fixes: f449c9e549c ("colo: compare the packet based on the tcp sequence number") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen Reviewed-by: Zhang Chen --- net/colo.c |

Re: [PATCH 07/10] net/colo-compare.c: Fix compare_timeout format issue

2020-10-15 Thread Philippe Mathieu-Daudé
On 10/14/20 9:25 AM, Zhang Chen wrote: From: Zhang Chen This parameter need compare with the return of qemu_clock_get_ms(), it is uinit64_t. So we need fix this issue here. Typo "uint64_t" Please add: Fixes: 9cc43c94b31 ("net/colo-compare.c: Expose "compare_timeout" to users") Reviewed-by:

[PATCH] tests/acceptance: add MIPS record/replay tests

2020-10-15 Thread Pavel Dovgalyuk
This patch adds MIPS-targeted acceptance tests for record/replay functions. Signed-off-by: Pavel Dovgalyuk --- 0 files changed diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_kernel.py index 952f429cac..6c3d1ec3fb 100644 --- a/tests/acceptance/replay_kernel.py +++ b/te

Re: Kernel patch cases qemu live migration failed.

2020-10-15 Thread Marc Zyngier
Hi Please don't use my arm.com address anymore, nobody reads it... On 2020-10-15 05:06, 张东旭 wrote: I'm so sorry for disturbing you. When I apply this kernel patch:KVM: arm64/sve: System register context switch and access support https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gi

Re: [PATCH v2 17/20] iotests: Give access to the qemu-storage-daemon

2020-10-15 Thread Kevin Wolf
Am 22.09.2020 um 12:49 hat Max Reitz geschrieben: > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/check | 11 +++ > tests/qemu-iotests/common.rc | 17 + > 2 files changed, 28 insertions(+) > > diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check > in

Re: [PATCH v5] Add a comment in bios-tables-test.c to clarify the reason behind approach

2020-10-15 Thread Ani Sinha
On Mon, Oct 12, 2020 at 19:43 Thomas Huth wrote: > On 12/10/2020 16.07, Ani Sinha wrote: > > Request to queue this patch with the next pull. > > I can take it via qtest-next in case Michael / Igor do not plan to send a > pull request any time soon. Michael or Igor, care to comment? > > Thoma

Re: [PATCH v2 18/20] iotests: Allow testing FUSE exports

2020-10-15 Thread Kevin Wolf
Am 22.09.2020 um 12:49 hat Max Reitz geschrieben: > This pretends FUSE exports are a kind of protocol. As such, they are > always tested under the format node. This is probably the best way to > test them, actually, because this will generate more I/O load and more > varied patterns. > > Signed-

Re: [PATCH v6 00/10] migration: bring improved savevm/loadvm/delvm to QMP

2020-10-15 Thread Daniel P . Berrangé
ping: for anyone in the block or migration maintainers teams to review this, since Markus has acked the QAPI design side of it. On Thu, Oct 08, 2020 at 04:49:51PM +0100, Daniel P. Berrangé wrote: > v1: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg00866.html > v2: https://lists.gnu.or

[RFC 0/5] NVMe passthrough: Support 64kB page host

2020-10-15 Thread Eric Auger
This series allows NVMe passthrough on aarch64 with 64kB page host. Addresses and sizes of buffers which are VFIO DMA mapped are aligned with the host page size. nvme_register_buf() path is taken care of in this series but it does not seem to prevent the use case from working. Best Regards Eric

[RFC 1/5] block/nvme: use some NVME_CAP_* macros

2020-10-15 Thread Eric Auger
let's use NVME_CAP_DSTRD, NVME_CAP_MPSMIN and NVME_CAP_TO macros Signed-off-by: Eric Auger --- block/nvme.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/nvme.c b/block/nvme.c index f4f27b6da7..e3d96f20d0 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -728,10 +

[RFC 2/5] block/nvme: Change size and alignment of IDENTIFY response buffer

2020-10-15 Thread Eric Auger
In preparation of 64kB host page support, let's change the size and alignment of the IDENTIFY command response buffer so that the VFIO DMA MAP succeeds. We align on the host page size. Signed-off-by: Eric Auger --- block/nvme.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) di

[RFC 3/5] block/nvme: Change size and alignment of queue

2020-10-15 Thread Eric Auger
In preparation of 64kB host page support, let's change the size and alignment of the queue so that the VFIO DMA MAP succeeds. We align on the host page size. Signed-off-by: Eric Auger --- block/nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/nvme.c b/block/nv

[RFC 4/5] block/nvme: Change size and alignment of prp_list_pages

2020-10-15 Thread Eric Auger
In preparation of 64kB host page support, let's change the size and alignment of the prp_list_pages so that the VFIO DMA MAP succeeds with 64kB host page size. We align on the host page size. Signed-off-by: Eric Auger --- block/nvme.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[RFC 5/5] block/nvme: Align iov's va and size on host page size

2020-10-15 Thread Eric Auger
Make sure iov's va and size are properly aligned on the host page size. Signed-off-by: Eric Auger --- block/nvme.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/block/nvme.c b/block/nvme.c index be8ec48bf2..45807ed110 100644 --- a/block/nvme.c +++ b/block/nvme

Re: [PATCH v2 00/20] block/export: Allow exporting BDSs via FUSE

2020-10-15 Thread Kevin Wolf
Am 22.09.2020 um 12:49 hat Max Reitz geschrieben: > Based-on: <20200907182011.521007-1-kw...@redhat.com> > (“block/export: Add infrastructure and QAPI for block exports”) > > (Though its patch 16 needs a s/= \&blk_exp_nbd/= drv/ on top.) > > v1: https://lists.nongnu.org/archive/html/qem

Re: [PATCH 2/2] qga: add ssh-{add,remove}-authorized-keys

2020-10-15 Thread Daniel P . Berrangé
On Wed, Oct 14, 2020 at 12:25:02AM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Add new commands to add and remove SSH public keys from > ~/.ssh/authorized_keys. > > I took a different approach for testing, including the unit tests right > with the code. I wanted to ov

[PATCH] block/qcow2-cluster: remove dead code

2020-10-15 Thread Elena Afanasova
Since handle_dependencies() returns 0 or -EAGAIN the following case can be removed. Spotted by PVS-Studio. Signed-off-by: Elena Afanasova --- block/qcow2-cluster.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index aa87d3e99b..e2e0db0cc9 100

Re: [PATCH v2 2/3] accel/tcg: split tcg_start_vcpu_thread

2020-10-15 Thread Claudio Fontana
On 10/14/20 10:08 PM, Richard Henderson wrote: > On 10/14/20 12:23 PM, Claudio Fontana wrote: >> +++ b/accel/tcg/tcg-cpus-mttcg.h >> @@ -10,14 +10,4 @@ >> #ifndef TCG_CPUS_MTTCG_H >> #define TCG_CPUS_MTTCG_H >> >> -/* >> - * Multi-threaded TCG >> - * >> - * In the multi-threaded case each vCPU

Re: [PATCH] docs: Print warning when running Sphinx 3.x and newer

2020-10-15 Thread Peter Maydell
On Wed, 14 Oct 2020 at 23:34, Eduardo Habkost wrote: > > This won't prevent the docs from being built, but will let people > know Sphinx 3.x is not fully supported yet. > > Signed-off-by: Eduardo Habkost Sphinx 3.0.1 works fine for me, so I think we probably want to set the cutoff somewhere else

Re: [PATCH v3 0/2] block: deprecate the sheepdog driver

2020-10-15 Thread Kevin Wolf
Am 02.10.2020 um 13:32 hat Daniel P. Berrangé geschrieben: > 2 years back I proposed dropping the sheepdog mailing list from the > MAINTAINERS file, but somehow the patch never got picked up: > > https://lists.gnu.org/archive/html/qemu-block/2018-03/msg01048.html > > So here I am with the same

Re: [PATCH] block/qcow2-cluster: remove dead code

2020-10-15 Thread Kevin Wolf
Am 15.10.2020 um 14:13 hat Elena Afanasova geschrieben: > Since handle_dependencies() returns 0 or -EAGAIN the following case can be > removed. > Spotted by PVS-Studio. > > Signed-off-by: Elena Afanasova > --- > block/qcow2-cluster.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/bl

[PULL 3/8] ui/spice-app: don't use qemu_chr_open_spice_port directly

2020-10-15 Thread Gerd Hoffmann
Save the parent object's open function pointer in the (new) VCChardevClass struct instead before overwriting it, so we can look it up when needed. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-id: 20201014121120.13482-3-kra...@redhat.com --- ui/spice-app.c | 17 ++

[PULL 2/8] modules: update qom object module comment

2020-10-15 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-id: 20200923103728.12026-1-kra...@redhat.com --- util/module.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/module.c b/util/module.c index 836fd444e1fd..4349607ad176 100644 --- a/util/module.c

[PULL 0/8] Modules 20201015 patches

2020-10-15 Thread Gerd Hoffmann
The following changes since commit 57c98ea9acdcef5021f5671efa6475a5794a51c4: Merge remote-tracking branch 'remotes/kraxel/tags/ui-20201014-pull-request' into staging (2020-10-14 13:56:06 +0100) are available in the Git repository at: git://git.kraxel.org/qemu tags/modules-202

[PULL 4/8] chardev/spice: make qemu_chr_open_spice_port static

2020-10-15 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-id: 20201014121120.13482-4-kra...@redhat.com --- include/chardev/spice.h | 3 --- chardev/spice.c | 8 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/chardev/spice.h b/include/charde

[PULL 6/8] meson: add spice_headers dependency.

2020-10-15 Thread Gerd Hoffmann
Used for files which (with CONFIG_SPICE=y) depend on spice header files to pick up some enum, but which do not depend on on the actual spice shared library. Signed-off-by: Gerd Hoffmann Message-id: 20201014121120.13482-6-kra...@redhat.com --- audio/meson.build | 2 +- meson.build | 2 +

[PULL 1/8] module: silence errors for module_load_qom_all().

2020-10-15 Thread Gerd Hoffmann
Add mayfail bool parameter to module loading functions. Set it to true for module_load_qom_all() because device modules might not load into all system emulation variants. qemu-system-s390x for example will not load qxl because it lacks vga support. Makes "make check" less chatty. Drop module_lo

[PULL 8/8] chardev/spice: build spice chardevs as module

2020-10-15 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Message-id: 20201014121120.13482-8-kra...@redhat.com --- util/module.c | 2 ++ chardev/meson.build | 7 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/util/module.c b/util/module.c index 4349607ad176..f0ed05fbd06b 100644 --- a/util/module.

[PULL 7/8] meson: add spice dependency to core spice source files.

2020-10-15 Thread Gerd Hoffmann
Right now it happens to work by pure luck because the spice chardevs add the spice dependency to the softmmu source set. That'll change though once we start building spice chardevs as module, so lets fix it properly. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-id: 2

[PULL 5/8] chardev/spice: simplify chardev setup

2020-10-15 Thread Gerd Hoffmann
Initialize spice before chardevs. That allows to register the spice chardevs directly in the init function and removes the need to maintain a linked list of chardevs just for registration. Signed-off-by: Gerd Hoffmann Message-id: 20201014121120.13482-5-kra...@redhat.com --- include/chardev/spic

Re: [PATCH v4 7/7] nbd: Allow export of multiple bitmaps for one device

2020-10-15 Thread Eric Blake
On 10/14/20 9:42 AM, Vladimir Sementsov-Ogievskiy wrote: 10.10.2020 00:55, Eric Blake wrote: With this, 'qemu-nbd -B b0 -B b1 -f qcow2 img.qcow2' can let you sniff out multiple bitmaps from one server.  qemu-img as client can still only read one bitmap per client connection, but other NBD client

Re: [PATCH v5] Add a comment in bios-tables-test.c to clarify the reason behind approach

2020-10-15 Thread Michael S. Tsirkin
On Thu, Oct 15, 2020 at 04:58:37PM +0530, Ani Sinha wrote: > > > On Mon, Oct 12, 2020 at 19:43 Thomas Huth wrote: > > On 12/10/2020 16.07, Ani Sinha wrote: > > Request to queue this patch with the next pull. > > I can take it via qtest-next in case Michael / Igor do not plan to sen

Re: [PATCH] pci: advertise a page aligned ATS

2020-10-15 Thread Michael S. Tsirkin
On Thu, Oct 15, 2020 at 03:47:09PM +0800, Jason Wang wrote: > > On 2020/9/9 下午4:17, Jason Wang wrote: > > After Linux kernel commit 61363c1474b1 ("iommu/vt-d: Enable ATS only > > if the device uses page aligned address."), ATS will be only enabled > > if device advertises a page aligned request. >

Re: [PATCH] vhost-vdpa: negotiate VIRTIO_NET_F_STATUS with driver

2020-10-15 Thread Michael S. Tsirkin
On Thu, Oct 15, 2020 at 03:24:29PM +0800, Jason Wang wrote: > > On 2020/10/2 上午4:09, Si-Wei Liu wrote: > > Vendor driver may not support or implement config > > interrupt delivery for link status notifications. > > In this event, vendor driver is expected to NACK > > the feature, but guest will ke

[PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset

2020-10-15 Thread Matthew Rosato
Currently, a subsystem reset event leaves PCI devices enabled, causing issues post-reset in the guest (an example would be after a kexec). These devices need to be reset during a subsystem reset, allowing them to be properly re-enabled afterwards. Add the S390 PCI host bridge to the list of qdevs

Kernel patch cases qemu live migration failed.

2020-10-15 Thread 张东旭
I'm so sorry for disturbing you.When I apply this kernel patch:KVM: arm64/sve: System register context switch and access supporthttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm64/kvm/sys_regs.c?id=73433762fcaeb9d59e84d299021c6b15466c96ddqemu live migration will

Re: Kernel patch cases qemu live migration failed.

2020-10-15 Thread Andrew Jones
On Thu, Oct 15, 2020 at 12:06:39PM +0800, 张东旭 wrote: > I'm so sorry for disturbing you.When I apply this kernel patch:KVM: > arm64/sve: System register context switch and access > supporthttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm64/kvm/sys_regs.c?id=7343376

Re: [PATCH v2 2/3] accel/tcg: split tcg_start_vcpu_thread

2020-10-15 Thread Claudio Fontana
On 10/15/20 2:33 PM, Claudio Fontana wrote: > On 10/14/20 10:08 PM, Richard Henderson wrote: >> On 10/14/20 12:23 PM, Claudio Fontana wrote: >>> +++ b/accel/tcg/tcg-cpus-mttcg.h >>> @@ -10,14 +10,4 @@ >>> #ifndef TCG_CPUS_MTTCG_H >>> #define TCG_CPUS_MTTCG_H >>> >>> -/* >>> - * Multi-threaded T

Re: [RFC 1/5] block/nvme: use some NVME_CAP_* macros

2020-10-15 Thread Philippe Mathieu-Daudé
On 10/15/20 1:52 PM, Eric Auger wrote: let's use NVME_CAP_DSTRD, NVME_CAP_MPSMIN and NVME_CAP_TO macros Signed-off-by: Eric Auger --- block/nvme.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/nvme.c b/block/nvme.c index f4f27b6da7..e3d96f20d0 100644 --- a/b

Re: [RFC 1/5] block/nvme: use some NVME_CAP_* macros

2020-10-15 Thread Philippe Mathieu-Daudé
On 10/15/20 3:29 PM, Philippe Mathieu-Daudé wrote: On 10/15/20 1:52 PM, Eric Auger wrote: let's use NVME_CAP_DSTRD, NVME_CAP_MPSMIN and NVME_CAP_TO macros Signed-off-by: Eric Auger ---   block/nvme.c | 6 +++---   1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/nvme.c b/bloc

Re: [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset

2020-10-15 Thread Christian Borntraeger
On 15.10.20 15:16, Matthew Rosato wrote: > Currently, a subsystem reset event leaves PCI devices enabled, causing > issues post-reset in the guest (an example would be after a kexec). These > devices need to be reset during a subsystem reset, allowing them to be > properly re-enabled afterwards

Re: [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset

2020-10-15 Thread Christian Borntraeger
On 15.10.20 15:32, Christian Borntraeger wrote: > > > On 15.10.20 15:16, Matthew Rosato wrote: >> Currently, a subsystem reset event leaves PCI devices enabled, causing >> issues post-reset in the guest (an example would be after a kexec). These >> devices need to be reset during a subsystem

Re: Kernel patch cases qemu live migration failed.

2020-10-15 Thread Andrew Jones
On Thu, Oct 15, 2020 at 12:26:10PM +0100, Marc Zyngier wrote: > Hi > > Please don't use my arm.com address anymore, nobody reads it... > > On 2020-10-15 05:06, 张东旭 wrote: > > I'm so sorry for disturbing you. > > > > When I apply this kernel patch:KVM: arm64/sve: System register > > context switc

Re: [RFC 1/5] block/nvme: use some NVME_CAP_* macros

2020-10-15 Thread Philippe Mathieu-Daudé
On 10/15/20 3:32 PM, Philippe Mathieu-Daudé wrote: On 10/15/20 3:29 PM, Philippe Mathieu-Daudé wrote: On 10/15/20 1:52 PM, Eric Auger wrote: let's use NVME_CAP_DSTRD, NVME_CAP_MPSMIN and NVME_CAP_TO macros Signed-off-by: Eric Auger ---   block/nvme.c | 6 +++---   1 file changed, 3 insertions(

Re: [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset

2020-10-15 Thread Niklas Schnelle
On 10/15/20 3:34 PM, Christian Borntraeger wrote: > > > On 15.10.20 15:32, Christian Borntraeger wrote: >> >> >> On 15.10.20 15:16, Matthew Rosato wrote: >>> Currently, a subsystem reset event leaves PCI devices enabled, causing >>> issues post-reset in the guest (an example would be after a k

Re: [PATCH v4] introduce vfio-user protocol specification

2020-10-15 Thread Felipe Franciosi
Hi, > On Oct 13, 2020, at 10:30 AM, Stefan Hajnoczi wrote: > > On Fri, Oct 02, 2020 at 10:14:23AM +, Felipe Franciosi wrote: >> >> >>> On Sep 30, 2020, at 3:24 PM, Stefan Hajnoczi wrote: >>> >>> On Tue, Sep 29, 2020 at 09:21:54AM -0700, John G Johnson wrote: > On Sep 29, 2020, at 3:3

[PATCH v4 01/16] memory: Add FlatView foreach function

2020-10-15 Thread Alexander Bulekov
Acked-by: Paolo Bonzini Signed-off-by: Alexander Bulekov --- include/exec/memory.h | 5 + softmmu/memory.c | 9 + 2 files changed, 14 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 622207bde1..233655b29a 100644 --- a/include/exec/memory.h +++ b/i

[PATCH v4 07/16] fuzz: Add support for custom crossover functions

2020-10-15 Thread Alexander Bulekov
libfuzzer supports a "custom crossover function". Libfuzzer often tries to blend two inputs to create a new interesting input. Sometimes, we have a better idea about how to blend inputs together. This change allows fuzzers to specify a custom function for blending two inputs together. Signed-off-b

[PATCH v4 04/16] fuzz: Add DMA support to the generic-fuzzer

2020-10-15 Thread Alexander Bulekov
When a virtual-device tries to access some buffer in memory over DMA, we add call-backs into the fuzzer(next commit). The fuzzer checks verifies that the DMA request maps to a physical RAM address and fills the memory with fuzzer-provided data. The patterns that we use to fill this memory are speci

[PATCH v4 02/16] fuzz: Add general virtual-device fuzzer

2020-10-15 Thread Alexander Bulekov
This is a generic fuzzer designed to fuzz a virtual device's MemoryRegions, as long as they exist within the Memory or Port IO (if it exists) AddressSpaces. The fuzzer's input is interpreted into a sequence of qtest commands (outb, readw, etc). The interpreted commands are separated by a magic seap

[PATCH v4 03/16] fuzz: Add PCI features to the general fuzzer

2020-10-15 Thread Alexander Bulekov
This patch compares TYPE_PCI_DEVICE objects against the user-provided matching pattern. If there is a match, we use some hacks and leverage QOS to map each possible BAR for that device. Now fuzzed inputs might be converted to pci_read/write commands which target specific. This means that we can fuz

[PATCH v4 05/16] fuzz: Declare DMA Read callback function

2020-10-15 Thread Alexander Bulekov
This patch declares the fuzz_dma_read_cb function and uses the preprocessor and linker(weak symbols) to handle these cases: When we build softmmu/all with --enable-fuzzing, there should be no strong symbol defined for fuzz_dma_read_cb, and we link against a weak stub function. When we build softm

[PATCH v4 09/16] fuzz: add a crossover function to generic-fuzzer

2020-10-15 Thread Alexander Bulekov
Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/general_fuzz.c | 90 - 1 file changed, 89 insertions(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/general_fuzz.c b/tests/qtest/fuzz/general_fuzz.c index 11346e229a..22884512a3 1006

[PATCH v4 06/16] fuzz: Add fuzzer callbacks to DMA-read functions

2020-10-15 Thread Alexander Bulekov
We should be careful to not call any functions besides fuzz_dma_read_cb. Without --enable-fuzzing, fuzz_dma_read_cb is an empty inlined function. Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny --- include/exec/memory.h | 1 + include/exec/memory_ldst_cached.h.inc | 3

[PATCH v4 14/16] fuzz: add general-fuzz configs for oss-fuzz

2020-10-15 Thread Alexander Bulekov
Predefine some general-fuzz configs. For each of these, we will create a separate FuzzTarget that can be selected through argv0 and, therefore, fuzzed on oss-fuzz. Signed-off-by: Alexander Bulekov --- Maybe this isn't the best way to specify a list string-triples. I saw that some files use QLIT_

[PATCH v4 10/16] scripts/oss-fuzz: Add script to reorder a general-fuzzer trace

2020-10-15 Thread Alexander Bulekov
The general-fuzzer uses hooks to fulfill DMA requests just-in-time. This means that if we try to use QTEST_LOG=1 to build a reproducer, the DMA writes will be logged _after_ the in/out/read/write that triggered the DMA read. To work work around this, the general-fuzzer annotates these just-in time

Re: [RFC 0/5] NVMe passthrough: Support 64kB page host

2020-10-15 Thread Philippe Mathieu-Daudé
On 10/15/20 1:52 PM, Eric Auger wrote: This series allows NVMe passthrough on aarch64 with 64kB page host. Addresses and sizes of buffers which are VFIO DMA mapped are aligned with the host page size. nvme_register_buf() path is taken care of in this series but it does not seem to prevent the us

[PATCH v4 13/16] fuzz: add an "opaque" to the FuzzTarget struct

2020-10-15 Thread Alexander Bulekov
It can be useful to register FuzzTargets that have nearly-identical initialization handlers (e.g. for using the same fuzzing code, with different configuration options). Add an opaque pointer to the FuzzTarget struct, so that FuzzTargets can hold some data, useful for storing target-specific config

[PATCH v4 08/16] fuzz: add a DISABLE_PCI op to general-fuzzer

2020-10-15 Thread Alexander Bulekov
This new operation is used in the next commit, which concatenates two fuzzer-generated inputs. With this operation, we can prevent the second input from clobbering the PCI configuration performed by the first. Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny --- tests/qtest/fuzz/gener

[PATCH v4 11/16] scripts/oss-fuzz: Add crash trace minimization script

2020-10-15 Thread Alexander Bulekov
Once we find a crash, we can convert it into a QTest trace. Usually this trace will contain many operations that are unneeded to reproduce the crash. This script tries to minimize the crashing trace, by removing operations and trimming QTest bufwrite(write addr len data...) commands. Signed-off-by

[PATCH v4 15/16] fuzz: register predefined general-fuzz configs

2020-10-15 Thread Alexander Bulekov
We call get_general_fuzz_configs, which fills an array with predefined {name, args, objects} triples. For each of these, we add a new FuzzTarget, that uses a small wrapper to set QEMU_FUZZ_{ARGS,OBJECTS} to the corresponding predefined values. Signed-off-by: Alexander Bulekov --- tests/qtest/fuz

Re: [PATCH v3 09/16] fuzz: add a crossover function to generic-fuzzer

2020-10-15 Thread Alexander Bulekov
Thanks, I added some clarifications, but I added them to 02/16 (where I first define and use SEPARATOR). On 201001 1631, Darren Kenny wrote: > As mentioned in an earlier patch, maybe the definition of SEPARATOR > should be here as well as some of the comments you provided in the > replies to it. >

[PATCH v4 16/16] scripts/oss-fuzz: remove the general-fuzz target

2020-10-15 Thread Alexander Bulekov
general-fuzz is not a standalone fuzzer - it requires some env variables to be set. On oss-fuzz, we set these with some predefined general-fuzz-{...} targets, that are thin wrappers around general-fuzz. Remove general-fuzz from the oss-fuzz build, so oss-fuzz does not treat it as a standalone fuzze

Re: [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset

2020-10-15 Thread Matthew Rosato
On 10/15/20 9:37 AM, Niklas Schnelle wrote: On 10/15/20 3:34 PM, Christian Borntraeger wrote: On 15.10.20 15:32, Christian Borntraeger wrote: On 15.10.20 15:16, Matthew Rosato wrote: Currently, a subsystem reset event leaves PCI devices enabled, causing issues post-reset in the guest (an

[PATCH v4 00/16] Add a General Virtual Device Fuzzer

2020-10-15 Thread Alexander Bulekov
v4: - Replace yaml + c template-based oss-fuzz configs, with C code to register a FuzzTarget for each config (as suggested by Paolo) - Replicate the functionality of address_space_write_rom to ensure matching behavior when QTEST_LOG is enabled - Improve code documentation/co

[PATCH v4 12/16] fuzz: Add instructions for using general-fuzz

2020-10-15 Thread Alexander Bulekov
Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov --- docs/devel/fuzzing.txt | 39 +++ 1 file changed, 39 insertions(+) diff --git a/docs/devel/fuzzing.txt b/docs/devel/fuzzing.txt index 96d71c94d7..c40278fe0a 100644 --- a/docs/devel/fuzzing.txt +++

  1   2   3   4   >