[Qemu-devel] [Bug 1708551] Re: macOS Guest Reading USB 3.0 Bus as USB 2.0

2017-08-07 Thread Thomas Huth
** Changed in: qemu Status: Incomplete => Triaged -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1708551 Title: macOS Guest Reading USB 3.0 Bus as USB 2.0 Status in QEMU: Triaged Bug

[Qemu-devel] [Bug 1709025] Re: Disk corrupted after snapshot deletion

2017-08-07 Thread Thomas Huth
Please try again with the latest release of QEMU first (currently 2.9, or the latest RC of 2.10). QEMU 2.1.2 is very old, the bug might have been fixed in the latest release already. ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a

Re: [Qemu-devel] [Bug 1708551] Re: macOS Guest Reading USB 3.0 Bus as USB 2.0

2017-08-07 Thread Divine E
In doing so, the device is now unseen by the system. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1708551 Title: macOS Guest Reading USB 3.0 Bus as USB 2.0 Status in QEMU: Incomplete Bug

Re: [Qemu-devel] [PATCH] tests/pxe: Check virtio-net-ccw on s390x

2017-08-07 Thread Thomas Huth
On 07.08.2017 22:35, Michael S. Tsirkin wrote: > On Thu, Aug 03, 2017 at 03:30:19PM +0200, Thomas Huth wrote: >> Now that we've got a firmware that can do TFTP booting on s390x (i.e. >> the pc-bios/s390-netboot.img), we can enable the PXE tester for this >> architecture, too. >> >> Signed-off-by:

Re: [Qemu-devel] [Qemu-block] [PATCH] block: document semanatics of bdrv_co_preadv|pwritev

2017-08-07 Thread Fam Zheng
On Fri, 08/04 16:49, Daniel P. Berrange wrote: > This is odd. In the bdrv_aligned_readv() it looks very much like > we'll reference qiov->niov, if bytes != 0, so if qiov was NULL we > would crash. It doesn't make sense if read doesn't have an iov, where should the data be placed? :) > > In

[Qemu-devel] Howto: instructing patchew about patch dependency

2017-08-07 Thread Fam Zheng
Hi, QEMU patch submitters, I've patched patchew so that if you add a line: Based-on: $MESSAGE_ID in your cover letter body, or in a reply to it (or reply to reply), patchew will try to apply your series on top of the one $MESSAGE_ID refers to, assuming the base series _was_ successfully applied

Re: [Qemu-devel] [PATCH f0r 2.11] runstate/migrate: Two more transitions

2017-08-07 Thread Peter Xu
On Mon, Aug 07, 2017 at 01:25:29PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Fri, Aug 04, 2017 at 06:50:11PM +0100, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > There's a race if someone

Re: [Qemu-devel] [RFC PATCH 29/56] block: Make BlockDirtyInfo byte count unsigned in QAPI/QMP

2017-08-07 Thread John Snow
On 08/07/2017 10:45 AM, Markus Armbruster wrote: > Byte counts should use QAPI type 'size' (uint64_t). BlockDirtyInfo > member @count is 'int' (int64_t). bdrv_query_dirty_bitmaps() computes > @count from bdrv_get_dirty_count() in uint64_t, then implicitly > converts to int64_t. Before the

Re: [Qemu-devel] [RFC PATCH 28/56] block: Widen dirty bitmap granularity to uint64_t for safety

2017-08-07 Thread John Snow
On 08/07/2017 10:45 AM, Markus Armbruster wrote: > Block dirty bitmaps represent granularity in bytes as uint32_t. It > must be a power of two and a multiple of BDRV_SECTOR_SIZE. > > The trouble with uint32_t is computations like this one in > mirror_do_read(): > > uint64_t max_bytes; >

Re: [Qemu-devel] [RFC PATCH 27/56] block/dirty-bitmap: Clean up signed vs. unsigned dirty counts

2017-08-07 Thread John Snow
On 08/07/2017 10:45 AM, Markus Armbruster wrote: > hbitmap_count() returns uint64_t. > > Clean up test-hbitmap.c to check its value with g_assert_cmpuint() > instead of g_assert_cmpint(). > > bdrv_get_dirty_count() and bdrv_get_meta_dirty_count() return its > value converted to int64_t. Clean

Re: [Qemu-devel] About virtio device hotplug in Q35! 【外域邮件.谨慎查阅】

2017-08-07 Thread Bob Chen
1. How to test the KVM exit rate? 2. The switches are separate devices of PLX Technology # lspci -s 07:08.0 -nn 07:08.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch [10b5:8747] (rev ca) # This is one of the Root Ports in the system.

Re: [Qemu-devel] [PATCH for 2.10 v3 4/6] docker: docker.py make --no-cache skip checksum test

