Re: [Qemu-devel] [Qemu-discuss] IRQ per CPU

2018-07-05 Thread Dongli Zhang
On 07/05/2018 12:12 PM, Probir Roy wrote: >> Does 'per CPU basis' indicates irq per cpu, or irq per device queue? > > IRQ per CPU core, meaning that IRQ will be raised at and served by > that CPU. Does IRQ per queue mean the same thing? > About 'IRQ per queue', the device may create multiple

Re: [Qemu-devel] [PULL 0/7] Linux user for 3.0 patches

2018-07-05 Thread Peter Maydell
On 3 July 2018 at 17:34, Laurent Vivier wrote: > The following changes since commit ab08440a4ee09032d1a9cb22fdcab23bc7e1c656: > > Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180702' into > staging (2018-07-02 17:57:46 +0100) > > are available in the Git repository at: > > git://

[Qemu-devel] [PATCH for 3.0] hw/arm/smmu-common: Fix devfn computation in smmu_iommu_mr

2018-07-05 Thread Eric Auger
smmu_iommu_mr() aims at returning the IOMMUMemoryRegion corresponding to a given sid. The function extracts both the PCIe bus number and the devfn to return this data. Current computation of devfn is wrong as it only returns the PCIe function instead of slot | function. Fixes 32cfd7f39e08 ("hw/arm

Re: [Qemu-devel] [PATCH v4] module: Use QEMU_MODULE_DIR as a search path

2018-07-05 Thread Daniel P . Berrangé
On Wed, Jul 04, 2018 at 02:10:10PM -0400, ryang wrote: > The current paths for modules are CONFIG_QEMU_MODDIR and paths relative > to the executable. Qemu and its modules can be installed and executed in > paths that are different from these search paths. This change allows > a search path to be sp

[Qemu-devel] [PATCH v2 0/9] block: Fix dst reading after tail copy offloading

2018-07-05 Thread Fam Zheng
Qcow2 allocates new clusters after the end of the file. If it is the destinaton of copy offloading, we must adjust dst->bs->total_sectors. Otherwise, further reads will drop to the "beyond EOF" code path and return zeroes, which problem is caught by iotests 222. Follow the logic in the normal writ

[Qemu-devel] [PATCH v2 2/9] block: Use BdrvChild to discard

2018-07-05 Thread Fam Zheng
Other I/O functions are already using a BdrvChild pointer in the API, so make discard do the same. It makes it possible to initiate the same permission checks before doing I/O, and much easier to share the helper functions for this, which will be added and used by write, truncate and copy range pat

[Qemu-devel] [PATCH v2 1/9] block: Add copy offloading trace points

2018-07-05 Thread Fam Zheng
A few trace points that can help reveal what is happening in a copy offloading I/O path. Signed-off-by: Fam Zheng --- block/file-posix.c | 2 ++ block/io.c | 2 ++ block/iscsi.c | 3 +++ block/trace-events | 6 ++ 4 files changed, 13 insertions(+) diff --git a/block/file-posix.

[Qemu-devel] [PATCH v2 7/9] block: Use common req handling in copy offloading

2018-07-05 Thread Fam Zheng
This brings the request handling logic inline with write and discard, fixing write_gen, resize_cb, dirty bitmaps and image size refreshing. The last of these issues broke iotest case 222, which is now fixed. Signed-off-by: Fam Zheng --- block/io.c | 8 +++- 1 file changed, 7 insertions(+), 1

[Qemu-devel] [PATCH v2 3/9] block: Use uint64_t for BdrvTrackedRequest byte fields

2018-07-05 Thread Fam Zheng
This matches the types used for bytes in the rest parts of block layer. In the case of bdrv_co_truncate, new_bytes can be the image size which probably doesn't fit in a 32 bit int. Signed-off-by: Fam Zheng --- block/io.c| 2 +- include/block/block_int.h | 4 ++-- 2 files changed,

[Qemu-devel] [PATCH v2 4/9] block: Extract common write req handling

2018-07-05 Thread Fam Zheng
As a mechanical refactoring patch, this is the first step towards unified and more correct write code paths. This is helpful because multiple BlockDriverState fields need to be updated after modifying image data, and it's hard to maintain in multiple places such as copy offload, discard and truncat

[Qemu-devel] [PATCH v2 5/9] block: Fix handling of image enlarging write

2018-07-05 Thread Fam Zheng
Two problems exist when a write request that enlarges the image (i.e. write beyond EOF) finishes: 1) parent is not notified about size change; 2) dirty bitmap is not resized although we try to set the dirty bits; Fix them just like how bdrv_co_truncate works. Reported-by: Kevin Wolf Signed-off-

[Qemu-devel] [PATCH v2 6/9] block: Use common req handling for discard

2018-07-05 Thread Fam Zheng
Reuse the new bdrv_co_write_req_prepare/finish helpers. The variation here is that discard requests don't affect bs->wr_highest_offset. Signed-off-by: Fam Zheng --- block/io.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/block/io.c b/block/io.c index

[Qemu-devel] [PATCH v2 8/9] block: Fix bdrv_co_truncate overlap check

