[PATCH v3 3/8] meson: add module_trace & module_trace_src

2021-01-21 Thread Gerd Hoffmann
module_trace is a dict which keeps track of the trace source files for a module. module_trace_src collects the trace source files for a given trace-events file, which then either added to the source set or to a new module_trace dict depending on whenever they are for a module or core qemu. Signed

[PATCH v3 2/8] meson: move up hw subdir (specifically before trace subdir)

2021-01-21 Thread Gerd Hoffmann
Needed so trace/meson.build can see stuff done in hw/*/meson.build. Signed-off-by: Gerd Hoffmann --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 1f3d48b53a06..7462a50b4c36 100644 --- a/meson.build +++ b/meson.build @@ -1777,6

Re: [PATCH 3/3] 9pfs: Improve unreclaim loop

2021-01-21 Thread Christian Schoenebeck
On Montag, 18. Januar 2021 15:23:00 CET Greg Kurz wrote: > If a fid was actually re-open by v9fs_reopen_fid(), we re-traverse the "re-opened" > fid list from the head in case some other request created a fid that > needs to be marked unreclaimable as well (ie. the client open a new "i.e." and ei

[PATCH v3 0/8] [RfC] fix tracing for modules

2021-01-21 Thread Gerd Hoffmann
First version that actually works. Only qxl covered for this RfC, other modules will follow once the basics are hashed out. v3: - handle initialization of modular tracepoints. TODO: Enabling modular tracepoints via -trace cmd line doesn't work yet. Guess we need to store the list somewhere for

[PATCH v3 8/8] trace/simple: add st_init_group

2021-01-21 Thread Gerd Hoffmann
Add helper function and call it for each trace event group added. Makes sure that events added at module load time are initialized properly. Signed-off-by: Gerd Hoffmann --- trace/simple.h | 1 + trace/control.c | 4 trace/simple.c | 12 3 files changed, 17 insertions(+) d

Re: [PATCH 04/25] keyval: accept escaped commas in implied option

2021-01-21 Thread Markus Armbruster
Paolo Bonzini writes: > This is used with the weirdly-named device "SUNFD,fdtwo": "SUNW,fdtwo" Suggest "with weirdly-named devices such as "SUNW,fdtwo:", because we've got more weirdos. > $ qemu-system-sparc -device SUNW,,fdtwo,help > SUNW,fdtwo options: > drive=- Node name

Re: changing tests/qtest/meson.build causes unnecessary rebuilding

2021-01-21 Thread Paolo Bonzini
On 21/01/21 12:56, Peter Maydell wrote: $ make -C build/arm-clang/ -j8 make: Entering directory '/home/petmay01/linaro/qemu-from-laptop/qemu/build/arm-clang' [1/23] Generating qemu-version.h with a meson_exe.py custom command make: Leaving directory '/home/petmay01/linaro/qemu-from-laptop/qemu/bu

Re: [PATCH v11 5/5] migration: introduce 'userfaultfd-wrlat.py' script

2021-01-21 Thread Andrey Gruzdev
On 20.01.2021 00:01, Peter Xu wrote: On Wed, Jan 06, 2021 at 06:21:20PM +0300, Andrey Gruzdev wrote: Add BCC/eBPF script to analyze userfaultfd write fault latency distribution. Signed-off-by: Andrey Gruzdev Acked-by: Peter Xu (This seems to be the last patch that lacks a r-b ... Let's see w

Re: [PATCH] gitlab-ci: Test building linux-user targets on CentOS 7

2021-01-21 Thread Philippe Mathieu-Daudé
On 1/21/21 1:15 PM, Philippe Mathieu-Daudé wrote: > Add a configuration tested by Peter Maydell (see [1] and [2]) > but not covered in our CI [3]: > > [705/2910] Compiling C object > libqemu-arm-linux-user.fa.p/linux-user_strace.c.o > FAILED: libqemu-arm-linux-user.fa.p/linux-user_strace.c.o

Re: [PATCH v2 3/3] hw/usb/dev-uas: Report command additional adb length as unsupported

2021-01-21 Thread Philippe Mathieu-Daudé
On 1/21/21 12:14 PM, Gerd Hoffmann wrote: > On Wed, Jan 20, 2021 at 04:35:22PM +0100, Philippe Mathieu-Daudé wrote: >> We are not ready to handle additional CDB data. >> >> If a guest sends a packet with such additional data, >> report the command parameter as not supported. >> >> Specify a size (o

Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang

2021-01-21 Thread Philippe Mathieu-Daudé
On 1/21/21 1:02 PM, Daniel P. Berrangé wrote: > On Thu, Jan 21, 2021 at 12:48:21PM +0100, Philippe Mathieu-Daudé wrote: >> On 1/21/21 12:21 PM, Daniel P. Berrangé wrote: >>> On Thu, Jan 21, 2021 at 12:18:18PM +0100, Philippe Mathieu-Daudé wrote: On 1/21/21 11:32 AM, Daniel P. Berrangé wrote: >

Re: [PATCH v3 18/19] i386: provide simple 'hv-default=on' option

2021-01-21 Thread Igor Mammedov
On Wed, 20 Jan 2021 15:49:09 -0500 Eduardo Habkost wrote: > On Wed, Jan 20, 2021 at 08:08:32PM +0100, Igor Mammedov wrote: > > On Wed, 20 Jan 2021 15:38:33 +0100 > > Vitaly Kuznetsov wrote: > > > > > Igor Mammedov writes: > > > > > > > On Fri, 15 Jan 2021 10:20:23 +0100 > > > > Vitaly Kuz

Re: Thread safety of coroutine-sigaltstack

2021-01-21 Thread Laszlo Ersek
On 01/21/21 10:27, Max Reitz wrote: > On 20.01.21 18:25, Laszlo Ersek wrote: >> On 01/20/21 17:26, Max Reitz wrote: >>> Hi, >>> >>> I’ve run into trouble with Vladimir’s async backup series on MacOS, >>> namely that iotest 256 fails with qemu exiting because of a SIGUSR2. >>> >>> Turns out this is

Re: [PATCH 0/8] s390x/pci: Fixing s390 vfio-pci ISM support

2021-01-21 Thread Niklas Schnelle
On 1/21/21 1:30 PM, Pierre Morel wrote: > > > On 1/21/21 10:58 AM, Niklas Schnelle wrote: >> >> >> On 1/21/21 9:27 AM, Pierre Morel wrote: >>> >>> >>> On 1/20/21 9:29 PM, Matthew Rosato wrote: On 1/20/21 2:18 PM, Pierre Morel wrote: > > >>> ...snip... >>> So, I mean I ca

[PATCH] nsis: adjust for new MinGW paths

2021-01-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qemu.nsi | 42 -- 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/qemu.nsi b/qemu.nsi index 1a0112265b..c3df8c9d3b 100644 --- a/qemu.nsi +++ b/qemu.nsi @@ -35,11 +35,6 @@ !define OUTFILE "qemu-setup.exe" !en

[PATCH] meson: convert wixl detection to Meson

2021-01-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 84 ++- meson.build | 10 -- meson_options.txt | 2 ++ qga/meson.build | 55 +++ 4 files changed, 61 insertions(+), 90 deletions(-) diff --git a/configure b/c

Re: [PATCH v3 18/19] i386: provide simple 'hv-default=on' option

2021-01-21 Thread Igor Mammedov
On Thu, 21 Jan 2021 09:45:33 +0100 Vitaly Kuznetsov wrote: > Igor Mammedov writes: > > > On Wed, 20 Jan 2021 15:38:33 +0100 > > Vitaly Kuznetsov wrote: > > > >> Igor Mammedov writes: > >> > >> > On Fri, 15 Jan 2021 10:20:23 +0100 > >> > Vitaly Kuznetsov wrote: > >> > > >> >> suggest

Re: [PATCH] gitlab-ci: Test building linux-user targets on CentOS 7

2021-01-21 Thread Thomas Huth
On 21/01/2021 14.14, Philippe Mathieu-Daudé wrote: On 1/21/21 1:15 PM, Philippe Mathieu-Daudé wrote: Add a configuration tested by Peter Maydell (see [1] and [2]) but not covered in our CI [3]: [705/2910] Compiling C object libqemu-arm-linux-user.fa.p/linux-user_strace.c.o FAILED: libqem

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-01-21 Thread Francisco Iglesias
Hi Bin, On [2021 Jan 21] Thu 16:59:51, Bin Meng wrote: > Hi Francisco, > > On Thu, Jan 21, 2021 at 4:50 PM Francisco Iglesias > wrote: > > > > Dear Bin, > > > > On [2021 Jan 20] Wed 22:20:25, Bin Meng wrote: > > > Hi Francisco, > > > > > > On Tue, Jan 19, 2021 at 9:01 PM Francisco Iglesias > > >

Re: changing tests/qtest/meson.build causes unnecessary rebuilding

2021-01-21 Thread Thomas Huth
On 21/01/2021 14.12, Paolo Bonzini wrote: On 21/01/21 12:56, Peter Maydell wrote: $ make -C build/arm-clang/ -j8 make: Entering directory '/home/petmay01/linaro/qemu-from-laptop/qemu/build/arm-clang' [1/23] Generating qemu-version.h with a meson_exe.py custom command make: Leaving directory '/ho

Re: [PATCH 0/8] s390x/pci: Fixing s390 vfio-pci ISM support

2021-01-21 Thread Matthew Rosato
On 1/21/21 3:27 AM, Pierre Morel wrote: On 1/20/21 9:29 PM, Matthew Rosato wrote: On 1/20/21 2:18 PM, Pierre Morel wrote: ...snip... So we have: devices supporting MIO and MSIX devices not supporting MIO nor MSIX devices not supporting the use of PCISTG to emulate PCISTB The first two a

[PATCH] virtiofsd: prevent opening of special files (CVE-2020-35517)

2021-01-21 Thread Stefan Hajnoczi
A well-behaved FUSE client does not attempt to open special files with FUSE_OPEN because they are handled on the client side (e.g. device nodes are handled by client-side device drivers). The check to prevent virtiofsd from opening special files is missing in a few cases, most notably FUSE_OPEN. A

Re: [PATCH 0/8] s390x/pci: Fixing s390 vfio-pci ISM support

2021-01-21 Thread Pierre Morel
On 1/21/21 2:37 PM, Niklas Schnelle wrote: On 1/21/21 1:30 PM, Pierre Morel wrote: Just wanted to say that we've had a very similar discussion with Cornelia end of last year and came to the conclusion that explicitly matching the PFT is likely the safest bet: https://lkml.org/lkml/2020/1

Re: [PATCH] virtiofsd: prevent opening of special files (CVE-2020-35517)

2021-01-21 Thread Daniel P . Berrangé
On Thu, Jan 21, 2021 at 02:44:29PM +, Stefan Hajnoczi wrote: > A well-behaved FUSE client does not attempt to open special files with > FUSE_OPEN because they are handled on the client side (e.g. device nodes > are handled by client-side device drivers). > > The check to prevent virtiofsd from

Re: [PATCH 0/8] s390x/pci: Fixing s390 vfio-pci ISM support

2021-01-21 Thread Niklas Schnelle
On 1/21/21 3:46 PM, Pierre Morel wrote: > > > On 1/21/21 2:37 PM, Niklas Schnelle wrote: >> >> >> On 1/21/21 1:30 PM, Pierre Morel wrote: > Just wanted to say that we've had a very similar discussion with Cornelia end of last year and came to the conclusion that explicitly

Re: [PATCH 0/6] Update git repo URLs to GitLab

2021-01-21 Thread Stefan Hajnoczi
On Mon, Jan 11, 2021 at 11:50:11AM +, Stefan Hajnoczi wrote: > Several places in qemu.git reference qemu.org git repo URLs. Let's switch to > GitLab repo URLs in order to enable GitLab as a gating CI and in order to > reduce qemu.org bandwidth consumption. > > Paolo has already set up GitLab m

[PATCH v12 0/5] UFFD write-tracking migration/snapshots

2021-01-21 Thread andrey . gruzdev--- via
This patch series is a kind of 'rethinking' of Denis Plotnikov's ideas he's implemented in his series '[PATCH v0 0/4] migration: add background snapshot'. Currently the only way to make (external) live VM snapshot is using existing dirty page logging migration mechanism. The main problem is that i

[PATCH v12 1/5] migration: introduce 'background-snapshot' migration capability

2021-01-21 Thread andrey . gruzdev--- via
Add new capability to 'qapi/migration.json' schema. Update migrate_caps_check() to validate enabled capability set against introduced one. Perform checks for required kernel features and compatibility with guest memory backends. Signed-off-by: Andrey Gruzdev Reviewed-by: Peter Xu Acked-by: Marku

[PATCH v12 2/5] migration: introduce UFFD-WP low-level interface helpers

2021-01-21 Thread andrey . gruzdev--- via
Glue code to the userfaultfd kernel implementation. Querying feature support, createing file descriptor, feature control, memory region registration, IOCTLs on registered registered regions. Signed-off-by: Andrey Gruzdev Reviewed-by: Peter Xu --- include/exec/memory.h | 1 + include/qemu

[PATCH v12 3/5] migration: support UFFD write fault processing in ram_save_iterate()

2021-01-21 Thread andrey . gruzdev--- via
In this particular implementation the same single migration thread is responsible for both normal linear dirty page migration and procesing UFFD page fault events. Processing write faults includes reading UFFD file descriptor, finding respective RAM block and saving faulting page to the migration

[PATCH v12 4/5] migration: implementation of background snapshot thread

2021-01-21 Thread andrey . gruzdev--- via
Introducing implementation of 'background' snapshot thread which in overall follows the logic of precopy migration while internally utilizes completely different mechanism to 'freeze' vmstate at the start of snapshot creation. This mechanism is based on userfault_fd with wr-protection support and

[PATCH v12 5/5] migration: introduce 'userfaultfd-wrlat.py' script

2021-01-21 Thread andrey . gruzdev--- via
Add BCC/eBPF script to analyze userfaultfd write fault latency distribution. Signed-off-by: Andrey Gruzdev Reviewed-by: Peter Xu --- scripts/userfaultfd-wrlat.py | 122 +++ 1 file changed, 122 insertions(+) create mode 100755 scripts/userfaultfd-wrlat.py diff -

[PATCH v2] usb-host: map LIBUSB_SPEED_SUPER_PLUS to USB_SPEED_SUPER

2021-01-21 Thread Gerd Hoffmann
Handle host superspeedplus (usb 3.1+) devices like superspeed (usb 3.0) devices. That is enough to get them handled properly by xhci. They show up as superspeed devices inside the guest, but should be able to actually run at higher speeds. Reported-by: Angel Pagan Tested-by: Angel Pagan Signed

Re: [PATCH v7 00/11] Rework iotests/check

2021-01-21 Thread Paolo Bonzini
On 16/01/21 14:44, Vladimir Sementsov-Ogievskiy wrote: Hi all! These series has 3 goals: - get rid of group file (to forget about rebase and in-list conflicts) - introduce human-readable names for tests - rewrite check into python Very nice! I have wondered for some time if we should r

Re: Thread safety of coroutine-sigaltstack

2021-01-21 Thread Paolo Bonzini
On 21/01/21 10:27, Max Reitz wrote: Sure, I can do that. I agree that there probably are better solutions than to wrap everything in a lock.  OTOH, it looks to me like this lock is the most simple solution.  If Daniel is right[1] and we should drop coroutine-sigaltstack altogether (at some p

Re: [PATCH v12 0/5] UFFD write-tracking migration/snapshots

2021-01-21 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210121150234.192543-1-andrey.gruz...@virtuozzo.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210121150234.192543-1-andrey.gruz...@virtuozzo.com Subject: [PATCH v12 0/5] U

Re: [PATCH v2 1/1] linux-user/signal: Decode waitid si_code

2021-01-21 Thread Andreas K . Hüttel
Am Mittwoch, 20. Januar 2021, 22:12:30 EET schrieb Andreas K. Hüttel: > > This patch just passes the waitid status directly back to the guest. > > This works at least as well as the previous versions, so ++ from me. > > Will do more testing over the next days to see if it maybe also improves the

Re: [PATCH] virtiofsd: prevent opening of special files (CVE-2020-35517)

2021-01-21 Thread alex--- via
Excerpts from Stefan Hajnoczi's message of January 21, 2021 9:44 am: > A well-behaved FUSE client does not attempt to open special files with > FUSE_OPEN because they are handled on the client side (e.g. device nodes > are handled by client-side device drivers). > > The check to prevent virtiofsd

[PATCH v13 0/5] UFFD write-tracking migration/snapshots

2021-01-21 Thread andrey . gruzdev--- via
This patch series is a kind of 'rethinking' of Denis Plotnikov's ideas he's implemented in his series '[PATCH v0 0/4] migration: add background snapshot'. Currently the only way to make (external) live VM snapshot is using existing dirty page logging migration mechanism. The main problem is that i

[PATCH v13 2/5] migration: introduce UFFD-WP low-level interface helpers

2021-01-21 Thread andrey . gruzdev--- via
Glue code to the userfaultfd kernel implementation. Querying feature support, createing file descriptor, feature control, memory region registration, IOCTLs on registered registered regions. Signed-off-by: Andrey Gruzdev Reviewed-by: Peter Xu --- include/exec/memory.h | 1 + include/qemu

[PATCH v13 4/5] migration: implementation of background snapshot thread

2021-01-21 Thread andrey . gruzdev--- via
Introducing implementation of 'background' snapshot thread which in overall follows the logic of precopy migration while internally utilizes completely different mechanism to 'freeze' vmstate at the start of snapshot creation. This mechanism is based on userfault_fd with wr-protection support and

[PATCH v13 5/5] migration: introduce 'userfaultfd-wrlat.py' script

2021-01-21 Thread andrey . gruzdev--- via
Add BCC/eBPF script to analyze userfaultfd write fault latency distribution. Signed-off-by: Andrey Gruzdev Reviewed-by: Peter Xu --- scripts/userfaultfd-wrlat.py | 122 +++ 1 file changed, 122 insertions(+) create mode 100755 scripts/userfaultfd-wrlat.py diff -

[PATCH v13 1/5] migration: introduce 'background-snapshot' migration capability

2021-01-21 Thread andrey . gruzdev--- via
Add new capability to 'qapi/migration.json' schema. Update migrate_caps_check() to validate enabled capability set against introduced one. Perform checks for required kernel features and compatibility with guest memory backends. Signed-off-by: Andrey Gruzdev Reviewed-by: Peter Xu Acked-by: Marku

[PATCH v13 3/5] migration: support UFFD write fault processing in ram_save_iterate()

2021-01-21 Thread andrey . gruzdev--- via
In this particular implementation the same single migration thread is responsible for both normal linear dirty page migration and procesing UFFD page fault events. Processing write faults includes reading UFFD file descriptor, finding respective RAM block and saving faulting page to the migration

Re: changing tests/qtest/meson.build causes unnecessary rebuilding

2021-01-21 Thread Paolo Bonzini
On 21/01/21 15:29, Thomas Huth wrote: Not sure if it is related, but I noticed that we are also rebuilding a lot of files in the gitlab-CI that we did not before the meson conversion, especially in the check-system-* jobs, e.g: https://gitlab.com/qemu-project/qemu/-/jobs/977344949#L366 The

Re: [PATCH] virtiofsd: prevent opening of special files (CVE-2020-35517)

2021-01-21 Thread Laszlo Ersek
On 01/21/21 15:44, Stefan Hajnoczi wrote: > A well-behaved FUSE client does not attempt to open special files with > FUSE_OPEN because they are handled on the client side (e.g. device nodes > are handled by client-side device drivers). > > The check to prevent virtiofsd from opening special files

Re: [PATCH v11 5/5] migration: introduce 'userfaultfd-wrlat.py' script

2021-01-21 Thread Peter Xu
On Thu, Jan 21, 2021 at 04:12:23PM +0300, Andrey Gruzdev wrote: > > > +/* KRETPROBE for handle_userfault(). */ > > > +int retprobe_handle_userfault(struct pt_regs *ctx) > > > +{ > > > +u64 pid = (u32) bpf_get_current_pid_tgid(); > > > +u64 *addr_p; > > > + > > > +/* > > > + * Here w

Re: Thread safety of coroutine-sigaltstack

2021-01-21 Thread Max Reitz
On 21.01.21 14:34, Laszlo Ersek wrote: On 01/21/21 10:27, Max Reitz wrote: On 20.01.21 18:25, Laszlo Ersek wrote: On 01/20/21 17:26, Max Reitz wrote: Hi, I’ve run into trouble with Vladimir’s async backup series on MacOS, namely that iotest 256 fails with qemu exiting because of a SIGUSR2. T

Re: [PATCH] tests: Fix memory leak in tpm-util.c

2021-01-21 Thread Philippe Mathieu-Daudé
On 1/15/21 9:46 PM, Stefan Berger wrote: > This patch fixes the following memory leak detected by asan: > > Indirect leak of 560320 byte(s) in 136 object(s) allocated from: > #0 0x556b3b3f9b57 in calloc > (/home/stefanb/tmp/qemu-tip/build/tests/qtest/tpm-crb-swtpm-test+0x23fb57) > #1 0x15

Re: [PATCH 0/8] s390x/pci: Fixing s390 vfio-pci ISM support

2021-01-21 Thread Pierre Morel
On 1/21/21 3:42 PM, Matthew Rosato wrote: On 1/21/21 3:27 AM, Pierre Morel wrote: On 1/20/21 9:29 PM, Matthew Rosato wrote: On 1/20/21 2:18 PM, Pierre Morel wrote: ...snip... So we have: devices supporting MIO and MSIX devices not supporting MIO nor MSIX devices not supporting the us

Re: [PATCH] virtiofsd: prevent opening of special files (CVE-2020-35517)

2021-01-21 Thread alex--- via
Excerpts from Laszlo Ersek's message of January 21, 2021 10:32 am: > Assuming a benign / trusted guest, is there going to be an override for > this? > > Asked differently -- if we don't want to set up a separate block device > on the host, to contain the filesystem that is mounted as the shared >

Re: changing tests/qtest/meson.build causes unnecessary rebuilding

2021-01-21 Thread Philippe Mathieu-Daudé
Hi Peter, On 1/21/21 2:12 PM, Paolo Bonzini wrote: > On 21/01/21 12:56, Peter Maydell wrote: >> $ make -C build/arm-clang/ -j8 >> make: Entering directory >> '/home/petmay01/linaro/qemu-from-laptop/qemu/build/arm-clang' >> [1/23] Generating qemu-version.h with a meson_exe.py custom command >> make

Re: Thread safety of coroutine-sigaltstack

2021-01-21 Thread Daniel P . Berrangé
On Thu, Jan 21, 2021 at 04:42:09PM +0100, Max Reitz wrote: > On 21.01.21 14:34, Laszlo Ersek wrote: > > On 01/21/21 10:27, Max Reitz wrote: > > SUSv3 marked ucontext functions obsolescent: > > > > https://pubs.opengroup.org/onlinepubs/95399/functions/makecontext.html#tag_03_356_08 > > > > and

Re: Thread safety of coroutine-sigaltstack

2021-01-21 Thread Laszlo Ersek
On 01/21/21 16:42, Max Reitz wrote: > Perhaps we have the policy of “If another process can send signals, then > we consider it to have full control over qemu, like a debugger.” That's what I had more or less in mind, yes; see e.g. https://man7.org/linux/man-pages/man2/ptrace.2.html EPER

Re: Thread safety of coroutine-sigaltstack

2021-01-21 Thread Daniel P . Berrangé
On Thu, Jan 21, 2021 at 04:14:21PM +0100, Paolo Bonzini wrote: > On 21/01/21 10:27, Max Reitz wrote: > > > > Sure, I can do that. > > > > I agree that there probably are better solutions than to wrap everything > > in a lock.  OTOH, it looks to me like this lock is the most simple > > solution. 

[DRAFT RFC] ioeventfd/ioregionfd support in vfio-user

2021-01-21 Thread John Levon
Hi, please take a look. For context, this addition is against the current https://github.com/nutanix/libvfio-user/blob/master/docs/vfio-user.rst specification. kvm@ readers: Stefan suggested this may be of interest from a VFIO point of view, in case there is any potential cross-over in defining

Re: [PATCH v11 4/5] migration: implementation of background snapshot thread

2021-01-21 Thread Dr. David Alan Gilbert
* Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: > On 21.01.2021 12:56, Dr. David Alan Gilbert wrote: > > * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: > > > On 19.01.2021 21:49, Dr. David Alan Gilbert wrote: > > > > * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: > > > > > In

[PATCH v3] machine: add missing doc for memory-backend option

2021-01-21 Thread Igor Mammedov
Add documentation for '-machine memory-backend' CLI option and how to use it. And document that x-use-canonical-path-for-ramblock-id, is considered to be stable to make sure it won't go away by accident. x- was intended for unstable/iternal properties, and not supposed to be stable option. Howeve

Re: [PATCH v7 07/11] iotests: add findtests.py

2021-01-21 Thread Eric Blake
On 1/16/21 7:44 AM, Vladimir Sementsov-Ogievskiy wrote: > 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

Re: [PATCH v6 4/7] coroutine: add libucontext as external library

2021-01-21 Thread Daniel P . Berrangé
On Mon, Jan 04, 2021 at 06:20:52PM -0800, Joelle van Dyne wrote: > iOS does not support ucontext natively for aarch64 and the sigaltstack is > also unsupported (even worse, it fails silently, see: > https://openradar.appspot.com/13002712 ) > > As a workaround we include a library implementation of

Re: [PATCH v3 18/19] i386: provide simple 'hv-default=on' option

2021-01-21 Thread Igor Mammedov
On Thu, 21 Jan 2021 14:27:04 +0100 Igor Mammedov wrote: > On Wed, 20 Jan 2021 15:49:09 -0500 > Eduardo Habkost wrote: > > > On Wed, Jan 20, 2021 at 08:08:32PM +0100, Igor Mammedov wrote: > > > On Wed, 20 Jan 2021 15:38:33 +0100 > > > Vitaly Kuznetsov wrote: > > > > > > > Igor Mammedov

Re: [PATCH v7 07/11] iotests: add findtests.py

2021-01-21 Thread Eric Blake
On 1/16/21 7:44 AM, Vladimir Sementsov-Ogievskiy wrote: > Add python script with new logic of searching for tests: > > The file findtests.py is self-executable and may be used for debugging > purposes. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > diff --git a/tests/qemu-iotests/find

Re: Migrating to the gitlab issue tracker

2021-01-21 Thread John Snow
On 1/21/21 5:57 AM, Thomas Huth wrote: On 05/11/2020 01.06, John Snow wrote: On 10/30/20 6:57 AM, Peter Maydell wrote: On Fri, 30 Oct 2020 at 10:10, Daniel P. Berrangé wrote: This makes it more appealing to leave existing bugs in the LP tracker until they are resolved, auto-closed, or there i

Re: [PATCH 3/3] 9pfs: Improve unreclaim loop

2021-01-21 Thread Greg Kurz
On Thu, 21 Jan 2021 13:50:37 +0100 Christian Schoenebeck wrote: > On Montag, 18. Januar 2021 15:23:00 CET Greg Kurz wrote: > > If a fid was actually re-open by v9fs_reopen_fid(), we re-traverse the > > "re-opened" > > > fid list from the head in case some other request created a fid that > > ne

Re: Thread safety of coroutine-sigaltstack

2021-01-21 Thread Peter Maydell
On Thu, 21 Jan 2021 at 16:10, Daniel P. Berrangé wrote: > FWIW The libucontext impl is all ASM based and has coverage for all the > arches we care about: > >https://github.com/kaniini/libucontext > > so doesn't seem like there's a need for coroutine-asm if we can rely > on libucontext for por

Re: [PATCH v7 08/11] iotests: add testenv.py

2021-01-21 Thread Eric Blake
On 1/16/21 7:44 AM, Vladimir Sementsov-Ogievskiy wrote: > 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 somebo

Re: [PATCH v3 18/19] i386: provide simple 'hv-default=on' option

2021-01-21 Thread Vitaly Kuznetsov
Igor Mammedov writes: > On Thu, 21 Jan 2021 09:45:33 +0100 > Vitaly Kuznetsov wrote: > >> > >> > So far I read snippet above as a problem: >> > 1: >> > host supports evmcs: >> > and exposes HYPERV_FEAT_EVMCS in CPUID >> >> Host with EVMCS is Intel >> >> > 2: we migrate to host without ev

Re: [PATCH v7 07/11] iotests: add findtests.py

2021-01-21 Thread Vladimir Sementsov-Ogievskiy
21.01.2021 19:21, Eric Blake wrote: On 1/16/21 7:44 AM, Vladimir Sementsov-Ogievskiy wrote: Add python script with new logic of searching for tests: The file findtests.py is self-executable and may be used for debugging purposes. Signed-off-by: Vladimir Sementsov-Ogievskiy --- diff --gi

Re: [PATCH v7 09/11] iotests: add testrunner.py

2021-01-21 Thread Eric Blake
On 1/16/21 7:44 AM, Vladimir Sementsov-Ogievskiy wrote: > 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 p

Re: [PATCH 0/3] 9pfs: Improve unreclaim logic

2021-01-21 Thread Greg Kurz
On Mon, 18 Jan 2021 15:22:57 +0100 Greg Kurz wrote: > clone of "master" > Drat... this text seems to have leaked from stgit and replaced the one I had written in git publish: --- We currently restart the unreclaim loop all over when we detect that the current iteration yielded execution. This

Re: [PATCH v7 08/11] iotests: add testenv.py

2021-01-21 Thread Vladimir Sementsov-Ogievskiy
21.01.2021 19:48, Eric Blake wrote: On 1/16/21 7:44 AM, Vladimir Sementsov-Ogievskiy wrote: 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

[PATCH v3 2/2] block: move blk_exp_close_all() to qemu_cleanup()

2021-01-21 Thread Sergio Lopez
Move blk_exp_close_all() from bdrv_close() to qemu_cleanup(), before bdrv_drain_all_begin(). Export drivers may have coroutines yielding at some point in the block layer, so we need to shut them down before draining the block layer, as otherwise they may get stuck blk_wait_while_drained(). RHBZ:

Re: [PATCH 3/3] 9pfs: Improve unreclaim loop

2021-01-21 Thread Christian Schoenebeck
On Donnerstag, 21. Januar 2021 17:34:55 CET Greg Kurz wrote: > > > + > > > +/* > > > + * v9fs_reopen_fid() can yield : a reference on the fid must be > > > held > > > + * to ensure its pointer remains valid and we can safely pass it to > > > + * QSIMPLEQ_NEXT(). The corresponding pu

[PATCH v3 1/2] block: Avoid processing BDS twice in bdrv_set_aio_context_ignore()

2021-01-21 Thread Sergio Lopez
Some graphs may contain an indirect reference to the first BDS in the chain that can be reached while walking it bottom->up from one its children. Doubling-processing of a BDS is especially problematic for the aio_notifiers, as they might attempt to work on both the old and the new AIO contexts.

Re: What are libvhost-user locking requirements

2021-01-21 Thread Stefan Hajnoczi
On Wed, Jan 20, 2021 at 10:45:01AM +, Dr. David Alan Gilbert wrote: > * Vivek Goyal (vgo...@redhat.com) wrote: > > - what's the locking model needed to use libvhost-user. Is there one? > > I don't think it really had one. Same. Most libvhost-user applications are single-threaded. Stefan s

[PATCH] virtiofsd: Add _llseek to the seccomp whitelist

2021-01-21 Thread Greg Kurz
This is how glibc implements lseek(2) on POWER. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1917692 Signed-off-by: Greg Kurz --- tools/virtiofsd/passthrough_seccomp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virtiofsd/passthrough_seccomp.c b/tools/virtiofsd/passthrough

Re: [PATCH] virtiofsd: prevent opening of special files (CVE-2020-35517)

2021-01-21 Thread Laszlo Ersek
On 01/21/21 16:52, Alex Xu wrote: > Excerpts from Laszlo Ersek's message of January 21, 2021 10:32 am: >> Assuming a benign / trusted guest, is there going to be an override for >> this? >> >> Asked differently -- if we don't want to set up a separate block device >> on the host, to contain the fil

Re: [PATCH v20 00/20] Initial support for multi-process Qemu

2021-01-21 Thread Stefan Hajnoczi
On Tue, Jan 19, 2021 at 03:28:17PM -0500, Jagannathan Raman wrote: > Hi, > > This is the v20 of the patchset. This version has the following changes: > > [PATCH v18 08/20] io: add qio_channel_readv_full_all_eof & > qio_channel_readv_full_all helpers > - Considers fds as part of

Re: [PATCH] 9pfs/proxy: Check return value of proxy_marshal()

2021-01-21 Thread Greg Kurz
On Mon, 11 Jan 2021 10:49:56 +0100 Greg Kurz wrote: > This should always successfully write exactly two 32-bit integers. > Make it clear with an assert(), like v9fs_receive_status() and > v9fs_receive_response() already do when unmarshalling the same > header. > > Fixes: Coverity CID 1438968 > S

Re: [PATCH v6 4/7] coroutine: add libucontext as external library

2021-01-21 Thread Joelle van Dyne
Yes since the submission of this patch, we have been working with the original authors to merge all the changes upstream. The next patch should point to the original repo. -j On Thursday, January 21, 2021, Daniel P. Berrangé wrote: > On Mon, Jan 04, 2021 at 06:20:52PM -0800, Joelle van Dyne wro

[PATCH v3 0/2] nbd/server: Quiesce coroutines on context switch

2021-01-21 Thread Sergio Lopez
This series allows the NBD server to properly switch between AIO contexts, having quiesced recv_coroutine and send_coroutine before doing the transition. We need this because we send back devices running in IO Thread owned contexts to the main context when stopping the data plane, something that c

Re: Thread safety of coroutine-sigaltstack

2021-01-21 Thread Paolo Bonzini
On 21/01/21 17:44, Peter Maydell wrote: On Thu, 21 Jan 2021 at 16:10, Daniel P. Berrangé wrote: FWIW The libucontext impl is all ASM based and has coverage for all the arches we care about: https://github.com/kaniini/libucontext so doesn't seem like there's a need for coroutine-asm if we

Re: [PATCH v11 5/5] migration: introduce 'userfaultfd-wrlat.py' script

2021-01-21 Thread Andrey Gruzdev
On 21.01.2021 18:37, Peter Xu wrote: On Thu, Jan 21, 2021 at 04:12:23PM +0300, Andrey Gruzdev wrote: +/* KRETPROBE for handle_userfault(). */ +int retprobe_handle_userfault(struct pt_regs *ctx) +{ +u64 pid = (u32) bpf_get_current_pid_tgid(); +u64 *addr_p; + +/* + * Here we just i

Re: [PATCH v3 18/19] i386: provide simple 'hv-default=on' option

2021-01-21 Thread Eduardo Habkost
On Thu, Jan 21, 2021 at 02:27:04PM +0100, Igor Mammedov wrote: > On Wed, 20 Jan 2021 15:49:09 -0500 > Eduardo Habkost wrote: > > > On Wed, Jan 20, 2021 at 08:08:32PM +0100, Igor Mammedov wrote: > > > On Wed, 20 Jan 2021 15:38:33 +0100 > > > Vitaly Kuznetsov wrote: > > > > > > > Igor Mammedov

[PATCH v2 2/2] gitlab-ci: Test building linux-user targets on CentOS 7

2021-01-21 Thread Philippe Mathieu-Daudé
Add a configuration tested by Peter Maydell (see [1] and [2]) but not covered in our CI [3]: [705/2910] Compiling C object libqemu-arm-linux-user.fa.p/linux-user_strace.c.o FAILED: libqemu-arm-linux-user.fa.p/linux-user_strace.c.o ../linux-user/strace.c: In function 'do_print_sockopt': ..

Re: [PATCH v11 4/5] migration: implementation of background snapshot thread

2021-01-21 Thread Andrey Gruzdev
On 21.01.2021 19:11, Dr. David Alan Gilbert wrote: * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: On 21.01.2021 12:56, Dr. David Alan Gilbert wrote: * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: On 19.01.2021 21:49, Dr. David Alan Gilbert wrote: * Andrey Gruzdev (andrey.gruz.

Re: [PATCH v7 10/11] iotests: rewrite check into python

2021-01-21 Thread Eric Blake
On 1/16/21 7:44 AM, Vladimir Sementsov-Ogievskiy wrote: > Just use classes introduced in previous three commits. Behavior > difference is described in these three commits. > > Drop group file, as it becomes unused. > > Drop common.env: now check is in python, and for tests we use same > python in

Re: [PATCH v7 09/11] iotests: add testrunner.py

2021-01-21 Thread Vladimir Sementsov-Ogievskiy
21.01.2021 20:02, Eric Blake wrote: On 1/16/21 7:44 AM, Vladimir Sementsov-Ogievskiy wrote: 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,

[PATCH v2 0/2] gitlab-ci: Test linux-user on CentOS 7

2021-01-21 Thread Philippe Mathieu-Daudé
The first patch adds the static libc package to the CentOS 7 Docker image so then we can run the TCG linux-user tests on it (second patch). Since v1: - added first patch Philippe Mathieu-Daudé (2): tests/docker: Install static libc package in CentOS 7 gitlab-ci: Test building linux-user targe

Re: [PATCH v3 1/2] block: Avoid processing BDS twice in bdrv_set_aio_context_ignore()

2021-01-21 Thread Eric Blake
On 1/21/21 11:06 AM, Sergio Lopez wrote: > Some graphs may contain an indirect reference to the first BDS in the > chain that can be reached while walking it bottom->up from one its one of its > children. > > Doubling-processing of a BDS is especially problematic for the Double-processing > ai

Re: [PATCH] virtiofsd: Add _llseek to the seccomp whitelist

2021-01-21 Thread Dr. David Alan Gilbert
* Greg Kurz (gr...@kaod.org) wrote: > This is how glibc implements lseek(2) on POWER. > > BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1917692 > Signed-off-by: Greg Kurz OK, I'm going to assume that _llseek is present on pretty much everything? Reviewed-by: Dr. David Alan Gilbert > --

[PATCH v2 1/2] tests/docker: Install static libc package in CentOS 7

2021-01-21 Thread Philippe Mathieu-Daudé
We need to install the static libc package to be able to run the TCG tests: $ make check-tcg ... BUILD TCG tests for x86_64-softmmu BUILD x86_64-softmmu guest-tests with cc /usr/bin/ld: hello: warning: allocated section `.notes' not in segment /usr/bin/ld: memory: warning: allo

Re: [PATCH v20 00/20] Initial support for multi-process Qemu

2021-01-21 Thread Jag Raman
> On Jan 21, 2021, at 12:07 PM, Stefan Hajnoczi wrote: > > On Tue, Jan 19, 2021 at 03:28:17PM -0500, Jagannathan Raman wrote: >> Hi, >> >> This is the v20 of the patchset. This version has the following changes: >> >> [PATCH v18 08/20] io: add qio_channel_readv_full_all_eof & >>

[PATCH] gitlab-ci.yml: Avoid some submodules to speed up the CI a little bit

2021-01-21 Thread Thomas Huth
Since the meson build system rework, the configure script prefers the git submodules over the system libraries. So we are testing compilation with capstone, fdt and libslirp as a submodule all over the place, burning CPU cycles by recompiling these third party modules and wasting some network bandw

Re: [PATCH v2 2/2] gitlab-ci: Test building linux-user targets on CentOS 7

2021-01-21 Thread Wainer dos Santos Moschetta
Hi, On 1/21/21 2:28 PM, Philippe Mathieu-Daudé wrote: Add a configuration tested by Peter Maydell (see [1] and [2]) but not covered in our CI [3]: [705/2910] Compiling C object libqemu-arm-linux-user.fa.p/linux-user_strace.c.o FAILED: libqemu-arm-linux-user.fa.p/linux-user_strace.c.o

Re: [PATCH v11 4/5] migration: implementation of background snapshot thread

2021-01-21 Thread Dr. David Alan Gilbert
* Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: > On 21.01.2021 19:11, Dr. David Alan Gilbert wrote: > > * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: > > > On 21.01.2021 12:56, Dr. David Alan Gilbert wrote: > > > > * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: > > > > > On

Re: [PATCH 0/8] s390x/pci: Fixing s390 vfio-pci ISM support

2021-01-21 Thread Cornelia Huck
On Thu, 21 Jan 2021 15:54:22 +0100 Niklas Schnelle wrote: > On 1/21/21 3:46 PM, Pierre Morel wrote: > > > > > > On 1/21/21 2:37 PM, Niklas Schnelle wrote: > >> > >> > >> On 1/21/21 1:30 PM, Pierre Morel wrote: > > > > Just wanted to say that we've had a very similar discussion

Re: [PATCH] virtiofsd: Add _llseek to the seccomp whitelist

2021-01-21 Thread Greg Kurz
On Thu, 21 Jan 2021 17:35:53 + "Dr. David Alan Gilbert" wrote: > * Greg Kurz (gr...@kaod.org) wrote: > > This is how glibc implements lseek(2) on POWER. > > > > BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1917692 > > Signed-off-by: Greg Kurz > > OK, I'm going to assume that _llsee

Re: [PATCH v3 2/2] block: move blk_exp_close_all() to qemu_cleanup()

2021-01-21 Thread Eric Blake
On 1/21/21 11:07 AM, Sergio Lopez wrote: > Move blk_exp_close_all() from bdrv_close() to qemu_cleanup(), before > bdrv_drain_all_begin(). > > Export drivers may have coroutines yielding at some point in the block > layer, so we need to shut them down before draining the block layer, > as otherwise

Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang

2021-01-21 Thread Wainer dos Santos Moschetta
Hi, On 1/21/21 7:08 AM, Thomas Huth wrote: On 10/01/2021 17.27, Philippe Mathieu-Daudé wrote: Split the current GCC build-tci job in 2, and use Clang compiler in the new job. Signed-off-by: Philippe Mathieu-Daudé --- RFC in case someone have better idea to optimize can respin this patch.   .

  1   2   3   4   >