2017-08-07 Thread Fam Zheng
On Mon, 08/07 16:39, Alex Bennée wrote: > If you invoke with NOCACHE=1 we pass --no-cache in the argv to > docker.py but may still not force a rebuild if the dockerfile checksum > hasn't changed. By testing for its presence we can force builds > without having to manually remove the docker image.

Re: [Qemu-devel] [PATCH for 2.10 v3 1/6] docker: ensure NOUSER for travis images

2017-08-07 Thread Fam Zheng
On Mon, 08/07 16:39, Alex Bennée wrote: > While adding the current user is a useful default behaviour for > creating new images it is not appropriate for Travis which already has > a default user. Target docker-travis@travis will not have NOUSER=1 automatically, right? Is that a problem? Fam >

[Qemu-devel] [Bug 1709025] Re: Disk corrupted after snapshot deletion

2017-08-07 Thread junchi
My qemu version is 2.1.2 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1709025 Title: Disk corrupted after snapshot deletion Status in QEMU: New Bug description: I found the vm disk

[Qemu-devel] [PATCH] target/i386: set rip_offset for some SSE4.1 instructions

2017-08-07 Thread Joseph Myers
When emulating various SSE4.1 instructions such as pinsrd, the address of a memory operand is computed without allowing for the 8-bit immediate operand located after the memory operand, meaning that the memory operand uses the wrong address in the case where it is rip-relative. This patch adds

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.10] block/nfs: fix mutex assertion in nfs_file_close()

2017-08-07 Thread John Snow
On 08/07/2017 06:29 PM, Jeff Cody wrote: > Commit c096358e747e88fc7364e40e3c354ee0bb683960 introduced assertion > checks for when qemu_mutex() functions are called without the > corresponding qemu_mutex_init() having initialized the mutex. > > This uncovered a latent bug in qemu's nfs driver -

[Qemu-devel] [PATCH 18/22] translate-all: protect TB jumps with a per-destination-TB lock

2017-08-07 Thread Emilio G. Cota
This applies to both user-mode and !user-mode emulation. Instead of relying on a global lock, protect the list of incoming jumps with tb->jmp_lock. In order to find the destination TB (and therefore its jmp_lock) from the origin TB, we introduce tb->jmp_dest[]. This results in TranslationBlock

Re: [Qemu-devel] [Qemu-block] [PATCH v3 for-2.10 0/4] improved --version/--help tweaks

2017-08-07 Thread John Snow
On 08/03/2017 12:33 PM, Eric Blake wrote: > Not sure if this should go through Kevin's block tree, Paolo's > miscellaneous patches, or if I should just do a pull request > myself (since patch 4 includes a change to qemu-nbd) > > since v2: add R-b on 2-4; also sort 'qemu-img --help' create text

[Qemu-devel] [PATCH 22/22] tcg: remove tb_lock

2017-08-07 Thread Emilio G. Cota
Use mmap_lock in user-mode to protect TCG state and the page descriptors. In !user-mode, each vCPU has its own TCG state, so no locks needed. Per-page locks are used to protect the page descriptors. Per-TB locks are used in both modes to protect TB jumps. Some notes: -

[Qemu-devel] [PATCH 07/22] tcg: track TBs with per-region BST's

2017-08-07 Thread Emilio G. Cota
This paves the way for enabling scalable parallel generation of TCG code. Instead of tracking TBs with a single binary search tree (BST), use a BST for each TCG region, protecting it with a lock. This is as scalable as it gets, since each TCG thread operates on a separate region. The core of

[Qemu-devel] [PATCH 17/22] translate-all: discard TB when tb_link_page returns an existing matching TB

2017-08-07 Thread Emilio G. Cota
Use the recently-gained QHT feature of returning the matching TB if it already exists. This allows us to get rid of the lookup we perform right after acquiring tb_lock. Suggested-by: Richard Henderson Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c

Re: [Qemu-devel] tb_invalidate_phys_range and tb_invalidate_phys_page_range