2018-07-05 Thread Fam Zheng
If we are growing the image and potentially using preallocation for the new area, we need to make sure that no write requests are made to the "preallocated" area which [@old_size, @offset), not [@offset, offset * 2 - @old_size). Signed-off-by: Fam Zheng --- block/io.c | 3 ++- 1 file changed, 2

[Qemu-devel] [PATCH v2 9/9] block: Use common write req handling in truncate

2018-07-05 Thread Fam Zheng
Truncation is the last to convert from open coded req handling to reusing helpers. This time the permission check in prepare has to adapt to the new caller: it checks a different permission bit, and don't trigger the before write notifier. Also, truncation should always trigger a bs->total_sectors

[Qemu-devel] [PATCH v3 0/4] fix image fleecing

2018-07-05 Thread Vladimir Sementsov-Ogievskiy
Hi all. This fixes image fleecing scheme for 3.0, details are in 04 patch. v3: 02: fix typo in assert, to fix build v2: 01,02: new patches 03: - improve comment - fix assert in bdrv_aligned_pwritev - add asserts to not use the flag on read requests - support copy_range 04: - expand

[Qemu-devel] [PATCH v3 3/4] block: add BDRV_REQ_SERIALISING flag

2018-07-05 Thread Vladimir Sementsov-Ogievskiy
Serialized writes should be used in copy-on-write of backup(sync=none) for image fleecing scheme. We need to change an assert in bdrv_aligned_pwritev, added in 28de2dcd88de. The assert may fail now, because call to wait_serialising_requests here may become first call to it for this request with se

Re: [Qemu-devel] [PATCH v4] module: Use QEMU_MODULE_DIR as a search path

2018-07-05 Thread Fam Zheng
On Wed, 07/04 14:10, ryang wrote: > The current paths for modules are CONFIG_QEMU_MODDIR and paths relative > to the executable. Qemu and its modules can be installed and executed in > paths that are different from these search paths. This change allows > a search path to be specified by environmen

[Qemu-devel] [PATCH v3 4/4] block/backup: fix fleecing scheme: use serialized writes

2018-07-05 Thread Vladimir Sementsov-Ogievskiy
Fleecing scheme works as follows: we want a kind of temporary snapshot of active drive A. We create temporary image B, with B->backing = A. Then we start backup(sync=none) from A to B. From this point, B reads as point-in-time snapshot of A (A continues to be active drive, accepting guest IO). Thi

[Qemu-devel] [PATCH v3 2/4] block: split flags in copy_range

2018-07-05 Thread Vladimir Sementsov-Ogievskiy
Pass read flags and write flags separately. This is needed to handle coming BDRV_REQ_NO_SERIALISING clearly in following patches. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 3 ++- include/block/block_int.h | 14 ++ include/sysemu/block-back

[Qemu-devel] [PATCH v3 1/4] block: disallow BDRV_REQ_NO_SERIALISING for write

2018-07-05 Thread Vladimir Sementsov-Ogievskiy
Before commit 9ded4a01149 "backup: Use copy offloading", BDRV_REQ_NO_SERIALISING was used for only one case: read in copy-on-write operation during backup. Also, the flag was handled only on read path (in bdrv_co_preadv and bdrv_aligned_preadv). After 9ded4a01149, flag is used for not waiting seri

Re: [Qemu-devel] [kvmtool test PATCH 24/24] kvmtool: arm: Add support for creating VM with PA size

2018-07-05 Thread Peter Maydell
On 4 July 2018 at 16:51, Will Deacon wrote: > On Wed, Jul 04, 2018 at 03:41:18PM +0100, Marc Zyngier wrote: >> Not really. Let's say I want my IPA space split in two: memory covers >> the low 47 bit, and I want MMIO spanning the top 47 bit. With your >> scheme, you'd end-up with a 47bit IPA space,

[Qemu-devel] [PATCH v3] accel: forbid early use of kvm_enabled() and friends

2018-07-05 Thread Greg Kurz
It is unsafe to rely on *_enabled() helpers before the accelerator has been initialized, ie, accel_init_machine() has succeeded, because they always return false. But it is still possible to end up calling them indirectly by inadvertance, and cause QEMU to misbehave. This patch causes QEMU to abor

Re: [Qemu-devel] [kvmtool test PATCH 24/24] kvmtool: arm: Add support for creating VM with PA size

2018-07-05 Thread Auger Eric
Hi, On 07/05/2018 09:51 AM, Peter Maydell wrote: > On 4 July 2018 at 16:51, Will Deacon wrote: >> On Wed, Jul 04, 2018 at 03:41:18PM +0100, Marc Zyngier wrote: >>> Not really. Let's say I want my IPA space split in two: memory covers >>> the low 47 bit, and I want MMIO spanning the top 47 bit. Wi

[Qemu-devel] [PATCH 0/2] tests: multifd migration test scenarios

2018-07-05 Thread Balamuruhan S
This patchset adds test scenarios for precopy multifd migration using fd and unix. Also I am working on adding scenarios in tp-qemu using Avocado-VT and observed `Segmentation fault` with recently added test scenario using fd where as unix and tcp got PASS, https://github.com/autotest/tp-qemu/pu

[Qemu-devel] [PATCH 1/2] tests: add precopy multifd migration test with unix

2018-07-05 Thread Balamuruhan S
multifd migration feature is in with commit: 35374cbdff, this patch adds test for it using unix socket. Signed-off-by: Balamuruhan S --- tests/migration-test.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/tests/migration-test.c b/tests/migration-test.c ind

