Re: [Qemu-devel] [PATCH v3 08/10] migration: handle the error condition properly

2018-08-07 Thread Peter Xu
On Wed, Aug 08, 2018 at 02:29:52PM +0800, Xiao Guangrong wrote: > > > On 08/08/2018 01:08 PM, Peter Xu wrote: > > On Tue, Aug 07, 2018 at 05:12:07PM +0800, guangrong.x...@gmail.com wrote: > > > From: Xiao Guangrong > > > > > > ram_find_and_save_block() can return negative if any error hanppens,

Re: [Qemu-devel] [PATCH v3 09/10] migration: fix calculating xbzrle_counters.cache_miss_rate

2018-08-07 Thread Xiao Guangrong
On 08/08/2018 02:05 PM, Peter Xu wrote: On Tue, Aug 07, 2018 at 05:12:08PM +0800, guangrong.x...@gmail.com wrote: From: Xiao Guangrong As Peter pointed out: | - xbzrle_counters.cache_miss is done in save_xbzrle_page(), so it's | per-guest-page granularity | | - RAMState.iterations is done

Re: [Qemu-devel] [PATCH v3 08/10] migration: handle the error condition properly

2018-08-07 Thread Xiao Guangrong
On 08/08/2018 01:08 PM, Peter Xu wrote: On Tue, Aug 07, 2018 at 05:12:07PM +0800, guangrong.x...@gmail.com wrote: From: Xiao Guangrong ram_find_and_save_block() can return negative if any error hanppens, however, it is completely ignored in current code Could you hint me where we'll retur

Re: [Qemu-devel] [PATCH v2 4/5] qcow2: Set the default cache-clean-interval to 30 seconds

2018-08-07 Thread Leonid Bloch
On 08/07/2018 11:34 PM, Eric Blake wrote: On 08/07/2018 03:21 PM, Leonid Bloch wrote: The default cache-clean-interval is set to 30 seconds, in order to lower the overhead of the qcow2 caches. Signed-off-by: Leonid Bloch --- +++ b/qapi/block-core.json @@ -2830,7 +2830,8 @@   #   # @cache-cl

Re: [Qemu-devel] [PATCH v3 07/10] migration: do not flush_compressed_data at the end of each iteration

2018-08-07 Thread Xiao Guangrong
On 08/08/2018 12:52 PM, Peter Xu wrote: On Tue, Aug 07, 2018 at 05:12:06PM +0800, guangrong.x...@gmail.com wrote: From: Xiao Guangrong flush_compressed_data() needs to wait all compression threads to finish their work, after that all threads are free until the migration feeds new request to

Re: [Qemu-devel] [PATCH v3 01/10] migration: do not wait for free thread

2018-08-07 Thread Xiao Guangrong
On 08/08/2018 11:51 AM, Peter Xu wrote: On Tue, Aug 07, 2018 at 08:29:54AM -0500, Eric Blake wrote: On 08/07/2018 04:12 AM, guangrong.x...@gmail.com wrote: From: Xiao Guangrong Instead of putting the main thread to sleep state to wait for free compression thread, we can directly post it ou

Re: [Qemu-devel] [PATCH v3 10/10] migration: show the statistics of compression

2018-08-07 Thread Peter Xu
On Tue, Aug 07, 2018 at 05:12:09PM +0800, guangrong.x...@gmail.com wrote: [...] > @@ -1602,6 +1614,26 @@ static void migration_update_rates(RAMState *rs, > int64_t end_time) > rs->xbzrle_cache_miss_prev) / page_count; > rs->xbzrle_cache_miss_prev = xbzrle_counters.cache_mis

Re: [Qemu-devel] [PATCH v3 09/10] migration: fix calculating xbzrle_counters.cache_miss_rate

2018-08-07 Thread Peter Xu
On Tue, Aug 07, 2018 at 05:12:08PM +0800, guangrong.x...@gmail.com wrote: > From: Xiao Guangrong > > As Peter pointed out: > | - xbzrle_counters.cache_miss is done in save_xbzrle_page(), so it's > | per-guest-page granularity > | > | - RAMState.iterations is done for each ram_find_and_save_bloc

[Qemu-devel] [Bug 1500265] Re: nested 9p filesystem with security_model=mapped-xattr

2018-08-07 Thread Enrico Weigelt, metux IT consult
Interesting approach. But maybe it should be configurable (eg. specify the mapping prefix). -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1500265 Title: nested 9p filesystem with security_model=map

[Qemu-devel] [Bug 1785902] Re: local/9pfs: Too many levels of symbolic links

2018-08-07 Thread Enrico Weigelt, metux IT consult
Turned out that security_model=mapped can't cope with symlinks in the host file system. Instead, security_model=passthrough works as expected. OTOH, I'll have to check, whether this mode already provides a safe chroot, or guest can escape and damage the host system. The wiki page needs some more

Re: [Qemu-devel] [PATCH v3 08/10] migration: handle the error condition properly

2018-08-07 Thread Peter Xu
On Tue, Aug 07, 2018 at 05:12:07PM +0800, guangrong.x...@gmail.com wrote: > From: Xiao Guangrong > > ram_find_and_save_block() can return negative if any error hanppens, > however, it is completely ignored in current code Could you hint me where we'll return an error? (Anyway I agree that the e

[Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-07 Thread Thomas Huth
Can you simply put a echo $solaris right before the "if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a" line in the configure script, and then run configure again? You then should see the contents of the $solaris variable. And what do you get if you run libgc

Re: [Qemu-devel] [PATCH v3 07/10] migration: do not flush_compressed_data at the end of each iteration

2018-08-07 Thread Peter Xu
On Tue, Aug 07, 2018 at 05:12:06PM +0800, guangrong.x...@gmail.com wrote: > From: Xiao Guangrong > > flush_compressed_data() needs to wait all compression threads to > finish their work, after that all threads are free until the > migration feeds new request to them, reducing its call can improve

Re: [Qemu-devel] [PATCH v3 05/10] migration: move handle of zero page to the thread

2018-08-07 Thread Peter Xu
On Tue, Aug 07, 2018 at 05:12:04PM +0800, guangrong.x...@gmail.com wrote: > From: Xiao Guangrong > > Detecting zero page is not a light work, moving it to the thread to > speed the main thread up, btw, handling ram_release_pages() for the > zero page is moved to the thread as well > > Signed-off

[Qemu-devel] [Bug 1463172] Re: destination arm board hangs after migration from x86 source

2018-08-07 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/1463172 Title: destination

[Qemu-devel] [Bug 1463812] Re: qemu-system-ppc64 V2.30 cause RHEL5.9 disk corruption

2018-08-07 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/1463812 Title: qemu-system

[Qemu-devel] [Bug 1463172] Re: destination arm board hangs after migration from x86 source

2018-08-07 Thread Launchpad Bug Tracker
[Expired for qemu (Ubuntu) because there has been no activity for 60 days.] ** Changed in: qemu (Ubuntu) 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/1463172 Ti

Re: [Qemu-devel] [PATCH 02/21] jobs: add exit shim

2018-08-07 Thread Jeff Cody
On Tue, Aug 07, 2018 at 12:33:30AM -0400, John Snow wrote: > Most jobs do the same thing when they leave their running loop: > - Store the return code in a structure > - wait to receive this structure in the main thread > - signal job completion via job_completed > > More seriously, when we utiliz

Re: [Qemu-devel] [PATCH v3 01/10] migration: do not wait for free thread

2018-08-07 Thread Peter Xu
On Tue, Aug 07, 2018 at 08:29:54AM -0500, Eric Blake wrote: > On 08/07/2018 04:12 AM, guangrong.x...@gmail.com wrote: > > From: Xiao Guangrong > > > > Instead of putting the main thread to sleep state to wait for > > free compression thread, we can directly post it out as normal > > page that red

Re: [Qemu-devel] [PATCH 06/21] block/stream: utilize job_exit shim

2018-08-07 Thread Jeff Cody
On Tue, Aug 07, 2018 at 12:33:34AM -0400, John Snow wrote: > Change the manual deferment to stream_complete into the implicit > callback to job_exit. > > Signed-off-by: John Snow Reviewed-by: Jeff Cody > --- > block/stream.c | 23 --- > 1 file changed, 8 insertions(+), 15

Re: [Qemu-devel] [PATCH 05/21] block/mirror: utilize job_exit shim

2018-08-07 Thread Jeff Cody
On Tue, Aug 07, 2018 at 12:33:33AM -0400, John Snow wrote: > Change the manual deferment to mirror_exit into the implicit > callback to job_exit and the mirror_exit callback. > > Signed-off-by: John Snow Reviewed-by: Jeff Cody > --- > block/mirror.c | 27 +++ > 1 file

Re: [Qemu-devel] [PATCH v3 0/4] Balloon inhibit enhancements, vfio restriction

2018-08-07 Thread Peter Xu
On Wed, Aug 08, 2018 at 12:58:32AM +0300, Michael S. Tsirkin wrote: > At least with VTD, it seems entirely possible to change e.g. a PMD > atomically to point to a different set of PTEs, then flush. > That will allow removing memory at high granularity for > an arbitrary device without mdev or PASI

Re: [Qemu-devel] [PATCH 04/21] block/commit: utilize job_exit shim

2018-08-07 Thread Jeff Cody
On Tue, Aug 07, 2018 at 12:33:32AM -0400, John Snow wrote: > Change the manual deferment to commit_complete into the implicit > callback to job_exit. > > Signed-off-by: John Snow > --- > block/commit.c | 19 +-- > 1 file changed, 5 insertions(+), 14 deletions(-) > > diff --git a

Re: [Qemu-devel] [PATCH v3 3/4] vfio: Inhibit ballooning based on group attachment to a container

2018-08-07 Thread Peter Xu
On Tue, Aug 07, 2018 at 01:31:24PM -0600, Alex Williamson wrote: > We use a VFIOContainer to associate an AddressSpace to one or more > VFIOGroups. The VFIOContainer represents the DMA context for that > AdressSpace for those VFIOGroups and is synchronized to changes in > that AddressSpace via a M

[Qemu-devel] [ANNOUNCE] QEMU 3.0.0-rc4 is now available

2018-08-07 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the fifth release candidate for the QEMU 3.0 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-3.0.0-rc4.tar.xz http://downl

Re: [Qemu-devel] [PATCH v2 3/4] vfio: Inhibit ballooning based on group attachment to a container

2018-08-07 Thread Peter Xu
On Tue, Aug 07, 2018 at 10:35:05AM -0600, Alex Williamson wrote: > On Tue, 7 Aug 2018 21:10:21 +0800 > Peter Xu wrote: > > > On Mon, Jul 30, 2018 at 05:14:21PM -0600, Alex Williamson wrote: > > > We use a VFIOContainer to associate an AddressSpace to one or more > > > VFIOGroups. The VFIOContain

Re: [Qemu-devel] [PATCH v2] bitmap: fix BITMAP_LAST_WORD_MASK

2018-08-07 Thread Wei Wang
On 08/07/2018 05:53 PM, Dr. David Alan Gilbert wrote: * Wei Wang (wei.w.w...@intel.com) wrote: On 08/07/2018 03:39 PM, Peter Xu wrote: On Tue, Jul 31, 2018 at 06:01:18PM +0800, Wei Wang wrote: When "nbits = 0", which means no bits to mask, this macro is expected to return 0, instead of 0xf

Re: [Qemu-devel] [PATCH v2] bitmap: fix BITMAP_LAST_WORD_MASK

2018-08-07 Thread Wei Wang
On 08/07/2018 08:17 PM, Peter Xu wrote: On Tue, Aug 07, 2018 at 04:21:15PM +0800, Wei Wang wrote: On 08/07/2018 03:39 PM, Peter Xu wrote: On Tue, Jul 31, 2018 at 06:01:18PM +0800, Wei Wang wrote: When "nbits = 0", which means no bits to mask, this macro is expected to return 0, instead of 0xff

Re: [Qemu-devel] [PATCH v3 1/4] balloon: Allow multiple inhibit users

2018-08-07 Thread Michael S. Tsirkin
On Tue, Aug 07, 2018 at 02:08:26PM -0600, Alex Williamson wrote: > On Tue, 7 Aug 2018 22:44:11 +0300 > "Michael S. Tsirkin" wrote: > > > On Tue, Aug 07, 2018 at 01:31:22PM -0600, Alex Williamson wrote: > > > A simple true/false internal state does not allow multiple users. Fix > > > this within

Re: [Qemu-devel] [PATCH v3 0/4] Balloon inhibit enhancements, vfio restriction

2018-08-07 Thread Michael S. Tsirkin
On Tue, Aug 07, 2018 at 04:40:33PM -0600, Alex Williamson wrote: > Maybe some of these will evolve over time, SVA efforts are working on > some of these interfaces, but apparently device assignment users have > been getting along just fine without ballooning for many years. But not any more I thin

Re: [Qemu-devel] [PATCH v5 00/24] Fixing record/replay and adding reverse debugging

2018-08-07 Thread Ciro Santilli
OK, finally got some time to try it out, I'm using c42634d8e3428cfa60672c3ba89cabefc720cde9 from rr-180725. Replay works well as far as I can tell, so I moved to the reverse debugging: /home/ciro/bak/git/linux-kernel-module-cheat/out/x86_ 64/buildroot/build/host-qemu-custom.rr/x86_64-softmmu/qemu

Re: [Qemu-devel] [PATCH] vnc: fix memleak of the "vnc-worker-output" name

2018-08-07 Thread Marc-André Lureau
Hi On Wed, Aug 8, 2018 at 12:18 AM, Peter Wu wrote: > Fixes repeated memory leaks of 18 bytes when using VNC: > > Direct leak of 831024 byte(s) in 46168 object(s) allocated from: > ... > #4 0x7f6d2f919bdd in g_strdup_vprintf glib/gstrfuncs.c:514 > #5 0x56085cdcf660 in

Re: [Qemu-devel] [PATCH v6 0/5] s390x: vfio-ap: guest dedicated crypto adapters

2018-08-07 Thread Tony Krowiak
Ping On 06/29/2018 06:47 PM, Tony Krowiak wrote: From: Tony Krowiak This patch series is the QEMU counterpart to the KVM/kernel support for guest dedicated crypto adapters. The KVM/kernel model is built on the VFIO mediated device framework and provides the infrastructure for granting exclusiv

Re: [Qemu-devel] [PATCH v3 0/4] Balloon inhibit enhancements, vfio restriction

2018-08-07 Thread Alex Williamson
On Wed, 8 Aug 2018 00:58:32 +0300 "Michael S. Tsirkin" wrote: > On Tue, Aug 07, 2018 at 01:53:03PM -0600, Alex Williamson wrote: > > On Tue, 7 Aug 2018 22:44:56 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Tue, Aug 07, 2018 at 01:31:21PM -0600, Alex Williamson wrote: > > > > v3: > > >

[Qemu-devel] [Bug 1785734] Re: movdqu partial write at page boundary

2018-08-07 Thread pranith
** Changed in: qemu Status: New => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1785734 Title: movdqu partial write at page boundary Status in QEMU: Confirmed Bug description:

[Qemu-devel] [PATCH] vnc: fix memleak of the "vnc-worker-output" name

2018-08-07 Thread Peter Wu
Fixes repeated memory leaks of 18 bytes when using VNC: Direct leak of 831024 byte(s) in 46168 object(s) allocated from: ... #4 0x7f6d2f919bdd in g_strdup_vprintf glib/gstrfuncs.c:514 #5 0x56085cdcf660 in buffer_init util/buffer.c:59 #6 0x56085ca6a7ec in vnc_asy

Re: [Qemu-devel] [PATCH v3 0/4] Balloon inhibit enhancements, vfio restriction

2018-08-07 Thread Michael S. Tsirkin
On Tue, Aug 07, 2018 at 01:53:03PM -0600, Alex Williamson wrote: > On Tue, 7 Aug 2018 22:44:56 +0300 > "Michael S. Tsirkin" wrote: > > > On Tue, Aug 07, 2018 at 01:31:21PM -0600, Alex Williamson wrote: > > > v3: > > > - Drop "nested" term in commit log (David) > > > - Adopt suggested wording in

[Qemu-devel] [Bug 1785902] [NEW] local/9pfs: Too many levels of symbolic links

2018-08-07 Thread Enrico Weigelt, metux IT consult
Public bug reported: Version: 2.9.1 The primary symptom is resolving symlink fails w/ error "too many levels of symbolic links". My analysis showed that local_readlink() uses local_open_nofollow() to open the file and then tries to read it. local_open_nofollow() then tries to open the file w/ O_

[Qemu-devel] [Bug 1785734] Re: movdqu partial write at page boundary

2018-08-07 Thread Richard Henderson
This is a part of a class of related problems for qemu linux-user, in that any non-atomic store is not validated before initiating a partial write. For instance, qemu-x86_64, built for arm32, would show this same partial store problem for any 64-bit write crossing a page boundary because we are fo

Re: [Qemu-devel] [PATCH v2 4/5] qcow2: Set the default cache-clean-interval to 30 seconds

2018-08-07 Thread Eric Blake
On 08/07/2018 03:21 PM, Leonid Bloch wrote: The default cache-clean-interval is set to 30 seconds, in order to lower the overhead of the qcow2 caches. Signed-off-by: Leonid Bloch --- +++ b/qapi/block-core.json @@ -2830,7 +2830,8 @@ # # @cache-clean-interval: clean unused entries in the

[Qemu-devel] [PATCH v2 2/5] qcow2: Make the default L2 cache sufficient to cover the entire image

2018-08-07 Thread Leonid Bloch
Sufficient L2 cache can noticeably improve the performance when using large images with frequent I/O. The memory overhead is not significant in most cases, as the cache size is only 1 MB for each 8 GB of virtual image size (with the default cluster size of 64 KB). For cases with very large images a

[Qemu-devel] [PATCH v2 3/5] qcow2: Resize the cache upon image resizing

2018-08-07 Thread Leonid Bloch
The caches are now recalculated upon image resizing. This is done because the new default behavior of assigning a sufficient L2 cache to cover the entire image implies that the cache will still be sufficient after an image resizing. Signed-off-by: Leonid Bloch --- block/qcow2.c | 8 1 f

[Qemu-devel] [PATCH v2 1/5] qcow2: Options' documentation fixes

2018-08-07 Thread Leonid Bloch
Signed-off-by: Leonid Bloch --- docs/qcow2-cache.txt | 3 +++ qemu-options.hx | 9 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt index 8a09a5cc5f..5bf2a8ad29 100644 --- a/docs/qcow2-cache.txt +++ b/docs/qcow2-cache.txt @@

[Qemu-devel] [PATCH v2 5/5] qcow2: Explicit number replaced by a constant

2018-08-07 Thread Leonid Bloch
Signed-off-by: Leonid Bloch --- block/qcow2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 453a6377ac..a54e20402b 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1321,7 +1321,7 @@ static int coroutine_fn qcow2_do_open(BlockDriverSt

[Qemu-devel] [PATCH v2 4/5] qcow2: Set the default cache-clean-interval to 30 seconds

2018-08-07 Thread Leonid Bloch
The default cache-clean-interval is set to 30 seconds, in order to lower the overhead of the qcow2 caches. Signed-off-by: Leonid Bloch --- block/qcow2.c| 2 +- block/qcow2.h| 1 + docs/qcow2-cache.txt | 3 +-- qapi/block-core.json | 3 ++- qemu-options.hx | 2 +- 5 files cha

[Qemu-devel] [PATCH v2 0/5] qcow2: Make the L2 cache cover the whole image by default

2018-08-07 Thread Leonid Bloch
This series makes the qcow2 L2 cache cover the entire image by default. The importance of this change is in noticeable performance improvement, especially with heavy random I/O. The memory overhead is not big in most cases, as only 1 MB of cache for every 8 GB of image size is used. For cases with

Re: [Qemu-devel] [PATCH v3 1/4] balloon: Allow multiple inhibit users

2018-08-07 Thread Alex Williamson
On Tue, 7 Aug 2018 22:44:11 +0300 "Michael S. Tsirkin" wrote: > On Tue, Aug 07, 2018 at 01:31:22PM -0600, Alex Williamson wrote: > > A simple true/false internal state does not allow multiple users. Fix > > this within the existing interface by converting to a counter, so long > > as the counter

Re: [Qemu-devel] [PULL 21/35] block: fix QEMU crash with scsi-hd and drive_del

2018-08-07 Thread Eric Blake
On 08/06/2018 05:04 PM, Eric Blake wrote: On 06/18/2018 11:44 AM, Kevin Wolf wrote: From: Greg Kurz Removing a drive with drive_del while it is being used to run an I/O intensive workload can cause QEMU to crash. ... Test 83 sets up a client that intentionally disconnects at critical po

Re: [Qemu-devel] [PATCH v3 0/4] Balloon inhibit enhancements, vfio restriction

2018-08-07 Thread Alex Williamson
On Tue, 7 Aug 2018 22:44:56 +0300 "Michael S. Tsirkin" wrote: > On Tue, Aug 07, 2018 at 01:31:21PM -0600, Alex Williamson wrote: > > v3: > > - Drop "nested" term in commit log (David) > > - Adopt suggested wording in ccw code (Cornelia) > > - Explain balloon inhibitor usage in vfio common (Pet

Re: [Qemu-devel] [PATCH 2/2] fw_cfg: set the get_boot_devices_list() ignore_suffixes parameter from machine property

2018-08-07 Thread Eduardo Habkost
On Tue, Aug 07, 2018 at 08:27:30PM +0100, Mark Cave-Ayland wrote: > On 06/08/18 21:11, Eduardo Habkost wrote: > > On Sun, Aug 05, 2018 at 12:28:50PM +0100, Mark Cave-Ayland wrote: > > > For the older machines (such as Mac and SPARC) the DT nodes representing > > > bootdevices for disk nodes are irr

Re: [Qemu-devel] [PATCH v3 0/4] Balloon inhibit enhancements, vfio restriction

2018-08-07 Thread Michael S. Tsirkin
On Tue, Aug 07, 2018 at 01:31:21PM -0600, Alex Williamson wrote: > v3: > - Drop "nested" term in commit log (David) > - Adopt suggested wording in ccw code (Cornelia) > - Explain balloon inhibitor usage in vfio common (Peter) > - Fix to call inhibitor prior to re-using existing containers >

Re: [Qemu-devel] [PATCH v3 1/4] balloon: Allow multiple inhibit users

2018-08-07 Thread Michael S. Tsirkin
On Tue, Aug 07, 2018 at 01:31:22PM -0600, Alex Williamson wrote: > A simple true/false internal state does not allow multiple users. Fix > this within the existing interface by converting to a counter, so long > as the counter is elevated, ballooning is inhibited. > > Reviewed-by: David Hildenbra

Re: [Qemu-devel] Question: How to integrate simple tests for a new platform so that they fit in well within QEMU

2018-08-07 Thread Richard Henderson
On 08/07/2018 05:34 AM, Aleksandar Markovic wrote: > We are introducing a new MIPS platform - called nanoMIPS - to the QEMU. > > Besides providing new functionality, we would like to integrate into QEMU > some basic testing capabilities for that new platform. Something like this: > > Enable user

[Qemu-devel] [PATCH v3 1/4] balloon: Allow multiple inhibit users

2018-08-07 Thread Alex Williamson
A simple true/false internal state does not allow multiple users. Fix this within the existing interface by converting to a counter, so long as the counter is elevated, ballooning is inhibited. Reviewed-by: David Hildenbrand Reviewed-by: Peter Xu Reviewed-by: Cornelia Huck Signed-off-by: Alex

[Qemu-devel] [PATCH v3 4/4] vfio/ccw/pci: Allow devices to opt-in for ballooning

2018-08-07 Thread Alex Williamson
If a vfio assigned device makes use of a physical IOMMU, then memory ballooning is necessarily inhibited due to the page pinning, lack of page level granularity at the IOMMU, and sufficient notifiers to both remove the page on balloon inflation and add it back on deflation. However, not all devices

[Qemu-devel] [PATCH v3 3/4] vfio: Inhibit ballooning based on group attachment to a container

2018-08-07 Thread Alex Williamson
We use a VFIOContainer to associate an AddressSpace to one or more VFIOGroups. The VFIOContainer represents the DMA context for that AdressSpace for those VFIOGroups and is synchronized to changes in that AddressSpace via a MemoryListener. For IOMMU backed devices, maintaining the DMA context for

[Qemu-devel] [PATCH v3 0/4] Balloon inhibit enhancements, vfio restriction

2018-08-07 Thread Alex Williamson
v3: - Drop "nested" term in commit log (David) - Adopt suggested wording in ccw code (Cornelia) - Explain balloon inhibitor usage in vfio common (Peter) - Fix to call inhibitor prior to re-using existing containers to avoid gap that pinning may have occurred in set container ioctl (self)

[Qemu-devel] [PATCH v3 2/4] kvm: Use inhibit to prevent ballooning without synchronous mmu

2018-08-07 Thread Alex Williamson
Remove KVM specific tests in balloon_page(), instead marking ballooning as inhibited without KVM_CAP_SYNC_MMU support. Reviewed-by: David Hildenbrand Reviewed-by: Peter Xu Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson --- accel/kvm/kvm-all.c| 4 hw/virtio/virtio-ballo

Re: [Qemu-devel] [PATCH 2/2] fw_cfg: set the get_boot_devices_list() ignore_suffixes parameter from machine property

2018-08-07 Thread Mark Cave-Ayland
On 06/08/18 21:11, Eduardo Habkost wrote: On Sun, Aug 05, 2018 at 12:28:50PM +0100, Mark Cave-Ayland wrote: For the older machines (such as Mac and SPARC) the DT nodes representing bootdevices for disk nodes are irregular for mainly historical reasons, and should be handled on an individual bas

Re: [Qemu-devel] [PATCH V10 08/20] ram/COLO: Record the dirty pages that SVM received

2018-08-07 Thread Dr. David Alan Gilbert
* Zhang Chen (zhangc...@gmail.com) wrote: > On Sat, Jul 28, 2018 at 2:51 AM, Dr. David Alan Gilbert > wrote: > > > * Zhang Chen (zhangc...@gmail.com) wrote: > > > We record the address of the dirty pages that received, > > > it will help flushing pages that cached into SVM. > > > > > > Here, it i

Re: [Qemu-devel] [PATCH 3/5] dev-mtp: retry write for incomplete transfers

2018-08-07 Thread Bandan Das
Gerd Hoffmann writes: > On Fri, Jul 20, 2018 at 05:40:18PM -0400, Bandan Das wrote: >> For large buffers, write may not copy the full buffer. For example, >> on Linux, write imposes a limit of 0x7000. Note that this does >> not fix >4G transfers but ~>2G files will transfer successfully. > >

Re: [Qemu-devel] [PATCH 19/21] qapi/block-commit: expose new job properties

2018-08-07 Thread John Snow
On 08/07/2018 10:52 AM, Eric Blake wrote: > On 08/06/2018 11:33 PM, John Snow wrote: >> Signed-off-by: John Snow >> --- >>   blockdev.c   | 8 >>   qapi/block-core.json | 3 ++- >>   2 files changed, 10 insertions(+), 1 deletion(-) >> > >> +++ b/qapi/block-core.json >> @@ -1518,

Re: [Qemu-devel] [PATCH V10 07/20] COLO: Load dirty pages into SVM's RAM cache firstly

2018-08-07 Thread Dr. David Alan Gilbert
* Zhang Chen (zhangc...@gmail.com) wrote: > We should not load PVM's state directly into SVM, because there maybe some > errors happen when SVM is receving data, which will break SVM. > > We need to ensure receving all data before load the state into SVM. We use > an extra memory to cache these da

[Qemu-devel] [Bug 1483070] Re: VIRTIO Sequential Write IOPS limits not working

2018-08-07 Thread Thomas Huth
Has this issue ever been fixed? If not, is there still interest in fixing it? Or could we close this ticket nowadays? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.l

[Qemu-devel] [PATCH 7/7] qcow2: async scheme for qcow2_co_pwritev

2018-08-07 Thread Vladimir Sementsov-Ogievskiy
Start several async requests instead of read chunk by chunk. Iotest 026 output is changed, as because of async io error path has changed. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 47 ++ tests/qemu-iotests/026.out

[Qemu-devel] [PATCH 0/7] qcow2: async handling of fragmented io

2018-08-07 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here is an asynchronous scheme for handling fragmented qcow2 reads and writes. Both qcow2 read and write functions loops through sequential portions of data. The series aim it to parallelize these loops iterations. It improves performance for fragmented qcow2 images, I've tested it as fol

[Qemu-devel] [PATCH 4/7] qcow2: async scheme for qcow2_co_preadv

2018-08-07 Thread Vladimir Sementsov-Ogievskiy
Start several async requests instead of read chunk by chunk. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 208 -- 1 file changed, 204 insertions(+), 4 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 5e7f2ee

[Qemu-devel] [PATCH 3/7] qcow2: split out reading normal clusters from qcow2_co_preadv

2018-08-07 Thread Vladimir Sementsov-Ogievskiy
Memory allocation may become less efficient for encrypted case. It's a payment for further asynchronous scheme. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 114 -- 1 file changed, 64 insertions(+), 50 deletions(-) diff

[Qemu-devel] [PATCH 5/7] qcow2: refactor qcow2_co_pwritev: split out qcow2_co_do_pwritev

2018-08-07 Thread Vladimir Sementsov-Ogievskiy
Split out block which will be reused in async scheme. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 138 -- 1 file changed, 86 insertions(+), 52 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index a0df8d4e50..4d

[Qemu-devel] [PATCH 2/7] qcow2: bdrv_co_pwritev: move encryption code out of lock

2018-08-07 Thread Vladimir Sementsov-Ogievskiy
We don't need locking for encryption code. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 41def07c67..65e3ca00e2 100644 --- a/block/qcow2.c +++ b/block/qco

[Qemu-devel] [PATCH 1/7] qcow2: move qemu_co_mutex_lock below decryption procedure

2018-08-07 Thread Vladimir Sementsov-Ogievskiy
From: "Denis V. Lunev" We are not working with a shared state data in the decruption code and thus this operation is safe. On the other hand this significantly reduces the scope of the lock. Signed-off-by: Denis V. Lunev --- block/qcow2.c | 14 -- 1 file changed, 8 insertions(+), 6

[Qemu-devel] [PATCH 6/7] qcow2: refactor qcow2_co_pwritev locals scope

2018-08-07 Thread Vladimir Sementsov-Ogievskiy
Move local variables related to individual loop iteration into while block. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 4d669432d1..88b3fb8080 100644 --- a/block/qco

Re: [Qemu-devel] [PATCH v3 4/4] hw/arm/sysbus-fdt: Add support for instantiating generic devices

2018-08-07 Thread Auger Eric
Hi Geert, On 08/07/2018 05:32 PM, Geert Uytterhoeven wrote: > Hi Eric, > > On Tue, Aug 7, 2018 at 4:19 PM Auger Eric wrote: >> On 07/25/2018 04:34 PM, Geert Uytterhoeven wrote: >>> Add a fallback for instantiating generic devices without a type-specific >>> or compatible-specific instantation me

Re: [Qemu-devel] [PATCH v2 3/4] vfio: Inhibit ballooning based on group attachment to a container

2018-08-07 Thread Alex Williamson
On Tue, 7 Aug 2018 21:10:21 +0800 Peter Xu wrote: > On Mon, Jul 30, 2018 at 05:14:21PM -0600, Alex Williamson wrote: > > We use a VFIOContainer to associate an AddressSpace to one or more > > VFIOGroups. The VFIOContainer represents the DMA context for that > > AdressSpace for those VFIOGroups a

Re: [Qemu-devel] [PATCH] hw/pci: add pci capability to pci-pci bridge

2018-08-07 Thread Laszlo Ersek
On 08/07/18 14:19, Laszlo Ersek wrote: > On 08/07/18 09:04, Jing Liu wrote: >> Add hint to firmware (e.g. SeaBIOS) to reserve addtional >> IO/MEM/PREF spaces for legacy pci-pci bridge, to enable >> some pci devices hotplugging whose IO/MEM/PREF spaces >> requests are larger than the ones in pci-pci

Re: [Qemu-devel] [PATCH for-3.0] slirp: Correct size check in m_inc()

2018-08-07 Thread Peter Maydell
On 7 August 2018 at 16:47, Markus Armbruster wrote: > Peter Maydell writes: > >> On 7 August 2018 at 14:09, Daniel P. Berrangé wrote: >>> On Tue, Aug 07, 2018 at 03:07:07PM +0200, Thomas Huth wrote: But 864036e251f54c9 was never part of an official QEMU release, was it? Or did it go in

[Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-07 Thread Michele Denber
Ah, I see: "in a future QEMU release we may drop support for those hosts unless somebody volunteers to help us with maintaining them (and can provide build/CI machines)." OK, so I happily volunteer an account on my machine to help maintain this. "What's the content of the $solaris variable at th

[Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-07 Thread Michele Denber
"The libgcrypt-config command should be in $PATH" I'm sorry - I don't understand. Isn't $PATH a list of directories? I need to put a command in there? I'm clearly missing something here. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to Q

Re: [Qemu-devel] [PATCH for-3.0] slirp: Correct size check in m_inc()

2018-08-07 Thread Markus Armbruster
Peter Maydell writes: > On 7 August 2018 at 14:09, Daniel P. Berrangé wrote: >> On Tue, Aug 07, 2018 at 03:07:07PM +0200, Thomas Huth wrote: >>> But 864036e251f54c9 was never part of an official QEMU release, was it? >>> Or did it go into a stable release already? If not, I think you simply >>>

Re: [Qemu-devel] [PATCH v3 4/4] hw/arm/sysbus-fdt: Add support for instantiating generic devices

2018-08-07 Thread Geert Uytterhoeven
Hi Eric, On Tue, Aug 7, 2018 at 4:19 PM Auger Eric wrote: > On 07/25/2018 04:34 PM, Geert Uytterhoeven wrote: > > Add a fallback for instantiating generic devices without a type-specific > > or compatible-specific instantation method. This will be used when no > > other match is found. > > > > T

Re: [Qemu-devel] [PATCH 02/10] char/spice: discard write() if backend is disconnected

2018-08-07 Thread Marc-André Lureau
Hi On Fri, Aug 3, 2018 at 7:36 PM, Marc-André Lureau wrote: > Most chardev backend handle write() as discarded data if underlying > system is disconnected. For unknown historical reasons, the Spice > backend has "reliable" write. It will wait until the client end is > reconnected to accept furthe

[Qemu-devel] [Bug 1785308] Re: 0x8 exception encountered but not handled

2018-08-07 Thread Dr. David Alan Gilbert
I think I'd start by seeing if it fails in both or if they're different. If they're different then you'd follow the series of exceptions that they each get and see where they diverge. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. h

Re: [Qemu-devel] [Qemu-block] [PATCH v9 06/31] iotests.py: Add filter_imgfmt()

2018-08-07 Thread Alberto Garcia
On Thu 28 Jun 2018 02:07:20 AM CEST, Max Reitz wrote: > Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [PATCH] migration: Correctly handle subsections with no 'needed' function

2018-08-07 Thread Peter Maydell
On 7 August 2018 at 16:05, Juan Quintela wrote: > Peter Maydell wrote: >> So it's better to use a needed-always subsection, which will give >> the desired behaviour: >> * new QEMU -> new QEMU: state is always migrated >> * old QEMU -> new QEMU: migration doesn't fail, and guest >>will work

Re: [Qemu-devel] [PATCH] migration: Correctly handle subsections with no 'needed' function

2018-08-07 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 7 August 2018 at 16:05, Juan Quintela wrote: > > Peter Maydell wrote: > >> So it's better to use a needed-always subsection, which will give > >> the desired behaviour: > >> * new QEMU -> new QEMU: state is always migrated > >> * old QEMU -

Re: [Qemu-devel] [PATCH] secondary-vga: unregister vram on unplug.

2018-08-07 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 7 August 2018 at 15:57, Dr. David Alan Gilbert wrote: > > * Gerd Hoffmann (kra...@redhat.com) wrote: > >> On Fri, Jul 20, 2018 at 10:19:48AM +0200, remy.n...@blade-group.com wrote: > >> > From: "Remy Noel" > >> > > >> > When removing a second

Re: [Qemu-devel] [Qemu-block] [PATCH v9 14/31] block: Add bdrv_dirname()

2018-08-07 Thread Alberto Garcia
On Thu 28 Jun 2018 02:07:28 AM CEST, Max Reitz wrote: > This function may be implemented by block drivers to derive a directory > name from a BDS. Concatenating this g_free()-able string with a relative > filename must result in a valid (not necessarily existing) filename, so > this is a function t

Re: [Qemu-devel] [Qemu-block] [PATCH v9 13/31] block: Fix bdrv_find_backing_image()

2018-08-07 Thread Alberto Garcia
On Thu 28 Jun 2018 02:07:27 AM CEST, Max Reitz wrote: > bdrv_find_backing_image() should use bdrv_get_full_backing_filename() or > bdrv_make_absolute_filename() instead of trying to do what those > functions do by itself. > > path_combine_deprecated() can now be dropped, so let's do that. > > Signe

Re: [Qemu-devel] [PATCH] virtio-gpu: fix crashes upon warm reboot with vga mode

2018-08-07 Thread Peter Maydell
On 7 August 2018 at 14:41, Gerd Hoffmann wrote: > On Tue, Aug 07, 2018 at 03:02:49PM +0200, Marc-André Lureau wrote: >> Hi >> >> On Tue, Aug 7, 2018 at 2:55 PM, Gerd Hoffmann wrote: >> > On Fri, Aug 03, 2018 at 05:32:35PM +0200, Marc-André Lureau wrote: >> >> With vga=775 on the Linux command lin

Re: [Qemu-devel] [Qemu-block] [PATCH v9 12/31] block: Add bdrv_make_absolute_filename()

2018-08-07 Thread Alberto Garcia
On Thu 28 Jun 2018 02:07:26 AM CEST, Max Reitz wrote: > This is a general function for making a filename that is relative to a > certain BDS absolute. > > It calls bdrv_get_full_backing_filename_from_filename() for now, but > that will be changed in a follow-up patch. > > Signed-off-by: Max Reitz

Re: [Qemu-devel] [PATCH] secondary-vga: unregister vram on unplug.

2018-08-07 Thread Peter Maydell
On 7 August 2018 at 15:57, Dr. David Alan Gilbert wrote: > * Gerd Hoffmann (kra...@redhat.com) wrote: >> On Fri, Jul 20, 2018 at 10:19:48AM +0200, remy.n...@blade-group.com wrote: >> > From: "Remy Noel" >> > >> > When removing a secondary-vga device and then adding it back (or adding >> > an othe

Re: [Qemu-devel] [PATCH v3 1/4] vfio/platform: Make the vfio-platform device non-abstract

2018-08-07 Thread Auger Eric
Hi Geert, On 08/07/2018 05:00 PM, Geert Uytterhoeven wrote: > Hi Eric, > > On Tue, Aug 7, 2018 at 4:18 PM Auger Eric wrote: >> On 07/25/2018 04:34 PM, Geert Uytterhoeven wrote: >>> From: Auger Eric >>> >>> Up to now the vfio-platform device has been abstract and could not be >>> instantiated.

Re: [Qemu-devel] [Qemu-block] [PATCH v9 11/31] block: bdrv_get_full_backing_filename's ret. val.

2018-08-07 Thread Alberto Garcia
On Thu 28 Jun 2018 02:07:25 AM CEST, Max Reitz wrote: > Make bdrv_get_full_backing_filename() return an allocated string instead > of placing the result in a caller-provided buffer. > > Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [PATCH] migration: Correctly handle subsections with no 'needed' function

2018-08-07 Thread Juan Quintela
Peter Maydell wrote: > On 7 August 2018 at 15:49, Juan Quintela wrote: >> But what I wonder is _why_ we want subsections that are always there. >> We have: >> >> - normal sections >> int32_t foo >> int64_t bad; >> >> - subsections (always optional) >> if needed(whatever) >> int16_t fo

Re: [Qemu-devel] [Qemu-block] [PATCH v9 10/31] block: bdrv_get_full_backing_filename_from_...'s ret. val.

2018-08-07 Thread Alberto Garcia
On Thu 28 Jun 2018 02:07:24 AM CEST, Max Reitz wrote: > Make bdrv_get_full_backing_filename_from_filename() return an allocated > string instead of placing the result in a caller-provided buffer. > > Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [PATCH v3 1/4] vfio/platform: Make the vfio-platform device non-abstract

2018-08-07 Thread Geert Uytterhoeven
Hi Eric, On Tue, Aug 7, 2018 at 4:18 PM Auger Eric wrote: > On 07/25/2018 04:34 PM, Geert Uytterhoeven wrote: > > From: Auger Eric > > > > Up to now the vfio-platform device has been abstract and could not be > > instantiated. The integration of a new vfio platform device required > > creating

Re: [Qemu-devel] [PATCH] migration: Correctly handle subsections with no 'needed' function

2018-08-07 Thread Peter Maydell
On 7 August 2018 at 15:49, Juan Quintela wrote: > But what I wonder is _why_ we want subsections that are always there. > We have: > > - normal sections > int32_t foo > int64_t bad; > > - subsections (always optional) > if needed(whatever) > int16_t foo2 > int32_t bar2 > > So nee

Re: [Qemu-devel] [PATCH] secondary-vga: unregister vram on unplug.

2018-08-07 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > On Fri, Jul 20, 2018 at 10:19:48AM +0200, remy.n...@blade-group.com wrote: > > From: "Remy Noel" > > > > When removing a secondary-vga device and then adding it back (or adding > > an other one), qemu aborts with: > > "RAMBlock ":00:02.0/vga.vr

Re: [Qemu-devel] [PATCH 19/21] qapi/block-commit: expose new job properties

2018-08-07 Thread Eric Blake
On 08/06/2018 11:33 PM, John Snow wrote: Signed-off-by: John Snow --- blockdev.c | 8 qapi/block-core.json | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) +++ b/qapi/block-core.json @@ -1518,7 +1518,8 @@ { 'command': 'block-commit', 'data': { '*job-id':

[Qemu-devel] [Bug 1785670] Re: Guest(ubuntu 18.04) crashes when trying uploading file

2018-08-07 Thread Zihan Yang
Glad to see such a quick fix, and ASAN looks like a great tool :) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1785670 Title: Guest(ubuntu 18.04) crashes when trying uploading file Status in QEMU

  1   2   3   >