2017-08-07 Thread Emilio G. Cota
On Sat, Jul 29, 2017 at 10:23:42 +0100, Peter Maydell wrote: > On 29 July 2017 at 01:33, Emilio G. Cota wrote: (snip) > > +void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end, > > + int is_cpu_write_access) > > +{ > > +while

[Qemu-devel] [PATCH 21/22] translate-all: remove tb_lock mention from cpu_restore_state_from_tb

2017-08-07 Thread Emilio G. Cota
tb_lock was needed when the function did retranslation. However, since fca8a500d519 ("tcg: Save insn data and use it in cpu_restore_state_from_tb") we don't do retranslation. Get rid of the comment. Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 4 +--- 1 file

[Qemu-devel] [PATCH 16/22] translate-all: use per-page locking in !user-mode

2017-08-07 Thread Emilio G. Cota
Groundwork for supporting parallel TCG generation. Instead of using a global lock (tb_lock) to protect changes to pages, use fine-grained, per-page locks in !user-mode. User-mode stays with mmap_lock. Sometimes changes need to happen atomically on more than one page (e.g. when a TB that spans

[Qemu-devel] [PATCH 15/22] translate-all: move tb_invalidate_phys_page_range up in the file

2017-08-07 Thread Emilio G. Cota
This greatly simplifies next commit's diff. Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 77 --- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c

[Qemu-devel] [PATCH 19/22] cputlb: remove tb_lock from tlb_flush functions

2017-08-07 Thread Emilio G. Cota
The acquisition of tb_lock was added when the async tlb_flush was introduced in e3b9ca810 ("cputlb: introduce tlb_flush_* async work.") tb_lock was there to allow us to do memset() on the tb_jmp_cache's. However, since f3ced3c5928 ("tcg: consistently access cpu->tb_jmp_cache atomically") all

[Qemu-devel] [PATCH 14/22] translate-all: work page-by-page in tb_invalidate_phys_range_1

2017-08-07 Thread Emilio G. Cota
So that we pass a same-page range to tb_invalidate_phys_page_range, instead of always passing an end address that could be on a different page. As discussed with Peter Maydell on the list, tb_invalidate_phys_page_range doesn't actually do much with 'end', which explains why we have never hit a

[Qemu-devel] [PATCH 05/22] qht: require a default comparison function

2017-08-07 Thread Emilio G. Cota
qht_lookup now uses the default cmp function. qht_lookup_custom is defined to retain the old behaviour, that is a cmp function is explicitly provided. qht_insert will gain use of the default cmp in the next patch. Signed-off-by: Emilio G. Cota --- include/qemu/qht.h| 23

[Qemu-devel] [PATCH 12/22] translate-all: make l1_map lockless

2017-08-07 Thread Emilio G. Cota
Groundwork for supporting parallel TCG generation. We never remove entries from the radix tree, so we can use cmpxchg to implement lockless insertions. Signed-off-by: Emilio G. Cota --- docs/devel/multi-thread-tcg.txt | 4 ++-- accel/tcg/translate-all.c | 24

[Qemu-devel] [PATCH 13/22] translate-all: remove hole in PageDesc

2017-08-07 Thread Emilio G. Cota
Groundwork for supporting parallel TCG generation. Move the hole to the end of the struct, so that a u32 field can be added there without bloating the struct. Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Qemu-devel] [PATCH 20/22] exec: remove tb_lock from notdirty_mem_write

2017-08-07 Thread Emilio G. Cota
By passing a locked page_collection to tb_invalidate_phys_page_fast. Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.h | 3 ++- accel/tcg/translate-all.c | 8 exec.c| 11 +-- 3 files changed, 11 insertions(+), 11 deletions(-)

[Qemu-devel] [PATCH 06/22] qht: return existing entry when qht_insert fails

2017-08-07 Thread Emilio G. Cota
The meaning of "existing" is now changed to "matches in hash and ht->cmp result". This is saner than just checking the pointer value. Note that we now return NULL on insertion success, or the existing pointer on failure. We can do this because NULL pointers are not allowed to be inserted in QHT.

[Qemu-devel] [PATCH 08/22] tcg: move tb_ctx.tb_phys_invalidate_count to tcg_ctx

2017-08-07 Thread Emilio G. Cota
Thereby making it per-TCGContext. Once we remove tb_lock, this will avoid an atomic increment every time a TB is invalidated. Signed-off-by: Emilio G. Cota --- include/exec/tb-context.h | 1 - tcg/tcg.h | 3 +++ accel/tcg/translate-all.c | 5 +++-- tcg/tcg.c

[Qemu-devel] [PATCH 11/22] translate-all: exit from tb_phys_invalidate if qht_remove fails

2017-08-07 Thread Emilio G. Cota
Groundwork for supporting parallel TCG generation. Once tb_lock goes away, it is conceivable that two (or more) threads might race while invalidating the same TB. We currently do not check for this, which means we would wrongly invalidate the same TB more than once. Fix this by using qht_remove

[Qemu-devel] [PATCH 01/22] disas/arm: fix 'instuction' typo in comment

2017-08-07 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- disas/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disas/arm.c b/disas/arm.c index 27396dd..a08bbbe 100644 --- a/disas/arm.c +++ b/disas/arm.c @@ -1651,7 +1651,7 @@ print_insn_coprocessor (bfd_vma pc, struct

[Qemu-devel] [PATCH 10/22] translate-all: iterate over TBs in a page with page_for_each_tb

2017-08-07 Thread Emilio G. Cota
This commit does several things, but to avoid churn I merged them all into the same commit. To wit: - Use uintptr_t instead of TranslationBlock * for the list of TBs in a page. Just like we did in (c37e6d7e "tcg: Use uintptr_t type for jmp_list_{next|first} fields of TB"), the rationale is

[Qemu-devel] [PATCH 03/22] translate-all: fix 'consisits' typo in comment

2017-08-07 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index db3d42c..fe3388a 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@

[Qemu-devel] [PATCH 00/22] tcg: tb_lock removal

2017-08-07 Thread Emilio G. Cota
This series applies on top of the "multiple TCG contexts" series, v4: https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg06769.html Highlights: - First, fix a few typos I encountered while working on this (patches 1-3). I could send them separately to qemu-trivial if you prefer. - QHT:

[Qemu-devel] [PATCH 02/22] linux-user: fix 'finshed' typo in comment

2017-08-07 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index bbf7913..b1e993f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6231,7 +6231,7 @@ static

[Qemu-devel] [PATCH 04/22] qht: fix kernel-doc markup in qht.h

2017-08-07 Thread Emilio G. Cota
While at it, s/stuct/struct/. Signed-off-by: Emilio G. Cota --- include/qemu/qht.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/qht.h b/include/qemu/qht.h index 56c2c77..531aa95 100644 --- a/include/qemu/qht.h +++ b/include/qemu/qht.h @@

[Qemu-devel] [PATCH 09/22] translate-all: introduce iterator macros for tagged TB lists

2017-08-07 Thread Emilio G. Cota
These will soon gain a couple of users. Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 8f6f8f1..396c10c 100644 ---

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.10 0/5] block: bdrv_reopen() fixes

2017-08-07 Thread John Snow
On 08/03/2017 11:02 AM, Kevin Wolf wrote: > This is the first part of some fixes to bdrv_reopen(), which seems > reasonable enough to merge for 2.10. > > There is much more wrong with bdrv_reopen() currently, especially with > respect to op blocker permissions (basically the required

Re: [Qemu-devel] [Qemu-block] [PATCH 3/4] qcow2: Drop debugging dump_refcounts()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:06PM -0500, Eric Blake wrote: > It's been #if 0'd since its introduction in 2006, commit 585f8587. > We can revive dead code if we need it, but in the meantime, it has > bit-rotted (for example, not checking for failure in bdrv_getlength()). > > Signed-off-by: Eric

Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:05PM -0500, Eric Blake wrote: > This also requires changing the return type of get_cluster_offset() > and adjusting all callers. > > Use osdep.h macros instead of open-coded rounding while in the > area. > > Reported-by: Markus Armbruster >

Re: [Qemu-devel] [Qemu-block] [PATCH 4/4] qcow2: Check failure of bdrv_getlength()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:07PM -0500, Eric Blake wrote: > qcow2_co_pwritev_compressed() should not call bdrv_truncate() > if determining the size failed. > > Reported-by: Markus Armbruster > Signed-off-by: Eric Blake Reviewed-by: Jeff Cody

Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:05PM -0500, Eric Blake wrote: > This also requires changing the return type of get_cluster_offset() > and adjusting all callers. > > Use osdep.h macros instead of open-coded rounding while in the > area. > > Reported-by: Markus Armbruster >

Re: [Qemu-devel] [Qemu-block] [PATCH 1/4] vpc: Check failure of bdrv_getlength()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:04PM -0500, Eric Blake wrote: > vpc_open() was checking for bdrv_getlength() failure in one, but > not the other, location. > > Reported-by: Markus Armbruster > Signed-off-by: Eric Blake > --- > block/vpc.c | 9 - > 1

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/8] memory.h: Move MemTxResult type to memattrs.h

2017-08-07 Thread Alistair Francis
On Fri, Aug 4, 2017 at 5:59 PM, Edgar E. Iglesias wrote: > On Fri, Aug 04, 2017 at 06:20:42PM +0100, Peter Maydell wrote: >> Move the MemTxResult type to memattrs.h. We're going to want to >> use it in cpu/qom.h, which doesn't want to include all of >> memory.h. In

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.10 0/4] More blk_getlength() fixes