[Qemu-devel] [PATCH 2/2] tests: add precopy multifd migration with fd protocol

2018-07-05 Thread Balamuruhan S
This patch adds test for multifd migration feature with fd protocol. Signed-off-by: Balamuruhan S --- tests/migration-test.c | 57 ++ 1 file changed, 57 insertions(+) diff --git a/tests/migration-test.c b/tests/migration-test.c index e2434e70ea..2

Re: [Qemu-devel] [PATCH v3 20/20] arm/virt: Add support for GICv2 virtualization extensions

2018-07-05 Thread Jan Kiszka
On 2018-07-05 08:51, Jan Kiszka wrote: > On 2018-06-29 15:29, Luc Michel wrote: >> Add support for GICv2 virtualization extensions by mapping the necessary >> I/O regions and connecting the maintenance IRQ lines. >> >> Declare those additions in the device tree and in the ACPI tables. >> >> Signed-

Re: [Qemu-devel] 32-bit “qemu-system-i386 -enable-kvm” segfaults on x86_64

2018-07-05 Thread Ludovic Courtès
Hi Daniel, Thanks for the quick reply. Daniel P. Berrangé skribis: > On Wed, Jul 04, 2018 at 02:34:07PM +0200, Ludovic Courtès wrote: >> Hello, >> >> (I’m reporting the issue here because for some reason the launchpad.net >> login page redirects me to an “oops” page and fails to log me in.) >>

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

