Re: Race condition in overlayed qcow2?

2020-02-20 Thread dovgaluk
Vladimir Sementsov-Ogievskiy писал 2020-02-19 19:07: 19.02.2020 17:32, dovgaluk wrote: I encountered a problem with record/replay of QEMU execution and figured out the following, when QEMU is started with one virtual disk connected to the qcow2 image with applied 'snapshot' option. The patch

Re: Program counter stuck at 0xFFFFFFFC when emulating e5500 processor on T4240-RDB board

2020-02-20 Thread Philippe Mathieu-Daudé
Hello, On 2/20/20 6:40 AM, Wayne Li wrote: Dear QEMU list members, No subject: it is unlikely your question get noticed... Also you didn't Cc'ed the people who might help you (doing that for you): ./scripts/get_maintainer.pl -f target/ppc/cpu-models.c David Gibson (maintainer:PowerPC TCG CP

Re: [PATCH] hw/char/pl011: Output characters using best-effort mode

2020-02-20 Thread Philippe Mathieu-Daudé
Hi Gavin, Cc'ing the chardev maintainers: ./scripts/get_maintainer.pl -f chardev/char-fe.c "Marc-André Lureau" (maintainer:Character device...) Paolo Bonzini (reviewer:Character device...) qemu-devel@nongnu.org (open list:All patches CC here) On 2/20/20 7:01 AM, Gavin Shan wrote: Currentl

Re: Race condition in overlayed qcow2?

2020-02-20 Thread Vladimir Sementsov-Ogievskiy
20.02.2020 11:31, dovgaluk wrote: Vladimir Sementsov-Ogievskiy писал 2020-02-19 19:07: 19.02.2020 17:32, dovgaluk wrote: I encountered a problem with record/replay of QEMU execution and figured out the following, when QEMU is started with one virtual disk connected to the qcow2 image with appl

Re: [PATCH] hw/char/pl011: Output characters using best-effort mode

2020-02-20 Thread Gavin Shan
Hi Philippe, On 2/20/20 7:47 PM, Philippe Mathieu-Daudé wrote: Cc'ing the chardev maintainers: ./scripts/get_maintainer.pl -f chardev/char-fe.c "Marc-André Lureau" (maintainer:Character device...) Paolo Bonzini (reviewer:Character device...) qemu-devel@nongnu.org (open list:All patches CC he

Re: [PATCH] hw/char/pl011: Output characters using best-effort mode

2020-02-20 Thread Marc Zyngier
On 2020-02-20 06:01, Gavin Shan wrote: Currently, PL011 is used by ARM virt board by default. It's possible to block the system from booting. With below parameters in command line, the backend could run into endless attempts of transmitting packets, which can't succeed because of running out of

Re: [PATCH v2 6/7] block/block-copy: reduce intersecting request lock

2020-02-20 Thread Max Reitz
On 20.02.20 08:21, Vladimir Sementsov-Ogievskiy wrote: > 17.02.2020 16:38, Max Reitz wrote: >> On 27.11.19 19:08, Vladimir Sementsov-Ogievskiy wrote: [...] >>> +    if (!block_copy_wait_one(s, start, bytes)) { >>> +    /* No dirty bits and nothing to wait: the whole request >>> is don

[PULL 03/13] configure: linux-user doesn't need neither fdt nor slirp

2020-02-20 Thread Laurent Vivier
From: Laurent Vivier if softmmu is not enabled, we disable by default fdt and slirp as they are only used by -softmmu targets. A side effect is the git submodules are not cloned if they are not needed. Clone and build can be forced with --enable-fdt and --enable-slirp. Signed-off-by: Laurent V

[PULL 05/13] configure: Avoid compiling system tools on user build by default

2020-02-20 Thread Laurent Vivier
From: Philippe Mathieu-Daudé User-mode does not need the system tools. Do not build them by default if the user specifies --disable-system. This disables building the following binaries on a user-only build: - elf2dmp - qemu-edid - qemu-ga - qemu-img - qemu-io - qemu-nbd - ivshmem-client - ivsh

[PULL 00/13] Linux user for 5.0 patches

2020-02-20 Thread Laurent Vivier
The following changes since commit 6c599282f8ab382fe59f03a6cae755b89561a7b3: Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2020-02-15-v2' into staging (2020-02-17 13:32:25 +) are available in the Git repository at: git://github.com/vivier/qemu.git tags/linux-user-for-5.

[PULL 09/13] linux-user: Add support for getting alsa timer version and id

2020-02-20 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionalities of following ioctls: SNDRV_TIMER_IOCTL_PVERSION - Getting the sound timer version Read the sound timer version. The third ioctl's argument is a pointer to an int in which the specified timers version is returned. SNDRV_TIMER_

[PULL 12/13] linux-user: Add support for getting/setting selected alsa timer parameters using ioctls

2020-02-20 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionalities of following ioctls: SNDRV_TIMER_IOCTL_INFO - Getting information about selected timer Read information about the selected timer. The information is returned in the following structure: struct snd_timer_info { unsigne

[PULL 01/13] linux-user: Implement membarrier syscall

2020-02-20 Thread Laurent Vivier
From: Andreas Schwab Signed-off-by: Andreas Schwab Reviewed-by: Laurent Vivier Message-Id: Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index c930577686da..7aaa9d96397c 100644 ---

[PULL 08/13] linux-user: remove gemu_log from the linux-user tree

2020-02-20 Thread Laurent Vivier
From: Josh Kunz Now that all uses have been migrated to `qemu_log' it is no longer needed. Reviewed-by: Laurent Vivier Signed-off-by: Josh Kunz Message-Id: <20200204025416.111409-4-...@google.com> Signed-off-by: Laurent Vivier --- linux-user/main.c | 9 - linux-user/qemu.h | 1 - 2 f

[PULL 02/13] linux-user: implement getsockopt SO_RCVTIMEO and SO_SNDTIMEO

2020-02-20 Thread Laurent Vivier
From: Andreas Schwab Signed-off-by: Andreas Schwab Reviewed-by: Laurent Vivier Message-Id: Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 36 ++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscal

[PULL 04/13] linux-user/strace: Improve output of various syscalls

2020-02-20 Thread Laurent Vivier
From: Helge Deller Improve strace output of various syscalls which either have none or only int-type parameters. Signed-off-by: Helge Deller Reviewed-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20191121193351.ga31...@ls3530.fritz.box> Signed-off-by: Laurent Vivie

Re: [PATCH v1 07/13] migrate/ram: Get rid of "place_source" in ram_load_postcopy()

2020-02-20 Thread David Hildenbrand
> Am 19.02.2020 um 21:47 schrieb Peter Xu : > > On Wed, Feb 19, 2020 at 05:17:19PM +0100, David Hildenbrand wrote: >> It's always the same value. > > I guess not, because... > >> >> Cc: "Dr. David Alan Gilbert" >> Cc: Juan Quintela >> Cc: Peter Xu >> Signed-off-by: David Hildenbrand >>

[PULL 11/13] linux-user: Add support for selecting alsa timer using ioctl

2020-02-20 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionality of following ioctl: SNDRV_TIMER_IOCTL_SELECT - Selecting timer Selects the timer which id is specified. The timer id is specified in the following strcuture: struct snd_timer_select { struct snd_timer_id id; /*

[PULL 06/13] linux-user: Use `qemu_log' for non-strace logging

2020-02-20 Thread Laurent Vivier
From: Josh Kunz Since most calls to `gemu_log` are actually logging unimplemented features, this change replaces most non-strace calls to `gemu_log` with calls to `qemu_log_mask(LOG_UNIMP, ...)`. This allows the user to easily log to a file, and to mask out these log messages if they desire. No

Re: [PATCH v2] Avoid address_space_rw() with a constant is_write argument

2020-02-20 Thread Philippe Mathieu-Daudé
On 2/18/20 1:56 PM, Philippe Mathieu-Daudé wrote: On 2/18/20 12:24 PM, Peter Maydell wrote: The address_space_rw() function allows either reads or writes depending on the is_write argument passed to it; this is useful when the direction of the access is determined programmatically (as for instan

[PULL 13/13] linux-user: Add support for selected alsa timer instructions using ioctls

2020-02-20 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionalities of following ioctls: SNDRV_TIMER_IOCTL_START - Start selected alsa timer Starts the timer device that is selected. The third ioctl's argument is ignored. Before calling this ioctl, the ioctl "SNDRV_TIMER_IOCTL_SELECT" should b

[PULL 10/13] linux-user: Add support for getting/setting specified alsa timer parameters using ioctls

2020-02-20 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionalities of following ioctls: SNDRV_TIMER_IOCTL_GINFO - Getting information about specified timer Read information about the specified timer. The information about the timer is returned in the following structure: struct snd_timer

[PULL 07/13] linux-user: Use `qemu_log' for strace

2020-02-20 Thread Laurent Vivier
From: Josh Kunz This change switches linux-user strace logging to use the newer `qemu_log` logging subsystem rather than the older `gemu_log` (notice the "g") logger. `qemu_log` has several advantages, namely that it allows logging to a file, and provides a more unified interface for configuratio

Re: [PATCH v2 1/5] vhost-user block device backend

2020-02-20 Thread Coiby Xu
> > +vmsg->fd_num = 0; > > +for (cmsg = CMSG_FIRSTHDR(&msg); > > + cmsg != NULL; > > + cmsg = CMSG_NXTHDR(&msg, cmsg)) > > +{ > > +if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) { > > +fd_size = cmsg->cmsg_len - CMSG_LEN(0); > >

Re: Race condition in overlayed qcow2?

2020-02-20 Thread Vladimir Sementsov-Ogievskiy
20.02.2020 12:05, Vladimir Sementsov-Ogievskiy wrote: 20.02.2020 11:31, dovgaluk wrote: Vladimir Sementsov-Ogievskiy писал 2020-02-19 19:07: 19.02.2020 17:32, dovgaluk wrote: I encountered a problem with record/replay of QEMU execution and figured out the following, when QEMU is started with

Re: [PATCH] console: make QMP screendump use coroutine

2020-02-20 Thread Marc-André Lureau
Hi On Thu, Feb 20, 2020 at 8:49 AM Markus Armbruster wrote: > > Marc-André Lureau writes: > > > Thanks to the QMP coroutine support, the screendump handler can > > trigger a graphic_hw_update(), yield and let the main loop run until > > update is done. Then the handler is resumed, and the ppm_sa

Re:

2020-02-20 Thread Peter Maydell
On Thu, 20 Feb 2020 at 05:41, Wayne Li wrote: > Also, I do have another side question. When running with KVM enabled, I >see the kernel-level ioctl call KVM_RUN running and then returning over >and over again (by the way before the VM kinda grinds to a halt I only see >QEMU make the KVM_RUN call

RE: Race condition in overlayed qcow2?

2020-02-20 Thread Pavel Dovgalyuk
> From: Vladimir Sementsov-Ogievskiy [mailto:vsement...@virtuozzo.com] > 20.02.2020 11:31, dovgaluk wrote: > > Vladimir Sementsov-Ogievskiy писал 2020-02-19 19:07: > >> 19.02.2020 17:32, dovgaluk wrote: > >>> I encountered a problem with record/replay of QEMU execution and figured > >>> out the >

Re: [PATCH qemu v7 0/5] spapr: Kill SLOF

2020-02-20 Thread Paolo Bonzini
On 20/02/20 07:16, Alexey Kardashevskiy wrote: > This is another attempt to implement minimalistic > Open Firmware Client Interface in QEMU. > > With this thing, I can boot unmodified Ubuntu 18.04 and Fedora 30 > directly from the disk without SLOF. > > A useful discussion happened esrlier: > htt

Re: [PATCH v3 04/17] s390x: protvirt: Add diag308 subcodes 8 - 10

2020-02-20 Thread Cornelia Huck
On Fri, 14 Feb 2020 10:16:23 -0500 Janosch Frank wrote: > For diag308 subcodes 8 - 10 we have a new ipib of type 5. The ipib > holds the address and length of the secure execution header, as well > as a list of guest components. > > Each component is a block of memory, for example kernel or init

Re: [PATCH] hw/char/pl011: Output characters using best-effort mode

2020-02-20 Thread Peter Maydell
On Thu, 20 Feb 2020 at 09:10, Marc Zyngier wrote: > > On 2020-02-20 06:01, Gavin Shan wrote: > > This fixes the issue by using newly added API > > qemu_chr_fe_try_write_all(), > > which provides another type of service (best-effort). It's different > > from > > qemu_chr_fe_write_all() as the data

Re: [PATCH v2 1/2] docs: Convert qemu-cpu-models.texi to rST

2020-02-20 Thread Kashyap Chamarthy
On Wed, Feb 19, 2020 at 05:57:16PM +, Peter Maydell wrote: > On Wed, 19 Feb 2020 at 16:40, Kashyap Chamarthy wrote: > > Peter, how are you able to generate those *.7 `nroff` man pages? When I > > do 'make sphinxbuild' from my build dir ($HOME/buld/qemu), I only see: > > Just run 'make'. I

Re: [PATCH v10 01/22] softmmu: move vl.c to softmmu/

2020-02-20 Thread Darren Kenny
On Wed, Feb 19, 2020 at 11:10:57PM -0500, Alexander Bulekov wrote: Move vl.c to a separate directory, similar to linux-user/ Update the chechpatch and get_maintainer scripts, since they relied on /vl.c for top_of_tree checks. Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny --- M

Re: [PATCH v10 16/22] fuzz: add support for qos-assisted fuzz targets

2020-02-20 Thread Darren Kenny
On Wed, Feb 19, 2020 at 11:11:12PM -0500, Alexander Bulekov wrote: Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi Reviewed-by: Darren Kenny --- tests/qtest/fuzz/Makefile.include | 2 + tests/qtest/fuzz/qos_fuzz.c | 234 ++ tests/qtest/fuzz/q

Re: [PATCH v10 20/22] fuzz: add virtio-net fuzz target

2020-02-20 Thread Darren Kenny
On Wed, Feb 19, 2020 at 11:11:16PM -0500, Alexander Bulekov wrote: The virtio-net fuzz target feeds inputs to all three virtio-net virtqueues, and uses forking to avoid leaking state between fuzz runs. Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi Reviewed-by: Darren Kenny

Re: [PATCH v10 15/22] fuzz: support for fork-based fuzzing.

2020-02-20 Thread Darren Kenny
On Wed, Feb 19, 2020 at 11:11:11PM -0500, Alexander Bulekov wrote: fork() is a simple way to ensure that state does not leak in between fuzzing runs. Unfortunately, the fuzzer mutation engine relies on bitmaps which contain coverage information for each fuzzing run, and these bitmaps should be co

[PATCH] rcu_queue: add QSLIST functions

2020-02-20 Thread Paolo Bonzini
QSLIST is the only family of lists for which we do not have RCU-friendly accessors, add them. Signed-off-by: Paolo Bonzini --- include/qemu/queue.h | 15 +++-- include/qemu/rcu_queue.h | 47 tests/Makefile.include | 2 ++ tests/test-rcu-li

Re: [PATCH v10 21/22] fuzz: add virtio-scsi fuzz target

2020-02-20 Thread Darren Kenny
On Wed, Feb 19, 2020 at 11:11:17PM -0500, Alexander Bulekov wrote: The virtio-scsi fuzz target sets up and fuzzes the available virtio-scsi queues. After an element is placed on a queue, the fuzzer can select whether to perform a kick, or continue adding elements. Signed-off-by: Alexander Buleko

Re: [PATCH v3 05/17] s390x: protvirt: Support unpack facility

2020-02-20 Thread Cornelia Huck
On Fri, 14 Feb 2020 10:16:24 -0500 Janosch Frank wrote: > When a guest has saved a ipib of type 5 and call diagnose308 with s/call/calls/ > subcode 10, we have to setup the protected processing environment via > Ultravisor calls. The calls are done by KVM and are exposed via an API. > > The fo

Re: [PATCH v2] util/async: make bh_aio_poll() O(1)

2020-02-20 Thread Paolo Bonzini
On 19/02/20 18:53, Stefan Hajnoczi wrote: > The ctx->first_bh list contains all created BHs, including those that > are not scheduled. The list is iterated by the event loop and therefore > has O(n) time complexity with respected to the number of created BHs. > > Rewrite BHs so that only schedule

Re: [PATCH v2] util/async: make bh_aio_poll() O(1)

2020-02-20 Thread Paolo Bonzini
On 19/02/20 18:53, Stefan Hajnoczi wrote: > +} > + > +/* Only called from aio_bh_poll() and aio_ctx_finalize() */ > +static QEMUBH *aio_bh_dequeue(BHList *head, unsigned *flags) > +{ > +QEMUBH *bh = QSLIST_FIRST(head); I forgot, this should also become QSLIST_FIRST_RCU. Paolo

Re: [PATCH] rcu_queue: add QSLIST functions

2020-02-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200220103828.24525-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH] rcu_queue: add QSLIST functions Message-id: 20200220103828.24525-1-pbonz...@redhat.com Type: seri

Re: [PATCH v3 06/17] s390x: protvirt: Add migration blocker

2020-02-20 Thread Cornelia Huck
On Fri, 14 Feb 2020 10:16:25 -0500 Janosch Frank wrote: > Migration is not yet supported. > > Signed-off-by: Janosch Frank > --- > hw/s390x/s390-virtio-ccw.c | 16 > 1 file changed, 16 insertions(+) > > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > in

Re: [PATCH v2] hw/i386: disable smbus migration for xenfv

2020-02-20 Thread Paolo Bonzini
On 19/02/20 15:14, Olaf Hering wrote: >> Is any of the things done by pc_i440fx_5_0_machine_options and >> pc_i440fx_machine_options a desired, or even breaking, change for the >> current result of pc_xen_hvm_init? > I tried to follow a few of the initialized members: > > default_nic_model, perhap

Re: [PATCH v3 09/17] s390: protvirt: Move STSI data over SIDAD

2020-02-20 Thread Cornelia Huck
On Fri, 14 Feb 2020 10:16:28 -0500 Janosch Frank wrote: > For protected guests, we need to put the STSI emulation results into > the SIDA, so SIE will write them into the guest at the next entry. > > Signed-off-by: Janosch Frank > --- > target/s390x/kvm.c | 15 --- > 1 file changed

Re: [PATCH v2 1/2] docs: Convert qemu-cpu-models.texi to rST

2020-02-20 Thread Peter Maydell
On Thu, 20 Feb 2020 at 10:23, Kashyap Chamarthy wrote: > > On Wed, Feb 19, 2020 at 05:57:16PM +, Peter Maydell wrote: > > On Wed, 19 Feb 2020 at 16:40, Kashyap Chamarthy wrote: > > > Peter, how are you able to generate those *.7 `nroff` man pages? When I > > > do 'make sphinxbuild' from my b

Re: [PATCH v3 13/17] s390x: protvirt: Move diag 308 data over SIDAD

2020-02-20 Thread Cornelia Huck
On Fri, 14 Feb 2020 10:16:32 -0500 Janosch Frank wrote: > For protected guests the IPIB is written/read to/from the satellite > block, so we need to make those accesses virtual to make them go > through KVM mem ops. Confused. What does 'make those accesses virtual' mean? > > Signed-off-by: Jan

Re: [PATCH v3 16/17] s390x: protvirt: Handle SIGP store status correctly

2020-02-20 Thread Cornelia Huck
On Fri, 14 Feb 2020 10:16:35 -0500 Janosch Frank wrote: > Status storing is not done by QEMU anymore, but is handled by SIE. > > Signed-off-by: Janosch Frank > Reviewed-by: Thomas Huth > --- > target/s390x/helper.c | 4 > target/s390x/sigp.c | 1 + > 2 files changed, 5 insertions(+) >

Re: [PATCH v3 04/17] s390x: protvirt: Add diag308 subcodes 8 - 10

2020-02-20 Thread Janosch Frank
On 2/20/20 11:07 AM, Cornelia Huck wrote: > On Fri, 14 Feb 2020 10:16:23 -0500 > Janosch Frank wrote: > >> For diag308 subcodes 8 - 10 we have a new ipib of type 5. The ipib >> holds the address and length of the secure execution header, as well >> as a list of guest components. >> >> Each compon

Re: Requesting review about optimizing large guest start up time

2020-02-20 Thread Paolo Bonzini
I queued the patch, thanks! I simplified a bit the computation of the number of pages per thread, like this: numpages_per_thread = numpages / memset_num_threads; leftover = numpages % memset_num_threads; for (i = 0; i < memset_num_threads; i++) { memset_thread[i].addr = addr;

Re: [PATCH] aio-posix: avoid reacquiring rcu_read_lock() when polling

2020-02-20 Thread Paolo Bonzini
On 18/02/20 19:27, Stefan Hajnoczi wrote: > The first rcu_read_lock/unlock() is expensive. Nested calls are cheap. > > This optimization increases IOPS from 73k to 162k with a Linux guest > that has 2 virtio-blk,num-queues=1 and 99 virtio-blk,num-queues=32 > devices. > > Signed-off-by: Stefan Ha

Re: [PATCH v3 05/17] s390x: protvirt: Support unpack facility

2020-02-20 Thread Janosch Frank
On 2/20/20 11:39 AM, Cornelia Huck wrote: > On Fri, 14 Feb 2020 10:16:24 -0500 > Janosch Frank wrote: > >> When a guest has saved a ipib of type 5 and call diagnose308 with > > s/call/calls/ > >> subcode 10, we have to setup the protected processing environment via >> Ultravisor calls. The call

Re: [PATCH v1 13/13] migrate/ram: Tolerate partially changed mappings in postcopy code

2020-02-20 Thread David Hildenbrand
On 19.02.20 17:17, David Hildenbrand wrote: > When we partially change mappings (e.g., mmap over parts of an existing > mmap) where we have a userfaultfd handler registered, the handler will > implicitly be unregistered from the parts that changed. This is e.g., the > case when doing a qemu_ram_rem

Re: [PATCH v3 06/17] s390x: protvirt: Add migration blocker

2020-02-20 Thread Janosch Frank
On 2/20/20 11:48 AM, Cornelia Huck wrote: > On Fri, 14 Feb 2020 10:16:25 -0500 > Janosch Frank wrote: > >> Migration is not yet supported. >> >> Signed-off-by: Janosch Frank >> --- >> hw/s390x/s390-virtio-ccw.c | 16 >> 1 file changed, 16 insertions(+) >> >> diff --git a/hw/s39

Re: Race condition in overlayed qcow2?

2020-02-20 Thread Vladimir Sementsov-Ogievskiy
20.02.2020 13:00, Pavel Dovgalyuk wrote: From: Vladimir Sementsov-Ogievskiy [mailto:vsement...@virtuozzo.com] 20.02.2020 11:31, dovgaluk wrote: Vladimir Sementsov-Ogievskiy писал 2020-02-19 19:07: 19.02.2020 17:32, dovgaluk wrote: I encountered a problem with record/replay of QEMU execution an

Re: [PATCH v3 09/17] s390: protvirt: Move STSI data over SIDAD

2020-02-20 Thread Janosch Frank
On 2/20/20 11:54 AM, Cornelia Huck wrote: > On Fri, 14 Feb 2020 10:16:28 -0500 > Janosch Frank wrote: > >> For protected guests, we need to put the STSI emulation results into >> the SIDA, so SIE will write them into the guest at the next entry. >> >> Signed-off-by: Janosch Frank >> --- >> targ

Re: [PATCH v2] Avoid address_space_rw() with a constant is_write argument

2020-02-20 Thread Paolo Bonzini
On 18/02/20 14:13, Laurent Vivier wrote: > There is one in target/i386/hvf/vmx.h: macvm_set_cr0() you didn't change. > > You must update the script name in the script comment (as suggested by > Philippe) and in the commit message. > > Anyway: > > Reviewed-by: Laurent Vivier Thanks, I squashed

Re: [PATCH v3 13/17] s390x: protvirt: Move diag 308 data over SIDAD

2020-02-20 Thread Janosch Frank
On 2/20/20 12:00 PM, Cornelia Huck wrote: > On Fri, 14 Feb 2020 10:16:32 -0500 > Janosch Frank wrote: > >> For protected guests the IPIB is written/read to/from the satellite >> block, so we need to make those accesses virtual to make them go >> through KVM mem ops. ..we need those accesses to g

Re: [PATCH] Avoid cpu_physical_memory_rw() with a constant is_write argument

2020-02-20 Thread Paolo Bonzini
On 18/02/20 19:49, Peter Maydell wrote: > Depending on which way we go we would either want to remove these > casts, or not. > > I guess that we have more cases of 'void*', and that would > certainly be the easier way to convert (otherwise we probably > need to add a bunch of new casts to uint8_t*

Re: [PATCH v3 16/17] s390x: protvirt: Handle SIGP store status correctly

2020-02-20 Thread Cornelia Huck
On Thu, 20 Feb 2020 12:30:28 +0100 Janosch Frank wrote: > On 2/20/20 12:02 PM, Cornelia Huck wrote: > > On Fri, 14 Feb 2020 10:16:35 -0500 > > Janosch Frank wrote: > > > >> Status storing is not done by QEMU anymore, but is handled by SIE. > >> > >> Signed-off-by: Janosch Frank > >> Reviewed

Re: [PATCH v3 16/17] s390x: protvirt: Handle SIGP store status correctly

2020-02-20 Thread Janosch Frank
On 2/20/20 12:02 PM, Cornelia Huck wrote: > On Fri, 14 Feb 2020 10:16:35 -0500 > Janosch Frank wrote: > >> Status storing is not done by QEMU anymore, but is handled by SIE. >> >> Signed-off-by: Janosch Frank >> Reviewed-by: Thomas Huth >> --- >> target/s390x/helper.c | 4 >> target/s390x

Re: [PATCH v3 06/17] s390x: protvirt: Add migration blocker

2020-02-20 Thread Cornelia Huck
On Thu, 20 Feb 2020 12:24:23 +0100 Janosch Frank wrote: > On 2/20/20 11:48 AM, Cornelia Huck wrote: > > On Fri, 14 Feb 2020 10:16:25 -0500 > > Janosch Frank wrote: > > > >> Migration is not yet supported. > >> > >> Signed-off-by: Janosch Frank > >> --- > >> hw/s390x/s390-virtio-ccw.c | 16 +

Re: [PATCH v3 06/17] s390x: protvirt: Add migration blocker

2020-02-20 Thread Janosch Frank
On 2/20/20 12:39 PM, Cornelia Huck wrote: > On Thu, 20 Feb 2020 12:24:23 +0100 > Janosch Frank wrote: > >> On 2/20/20 11:48 AM, Cornelia Huck wrote: >>> On Fri, 14 Feb 2020 10:16:25 -0500 >>> Janosch Frank wrote: >>> Migration is not yet supported. Signed-off-by: Janosch Frank

RE: Race condition in overlayed qcow2?

2020-02-20 Thread Pavel Dovgalyuk
> From: Vladimir Sementsov-Ogievskiy [mailto:vsement...@virtuozzo.com] > 20.02.2020 13:00, Pavel Dovgalyuk wrote: > >> From: Vladimir Sementsov-Ogievskiy [mailto:vsement...@virtuozzo.com] > >> 20.02.2020 11:31, dovgaluk wrote: > >>> Vladimir Sementsov-Ogievskiy писал 2020-02-19 19:07: > 19.02.

Re: [PATCH v3 0/3] Dump QCOW2 metadata

2020-02-20 Thread Max Reitz
On 14.01.20 09:22, Andrey Shinkevich wrote: > The information about QCOW2 metadata allocations in an image ELF-file is > helpful for finding issues with the image data integrity. Sorry that I’m replying only so late – but I don’t know why we need this in qemu, and this cover letter doesn’t provide

[PATCH v3 1/1] s390x: css: pong, channel subsystem test device

2020-02-20 Thread Pierre Morel
This is a test device for channel subsystem. Most of the CSS instructions are handled by the common code. The PONG_READ and PONG_WRITE CCW commands allow to test the SSCH instruction with both read and write commands. It is also possible to define the Control Unit type with the cu_type property.

[PATCH v3 0/1] s390x: css: pong, channel subsystem test device

2020-02-20 Thread Pierre Morel
This patch series presents a device to test the channel subsystem. Currently it only does the following: - answer to WRITE requests by incrementing an integer stored as string in the data of a PONG_WRITE CCW command. - send back the same buffer, with the incremented integer when receiving a PO

Re: [PATCH v3 0/3] Dump QCOW2 metadata

2020-02-20 Thread Vladimir Sementsov-Ogievskiy
20.02.2020 14:58, Max Reitz wrote: On 14.01.20 09:22, Andrey Shinkevich wrote: The information about QCOW2 metadata allocations in an image ELF-file is helpful for finding issues with the image data integrity. Sorry that I’m replying only so late – but I don’t know why we need this in qemu, an

Re: [PATCH v3 0/3] Dump QCOW2 metadata

2020-02-20 Thread Kevin Wolf
Am 20.02.2020 um 12:58 hat Max Reitz geschrieben: > On 14.01.20 09:22, Andrey Shinkevich wrote: > > The information about QCOW2 metadata allocations in an image ELF-file is > > helpful for finding issues with the image data integrity. > > Sorry that I’m replying only so late – but I don’t know why

[Bug 1823790] Re: QEMU mishandling of SO_PEERSEC forces systemd into tight loop

2020-02-20 Thread Laurent Vivier
This seems to be the error reported in https://bugs.launchpad.net/qemu/+bug/1857811 ** Changed in: qemu Status: Confirmed => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1823790

[Bug 1857811] Re: qemu user static binary seems to lack support for network namespace.

2020-02-20 Thread Laurent Vivier
Could you run something like "sudo strace -yyy unshare --net chroot ..." with your failing binary to see what returns the host kernel? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1857811 Title: q

Re: [PATCH v4 07/16] hw/i386: Rename apicid_from_topo_ids to x86_apicid_from_topo_ids

2020-02-20 Thread Igor Mammedov
On Thu, 13 Feb 2020 12:17:12 -0600 Babu Moger wrote: > For consistancy rename apicid_from_topo_ids to x86_apicid_from_topo_ids. > No functional change. > > Signed-off-by: Babu Moger Reviewed-by: Igor Mammedov > --- > hw/i386/pc.c |2 +- > include/hw/i386/topology.h |6

[PATCH v4 03/16] s390x: protvirt: Support unpack facility

2020-02-20 Thread Janosch Frank
When a guest has saved a ipib of type 5 and calls diagnose308 with subcode 10, we have to setup the protected processing environment via Ultravisor calls. The calls are done by KVM and are exposed via an API. The following steps are necessary: 1. Create a VM (register it with the Ultravisor) 2. Cr

[PATCH v4 00/16] s390x: Protected Virtualization support

2020-02-20 Thread Janosch Frank
Most of the QEMU changes for PV are related to the new IPL type with subcodes 8 - 10 and the execution of the necessary Ultravisor calls to IPL secure guests. Note that we can only boot into secure mode from normal mode, i.e. stfle 161 is not active in secure mode. The other changes related to dat

[PATCH v4 02/16] s390x: protvirt: Add diag308 subcodes 8 - 10

2020-02-20 Thread Janosch Frank
For diag308 subcodes 8 - 10 we have a new ipib of type 5. The ipib holds the address and length of the secure execution header, as well as a list of guest components. Each component is a block of memory, for example kernel or initrd, which needs to be decrypted by the Ultravisor in order to run a

[PATCH v4 13/16] s390x: protvirt: Move IO control structures over SIDA

2020-02-20 Thread Janosch Frank
For protected guests, we need to put the IO emulation results into the SIDA, so SIE will write them into the guest at the next entry. Signed-off-by: Janosch Frank --- target/s390x/ioinst.c | 87 ++- 1 file changed, 61 insertions(+), 26 deletions(-) diff -

[PATCH v4 01/16] Sync pv

2020-02-20 Thread Janosch Frank
Signed-off-by: Janosch Frank --- linux-headers/linux/kvm.h | 46 +++ 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index ec146bd52a..2e647f2d9b 100644 --- a/linux-headers/linux/kvm.h +++ b/l

[PATCH v4 07/16] s390x: Add SIDA memory ops

2020-02-20 Thread Janosch Frank
Protected guests save the instruction control blocks in the SIDA instead of QEMU/KVM directly accessing the guest's memory. Let's introduce new functions to access the SIDA. Signed-off-by: Janosch Frank --- linux-headers/linux/kvm.h | 2 ++ target/s390x/cpu.h| 7 ++- target/s390x/

[PATCH v4 06/16] s390x: protvirt: KVM intercept changes

2020-02-20 Thread Janosch Frank
Secure guests no longer intercept with code 4 for an instruction interception. Instead they have codes 104 and 108 for secure instruction interception and secure instruction notification respectively. The 104 mirrors the 4 interception. The 108 is a notification interception to let KVM and QEMU k

[PATCH v4 14/16] s390x: protvirt: Handle SIGP store status correctly

2020-02-20 Thread Janosch Frank
Status storing is not done by QEMU anymore, but is handled by SIE. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth --- target/s390x/helper.c | 4 target/s390x/sigp.c | 1 + 2 files changed, 5 insertions(+) diff --git a/target/s390x/helper.c b/target/s390x/helper.c index a3a49164e4

[PATCH v4 05/16] s390x: protvirt: Handle diag 308 subcodes 0,1,3,4

2020-02-20 Thread Janosch Frank
As we now have access to the protection state of the cpus, we can implement special handling of diag 308 subcodes for cpus in the protected state. For subcodes 0 and 1 we need to unshare all pages before continuing, so the guest doesn't accidentally expose data when dumping. For subcode 3/4 we te

[PATCH v4 09/16] s390x: protvirt: SCLP interpretation

2020-02-20 Thread Janosch Frank
SCLP for a protected guest is done over the SIDAD, so we need to use the s390_cpu_virt_mem_* functions to access the SIDAD instead of guest memory when reading/writing SCBs. To not confuse the sclp emulation, we set 0x4000 as the SCCB address, since the function that injects the sclp external inte

[PATCH v4 08/16] s390x: protvirt: Move STSI data over SIDAD

2020-02-20 Thread Janosch Frank
For protected guests, we need to put the STSI emulation results into the SIDA, so SIE will write them into the guest at the next entry. Signed-off-by: Janosch Frank --- target/s390x/kvm.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/target/s390x/kvm.c b/ta

[PATCH v4 16/16] docs: Add protvirt docs

2020-02-20 Thread Janosch Frank
Lets add some documentation for the Protected VM functionality. Signed-off-by: Janosch Frank --- docs/protvirt.rst | 53 +++ 1 file changed, 53 insertions(+) create mode 100644 docs/protvirt.rst diff --git a/docs/protvirt.rst b/docs/protvirt.rst new

[PATCH v4 11/16] s390x: protvirt: Move diag 308 data over SIDAD

2020-02-20 Thread Janosch Frank
For protected guests the IPIB is written/read to/from the satellite block, so we need those accesses to go through s390_cpu_pv_mem_read/write(). Signed-off-by: Janosch Frank --- target/s390x/diag.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git

[PATCH v4 12/16] s390x: protvirt: Disable address checks for PV guest IO emulation

2020-02-20 Thread Janosch Frank
IO instruction data is routed through SIDAD for protected guests, so adresses do not need to be checked, as this is kernel memory. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth --- target/s390x/ioinst.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) d

[PATCH v4 04/16] s390x: protvirt: Add migration blocker

2020-02-20 Thread Janosch Frank
Migration is not yet supported. Signed-off-by: Janosch Frank --- hw/s390x/s390-virtio-ccw.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index aa974d294e..6fba8d9331 100644 --- a/hw/s390x/s390-virti

[PATCH v4 15/16] s390x: Add unpack feature to GA1

2020-02-20 Thread Janosch Frank
From: Christian Borntraeger Signed-off-by: Christian Borntraeger --- target/s390x/gen-features.c | 1 + target/s390x/kvm.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index 6278845b12..8ddeebc544 100644 --- a/tar

[PATCH v4 10/16] s390x: protvirt: Set guest IPL PSW

2020-02-20 Thread Janosch Frank
Handling of CPU reset and setting of the IPL psw from guest storage at offset 0 is done by a Ultravisor call. Let's only fetch it if necessary. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth --- target/s390x/cpu.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletion

[PATCH v3 02/20] hw: Remove unnecessary cast when calling dma_memory_read()

2020-02-20 Thread Philippe Mathieu-Daudé
Since its introduction in commit d86a77f8abb, dma_memory_read() always accepted void pointer argument. Remove the unnecessary casts. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Signed-off-by: Philippe Mathieu-Daudé --- scripts/coccinelle/exec_r

[PATCH v3 01/20] scripts/git.orderfile: Display Cocci scripts before code modifications

2020-02-20 Thread Philippe Mathieu-Daudé
When we use a Coccinelle semantic script to do automatic code modifications, it makes sense to look at the semantic patch first. Signed-off-by: Philippe Mathieu-Daudé --- scripts/git.orderfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/git.orderfile b/scripts/git.orderfile in

[PATCH v3 00/20] global exec/memory/dma APIs cleanup

2020-02-20 Thread Philippe Mathieu-Daudé
This series is inspired from Peter Maydel cleanup patch: https://www.mail-archive.com/qemu-devel@nongnu.org/msg680625.html - Convert 'is_write' argument to boolean - Use void pointer for blob buffer - Remove unnecessary casts (Stefan Weil) - Replace [API]_rw() by [API]_read/write() when is_write i

[PATCH v3 03/20] exec: Let qemu_ram_*() functions take a const pointer argument

2020-02-20 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 6 +++--- include/sysemu/xen-mapcache.h | 4 ++-- exec.c| 8 hw/i386/xen/xen-mapcache.c| 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/exec/cpu-common.h

[PATCH v3 05/20] exec: Let flatview API take void pointer arguments

2020-02-20 Thread Philippe Mathieu-Daudé
Only flatview_[read/write]_continue use a byte pointer to increment an offset. For the users, we are only dealing with a blob buffer. Use a void pointer argument. This will let us simplify the address_space API in the next commit. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h |

[PATCH v3 06/20] exec: Let the address_space API use void pointer arguments

2020-02-20 Thread Philippe Mathieu-Daudé
As we are only dealing with a blob buffer, use a void pointer argument. This will let us simplify other APIs. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 12 ++-- exec.c| 11 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git

[PATCH v3 08/20] Remove unnecessary cast when using the address_space API

2020-02-20 Thread Philippe Mathieu-Daudé
This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Two lines in hw/net/dp8393x.c that Coccinelle produced that were over 80 characters were re-wrapped by hand. Suggested-by: Stefan Weil Signed-off-by: Philippe Mathieu-Daudé --- scripts/coccinelle/exe

[PATCH v3 12/20] hw/ide: Let the DMAIntFunc prototype use a boolean 'is_write' argument

2020-02-20 Thread Philippe Mathieu-Daudé
The 'is_write' argument is either 0 or 1. Convert it to a boolean type. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ide/internal.h | 2 +- hw/dma/rc4030.c | 6 +++--- hw/ide/ahci.c | 2 +- hw/ide/core.c | 2 +- hw/ide/macio.c| 2 +- hw/ide/p

[PATCH v3 04/20] exec: Rename ram_ptr variable

2020-02-20 Thread Philippe Mathieu-Daudé
As we are going to use a different 'ptr' variable, rename the 'ram pointer' variable. Signed-off-by: Philippe Mathieu-Daudé --- exec.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/exec.c b/exec.c index 02b4e6ea41..06e386dc72 100644 --- a/exec.c +++ b

[PATCH v3 11/20] hw/ide/internal: Remove unused DMARestartFunc typedef

2020-02-20 Thread Philippe Mathieu-Daudé
The IDE DMA restart callback has been removed in commit fe09c7c9f0. Fixes: fe09c7c9f0 Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ide/internal.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 52ec197da0..ce766ac485 100644 -

[PATCH v3 10/20] Remove unnecessary cast when using the cpu_[physical]_memory API

2020-02-20 Thread Philippe Mathieu-Daudé
This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Suggested-by: Stefan Weil Signed-off-by: Philippe Mathieu-Daudé --- scripts/coccinelle/exec_rw_const.cocci | 10 ++ hw/display/omap_lcdc.c | 10 +- hw/dma/etraxfs_dma.c

  1   2   3   4   >