2017-08-07 Thread John Snow
On 08/07/2017 04:30 PM, Eric Blake wrote: > Thanks again to Markus for catching these spots. > > Eric Blake (4): > vpc: Check failure of bdrv_getlength() > qcow: Check failure of bdrv_getlength() and bdrv_truncate() > qcow2: Drop debugging dump_refcounts() > qcow2: Check failure of

[Qemu-devel] [PATCH for-2.10] block/nfs: fix mutex assertion in nfs_file_close()

2017-08-07 Thread Jeff Cody
Commit c096358e747e88fc7364e40e3c354ee0bb683960 introduced assertion checks for when qemu_mutex() functions are called without the corresponding qemu_mutex_init() having initialized the mutex. This uncovered a latent bug in qemu's nfs driver - in nfs_client_close(), the NFSClient structure is

Re: [Qemu-devel] [PATCH for-2.11 0/5] qmp-shell non-interactive mode, delete scripts/qmp/qmp

2017-08-07 Thread John Snow
On 08/04/2017 05:36 PM, Eduardo Habkost wrote: > This series adds the ability to run QMP commands > non-interactively to qmp-shell, and deletes scripts/qmp/qmp. > > Eduardo Habkost (5): > qmp-shell: Use argparse module > qmp-shell: Pass split cmdargs to __build_cmd() > qmp-shell:

Re: [Qemu-devel] [PULL 1/2] hw/i386: allow SHPC for Q35 machine

2017-08-07 Thread Michael S. Tsirkin
On Tue, Aug 08, 2017 at 12:40:08AM +0300, Michael S. Tsirkin wrote: > From: Aleksandr Bezzubikov > > Unmask previously masked SHPC feature in _OSC method. > > Signed-off-by: Aleksandr Bezzubikov > Reviewed-by: Marcel Apfelbaum >

[Qemu-devel] [PULL 2/2] cpu: add APIs to allocate/free CPU environment

2017-08-07 Thread Michael S. Tsirkin
These will be implemented and then used by follow-up patches. Signed-off-by: Michael S. Tsirkin --- include/qom/cpu.h | 31 +++ qom/cpu.c | 34 ++ 2 files changed, 65 insertions(+) diff --git

[Qemu-devel] [PULL 1/2] hw/i386: allow SHPC for Q35 machine

2017-08-07 Thread Michael S. Tsirkin
From: Aleksandr Bezzubikov Unmask previously masked SHPC feature in _OSC method. Signed-off-by: Aleksandr Bezzubikov Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[Qemu-devel] [PULL 0/2] virtio: fix for rc2

2017-08-07 Thread Michael S. Tsirkin
The following changes since commit e6a74868d92f858ac33915b6772999d7de2fd288: build-sys: add --disable-vhost-user (2017-08-03 15:55:41 +0300) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to

Re: [Qemu-devel] [PATCH for-2.10] throttle: Make LeakyBucket.avg and LeakyBucket.max integer types

2017-08-07 Thread Eric Blake
On 08/07/2017 11:15 AM, Alberto Garcia wrote: > Both the throttling limits set with the throttling.iops-* and > throttling.bps-* options and their QMP equivalents defined in the > BlockIOThrottle struct are integer values. > > Those limits are also reported in the BlockDeviceInfo struct and they

Re: [Qemu-devel] [Qemu-arm] [PATCH 2/2] loader: Ignore zero-sized ELF segments

2017-08-07 Thread Philippe Mathieu-Daudé
On 08/07/2017 11:39 AM, Peter Maydell wrote: Some ELF files have program headers that specify segments that are of zero size. Ignore them, rather than trying to create zero-length ROM blobs for them, because the zero-length blob can falsely trigger the overlapping-ROM-blobs check.

Re: [Qemu-devel] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-08-07 Thread Philippe Mathieu-Daudé
On 08/07/2017 05:30 PM, Eric Blake wrote: This also requires changing the return type of get_cluster_offset() and adjusting all callers. Use osdep.h macros instead of open-coded rounding while in the area. Reported-by: Markus Armbruster Signed-off-by: Eric Blake

Re: [Qemu-devel] [PATCH 4/4] qcow2: Check failure of bdrv_getlength()

2017-08-07 Thread Philippe Mathieu-Daudé
On 08/07/2017 05:30 PM, Eric Blake wrote: qcow2_co_pwritev_compressed() should not call bdrv_truncate() if determining the size failed. Reported-by: Markus Armbruster Signed-off-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé ---

[Qemu-devel] [Bug 1709170] [NEW] QEMU fails to honor O_TMPFILE

