[Qemu-devel] [Bug 994662] Re: QEMU crashes on ioport access

2017-06-30 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/994662 Title: QEMU

[Qemu-devel] [Bug 988128] Re: smbd crashes when called with "smb ports = 0"

2017-06-30 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/988128 Title: smbd

[Qemu-devel] [Bug 965133] Re: Sparc64 crash on start

2017-06-30 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/965133 Title: Sparc64

Re: [Qemu-devel] [RFC 0/7] tcg: parallel code generation (Work in Progress)

2017-06-30 Thread Emilio G. Cota
On Fri, Jun 30, 2017 at 01:25:54 -0700, Richard Henderson wrote: > On 06/29/2017 01:28 PM, Emilio G. Cota wrote: > >- Patches 2-3 remove *tbs[] to use a binary search tree instead. > > This removes the assumption in tb_find_pc that *tbs[] are ordered > > by tc_ptr, thereby allowing us to

Re: [Qemu-devel] [RFC 6/7] [XXX] tcg: make TCGContext thread-local for softmmu

2017-06-30 Thread Emilio G. Cota
On Fri, Jun 30, 2017 at 01:18:58 -0700, Richard Henderson wrote: > On 06/29/2017 01:28 PM, Emilio G. Cota wrote: > >This will allow us to generate TCG code in parallel. > > > >User-mode is kept out of this: contention due to concurrent translation > >is more commonly found in full-system mode

[Qemu-devel] [PATCH] fixup: missed some TLS variables

2017-06-30 Thread Emilio G. Cota
On Thu, Jun 29, 2017 at 16:28:28 -0400, Emilio G. Cota wrote: > XXX: After allowing tb_gen_code to run in parallel (see next patch), > crashes due to races in TCG code are found very quickly with -smp > 1 > (e.g. "tcg/tcg.c:233: tcg_out_label: Assertion `!l->has_value' failed.") >

Re: [Qemu-devel] [PATCH 4/4] xen: don't use xenstore to save/restore physmap anymore

2017-06-30 Thread Stefano Stabellini
On Fri, 30 Jun 2017, Igor Druzhinin wrote: > If we have a system with xenforeignmemory_map2() implemented > we don't need to save/restore physmap on suspend/restore > anymore. In case we resume a VM without physmap - try to > recreate the physmap during memory region restore phase and > remap map

Re: [Qemu-devel] [PATCH 3/4] xen/mapcache: introduce xen_remap_cache_entry()

2017-06-30 Thread Stefano Stabellini
On Fri, 30 Jun 2017, Igor Druzhinin wrote: > This new call is trying to update a requested map cache entry > according to the changes in the physmap. The call is searching > for the entry, unmaps it, tries to translate the address and > maps again at the same place. If the mapping is dummy this

Re: [Qemu-devel] [PATCH 2/4] xen/mapcache: add an ability to create dummy mappings

2017-06-30 Thread Stefano Stabellini
On Fri, 30 Jun 2017, Igor Druzhinin wrote: > Dummys are simple anonymous mappings that are placed instead > of regular foreign mappings in certain situations when we need > to postpone the actual mapping but still have to give a > memory region to QEMU to play with. > > This is planned to be used

Re: [Qemu-devel] [PATCH 1/4] xen: move physmap saving into a separate function

2017-06-30 Thread Stefano Stabellini
On Fri, 30 Jun 2017, Igor Druzhinin wrote: > Non-functional change. > > Signed-off-by: Igor Druzhinin Reviewed-by: Stefano Stabellini > --- > hw/i386/xen/xen-hvm.c | 57 > --- > 1 file

Re: [Qemu-devel] [PATCH] target/ppc: Use tcg_gen_lookup_and_goto_ptr

2017-06-30 Thread Emilio G. Cota
On Fri, Jun 30, 2017 at 11:37:36 -0700, Richard Henderson wrote: > Cc: qemu-...@nongnu.org > Signed-off-by: Richard Henderson > --- > target/ppc/translate.c | 23 --- > 1 file changed, 8 insertions(+), 15 deletions(-) Tested-by: Emilio G. Cota

Re: [Qemu-devel] [Qemu-block] [PATCH v2] tests: Avoid non-portable 'echo -ARG'

2017-06-30 Thread Jeff Cody
On Fri, Jun 30, 2017 at 02:58:31PM -0500, Eric Blake wrote: > POSIX says that backslashes in the arguments to 'echo', as well as > any use of 'echo -n' and 'echo -e', are non-portable; it recommends > people should favor 'printf' instead. This is definitely true where > we do not control which

Re: [Qemu-devel] [Qemu-block] [PATCH v4 1/2] iotests: Use absolute paths for executables

2017-06-30 Thread Jeff Cody
On Fri, Jun 30, 2017 at 02:45:46PM -0500, Eric Blake wrote: > On 06/30/2017 02:41 PM, Eric Blake wrote: > > > +++ 068.out.bad 2017-06-30 14:35:28.720241398 -0500 > > @@ -1,4 +1,5 @@ > > QA output created by 068 > > +realpath: '': No such file or directory > > > > The culprit?