2018-07-05 Thread Kevin Wolf
Am 04.07.2018 um 20:30 hat Peter Maydell geschrieben: > On 3 July 2018 at 15:59, Kevin Wolf wrote: > > The following changes since commit a395717cbd26e7593d3c3fe81faca121ec6d13e8: > > > > Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into > > staging (2018-07-03 11:49:51 +

Re: [Qemu-devel] [PATCH 0/8] Coccinelle cleanups

2018-07-05 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Nothing exciting here, patches created mechanically > (common after soft freeze). Cc: qemu-trivial

Re: [Qemu-devel] [PATCH 1/2] block: add BDRV_REQ_SERIALISING flag

2018-07-05 Thread Kevin Wolf
Am 04.07.2018 um 19:06 hat Vladimir Sementsov-Ogievskiy geschrieben: > 04.07.2018 19:36, Vladimir Sementsov-Ogievskiy wrote: > > 04.07.2018 19:20, Kevin Wolf wrote: > > > Am 04.07.2018 um 18:11 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > > 04.07.2018 18:08, Kevin Wolf wrote: > > > > > Am 04

Re: [Qemu-devel] [PATCH 3/9] qapi: remove error checks for event emission

2018-07-05 Thread Markus Armbruster
Peter Xu writes: > In the whole QAPI event emission code we're passing in an Error* object > along the whole stack. That's never useful since it never fails after > all. Remove that. > > Then, remove that parameter from all the callers to send an event. > > Suggested-by: Eric Blake > Suggested

Re: [Qemu-devel] [PATCH] kvm: x86: Add support for -machine split-lock-ac

2018-07-05 Thread Hu, Robert
Best Regards, Robert Hoo > -Original Message- > From: Paolo Bonzini > Sent: Wednesday, July 4, 2018 21:39 > To: Liu, Jingqi > Cc: r...@twiddle.net; ehabk...@redhat.com; mtosa...@redhat.com; qemu- > de...@nongnu.org; Wang, Wei W ; Hu, Robert > > Subject: Re: [PATCH] kvm: x86: Add suppo

Re: [Qemu-devel] [PATCH v3 20/20] arm/virt: Add support for GICv2 virtualization extensions

2018-07-05 Thread Luc Michel
On 07/05/2018 10:00 AM, Jan Kiszka wrote: > On 2018-07-05 08:51, Jan Kiszka wrote: >> On 2018-06-29 15:29, Luc Michel wrote: >>> Add support for GICv2 virtualization extensions by mapping the necessary >>> I/O regions and connecting the maintenance IRQ lines. >>> >>> Declare those additions in th

Re: [Qemu-devel] [PATCH 2/8] error: Remove NULL checks on error_propagate() calls

2018-07-05 Thread David Hildenbrand
On 04.07.2018 17:39, Philippe Mathieu-Daudé wrote: > Patch created mechanically by rerunning: > > $ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \ > --macro-file scripts/cocci-macro-file.h \ > --dir . --in-place > > Signed-off-by: Philippe Mathieu-Daud

Re: [Qemu-devel] [PATCH 4/9] monitor: move need_resume flag into monitor struct

2018-07-05 Thread Markus Armbruster
Peter Xu writes: > It was put into the request object to show whether we'll need to resume > the monitor after dispatching the command. Now we move that into the > monitor struct so that it might be even used in other places in the > future, e.g., out-of-band message flow controls. > > One thing

Re: [Qemu-devel] [PATCH for-3.0 1/9] migration: simplify check to use qemu file buffer

2018-07-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Firstly, renaming the old matching_page_sizes variable to > matching_target_page_size, which suites more to what it did (it only > checks against target page size rather than multiple page sizes). > Meanwhile, simplify the check logic a bit, and enhance the c

Re: [Qemu-devel] [PATCH v2 0/3] blklogwrites improvements

2018-07-05 Thread Kevin Wolf
Am 04.07.2018 um 16:59 hat Ari Sundholm geschrieben: > This patch set contains a trivial printf format fix, followed by two > new features for the blklogwrites driver. > > The first feature is an option to append to an existing log, adopting > its sector size and other metadata in its superblock.

[Qemu-devel] [PATCH v4 4/5] i386: Add CPUID bit for WBNOINVD

2018-07-05 Thread Robert Hoo
WBNOINVD: Write back and do not invalidate cache, enumerated by CPUID.(EAX=8008H, ECX=0):EBX[bit 9]. Signed-off-by: Robert Hoo --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index b83

[Qemu-devel] [PATCH v4 1/5] i386: Add new MSR indices for IA32_PRED_CMD and IA32_ARCH_CAPABILITIES

2018-07-05 Thread Robert Hoo
IA32_PRED_CMD MSR gives software a way to issue commands that affect the state of indirect branch predictors. Enumerated by CPUID.(EAX=7H,ECX=0):EDX[26]. IA32_ARCH_CAPABILITIES MSR enumerates architectural features of RDCL_NO and IBRS_ALL. Enumerated by CPUID.(EAX=07H, ECX=0):EDX[29]. https://soft

[Qemu-devel] [PATCH v4 5/5] i386: Add new CPU model Icelake-{Server, Client}

2018-07-05 Thread Robert Hoo
New CPU models mostly inherit features from ancestor Skylake, while addin new features: UMIP, New Instructions ( PCONIFIG (server only), WBNOINVD, AVX512_VBMI2, GFNI, AVX512_VNNI, VPCLMULQDQ, VAES, AVX512_BITALG), Intel PT and 5-level paging (Server only). As well as IA32_PRED_CMD, SSBD support for

[Qemu-devel] [PATCH v4 3/5] i386: Add CPUID bit for PCONFIG

2018-07-05 Thread Robert Hoo
PCONFIG: Platform configuration, enumerated by CPUID.(EAX=07H, ECX=0): EDX[bit18]. Signed-off-by: Robert Hoo --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 878b1ce..b83d0a9 100644 --

Re: [Qemu-devel] [PATCH 0/2] file-posix: Fix creation locking

2018-07-05 Thread Kevin Wolf
Am 04.07.2018 um 16:47 hat Max Reitz geschrieben: > This series fixes two bugs Kevin spotted in file-posix's creation > locking. Thanks, applied to the block branch. Kevin

[Qemu-devel] [PATCH v4 0/5] Add Icelake CPU model

2018-07-05 Thread Robert Hoo
This patch set defines the new guest CPU models of Icelake. The first patch defines new indices for IA32_PRED_CMD MSR (IBPB) and IA32_ARCH_CAPABILITIES MSR. Other patches add CPUID bits feature words for new features, like PCONFIG, WBNOINVD. The final patch defines Icelake-{Server,Client} CPU mod

Re: [Qemu-devel] [PATCH for-3.0 1/9] migration: simplify check to use qemu file buffer

2018-07-05 Thread Peter Xu
On Thu, Jul 05, 2018 at 10:01:09AM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > Firstly, renaming the old matching_page_sizes variable to > > matching_target_page_size, which suites more to what it did (it only > > checks against target page size rather than mult

[Qemu-devel] [PATCH v4 2/5] i386: Add CPUID bit and feature words for IA32_ARCH_CAPABILITIES MSR

2018-07-05 Thread Robert Hoo
Support of IA32_PRED_CMD MSR already be enumerated by same CPUID bit as SPEC_CTRL. At present, mark CPUID_7_0_EDX_ARCH_CAPABILITIES unmigratable, per Paolo's comment. Signed-off-by: Robert Hoo --- target/i386/cpu.c | 3 ++- target/i386/cpu.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-

[Qemu-devel] [PATCH 0/2] Let's not chisel --preconfig in stone without a user

2018-07-05 Thread Markus Armbruster
Please refer to PATCH 1 for rationale. Markus Armbruster (2): qapi: Do not expose "allow-preconfig" in query-qmp-schema cli qmp: Mark --preconfig, exit-preconfig experimental hmp.c | 2 +- qapi/introspect.json | 5 + qapi/misc.json | 6 +++--- qe

[Qemu-devel] [PATCH 2/2] cli qmp: Mark --preconfig, exit-preconfig experimental

2018-07-05 Thread Markus Armbruster
Committing to the current --preconfig / exit-preconfig interface before it has seen any use is premature. Mark both as experimental, the former in documentation, the latter by renaming it to x-exit-preconfig. See the previous commit for more detailed rationale. Signed-off-by: Markus Armbruster

[Qemu-devel] [PATCH 1/2] qapi: Do not expose "allow-preconfig" in query-qmp-schema

2018-07-05 Thread Markus Armbruster
According to commit 047f7038f58, option --preconfig [...] allows pausing QEMU in the new RUN_STATE_PRECONFIG state, allowing the configuration of QEMU from QMP before the machine jumps into board initialization code of machine_run_board_init() The intent is to allow management to

Re: [Qemu-devel] [PATCH 1/2] tests: add precopy multifd migration test with unix

2018-07-05 Thread Peter Xu
On Thu, Jul 05, 2018 at 01:30:16PM +0530, Balamuruhan S wrote: > multifd migration feature is in with commit: 35374cbdff, this patch > adds test for it using unix socket. > > Signed-off-by: Balamuruhan S Reviewed-by: Peter Xu -- Peter Xu

Re: [Qemu-devel] [PATCH for-3.0 2/9] migration: loosen recovery check when load vm

2018-07-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > We were checking against -EIO, assuming that it will cover all IO > failures. But actually it is not. One example is that in > qemu_loadvm_section_start_full() we can have tons of places that will > return -EINVAL even if the error is caused by IO failures

Re: [Qemu-devel] [PATCH 3/9] qapi: remove error checks for event emission

2018-07-05 Thread Peter Xu
On Thu, Jul 05, 2018 at 10:43:13AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > In the whole QAPI event emission code we're passing in an Error* object > > along the whole stack. That's never useful since it never fails after > > all. Remove that. > > > > Then, remove that parameter

[Qemu-devel] [PATCH v3] qcow2: add overlap check for bitmap directory

2018-07-05 Thread Vladimir Sementsov-Ogievskiy
If it appropriate for 3.0, let's push it. If not - then for 3.1 with fixed "since". Should I cc stable? v3: - update Qcow2OverlapCheckFlags in qapi/block-core.json [Max] v2: - squash 02 (indentation fix) to 01 - drop comment from qcow2_check_metadata_overlap() - set @ign to QCOW2_OL_BITMA

Re: [Qemu-devel] [PATCH v2 1/1] s390x/storage attributes: fix CMMA_BLOCK_SIZE usage

2018-07-05 Thread Cornelia Huck
On Mon, 2 Jul 2018 15:04:11 +0200 Claudio Imbrenda wrote: > The macro CMMA_BLOCK_SIZE was defined but not used, and a hardcoded > value was instead used in the code. > > This patch fixes the value of CMMA_BLOCK_SIZE and uses it in the > appropriate place in the code, and fixes another case of h

Re: [Qemu-devel] [PATCH 2/2] tests: add precopy multifd migration with fd protocol

2018-07-05 Thread Peter Xu
On Thu, Jul 05, 2018 at 01:30:17PM +0530, Balamuruhan S wrote: > This patch adds test for multifd migration feature with fd protocol. > > Signed-off-by: Balamuruhan S > --- > tests/migration-test.c | 57 > ++ > 1 file changed, 57 insertions(+) >

Re: [Qemu-devel] [PATCH v3 20/20] arm/virt: Add support for GICv2 virtualization extensions

2018-07-05 Thread Peter Maydell
On 5 July 2018 at 09:46, Luc Michel wrote: > Yes I encountered the same issue with Xen in SMP (see my cover letter). > Re-reading the GICv2 specs, it's now clear to me that a read to > ITARGETSR0 to ITARGETSR7 should return "the number of the processor > performing the read". Reading the message o

Re: [Qemu-devel] [PATCH for-3.0 2/9] migration: loosen recovery check when load vm

2018-07-05 Thread Peter Xu
On Thu, Jul 05, 2018 at 10:15:47AM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > We were checking against -EIO, assuming that it will cover all IO > > failures. But actually it is not. One example is that in > > qemu_loadvm_section_start_full() we can have tons

Re: [Qemu-devel] [PULL 00/14] qga patch queue for soft-freeze

2018-07-05 Thread Peter Maydell
On 3 July 2018 at 21:52, Michael Roth wrote: > Hi Peter, > > Sorry for the last-minute pull request. Most of these have been on the list > for a while now waiting to be applied. Please consider pulling these in. > > The following changes since commit b07cd3e748b3f27a17c27afeee578dc4eedb8dd5: > >

Re: [Qemu-devel] [PATCH for-3.0 4/9] tests: introduce migrate_postcopy_* helpers

2018-07-05 Thread Balamuruhan S
On Thu, Jul 05, 2018 at 11:17:50AM +0800, Peter Xu wrote: > Separate the old postcopy UNIX socket test into three steps, provide a > helper for each step. With these helpers, we can do more compliated > tests like postcopy recovery, while keep the codes shared. > > Signed-off-by: Peter Xu > ---

Re: [Qemu-devel] [PATCH for-3.0 3/9] migration: fix incorrect bitmap size calculation

2018-07-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > The calculation on size of received bitmap is incorrect for postcopy > recovery. Here we wanted to let the size to cover all the valid bits in > the bitmap, we should use DIV_ROUND_UP() instead of a division. > > For example, a RAMBlock with size=4K (which

Re: [Qemu-devel] [PATCH 4/9] monitor: move need_resume flag into monitor struct

2018-07-05 Thread Peter Xu
On Thu, Jul 05, 2018 at 10:51:33AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > It was put into the request object to show whether we'll need to resume > > the monitor after dispatching the command. Now we move that into the > > monitor struct so that it might be even used in other p

Re: [Qemu-devel] [PATCH v4 0/5] Add Icelake CPU model

2018-07-05 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1530781798-183214-1-git-send-email-robert...@linux.intel.com Subject: [Qemu-devel] [PATCH v4 0/5] Add Icelake CPU model === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 t

Re: [Qemu-devel] ?==?utf-8?q? [PATCH v3 2/8] target/mips: Workaround for checkpatch.pl hanging on msa_helper.c

2018-07-05 Thread Aleksandar Markovic
> Hi Aleksandar, > > On 07/04/2018 04:30 PM, Aleksandar Markovic wrote: > > From: Aleksandar Markovic > > > > If checkpatch.pl is applied (using switch "-f") on file > > target/mips/msa_helper.c, it will hang. > > > > This is a workaround by correcting the source file. The workaround is > > found

Re: [Qemu-devel] [PATCH for-3.0 4/9] tests: introduce migrate_postcopy_* helpers

2018-07-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Separate the old postcopy UNIX socket test into three steps, provide a > helper for each step. With these helpers, we can do more compliated > tests like postcopy recovery, while keep the codes shared. > > Signed-off-by: Peter Xu > --- > tests/migration-t

Re: [Qemu-devel] ?==?utf-8?q? [PATCH v3 3/8] target/mips: Update some CP0 registers bit definitions

2018-07-05 Thread Aleksandar Markovic
Hi, Philippe! I truly appreciate your review. > > #define CP0C5_EVA 28 > > #define CP0C5_MSAEn 27 > > +#define CP0C5_PMJ2 25 > > +#define CP0C5_PMJ1 24 > > +#define CP0C5_PMJ0 23 > > Why not use: > > #define CP0C5_PMJ 23 /* 25..23 */ > I now think that the way you suggested here is better, and w

Re: [Qemu-devel] [PATCH 4/8] xen: Remove useless casts

2018-07-05 Thread Anthony PERARD
On Wed, Jul 04, 2018 at 12:39:15PM -0300, Philippe Mathieu-Daudé wrote: > Patch created mechanically by rerunning: > > $ spatch --sp-file scripts/coccinelle/typecast.cocci \ > --macro-file scripts/cocci-macro-file.h \ > --dir . --in-place > > Signed-off-by: Philippe Mat

Re: [Qemu-devel] ?==?utf-8?q? [PATCH v3 5/8] target/mips: Add CP0 BadInstrX register

2018-07-05 Thread Aleksandar Markovic
Hi, Philippe! > > @@ -6711,6 +6720,11 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, > > int reg, int sel) > > gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_BadInstrP)); > > rn = "BadInstrP"; > > break; > > + case 3: > > + CP0_CHECK(ctx->bi); > > + gen_mfc0_load32(arg, offsetof(CPUMIPSSt

Re: [Qemu-devel] ?==?utf-8?q? [PATCH v3 7/8] target/mips: Don't update BadVAddr register in Debug Mode

2018-07-05 Thread Aleksandar Markovic
> > > > Signed-off-by: Yongbok Kim > > Signed-off-by: Aleksandar Markovic > > Reviewed-by: Philippe Mathieu-Daudé > > Watch out in > http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg06407.html I >used another email: > > Reviewed-by: Philippe Mathieu-Daudé Will be corrected in v4.

Re: [Qemu-devel] [PATCH 4/8] xen: Remove useless casts

2018-07-05 Thread Peter Maydell
On 4 July 2018 at 16:39, Philippe Mathieu-Daudé wrote: > Patch created mechanically by rerunning: > > $ spatch --sp-file scripts/coccinelle/typecast.cocci \ > --macro-file scripts/cocci-macro-file.h \ > --dir . --in-place > > Signed-off-by: Philippe Mathieu-Daudé > ---

Re: [Qemu-devel] [PATCH for-3.0 5/9] tests: allow migrate() to take extra flags

2018-07-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > For example, we can pass in '"resume": true' to resume a migration. > > Signed-off-by: Peter Xu OK, it's a little odd, I wondered whether it would be better just to pass the whole arguments string in, but that makes it more work for hte claler to do the fo

Re: [Qemu-devel] [PATCH] block/crypto: Simplify block_crypto_co_create_opts_luks to avoid a memory leak

2018-07-05 Thread Kevin Wolf
Am 04.07.2018 um 17:02 hat Philippe Mathieu-Daudé geschrieben: > After 1ec4f4160a1 Coverity reported: > > Variable cryptoopts going out of scope leaks the storage it points to. > > Fixes: Coverity CID 1393782 (Resource leak) > Signed-off-by: Philippe Mathieu-Daudé I already sent a much simple

Re: [Qemu-devel] [PATCH for-3.0 6/9] tests: introduce migrate_query*() helpers

2018-07-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Introduce helpers to query migration states and use it. > > Signed-off-by: Peter Xu > --- > tests/migration-test.c | 64 -- > 1 file changed, 43 insertions(+), 21 deletions(-) > > diff --git a/tests/migration-test.c

Re: [Qemu-devel] [PULL 00/14] QAPI patches for 2018-07-03

2018-07-05 Thread Peter Maydell
On 3 July 2018 at 22:05, Markus Armbruster wrote: > The following changes since commit b07cd3e748b3f27a17c27afeee578dc4eedb8dd5: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.0-20180703' > into staging (2018-07-03 14:59:27 +0100) > > are available in the Git repository at: >

[Qemu-devel] [PULL v2 01/12] qemu-img: allow compressed not-in-order writes

2018-07-05 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy No reason to forbid them, and they are needed to improve performance with compress-threads in further patches. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf --- qemu-img.c | 5 - 1 file changed, 5 deletions(-) diff --git a/qemu-i

[Qemu-devel] [PULL v2 02/12] qcow2: refactor data compression

2018-07-05 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Make a separate function for compression to be parallelized later. - use .avail_out field instead of .next_out to calculate size of compressed data. It looks more natural and it allows to keep dest to be void pointer - set avail_out to be at least one by

[Qemu-devel] [PULL v2 04/12] block: Move two block permission constants to the relevant enum

2018-07-05 Thread Kevin Wolf
From: Ari Sundholm This allows using the two constants outside of block.c, which will happen in a subsequent patch. Signed-off-by: Ari Sundholm Signed-off-by: Kevin Wolf --- include/block/block.h | 7 +++ block.c | 6 -- 2 files changed, 7 insertions(+), 6 deletions(-)

[Qemu-devel] [PULL v2 05/12] block: Add blklogwrites

2018-07-05 Thread Kevin Wolf
From: Aapo Vienamo Implements a block device write logging system, similar to Linux kernel device mapper dm-log-writes. The write operations that are performed on a block device are logged to a file or another block device. The write log format is identical to the dm-log-writes format. Currently,

[Qemu-devel] [PULL v2 00/12] Block layer patches

2018-07-05 Thread Kevin Wolf
The following changes since commit fe8d2d5737ab20ed0118863f5eb888cae37122ab: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging (2018-07-04 22:38:10 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstrea

[Qemu-devel] [PULL v2 10/12] block/blklogwrites: Add an option for the update interval of the log superblock

2018-07-05 Thread Kevin Wolf
From: Ari Sundholm This is a way to ensure that the log superblock is periodically updated. Before, this was only done on flush requests, which may not be enough if the VM exits abnormally, omitting the final flush. The default interval is 4096 write requests. Signed-off-by: Ari Sundholm Signe

[Qemu-devel] [PULL v2 11/12] file-posix: Fix creation locking

2018-07-05 Thread Kevin Wolf
From: Max Reitz raw_apply_lock_bytes() takes a bit mask of "permissions that are NOT shared". Also, make the "perm" and "shared" variables uint64_t, because I do not particularly like using ~ on signed integers (and other permission masks are usually uint64_t, too). Reported-by: Kevin Wolf Sig

[Qemu-devel] [PULL v2 08/12] block/blklogwrites: Change log_sector_size from int64_t to uint64_t

2018-07-05 Thread Kevin Wolf
From: Ari Sundholm This was a simple oversight when working on intermediate versions of the original patch which introduced blklogwrites. Signed-off-by: Ari Sundholm Signed-off-by: Kevin Wolf --- block/blklogwrites.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/

Re: [Qemu-devel] [PATCH for-3.0 7/9] tests: introduce wait_for_migration_status()

2018-07-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > It's generalized from wait_for_migration_complete() to allow us to wait > for any migration status besides failure. > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > tests/migration-test.c | 10 -- > 1 file changed, 8 inser

[Qemu-devel] [PULL v2 03/12] qcow2: add compress threads

2018-07-05 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Do data compression in separate threads. This significantly improve performance for qemu-img convert with -W (allow async writes) and -c (compressed) options. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf --- block/qcow2.h | 3 +++ b

[Qemu-devel] [PULL v2 09/12] block/blklogwrites: Add an option for appending to an old log

2018-07-05 Thread Kevin Wolf
From: Ari Sundholm Suggested by Kevin Wolf. May be useful when testing multiple batches of writes or doing long-term testing involving restarts of the VM. Signed-off-by: Ari Sundholm Signed-off-by: Kevin Wolf --- qapi/block-core.json | 3 +- block/blklogwrites.c | 147 ++

[Qemu-devel] [PULL v2 12/12] file-posix: Unlock FD after creation

2018-07-05 Thread Kevin Wolf
From: Max Reitz Closing the FD does not necessarily mean that it is unlocked. Fix this by relinquishing all permission locks before qemu_close(). Reported-by: Kevin Wolf Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/file-posix.c | 17 ++--- 1 file changed, 14 inse

Re: [Qemu-devel] [PATCH] target/arm: Forbid unprivileged mode for M Baseline

2018-07-05 Thread Peter Maydell
On 4 July 2018 at 21:36, Julia Suvorova wrote: > MSR handling is the only place where CONTROL.nPRIV is modified. > > Signed-off-by: Julia Suvorova > --- > target/arm/helper.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/target/arm/helper.c b/target/arm/helper.c

[Qemu-devel] [PULL v2 07/12] block/crypto: Fix memory leak in create error path

2018-07-05 Thread Kevin Wolf
Fixes: Coverity CID 1393782 Signed-off-by: Kevin Wolf Reviewed-by: Daniel P. Berrangé --- block/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/crypto.c b/block/crypto.c index 994172a3de..146d81c90a 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -551,7 +55

Re: [Qemu-devel] [PATCH for-3.0 9/9] tests: hide stderr for postcopy recovery test

2018-07-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > We dumped something when network failure happens. We should avoid those > messages to be dumped when running the tests: > > $ ./tests/migration-test -p /x86_64/migration/postcopy/recovery > /x86_64/migration/postcopy/recovery: qemu-system-x86_64: > che

[Qemu-devel] [PULL v2 06/12] block: Don't silently truncate node names

2018-07-05 Thread Kevin Wolf
If the user passes a too long node name string, we silently truncate it to fit into BlockDriverState.node_name, i.e. to 31 characters. Apart from surprising the user when the node has a different name than requested, this also bypasses the check for duplicate names, so that the same name can be ass

[Qemu-devel] [PATCH v3 1/1] s390x/storage attributes: fix CMMA_BLOCK_SIZE usage

2018-07-05 Thread Claudio Imbrenda
The macro CMMA_BLOCK_SIZE was defined but not used, and a hardcoded value was instead used in the code. This patch fixes the value of CMMA_BLOCK_SIZE and uses it in the appropriate place in the code, and fixes another case of hardcoded value in the KVM backend, replacing it with the more appropria

Re: [Qemu-devel] [PATCH for-3.0 8/9] tests: add postcopy recovery test

2018-07-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Test the postcopy recovery procedure by emulating a network failure > using migrate-pause command. > > Signed-off-by: Peter Xu OK, that's nice. Reviewed-by: Dr. David Alan Gilbert > --- > tests/migration-test.c | 71 +++

Re: [Qemu-devel] [PATCH v3] qcow2: add overlap check for bitmap directory

2018-07-05 Thread Kevin Wolf
Am 05.07.2018 um 11:21 hat Vladimir Sementsov-Ogievskiy geschrieben: > If it appropriate for 3.0, let's push it. If not - then for 3.1 > with fixed "since". Should I cc stable? > > v3: - update Qcow2OverlapCheckFlags in qapi/block-core.json [Max] > > v2: - squash 02 (indentation fix) to 01 >

Re: [Qemu-devel] [PATCH] target/arm: Forbid unprivileged mode for M Baseline

2018-07-05 Thread Julia Suvorova via Qemu-devel
On 05.07.2018 13:33, Peter Maydell wrote: On 4 July 2018 at 21:36, Julia Suvorova wrote: MSR handling is the only place where CONTROL.nPRIV is modified. Signed-off-by: Julia Suvorova --- target/arm/helper.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/ar

[Qemu-devel] [PATCH V3] qemu-img: align result of is_allocated_sectors

2018-07-05 Thread Peter Lieven
We currently don't enforce that the sparse segments we detect during convert are aligned. This leads to unnecessary and costly read-modify-write cycles either internally in Qemu or in the background on the storage device as nearly all modern filesystems or hardware have a 4k alignment internally.

Re: [Qemu-devel] [PATCH 1/2] nvic: Handle ARMv6-M SCS reserved registers

2018-07-05 Thread Peter Maydell
On 4 July 2018 at 20:58, Julia Suvorova wrote: > Handle SCS reserved registers listed in ARMv6-M ARM D3.6.1. > All reserved registers are RAZ/WI. > > Signed-off-by: Julia Suvorova > --- > hw/intc/armv7m_nvic.c | 69 +++ > 1 file changed, 57 insertions(+),

Re: [Qemu-devel] [PATCH] kvm: x86: Add support for -machine split-lock-ac

2018-07-05 Thread Paolo Bonzini
On 04/07/2018 19:52, Eduardo Habkost wrote: >> (Robert, does IceLake have this feature? If so, we cannot create the >> CPU model until everything is in place). > I don't think we need to block the CPU model because QEMU+KVM > doesn't support some features yet, as long as kernel versions > capable

Re: [Qemu-devel] [PATCH for-3.0 6/9] tests: introduce migrate_query*() helpers

2018-07-05 Thread Balamuruhan S
On Thu, Jul 05, 2018 at 11:17:52AM +0800, Peter Xu wrote: > Introduce helpers to query migration states and use it. > > Signed-off-by: Peter Xu Looks good to me. Reviewed-by: Balamuruhan S > --- > tests/migration-test.c | 64 -- > 1 file changed, 43 ins

Re: [Qemu-devel] [PATCH v2 2/9] block: Use BdrvChild to discard

2018-07-05 Thread Kevin Wolf
Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben: > Other I/O functions are already using a BdrvChild pointer in the API, so > make discard do the same. It makes it possible to initiate the same > permission checks before doing I/O, and much easier to share the > helper functions for this, which wi

Re: [Qemu-devel] [PATCH] migration: release MigrationIncomingState in migration_object_finalize

2018-07-05 Thread Dr. David Alan Gilbert
* Lidong Chen (jemmy858...@gmail.com) wrote: > Qemu initialize the MigrationIncomingState structure in migration_object_init, > but not release it. this patch release it in migration_object_finalize. > > Signed-off-by: Lidong Chen Reviewed-by: Dr. David Alan Gilbert > --- > migration/migratio

Re: [Qemu-devel] [PATCH v2 1/9] block: Add copy offloading trace points

2018-07-05 Thread Kevin Wolf
Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben: > A few trace points that can help reveal what is happening in a copy > offloading I/O path. > > Signed-off-by: Fam Zheng > --- > block/file-posix.c | 2 ++ > block/io.c | 2 ++ > block/iscsi.c | 3 +++ > block/trace-events | 6 +

  1   2   3   4   >