2017-08-07 Thread Thiago Macieira
Public bug reported: When making a call like open("/tmp", O_TMPFILE | O_RDWR); under QEMU, we ged -EISDIR. Under any kernel 3.11 or later, we are supposed to get an unnamed file in /tmp. In case the filesystem for /tmp does not support unnamed files, we are supposed to get EOPNOTSUPP. [I

Re: [Qemu-devel] [PATCH 3/4] qcow2: Drop debugging dump_refcounts()

2017-08-07 Thread Philippe Mathieu-Daudé
On 08/07/2017 05:30 PM, Eric Blake wrote: It's been #if 0'd since its introduction in 2006, commit 585f8587. We can revive dead code if we need it, but in the meantime, it has bit-rotted (for example, not checking for failure in bdrv_getlength()). Signed-off-by: Eric Blake

Re: [Qemu-devel] [PATCH] tests/pxe: Check virtio-net-ccw on s390x

2017-08-07 Thread Michael S. Tsirkin
On Thu, Aug 03, 2017 at 03:30:19PM +0200, Thomas Huth wrote: > Now that we've got a firmware that can do TFTP booting on s390x (i.e. > the pc-bios/s390-netboot.img), we can enable the PXE tester for this > architecture, too. > > Signed-off-by: Thomas Huth > --- > Since this

Re: [Qemu-devel] [PATCH 1/4] vpc: Check failure of bdrv_getlength()

2017-08-07 Thread Philippe Mathieu-Daudé
On 08/07/2017 05:30 PM, Eric Blake wrote: vpc_open() was checking for bdrv_getlength() failure in one, but not the other, location. Reported-by: Markus Armbruster Signed-off-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé ---

[Qemu-devel] [PATCH 4/4] qcow2: Check failure of bdrv_getlength()

2017-08-07 Thread Eric Blake
qcow2_co_pwritev_compressed() should not call bdrv_truncate() if determining the size failed. Reported-by: Markus Armbruster Signed-off-by: Eric Blake --- block/qcow2.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/qcow2.c

[Qemu-devel] [PATCH 1/4] vpc: Check failure of bdrv_getlength()

2017-08-07 Thread Eric Blake
vpc_open() was checking for bdrv_getlength() failure in one, but not the other, location. Reported-by: Markus Armbruster Signed-off-by: Eric Blake --- block/vpc.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/block/vpc.c

[Qemu-devel] [PATCH 3/4] qcow2: Drop debugging dump_refcounts()

2017-08-07 Thread Eric Blake
It's been #if 0'd since its introduction in 2006, commit 585f8587. We can revive dead code if we need it, but in the meantime, it has bit-rotted (for example, not checking for failure in bdrv_getlength()). Signed-off-by: Eric Blake --- block/qcow2.c | 21 -

[Qemu-devel] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-08-07 Thread Eric Blake
This also requires changing the return type of get_cluster_offset() and adjusting all callers. Use osdep.h macros instead of open-coded rounding while in the area. Reported-by: Markus Armbruster Signed-off-by: Eric Blake --- block/qcow.c | 64

[Qemu-devel] [PATCH for-2.10 0/4] More blk_getlength() fixes

2017-08-07 Thread Eric Blake
Thanks again to Markus for catching these spots. Eric Blake (4): vpc: Check failure of bdrv_getlength() qcow: Check failure of bdrv_getlength() and bdrv_truncate() qcow2: Drop debugging dump_refcounts() qcow2: Check failure of bdrv_getlength() block/qcow.c | 64

Re: [Qemu-devel] Virtual RDMA device

2017-08-07 Thread Marcel Apfelbaum
On 01/08/2017 0:52, Michael S. Tsirkin wrote: On Mon, Jul 31, 2017 at 10:10:15PM +0300, Marcel Apfelbaum wrote: [...] This seems to be the mail thread with most CCs. Hi Michael, Please copy the upstream lists. virtio-dev, virtualization and qemu-devel for starters. I'd say linux-rdma

[Qemu-devel] [PATCH 3/3] Add new functions for whitelisting and their calls

2017-08-07 Thread dverma
The 'check_updated_properties' function keeps track of properties that were added/removed from fields across qemu versions. The 'check_updated_sizes' function reduces false positives generated especially while testing backward migration by keeping a list of common size/version changes. The

[Qemu-devel] [PATCH 1/3] Fix format and styles; make code more pythonic

2017-08-07 Thread dverma
- Format fixes, cleaned up the print statement - Style fixes, e.g. changed "if not x in y" to "if x not in y" - Improved variable names Signed-off-by: Deepak Verma --- scripts/vmstate-static-checker.py | 111 +- 1 file changed, 62

[Qemu-devel] [PATCH 2/3] Update the existing whitelist

2017-08-07 Thread dverma
Appended newer fields and introduced new names in the whitelist Signed-off-by: Deepak Verma --- scripts/vmstate-static-checker.py | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/scripts/vmstate-static-checker.py

[Qemu-devel] [PATCH 0/3] Vmstate-static-checker.py fix upstream

2017-08-07 Thread dverma
From: Deepak Verma This is an update to the script vmstate-static-checker.py. The whitelist has been updated and newer functions have been added to reduce the false positives generated by the script while testing migration. The code has been cleaned and updated to follow PEP8

Re: [Qemu-devel] >256 Virtio-net-pci hotplug Devices

2017-08-07 Thread Kinsella, Ray
Hi Marcel, Yup - I am using Seabios by default. I took all the measures from the Kernel time reported in syslog. As Seabios wasn't exhibiting any obvious scaling problem. Ray K -Original Message- From: Marcel Apfelbaum [mailto:mar...@redhat.com] Sent: Wednesday, August 2, 2017 5:43

[Qemu-devel] [PATCH v5 8/8] MAINTAINERS: add Dump maintainers

2017-08-07 Thread Marc-André Lureau
Proposing myself, since I have some familiarity with the code now. Signed-off-by: Marc-André Lureau Acked-by: Laszlo Ersek --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[Qemu-devel] [PATCH v5 4/8] dump: add guest ELF note

2017-08-07 Thread Marc-André Lureau
Read the guest ELF PT_NOTE from guest memory when fw_cfg etc/vmcoreinfo entry provides the location, and write it as an additional note in the dump. Signed-off-by: Marc-André Lureau --- include/sysemu/dump.h | 2 + dump.c| 103

[Qemu-devel] [PATCH v5 6/8] kdump: set vmcoreinfo location

2017-08-07 Thread Marc-André Lureau
kdump header provides offset and size of the vmcoreinfo content, append it if available (skip the ELF note header). crash-7.1.9 was the first version that started looking in the vmcoreinfo data for phys_base instead of in the kdump_sub_header. Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH v5 2/8] fw_cfg: add write callback