Re: [Qemu-devel] [PATCH v3 20/20] block: Make bdrv_is_allocated_above() byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:58PM -0500, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. In the common case, allocation is unlikely to ever use > values that are not naturally sector-aligned, but it is possible > that byte-based values will

Re: [Qemu-devel] [Qemu-block] [PATCH v3 19/20] block: Minimize raw use of bds->total_sectors

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:57PM -0500, Eric Blake wrote: > bdrv_is_allocated_above() was relying on intermediate->total_sectors, > which is a field that can have stale contents depending on the value > of intermediate->has_variable_length. An audit shows that we are safe > (we were first

Re: [Qemu-devel] [PATCH v3 18/20] block: Make bdrv_is_allocated() byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:56PM -0500, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. In the common case, allocation is unlikely to ever use > values that are not naturally sector-aligned, but it is possible > that byte-based values will

Re: [Qemu-devel] [PULL 04/14] migration: let MigrationState be a qdev

2017-06-30 Thread Eric Blake
On 06/30/2017 04:18 PM, Philippe Mathieu-Daudé wrote: > Hi Peter, Juan, > > On 06/28/2017 08:30 AM, Juan Quintela wrote: >> From: Peter Xu >> >> Let the old man "MigrationState" join the object family. Direct benefit >> is that we can start to use all the property features

Re: [Qemu-devel] [PATCH v3 16/20] backup: Switch backup_do_cow() to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:54PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert another internal > function (no semantic change). > > Signed-off-by: Eric Blake > Reviewed-by:

Re: [Qemu-devel] [PATCH v3 17/20] backup: Switch backup_run() to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:55PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Change the internal > loop iteration of backups to track by bytes instead of sectors > (although we are still guaranteed that

Re: [Qemu-devel] [PATCH v3 15/20] backup: Switch block_backup.h to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:53PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Continue by converting > the public interface to backup jobs (no semantic change), including > a change to CowRequest to

Re: [Qemu-devel] [PULL 04/14] migration: let MigrationState be a qdev

2017-06-30 Thread Philippe Mathieu-Daudé
Hi Peter, Juan, On 06/28/2017 08:30 AM, Juan Quintela wrote: From: Peter Xu Let the old man "MigrationState" join the object family. Direct benefit is that we can start to use all the property features derived from current QDev, like: HW_COMPAT_* bits, command line setup

Re: [Qemu-devel] [PATCH v3 14/20] backup: Switch BackupBlockJob to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:52PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Continue by converting an > internal structure (no semantic change), and all references to > tracking progress. Drop a

Re: [Qemu-devel] [Qemu-block] [PATCH v3 13/20] block: Drop unused bdrv_round_sectors_to_clusters()

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:51PM -0500, Eric Blake wrote: > Now that the last user [mirror_iteration()] has converted to using > bytes, we no longer need a function to round sectors to clusters. > > Signed-off-by: Eric Blake > Reviewed-by: John Snow >

Re: [Qemu-devel] [PATCH] util/cacheinfo: Fix warning generated by clang

2017-06-30 Thread Emilio G. Cota
On Fri, Jun 30, 2017 at 11:39:46 -0400, Pranith Kumar wrote: > Clang generates the following warning on aarch64 host: > > CC util/cacheinfo.o > /home/pranith/qemu/util/cacheinfo.c:121:48: warning: value size does not > match register size specified by the constraint and modifier >

Re: [Qemu-devel] [PATCH v3 12/20] mirror: Switch mirror_iteration() to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:50PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Change the internal > loop iteration of mirroring to track by bytes instead of sectors > (although we are still guaranteed

Re: [Qemu-devel] [PATCH v3 11/20] mirror: Switch mirror_do_read() to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:49PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert another internal > function (no semantic change). > > Signed-off-by: Eric Blake > Reviewed-by:

Re: [Qemu-devel] [PATCH v3 10/20] mirror: Switch mirror_cow_align() to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:48PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert another internal > function (no semantic change), and add mirror_clip_bytes() as a > counterpart to

Re: [Qemu-devel] [RFC 3/7] translate-all: use a binary search tree to track TBs in TBContext

2017-06-30 Thread Emilio G. Cota
On Fri, Jun 30, 2017 at 00:49:37 -0700, Richard Henderson wrote: > On 06/30/2017 12:41 AM, Richard Henderson wrote: > >On 06/29/2017 01:28 PM, Emilio G. Cota wrote: > >>+/* @key is already in the tree so it's safe to use container_of on it */ > >>+static gint tc_ptr_cmp(gconstpointer candidate,

Re: [Qemu-devel] [PATCH v3 09/20] mirror: Update signature of mirror_clip_sectors()

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:47PM -0500, Eric Blake wrote: > Rather than having a void function that modifies its input > in-place as the output, change the signature to reduce a layer > of indirection and return the result. > > Suggested-by: John Snow > Signed-off-by: Eric

Re: [Qemu-devel] [PATCH v3 08/20] mirror: Switch mirror_do_zero_or_discard() to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:46PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert another internal > function (no semantic change). > > Signed-off-by: Eric Blake > Reviewed-by:

Re: [Qemu-devel] [PATCH v3 07/20] mirror: Switch MirrorBlockJob to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:45PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Continue by converting an > internal structure (no semantic change), and all references to the > buffer size. > >

Re: [Qemu-devel] [PATCH v3 06/20] commit: Switch commit_run() to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:44PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Change the internal > loop iteration of committing to track by bytes instead of sectors > (although we are still guaranteed

Re: [Qemu-devel] [PATCH v3 05/20] commit: Switch commit_populate() to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:43PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Start by converting an > internal function (no semantic change). > > Signed-off-by: Eric Blake >

Re: [Qemu-devel] [PATCH v3 04/20] stream: Switch stream_run() to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:42PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Change the internal > loop iteration of streaming to track by bytes instead of sectors > (although we are still guaranteed

[Qemu-devel] [PATCH v2] tests: Avoid non-portable 'echo -ARG'

2017-06-30 Thread Eric Blake
POSIX says that backslashes in the arguments to 'echo', as well as any use of 'echo -n' and 'echo -e', are non-portable; it recommends people should favor 'printf' instead. This is definitely true where we do not control which shell is running (such as in makefile snippets or in documentation

Re: [Qemu-devel] [PATCH v3 03/20] stream: Switch stream_populate() to byte-based

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:41PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Start by converting an > internal function (no semantic change). > > Signed-off-by: Eric Blake >

Re: [Qemu-devel] [PATCH v3 02/20] trace: Show blockjob actions via bytes, not sectors

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:40PM -0500, Eric Blake wrote: > Upcoming patches are going to switch to byte-based interfaces > instead of sector-based. Even worse, trace_backup_do_cow_enter() > had a weird mix of cluster and sector indices. > > The trace interface is low enough that there are no

Re: [Qemu-devel] [PATCH v4 1/2] iotests: Use absolute paths for executables

2017-06-30 Thread Eric Blake
On 06/30/2017 02:41 PM, Eric Blake wrote: > +++ 068.out.bad 2017-06-30 14:35:28.720241398 -0500 > @@ -1,4 +1,5 @@ > QA output created by 068 > +realpath: '': No such file or directory > > The culprit? $QEMU_VXHS_PROG is empty for me, which means `set_prog_path > qnio_server` found nothing

Re: [Qemu-devel] [PATCH v3 01/20] blockjob: Track job ratelimits via bytes, not sectors

2017-06-30 Thread Jeff Cody
On Tue, Jun 27, 2017 at 02:24:39PM -0500, Eric Blake wrote: > The user interface specifies job rate limits in bytes/second. > It's pointless to have our internal representation track things > in sectors/second, particularly since we want to move away from > sector-based interfaces. > > Fix up a

Re: [Qemu-devel] [PATCH v4 1/2] iotests: Use absolute paths for executables

2017-06-30 Thread Eric Blake
On 06/29/2017 09:46 PM, Max Reitz wrote: >>> +++ b/tests/qemu-iotests/common.config >>> @@ -103,6 +103,12 @@ if [ -z "$QEMU_VXHS_PROG" ]; then >>> export QEMU_VXHS_PROG="`set_prog_path qnio_server`" >>> fi >>> >>> +export QEMU_PROG=$(realpath -- "$(type -p "$QEMU_PROG")") >> >> ...now

Re: [Qemu-devel] [PATCH v1] s390x/cpumodel: allow to enable "idtes" feature for TCG

2017-06-30 Thread Richard Henderson
On 06/29/2017 12:05 AM, Thomas Huth wrote: However, I'm not sure whether you can simply ignore the clearing-by-ASCE stuff in this case. For example, according to the PoP: "When the clearing-by-ASCE-option bit (bit 52 of gen- eral register R2 is one), the M4 field is ignored." And the idte

Re: [Qemu-devel] [PATCH RFC 0/6] q35: add acpi pci hotplug support

2017-06-30 Thread Michael S. Tsirkin
On Fri, Jun 30, 2017 at 10:25:05AM +0300, Marcel Apfelbaum wrote: > On 30/06/2017 2:17, Michael S. Tsirkin wrote: > > On Fri, Jun 30, 2017 at 12:55:56AM +0300, Aleksandr Bezzubikov wrote: > > > The series adds hotplug support to legacy PCI buses for Q35 machines. > > > The ACPI hotplug code is

[Qemu-devel] [PATCH] Python3 Support for qmp.py

2017-06-30 Thread Ishani Chugh
This patch intends to make qmp.py compatible with both python2 and python3. Signed-off-by: Ishani Chugh --- scripts/qmp/qmp.py | 66 +++--- 1 file changed, 43 insertions(+), 23 deletions(-) diff --git

[Qemu-devel] [PULL 3/3] tcg: consistently access cpu->tb_jmp_cache atomically

2017-06-30 Thread Richard Henderson
From: "Emilio G. Cota" Some code paths can lead to atomic accesses racing with memset() on cpu->tb_jmp_cache, which can result in torn reads/writes and is undefined behaviour in C11. These torn accesses are unlikely to show up as bugs, but from code inspection they seem

[Qemu-devel] [PULL 2/3] gen-icount: use tcg_ctx.tcg_env instead of cpu_env

2017-06-30 Thread Richard Henderson
From: "Emilio G. Cota" We are relying on cpu_env being defined as a global, yet most targets (i.e. all but arm/a64) have it defined as a local variable. Luckily all of them use the same "cpu_env" name, but really compilation shouldn't break if the name of that local variable

[Qemu-devel] [PULL 1/3] gen-icount: add missing inline to gen_tb_end

2017-06-30 Thread Richard Henderson
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Message-Id: <1497639397-19453-2-git-send-email-c...@braap.org> Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 2 +- 1 file

[Qemu-devel] [PULL 0/3] Queued TCG patches

2017-06-30 Thread Richard Henderson
None of my TCGTemp patches for now; I'm still trying to understand how they might (or might not) conflict with multi-threaded code gen for TCG. r~ The following changes since commit 82d76dc7fc19a5eb9f731d7faed1792bb97214e0: Merge remote-tracking branch 'remotes/famz/tags/block-pull-request'

Re: [Qemu-devel] [PATCH v11 01/29] Pass generic CPUState to gen_intermediate_code()

2017-06-30 Thread Richard Henderson
On 06/29/2017 03:52 PM, Emilio G. Cota wrote: On Wed, Jun 28, 2017 at 15:20:42 +0300, Lluís Vilanova wrote: Needed to implement a target-agnostic gen_intermediate_code() in the future. Signed-off-by: Lluís Vilanova Reviewed-by: David Gibson

[Qemu-devel] [PATCH] target/ppc: Use tcg_gen_lookup_and_goto_ptr

2017-06-30 Thread Richard Henderson
Cc: qemu-...@nongnu.org Signed-off-by: Richard Henderson --- target/ppc/translate.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index c0cd64d..9aa66f5 100644 ---

Re: [Qemu-devel] [PATCH v22 19/30] qcow2: add persistent dirty bitmaps support

2017-06-30 Thread Eric Blake
On 06/30/2017 12:58 PM, John Snow wrote: >> >> "Structure of a bitmap directory entry: >> ... >> 8 - 11:bitmap_table_size >> Number of entries in the bitmap table of the bitmap." >> > > This is the number of bitmaps stored in the qcow2, not the size of one >

Re: [Qemu-devel] [PATCH v22 19/30] qcow2: add persistent dirty bitmaps support

2017-06-30 Thread John Snow
On 06/30/2017 01:47 PM, Eric Blake wrote: > On 06/29/2017 09:23 PM, Max Reitz wrote: >> On 2017-06-30 04:18, Eric Blake wrote: >>> On 06/28/2017 07:05 AM, Vladimir Sementsov-Ogievskiy wrote: Store persistent dirty bitmaps in qcow2 image. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-devel] [PATCH v22 06/30] block/dirty-bitmap: add deserialize_ones func

2017-06-30 Thread John Snow
On 06/29/2017 10:01 PM, Eric Blake wrote: > On 06/29/2017 08:55 PM, Eric Blake wrote: >> On 06/28/2017 07:05 AM, Vladimir Sementsov-Ogievskiy wrote: >>> Add bdrv_dirty_bitmap_deserialize_ones() function, which is needed for >>> qcow2 bitmap loading, to handle unallocated bitmap parts, marked as

Re: [Qemu-devel] [PATCH v22 19/30] qcow2: add persistent dirty bitmaps support

2017-06-30 Thread Eric Blake
On 06/29/2017 09:23 PM, Max Reitz wrote: > On 2017-06-30 04:18, Eric Blake wrote: >> On 06/28/2017 07:05 AM, Vladimir Sementsov-Ogievskiy wrote: >>> Store persistent dirty bitmaps in qcow2 image. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievskiy >>> Reviewed-by: Max

Re: [Qemu-devel] [RFC 5/5] vifo: introduce new VFIO ioctl VFIO_DEVICE_PCI_GET_DIRTY_BITMAP

2017-06-30 Thread Alex Williamson
On Fri, 30 Jun 2017 05:14:40 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, June 30, 2017 4:57 AM > > > > On Thu, 29 Jun 2017 00:10:59 + > > "Tian, Kevin" wrote: > > > > > > From:

Re: [Qemu-devel] [PULL 0/2] Block patches

2017-06-30 Thread Peter Maydell
On 30 June 2017 at 15:10, Fam Zheng <f...@redhat.com> wrote: > The following changes since commit 36f87b4513373b3cd79c87c9197d17face95d4ac: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.10-20170630' > into staging (2017-06-30 11:58:49 +0100) > >

Re: [Qemu-devel] [PATCH] s390: return unavailable features via query-cpu-definitions

2017-06-30 Thread David Hildenbrand
On 30.06.2017 15:25, Viktor Mihajlovski wrote: > The response for query-cpu-definitions didn't include the > unavailable-features field, which is used by libvirt to figure > out whether a certain cpu model is usable on the host. > > The unavailable features are now computed by obtaining the host

Re: [Qemu-devel] [PATCH 1/2] vhost: ensure vhost_ops are set before calling iotlb callback

2017-06-30 Thread Marc-André Lureau
- Original Message - > This patch fixes a crash that happens when vhost-user iommu > support is enabled and vhost-user socket is closed. > > When it happens, if an IOTLB invalidation notification is sent > by the IOMMU, vhost_ops's NULL pointer is dereferenced. > > Signed-off-by:

Re: [Qemu-devel] postcopy migration hangs while loading virtio state

2017-06-30 Thread Dr. David Alan Gilbert
* Christian Borntraeger (borntrae...@de.ibm.com) wrote: > On 04/26/2017 01:45 PM, Christian Borntraeger wrote: > > >> Hmm, I have a theory, if the flags field has bit 1 set, i.e. > >> RAM_SAVE_FLAG_COMPRESS > >> then try changing ram_handle_compressed to always do the memset. > > > > FWIW,

Re: [Qemu-devel] [PATCH 2/2] vhost-user: unregister slave req handler at cleanup time

2017-06-30 Thread Marc-André Lureau
- Original Message - > If the backend sends a request just before closing the socket, > the aio dispatcher might schedule its reading after the vhost > device has been cleaned, leading to a NULL pointer dereference > in slave_read(); > > vhost_user_cleanup() already closes the socket

[Qemu-devel] [PATCH] migration/rdma: Fix race on source

2017-06-30 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Fix a race where the destination might try and send the source a WRID_READY before the source has done a post-recv for it. rdma_post_recv has to happen after the qp exists, and we're OK since we've already called qemu_rdma_source_init that

Re: [Qemu-devel] [RFC PATCH 1/3] vmstate: error hint for failed equal checks

2017-06-30 Thread Halil Pasic
On 06/30/2017 04:54 PM, Eric Blake wrote: > On 06/30/2017 09:41 AM, Halil Pasic wrote: 'This' basically boils down to the question and 'Why aren't hints reported in QMP context?' >>> >>> QMP is supposed to be machine-parseable. Hints are supposed to be >>> human-readable. If you have

Re: [Qemu-devel] [PATCH v4 2/3] tcg/aarch64: Use ADRP+ADD to compute target address

2017-06-30 Thread Richard Henderson
On 06/30/2017 07:36 AM, Pranith Kumar wrote: We use ADRP+ADD to compute the target address for goto_tb. This patch introduces the NOP instruction which is used to align the above instruction pair so that we can use one atomic instruction to patch the destination offsets. CC: Richard

[Qemu-devel] [PATCH 3/4] xen/mapcache: introduce xen_remap_cache_entry()

2017-06-30 Thread Igor Druzhinin
This new call is trying to update a requested map cache entry according to the changes in the physmap. The call is searching for the entry, unmaps it, tries to translate the address and maps again at the same place. If the mapping is dummy this call will make it real. This function makes use of a

[Qemu-devel] [PATCH 2/4] xen/mapcache: add an ability to create dummy mappings

2017-06-30 Thread Igor Druzhinin
Dummys are simple anonymous mappings that are placed instead of regular foreign mappings in certain situations when we need to postpone the actual mapping but still have to give a memory region to QEMU to play with. This is planned to be used for restore on Xen. Signed-off-by: Igor Druzhinin

[Qemu-devel] [PATCH 4/4] xen: don't use xenstore to save/restore physmap anymore

2017-06-30 Thread Igor Druzhinin
If we have a system with xenforeignmemory_map2() implemented we don't need to save/restore physmap on suspend/restore anymore. In case we resume a VM without physmap - try to recreate the physmap during memory region restore phase and remap map cache entries accordingly. The old code is left for

[Qemu-devel] [PATCH 0/4] xen: don't save/restore the physmap on VM save/restore

2017-06-30 Thread Igor Druzhinin
Saving/restoring the physmap to/from xenstore was introduced to QEMU majorly in order to cover up the VRAM region restore issue. The sequence of restore operations implies that we should know the effective guest VRAM address *before* we have the VRAM region restored (which happens later).

[Qemu-devel] [PATCH 1/4] xen: move physmap saving into a separate function

2017-06-30 Thread Igor Druzhinin
Non-functional change. Signed-off-by: Igor Druzhinin --- hw/i386/xen/xen-hvm.c | 57 --- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index

[Qemu-devel] [PATCH 1/2] vhost: ensure vhost_ops are set before calling iotlb callback

2017-06-30 Thread Maxime Coquelin
This patch fixes a crash that happens when vhost-user iommu support is enabled and vhost-user socket is closed. When it happens, if an IOTLB invalidation notification is sent by the IOMMU, vhost_ops's NULL pointer is dereferenced. Signed-off-by: Maxime Coquelin ---

[Qemu-devel] [PATCH 2/2] vhost-user: unregister slave req handler at cleanup time

2017-06-30 Thread Maxime Coquelin
If the backend sends a request just before closing the socket, the aio dispatcher might schedule its reading after the vhost device has been cleaned, leading to a NULL pointer dereference in slave_read(); vhost_user_cleanup() already closes the socket but it is not enough, the handler has to be

[Qemu-devel] [PATCH 0/2] vhost-user: fix crashes on disconnect when iommu is on

2017-06-30 Thread Maxime Coquelin
This two patches series aims at fixing a couple of crashes that happens when the vhost-user socket is closed and iommu enabled. Maxime Coquelin (2): vhost: ensure vhost_ops are set before calling iotlb callback vhost-user: unregister slave req handler at cleanup time

Re: [Qemu-devel] [PATCH v2] Add chardev-send-break monitor command

2017-06-30 Thread Stefan Fritsch
On Thursday, 29 June 2017 16:00:54 CEST Dr. David Alan Gilbert wrote: > * Eric Blake (ebl...@redhat.com) wrote: > > On 06/11/2017 02:48 AM, Stefan Fritsch wrote: > > > Sending a break on a serial console can be useful for debugging the > > > guest. But not all chardev backends support sending

Re: [Qemu-devel] [PATCH 3/3] msi: Handle remappable format interrupt request

2017-06-30 Thread Anthony PERARD
On Thu, Jun 29, 2017 at 01:49:54AM -0400, Lan Tianyu wrote: > From: Chao Gao > > According to VT-d spec Interrupt Remapping and Interrupt Posting -> > Interrupt Remapping -> Interrupt Request Formats On Intel 64 > Platforms, fields of MSI data register have changed. This

Re: [Qemu-devel] [PATCH 2/3] xen-pt: bind/unbind interrupt remapping format MSI

2017-06-30 Thread Anthony PERARD
On Thu, Jun 29, 2017 at 01:49:53AM -0400, Lan Tianyu wrote: > From: Chao Gao > > If a vIOMMU is exposed to guest, guest will configure the msi to remapping > format. The original code isn't suitable to the new format. A new pair > bind/unbind interfaces are added for this

[Qemu-devel] [PATCH] util/cacheinfo: Fix warning generated by clang

2017-06-30 Thread Pranith Kumar
Clang generates the following warning on aarch64 host: CC util/cacheinfo.o /home/pranith/qemu/util/cacheinfo.c:121:48: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] asm volatile("mrs\t%0, ctr_el0" : "=r"(ctr));

Re: [Qemu-devel] [PULL 0/7] M68k for 2.10 patches

2017-06-30 Thread Peter Maydell
On 30 June 2017 at 13:30, Laurent Vivier wrote: > The following changes since commit 4c8c1cc544dbd5e2564868e61c5037258e393832: > > Merge remote-tracking branch > 'remotes/vivier/tags/m68k-for-2.10-pull-request' into staging (2017-06-22 > 19:01:58 +0100) > > are available in

Re: [Qemu-devel] [RFC PATCH 1/3] vmstate: error hint for failed equal checks

2017-06-30 Thread Eric Blake
On 06/30/2017 09:41 AM, Halil Pasic wrote: >>> 'This' basically boils down to the question and >>> 'Why aren't hints reported in QMP context?' >> >> QMP is supposed to be machine-parseable. Hints are supposed to be >> human-readable. If you have a machine managing the monitor, the hint >> adds

Re: [Qemu-devel] [PATCH v1 1/1] xilinx-dp: Add support for the yuy2 video format

2017-06-30 Thread KONRAD Frederic
On 06/30/2017 03:55 PM, Edgar E. Iglesias wrote: From: "Edgar E. Iglesias" Add support for the yuy2 video format. Signed-off-by: Edgar E. Iglesias Acked-by: Sai Pavan Boddu --- hw/display/xlnx_dp.c | 3 +++ 1 file

Re: [Qemu-devel] [PATCH] tests: Avoid non-portable 'echo -ARG'

2017-06-30 Thread Eric Blake
On 06/30/2017 09:38 AM, Max Reitz wrote: > On 2017-06-28 16:21, Eric Blake wrote: >> POSIX says that backslashes in the arguments to 'echo', as well as >> any use of 'echo -n' and 'echo -e', are non-portable; it recommends >> people should favor 'printf' instead. This is definitely true where >>

Re: [Qemu-devel] [RFC PATCH 1/3] vmstate: error hint for failed equal checks

2017-06-30 Thread Halil Pasic
On 06/29/2017 09:04 PM, Eric Blake wrote: > On 06/14/2017 08:51 AM, Halil Pasic wrote: > > [apologies for the delayed response, and also adding Markus] > No problem. Many thanks for the effort. I see I've ended up with a lengthy email. A disclaimer before I start: No strong opinions here.

Re: [Qemu-devel] [PATCH] tests: Avoid non-portable 'echo -ARG'

2017-06-30 Thread Max Reitz
On 2017-06-28 16:21, Eric Blake wrote: > POSIX says that backslashes in the arguments to 'echo', as well as > any use of 'echo -n' and 'echo -e', are non-portable; it recommends > people should favor 'printf' instead. This is definitely true where > we do not control which shell is running (such

[Qemu-devel] [PATCH v4 2/3] tcg/aarch64: Use ADRP+ADD to compute target address

2017-06-30 Thread Pranith Kumar
We use ADRP+ADD to compute the target address for goto_tb. This patch introduces the NOP instruction which is used to align the above instruction pair so that we can use one atomic instruction to patch the destination offsets. CC: Richard Henderson CC: Alex Bennée

[Qemu-devel] [PATCH v4 1/3] tcg/aarch64: Introduce and use long branch to register

2017-06-30 Thread Pranith Kumar
We can use a branch to register instruction for exit_tb for offsets greater than 128MB. CC: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Pranith Kumar --- tcg/aarch64/tcg-target.inc.c | 15 +-- 1 file

[Qemu-devel] [PATCH v4 3/3] tcg/aarch64: Enable indirect jump path using LDR (literal)

2017-06-30 Thread Pranith Kumar
This patch enables the indirect jump path using an LDR (literal) instruction. It will be interesting to test and see which performs better among the two paths. CC: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Pranith Kumar

Re: [Qemu-devel] [Qemu-block] [RFC] QMP design: Fixing query-block and friends

2017-06-30 Thread Alberto Garcia
On Fri 30 Jun 2017 04:22:11 PM CEST, Kevin Wolf wrote: > Am 30.06.2017 um 15:01 hat Alberto Garcia geschrieben: >> On Tue 27 Jun 2017 06:31:45 PM CEST, Kevin Wolf wrote: >> > * Speaking of recursion: ImageInfo recursively includes information >> > about all images in the backing chain. This is

Re: [Qemu-devel] [Qemu-block] [RFC] QMP design: Fixing query-block and friends

2017-06-30 Thread Kevin Wolf
Am 30.06.2017 um 15:01 hat Alberto Garcia geschrieben: > On Tue 27 Jun 2017 06:31:45 PM CEST, Kevin Wolf wrote: > > * Speaking of recursion: ImageInfo recursively includes information > > about all images in the backing chain. This is what makes the output > > of query-named-block-nodes so

Re: [Qemu-devel] [PATCH] qom: enforce readonly nature of link's check callback

2017-06-30 Thread Fam Zheng
On Fri, 06/30 12:41, Paolo Bonzini wrote: > > > On 29/06/2017 13:14, Igor Mammedov wrote: > > link's check callback is supposed to verify/permit setting it, > > however currently nothing restricts it from misusing it > > and modifying target object from within. > > Make sure that readonly

Re: [Qemu-devel] [PATCH v6 0/5] Improve I/O tests coverage of LUKS driver

2017-06-30 Thread Max Reitz
On 2017-06-26 14:35, Daniel P. Berrange wrote: > The main goal of this series is to get the I/O tests passing > 100% with LUKS when run with './check -luks'. It also adds a > few more combinations to the LUKS/dmcrypt interoperability > test. > > To make LUKS testing not quite as slow, we drop the

[Qemu-devel] [PULL 1/2] block: Add BDRV_BLOCK_EOF to bdrv_get_block_status()

2017-06-30 Thread Fam Zheng
From: Eric Blake Just as the block layer already sets BDRV_BLOCK_ALLOCATED as a shortcut for subsequent operations, there are also some optimizations that are made easier if we can quickly tell that *pnum will advance us to the end of a file, via a new BDRV_BLOCK_EOF which

[Qemu-devel] [PULL 0/2] Block patches

2017-06-30 Thread Fam Zheng
The following changes since commit 36f87b4513373b3cd79c87c9197d17face95d4ac: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.10-20170630' into staging (2017-06-30 11:58:49 +0100) are available in the git repository at: git://github.com/famz/qemu.git tags/block-pull-request

[Qemu-devel] [PULL 2/2] block: Exploit BDRV_BLOCK_EOF for larger zero blocks

2017-06-30 Thread Fam Zheng
From: Eric Blake When we have a BDS with unallocated clusters, but asking the status of its underlying bs->file or backing layer encounters an end-of-file condition, we know that the rest of the unallocated area will read as zeroes. However, pre-patch, this required two

Re: [Qemu-devel] [PATCH v3] hmp, qmp: introduce "info memory" and "query-memory" commands

2017-06-30 Thread Vadim Galitsyn
Hi Guys, Thank you for the input. Please find updated patch v4 at http://lists.nongnu.org/archive/html/qemu-devel/2017-06/msg07065.html. Vadim On Tue, Jun 27, 2017 at 4:14 PM, Eric Blake wrote: > On 06/27/2017 09:05 AM, Igor Mammedov wrote: > > On Wed, 14 Jun 2017 17:21:06

Re: [Qemu-devel] [PULL 0/7] Block patches

2017-06-30 Thread Peter Maydell
On 30 June 2017 at 12:46, Stefan Hajnoczi wrote: > The following changes since commit 464588675455afda2899e20a0b120e4075de50c7: > > Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20170627-tag' > into staging (2017-06-29 11:45:01 +0100) > > are available in the

Re: [Qemu-devel] [PATCH v6 04/10] migration: let MigrationState be a qdev

2017-06-30 Thread Max Reitz
On 2017-06-30 15:05, Eric Blake wrote: > On 06/30/2017 07:33 AM, Max Reitz wrote: > >>> The assertion is caused by migrate_add_blocker() called before >>> initialization of migration object. I'll fix it. >> >> Thanks! >> >>> But even with a fix (so I can pass 055 now), I still cannot pass some

Re: [Qemu-devel] [PATCH v8 0/9] qemu-img: add measure sub-command

2017-06-30 Thread Max Reitz
On 2017-06-14 17:35, Stefan Hajnoczi wrote: > v8: > * Check 2P file size in qemu-iotests 178 [Berto] > * Use QCOW_MAX_L1_SIZE to check maximum virtual disk size [Berto] > > v7: > * Check max file size with 7 exabytes [Berto] > * Really use UINT64_MAX everywhere instead of ~0ULL [Berto] > >

[Qemu-devel] [PATCH v1 1/1] xilinx-dp: Add support for the yuy2 video format

2017-06-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add support for the yuy2 video format. Signed-off-by: Edgar E. Iglesias Acked-by: Sai Pavan Boddu --- hw/display/xlnx_dp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [Qemu-devel] BIT_WORD(start >> TARGET_PAGE_BITS)

2017-06-30 Thread Stefan Hajnoczi
On Fri, Jun 30, 2017 at 2:02 PM, ali saeedi wrote: > Hello > what does the following code do? > 'unsigned long page = BIT_WORD(start >> TARGET_PAGE_BITS)' ? > thanks a lot Aside from Eric's response, I want to mention that I've noticed your frequent questions too. A

Re: [Qemu-devel] [PATCH v3 2/3] tcg/aarch64: Use ADRP+ADD to compute target address

2017-06-30 Thread Pranith Kumar
On Fri, Jun 30, 2017 at 12:47 AM, Richard Henderson wrote: > On 06/29/2017 05:40 PM, Pranith Kumar wrote: >> >> void aarch64_tb_set_jmp_target(uintptr_t jmp_addr, uintptr_t addr) >> { >> tcg_insn_unit *code_ptr = (tcg_insn_unit *)jmp_addr; >> -tcg_insn_unit *target

Re: [Qemu-devel] [PATCH v8 1/9] block: add bdrv_measure() API

2017-06-30 Thread Max Reitz
On 2017-06-14 17:35, Stefan Hajnoczi wrote: > bdrv_measure() provides a conservative maximum for the size of a new > image. This information is handy if storage needs to be allocated (e.g. > a SAN or an LVM volume) ahead of time. > > Signed-off-by: Stefan Hajnoczi >

Re: [Qemu-devel] BIT_WORD(start >> TARGET_PAGE_BITS)

2017-06-30 Thread ali saeedi
thank you so much Eric Sorry for too questions I certainly follow your guide thanks a lot On Fri, Jun 30, 2017 at 5:49 PM, Eric Blake wrote: > On 06/30/2017 08:02 AM, ali saeedi wrote: > > Hello > > what does the following code do? > > 'unsigned long page = BIT_WORD(start >>

Re: [Qemu-devel] [PATCH 1/3] i386/msi: Correct mask of destination ID in MSI address

2017-06-30 Thread Anthony PERARD
On Thu, Jun 29, 2017 at 01:49:52AM -0400, Lan Tianyu wrote: > From: Chao Gao > > According to SDM 10.11.1, only [19:12] bits of MSI address are > Destination ID, change the mask to avoid ambiguity for VT-d spec > has used the bit 4 to indicate a remappable interrupt request.

  1   2   3   >