2017-08-07 Thread Marc-André Lureau
Reintroduce the write callback that was removed when write support was removed in commit 023e3148567ac898c7258138f8e86c3c2bb40d07. The write_cb callback is called when a write reaches the end of file, that is when the write pointer/offset reaches the size of the file. Signed-off-by: Marc-André

[Qemu-devel] [PATCH v5 3/8] fw_cfg: add vmcoreinfo file

2017-08-07 Thread Marc-André Lureau
See docs/specs/fw_cfg.txt for details. The "etc/vmcoreinfo" is added when using "-global fw_cfg.vmcoreinfo=on" qemu option. Disabled by default for machine types v2.9 and older. Signed-off-by: Marc-André Lureau --- include/hw/compat.h | 8

[Qemu-devel] [PATCH v5 7/8] scripts/dump-guest-memory.py: add vmcoreinfo

2017-08-07 Thread Marc-André Lureau
Add vmcoreinfo ELF note if fw-cfg has the memory location details. Signed-off-by: Marc-André Lureau --- scripts/dump-guest-memory.py | 51 1 file changed, 51 insertions(+) diff --git a/scripts/dump-guest-memory.py

[Qemu-devel] [PATCH v5 5/8] dump: update phys_base header field based on VMCOREINFO content

2017-08-07 Thread Marc-André Lureau
If the guest note is VMCOREINFO, try to get phys_base from it. Signed-off-by: Marc-André Lureau --- dump.c| 56 +-- docs/specs/fw_cfg.txt | 8 2 files changed, 62 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH v5 1/8] fw_cfg: rename read callback

2017-08-07 Thread Marc-André Lureau
The callback is called on select. Furthermore, the next patch introduced a new callback, so rename the function type with a generic name. Signed-off-by: Marc-André Lureau --- include/hw/loader.h | 2 +- include/hw/nvram/fw_cfg.h | 7 ---

[Qemu-devel] [PATCH v5 0/8] KASLR kernel dump support

2017-08-07 Thread Marc-André Lureau
Recent linux kernels enable KASLR to randomize phys/virt memory addresses. This series aims to provide enough information in qemu dumps so that crash utility can work with randomized kernel too (it hasn't been tested on other archs than x86 though, help welcome). The previous design to provide

Re: [Qemu-devel] [PATCH v3 1/3] Fix format and styles; make code more pythonic

2017-08-07 Thread Eric Blake
On 08/07/2017 11:53 AM, dverma wrote: > - Format fixes, cleaned up the print statement > - Style fixes, e.g. changed "if not x in y" to "if x not in y" > - Improved variable names > --- Missing a Signed-off-by: tag; without that, we can't accept the patch. Can you please resubmit with that fixed?

[Qemu-devel] [for-2.10 PATCH 3/3] spapr: error out if PHB fails to setup PCI DRCs

2017-08-07 Thread Greg Kurz
It is currently possible to start QEMU with two PHBs without using the index property: -device spapr-pci-host-bridge,id=pci1,\ buid=0x8002001,\ liobn=0x8100,\ liobn64=0x8101,\

[Qemu-devel] [Bug 1088617] Re: qemu-system-mipsel save/restore broken

2017-08-07 Thread Thomas Huth
Triaging old bug tickets ... can you still reproduce this issue with the latest version of QEMU? ** 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.

[Qemu-devel] [Bug 1050694] Re: Interrupt 0xffffffff when debug is turned on

2017-08-07 Thread Thomas Huth
Triaging old bug tickets ... is there still something left to do here, 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.

[Qemu-devel] [for-2.10 PATCH 2/3] spapr_drc: add Error ** argument to spapr_dr_connector_new()

2017-08-07 Thread Greg Kurz
This just allow spapr_dr_connector_new() to propagate errors to its callers. It doesn't change any functionality. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |4 ++-- hw/ppc/spapr_drc.c |4 ++-- hw/ppc/spapr_pci.c |2 +-

[Qemu-devel] [for-2.10 PATCH 1/3] spapr_drc: abort if object_property_add_child() fails

2017-08-07 Thread Greg Kurz
object_property_add_child() can only fail in two cases: - the child already has a parent, which shouldn't happen since the DRC was allocated a few lines above - the parent already has a child with the same name, which would mean the caller tries to create a DRC that already exists In both

[Qemu-devel] [for-2.10 PATCH 0/3] spapr: fix PCI hotplug issue when PHBs don't have index

2017-08-07 Thread Greg Kurz
While working on PHB hotplug for 2.11, a bug was discovered in the PCI DR logic in the PHB code: it relies on the PHB index property to be set but it doesn't enforce it. It is hence possible to create two PHBs with the same index (ie, the default value -1), even though this isn't expected by the

[Qemu-devel] [PATCH v3 3/3] Add new functions for whitelisting and their calls

2017-08-07 Thread dverma
The 'check_updated_properties' function keeps track of properties that were added/removed from fields across qemu versions. The 'check_updated_sizes' function reduces false positives generated especially while testing backward migration by keeping a list of common size/version changes. The

[Qemu-devel] [PATCH v3 0/3] Vmstate-static-checker.py fix upstream

2017-08-07 Thread dverma
This is an update to the script vmstate-static-checker.py. The whitelist has been updated and newer functions have been added to reduce the false positives generated by the script while testing migration. The code has been cleaned and updated to follow PEP8 guidelines. dverma (3): Fix format

[Qemu-devel] [PATCH v3 2/3] Update the existing whitelist

2017-08-07 Thread dverma
Appended newer fields and introduced new names in the whitelist --- scripts/vmstate-static-checker.py | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py index b416b66..ae41e44 100755

[Qemu-devel] [PATCH v3 1/3] Fix format and styles; make code more pythonic

2017-08-07 Thread dverma
- Format fixes, cleaned up the print statement - Style fixes, e.g. changed "if not x in y" to "if x not in y" - Improved variable names --- scripts/vmstate-static-checker.py | 111 +- 1 file changed, 62 insertions(+), 49 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v4 2/5] hw/pci: introduce pcie-pci-bridge device

2017-08-07 Thread Marcel Apfelbaum
On 07/08/2017 19:42, Alexander Bezzubikov wrote: 2017-08-07 19:39 GMT+03:00 Marcel Apfelbaum : On 05/08/2017 23:27, Aleksandr Bezzubikov wrote: Introduce a new PCIExpress-to-PCI Bridge device, which is a hot-pluggable PCI Express device and supports devices hot-plug with

[Qemu-devel] [PATCH v5] vmgenid: replace x-write-pointer-available hack

2017-08-07 Thread Marc-André Lureau
This compat property sole function is to prevent the device from being instantiated. Instead of requiring an extra compat property, check if fw_cfg has DMA enabled. fw_cfg is a built-in device that is initialized very early by the machine init code. We have at least one other device that also

Re: [Qemu-devel] AVMF & OVMF blobs in QEMU tree???

2017-08-07 Thread Laszlo Ersek
On 08/07/17 16:40, Peter Maydell wrote: > On 7 August 2017 at 15:31, Igor Mammedov wrote: >> As I recall there were issues with FAT driver licensing in edk2, >> but I've heard there were some changes in that regard. >> >> Is there any other reasons why we are not putting

Re: [Qemu-devel] [RFC PATCH 17/56] migration: Make MigrationStats sizes unsigned in QAPI/QMP

2017-08-07 Thread Juan Quintela
Markus Armbruster wrote: > Sizes should use QAPI type 'size' (uint64_t). MigrationStats members > @transferred, @remaining, @total, @normal-bytes, @page-size are 'int' > (int64_t). populate_ram_info(), populate_disk_info() and and many > places that update them in global

Re: [Qemu-devel] [RFC PATCH 18/56] migration: Make parameter max-bandwidth unsigned in QAPI/QMP

2017-08-07 Thread Juan Quintela
Markus Armbruster wrote: > Byte rates should use QAPI type 'size' (uint64_t). > migrate_set_speed's parameter @value and member @max-bandwidth of > MigrationParameters and MigrateSetParameters are 'int' (int64_t). > > Change them all to 'size'. > > migrate_set_speed and

[Qemu-devel] colo-compare: segfault and assert on colo_compare_finalize

2017-08-07 Thread Eduardo Otubo
(please ignore my last email, looks like mutt wants play games lately) Hi all, I have found a problem on colo-compare that leads to segmentation fault when calling qemu like this: $ qemu-system-x86_64 -S -machine pc -object colo-compare,id=test-object First I got an assert failed:

  1   2   3   4   >