[Qemu-devel] [PATCH] gtk: initialize zoom_to_fit

2018-10-03 Thread Gerd Hoffmann
Fixes: CID 1395988 Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 3ddb5fe162..ec935fff90 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2136,7 +2136,7 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualCo

Re: [Qemu-devel] [PATCH v2 4/4] cputlb: read CPUTLBEntry.addr_write atomically

2018-10-03 Thread Emilio G. Cota
On Thu, Oct 04, 2018 at 00:01:47 -0400, Emilio G. Cota wrote: > Speedup over master (snip) > That is, a 5% average slowdown, with a max slowdown of ~14% for > mcf :-( png chart: https://imgur.com/a/5Jghi6Q E.

Re: [Qemu-devel] [PATCH v2 4/4] cputlb: read CPUTLBEntry.addr_write atomically

2018-10-03 Thread Emilio G. Cota
On Wed, Oct 03, 2018 at 16:04:54 -0400, Emilio G. Cota wrote: > Updates can come from other threads, so readers that do not > take tlb_lock must use atomic_read to avoid undefined > behaviour (UB). > > This and the previous commit result in a small performance decrease, > but this is a fair price

[Qemu-devel] [PULL 0/4] Python queue, 2018-10-03

2018-10-03 Thread Eduardo Habkost
The following changes since commit dafd95053611aa14dda40266857608d12ddce658: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2018-10-02 18:27:18 +0100) are available in the Git repository at: git://github.com/ehabkost/qemu.git tags/python-next-pull-request fo

[Qemu-devel] [PULL 3/4] Revert "tests: migration/guestperf Python 2.6 argparse compatibility"

2018-10-03 Thread Eduardo Habkost
This reverts commit 0ea47d0f36112f0f38661e2e430edf32737c7f43. scripts/argparse.py was removed from the tree, so we don't need this hack anymore. Signed-off-by: Eduardo Habkost Message-Id: <20180618225131.13113-4-ehabk...@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PULL 2/4] Revert "docker.py: Python 2.6 argparse compatibility"

2018-10-03 Thread Eduardo Habkost
This reverts commit c2d3189667409561772e8c1e5615c5166cd8aa2c. scripts/argparse.py was removed from the tree, so we don't need this hack anymore. Signed-off-by: Eduardo Habkost Message-Id: <20180618225131.13113-3-ehabk...@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PULL 4/4] scripts/device-crash-test: Remove entries for serial devices

2018-10-03 Thread Eduardo Habkost
From: Thomas Huth The problem with the various serial devices has been fixed a while ago in commit 47c4f85a0c27888e12af827471cfef87deb49821 ("hw/char/serial: Allow disconnected chardevs") already, so we can remove these entries from the "ignore" list in the device-crash-test script now. Signed-o

[Qemu-devel] [PULL 1/4] device-crash-test: No need for sys.path hack

2018-10-03 Thread Eduardo Habkost
The device-crash-test script is already inside the 'scripts' directory, there's no need to add the directory manually to sys.path. Signed-off-by: Eduardo Habkost Message-Id: <20180618225131.13113-2-ehabk...@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Stefan Hajnoczi Signed-off-by:

[Qemu-devel] [RFC] target/xtensa: rework zero overhead loops implementation

2018-10-03 Thread Max Filippov
Don't invalidate TB with the end of zero overhead loop when LBEG or LEND change. Instead encode the distance from the TB start to the LEND in the TB flags and generate loopback code when offset of the next PC from the TB start equals that distance. Distance not greater than the maximal instruction

Re: [Qemu-devel] [PATCH v2 4/4] softfloat: Specialize udiv_qrnnd for ppc64

2018-10-03 Thread David Gibson
On Wed, Oct 03, 2018 at 01:07:11PM -0500, Richard Henderson wrote: > The ISA has a 128/64-bit division instruction, though it assumes the > low 64-bits of the numerator are 0, and so requires a bit more fixup > than a full 128-bit division insn. > > Cc: qemu-...@nongnu.org > Cc: Alexander Graf >

[Qemu-devel] [PULL 4/5] qemu-nbd: drop old-style negotiation

2018-10-03 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Use new-style negotiation always, with default "" (empty) export name if it is not specified with '-x' option. qemu as client can manage either style since 2.6.0, commit 69b49502d8 For comparison: nbd 3.10 dropped oldstyle long ago (Mar 2015): https://github.

[Qemu-devel] [PULL 1/5] nbd: Don't take address of fields in packed structs

2018-10-03 Thread Eric Blake
From: Peter Maydell Taking the address of a field in a packed struct is a bad idea, because it might not be actually aligned enough for that pointer type (and thus cause a crash on dereference on some host architectures). Newer versions of clang warn about this. Avoid the bug by not using the "mo

[Qemu-devel] [PULL 2/5] nbd/server: fix NBD_CMD_CACHE

2018-10-03 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We should not go to structured-read branch on CACHE command, fix that. Bug introduced in bc37b06a5cde24 "nbd/server: introduce NBD_CMD_CACHE" with the whole feature and affects 3.0.0 release. Signed-off-by: Vladimir Sementsov-Ogievskiy CC: qemu-sta...@nongnu.

[Qemu-devel] [PULL 3/5] qemu-nbd: Document --tls-creds

2018-10-03 Thread Eric Blake
Commit 145614a1 introduced --tls-creds and documented it in qemu-nbd.texi, but forgot to document it in 'qemu-nbd --help'. Signed-off-by: Eric Blake Message-Id: <20181003180426.602765-1-ebl...@redhat.com> Reviewed-by: John Snow --- qemu-nbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/

[Qemu-devel] [PULL 0/5] NBD patches through 2018-10-03

2018-10-03 Thread Eric Blake
The following changes since commit dafd95053611aa14dda40266857608d12ddce658: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2018-10-02 18:27:18 +0100) are available in the Git repository at: git://repo.or.cz/qemu/ericb.git tags/pull-nbd-2018-10-03 for you to

[Qemu-devel] [PULL 5/5] nbd/server: drop old-style negotiation

2018-10-03 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy After the previous commit, nbd_client_new's first parameter is always NULL. Let's drop it with all corresponding old-style negotiation code path which is unreachable now. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20181003170228.95973-3-vsement..

Re: [Qemu-devel] [PATCH 0/2] nbd server: drop old-style negotiation

2018-10-03 Thread Eric Blake
On 10/3/18 12:02 PM, Vladimir Sementsov-Ogievskiy wrote: It's unexpected behavior that without -x option qemu-nbd do old-style negotiation. Let's use "" as a default name instead (as it is already done if tls is used) and therefore, drop old-style negotiation from Qemu NBD server. Vladimir Semen

Re: [Qemu-devel] [PATCH v2] bitmap: Update count after a merge

2018-10-03 Thread John Snow
On 10/02/2018 07:33 PM, John Snow wrote: > From: Eric Blake > > We need an accurate count of the number of bits set in a bitmap > after a merge. In particular, since the merge operation short-circuits > a merge from an empty source, if you have bitmaps A, B, and C where > B started empty, then

Re: [Qemu-devel] [PATCH v2] nbd: Flip qemu-nbd to prefer newstyle; add -O for old behavior

2018-10-03 Thread Eric Blake
On 10/3/18 12:55 PM, Eric Blake wrote: Oldstyle NBD negotiation cannot perform any of the extensions that we have recently been relying on. While you can always pass -x "" to get newstyle negotiation, these days, it is better to just default to newstyle (with an empty export name) and fall back

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-nbd: Document --tls-creds

2018-10-03 Thread John Snow
On 10/03/2018 04:42 PM, Eric Blake wrote: > On 10/3/18 3:35 PM, John Snow wrote: >> >> >> On 10/03/2018 02:04 PM, Eric Blake wrote: >>> Commit 145614a1 introduced --tls-creds, but forgot to document >>> it in 'qemu-nbd --help'. >>> >>> Signed-off-by: Eric Blake >>> > >> Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH v4 0/6] dirty-bitmaps: fix QMP command permissions

2018-10-03 Thread John Snow
On 10/02/2018 07:02 PM, John Snow wrote: > based on: jsnow/bitmaps staging branch > > This series builds on a previous standalone patch and adjusts > the permission for all (or most) of the QMP bitmap commands. > > V4: > - Replace "in-use" with "in use" > - Replace "user_modifiable" version

Re: [Qemu-devel] [PATCH] qemu-nbd: Document --tls-creds

2018-10-03 Thread Eric Blake
On 10/3/18 1:04 PM, Eric Blake wrote: Commit 145614a1 introduced --tls-creds, but forgot to document it in 'qemu-nbd --help'. Signed-off-by: Eric Blake --- Sadly, 'git grep -i "qemu.nbd.*tls"' has no hits, making me wonder if our iotests are even covering this. Noticed while writing my other

Re: [Qemu-devel] [PATCH 0/2] nbd server: drop old-style negotiation

2018-10-03 Thread Richard W.M. Jones
FWIW I don't have anything to add - agree with what's been said already. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-nbd: Document --tls-creds

2018-10-03 Thread Eric Blake
On 10/3/18 3:35 PM, John Snow wrote: On 10/03/2018 02:04 PM, Eric Blake wrote: Commit 145614a1 introduced --tls-creds, but forgot to document it in 'qemu-nbd --help'. Signed-off-by: Eric Blake Reviewed-by: John Snow Do we have a manpage/texi that needs to update, too? No; commit 1456

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-nbd: Document --tls-creds

2018-10-03 Thread John Snow
On 10/03/2018 02:04 PM, Eric Blake wrote: > Commit 145614a1 introduced --tls-creds, but forgot to document > it in 'qemu-nbd --help'. > > Signed-off-by: Eric Blake > > --- > Sadly, 'git grep -i "qemu.nbd.*tls"' has no hits, making me wonder > if our iotests are even covering this. > > Notice

Re: [Qemu-devel] [PATCH v2 2/4] cputlb: fix assert_cpu_is_self macro

2018-10-03 Thread Richard Henderson
On 10/3/18 3:04 PM, Emilio G. Cota wrote: > Signed-off-by: Emilio G. Cota > --- > accel/tcg/cputlb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 13/13] target/arm: Add v8M stack checks for MSR to SP_NS

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > Updating the NS stack pointer via MSR to SP_NS should include > a check whether the new SP value is below the stack limit. > No other kinds of update to the various stack pointer and > limit registers via MSR should perform a check. > > Signed-off-by: Pe

Re: [Qemu-devel] [PATCH 12/13] target/arm: Add v8M stack checks for VLDM/VSTM

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > Add the v8M stack checks for the VLDM/VSTM > (aka VPUSH/VPOP) instructions. This code is currently > unreachable because we haven't yet implemented M profile > floating point support, but since the change is simple, > we add it now because otherwise we're

Re: [Qemu-devel] [PATCH 11/13] target/arm: Add v8M stack checks for Thumb push/pop

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > Add v8M stack checks for the 16-bit Thumb push/pop > encodings: STMDB, STMFD, LDM, LDMIA, LDMFD. > > Signed-off-by: Peter Maydell > --- > target/arm/translate.c | 16 +++- > 1 file changed, 15 insertions(+), 1 deletion(-) Reviewed-by: Rich

Re: [Qemu-devel] [PATCH 12/13] target/arm: Add v8M stack checks for VLDM/VSTM

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > Add the v8M stack checks for the VLDM/VSTM > (aka VPUSH/VPOP) instructions. This code is currently > unreachable because we haven't yet implemented M profile > floating point support, but since the change is simple, > we add it now because otherwise we're

Re: [Qemu-devel] [PATCH 10/13] target/arm: Add v8M stack checks for T32 load/store single

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > Add v8M stack checks for the instructions in the T32 > "load/store single" encoding class: these are the > "immediate pre-indexed" and "immediate, post-indexed" > LDR and STR instructions. > > Signed-off-by: Peter Maydell > --- > target/arm/translate.c

Re: [Qemu-devel] [PATCH 09/13] target/arm: Add v8M stack checks for Thumb2 LDM/STM

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > Add the v8M stack checks for: > * LDM (T2 encoding) > * STM (T2 encoding) > > This includes the 32-bit encodings of the instructions listed > in v8M ARM ARM rule R_YVWT as > * LDM, LDMIA, LDMFD > * LDMDB, LDMEA > * POP (multiple registers) > * PUSH

Re: [Qemu-devel] [PATCH 08/13] target/arm: Add v8M stack checks for LDRD/STRD (imm)

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > Add the v8M stack checks for: > * LDRD (immediate) > * STRD (immediate) > > Loads and stores are more complicated than ADD/SUB/MOV, because we > must ensure that memory accesses below the stack limit are not > performed, so we can't simply do the check

Re: [Qemu-devel] [PATCH 07/13] target/arm: Add v8M stack limit checks on NS function calls

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > Check the v8M stack limits when pushing the frame for a > non-secure function call via BLXNS. > > In order to be able to generate the exception we need to > promote raise_exception() from being local to op_helper.c > so we can call it from helper.c. > >

Re: [Qemu-devel] [PATCH 06/13] target/arm: Add v8M stack checks on exception entry

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > Add checks for breaches of the v8M stack limit when the > stack pointer is decremented to push the exception frame > for exception entry. > > Note that the exception-entry case is unique in that the > stack pointer is updated to be the limit value if the

[Qemu-devel] [PATCH v2 0/4] per-TLB lock

2018-10-03 Thread Emilio G. Cota
v1: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg00395.html Changes since v1: - Rebase on master - Expand lock usage to other tlb_table/tlb_v_table updates, which I missed in v1 - Fix assert_cpu_is_self macro - Add comment on why the owner thread doesn't need to use atomic_set

[Qemu-devel] [PATCH v2 3/4] cputlb: serialize tlb updates with env->tlb_lock

2018-10-03 Thread Emilio G. Cota
Currently we rely on atomic operations for cross-CPU invalidations. There are two cases that these atomics miss: cross-CPU invalidations can race with either (1) vCPU threads flushing their TLB, which happens via memset, or (2) vCPUs calling tlb_reset_dirty on their TLB, which updates .addr_write w

[Qemu-devel] ACPI PCI hotplug table updates

2018-10-03 Thread open sorcerer
Hi, I am digging into an issue where qmp_device_del does not actually delete devices when a guest OS is in prelaunch. This seems to be due to the guest OS not handling ACPI events because it is not currently running. If I assume correctly, qmp should allow you to add/remove devices while the host

[Qemu-devel] [PATCH v2 4/4] cputlb: read CPUTLBEntry.addr_write atomically

2018-10-03 Thread Emilio G. Cota
Updates can come from other threads, so readers that do not take tlb_lock must use atomic_read to avoid undefined behaviour (UB). This and the previous commit result in a small performance decrease, but this is a fair price for removing UB. Host: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz - Before

[Qemu-devel] [PATCH v2 2/4] cputlb: fix assert_cpu_is_self macro

2018-10-03 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- accel/tcg/cputlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 502eea2850..f6b388c961 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -58,9 +58,9 @@ } \ } while (0) -#de

[Qemu-devel] [PATCH v2 1/4] exec: introduce tlb_init

2018-10-03 Thread Emilio G. Cota
Paves the way for the addition of a per-TLB lock. Signed-off-by: Emilio G. Cota --- include/exec/exec-all.h | 8 accel/tcg/cputlb.c | 4 exec.c | 1 + 3 files changed, 13 insertions(+) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 5f781

Re: [Qemu-devel] [PATCH 05/13] target/arm: Add some comments in Thumb decode

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > Add some comments to the Thumb decoder indicating what bits > of the instruction have been decoded at various points in > the code. > > This is not an exhaustive set of comments; we're gradually > adding comments as we work with particular bits of the co

Re: [Qemu-devel] [PATCH v2] bitmap: Update count after a merge

2018-10-03 Thread Eric Blake
On 10/3/18 2:57 PM, John Snow wrote:    - I always forget to update this field.. We definitely should add some generic check on it somewhere, at least in tests. My suggestion (in another thread) was to enhance x-debug-block-dirty-bitmap-sha256 to include 'count' alongside the checksum, to mak

Re: [Qemu-devel] [PATCH 04/13] target/arm: Add v8M stack checks on ADD/SUB/MOV of SP

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > Add code to insert calls to a helper function to do the stack > limit checking when we handle these forms of instruction > that write to SP: > * ADD (SP plus immediate) > * ADD (SP plus register) > * SUB (SP minus immediate) > * SUB (SP minus register

Re: [Qemu-devel] [PATCH v2] bitmap: Update count after a merge

2018-10-03 Thread John Snow
On 10/03/2018 10:49 AM, Eric Blake wrote: > On 10/3/18 9:32 AM, Vladimir Sementsov-Ogievskiy wrote: >> 03.10.2018 02:33, John Snow wrote: >>> From: Eric Blake >>> >>> We need an accurate count of the number of bits set in a bitmap >>> after a merge. In particular, since the merge operation shor

Re: [Qemu-devel] [PATCH 03/13] target/arm: Move v7m_using_psp() to internals.h

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > We're going to want v7m_using_psp() in op_helper.c in the > next patch, so move it from helper.c to internals.h. > > Signed-off-by: Peter Maydell > --- > target/arm/internals.h | 15 +++ > target/arm/helper.c| 12 > 2 files

Re: [Qemu-devel] [PATCH 02/13] target/arm: Define new EXCP type for v8M stack overflows

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > Define EXCP_STKOF, and arrange for it to cause us to take > a UsageFault with CFSR.STKOF set. > > Signed-off-by: Peter Maydell > --- > target/arm/cpu.h| 2 ++ > target/arm/helper.c | 5 + > 2 files changed, 7 insertions(+) Reviewed-by: Richard

Re: [Qemu-devel] [PATCH] target/arm: Don't read r4 from v8M exception stackframe twice

2018-10-03 Thread Richard Henderson
On 10/2/18 10:03 AM, Peter Maydell wrote: > A cut-and-paste error meant we were reading r4 from the v8M > callee-saves exception stack frame twice. This is harmless > since it just meant we did two memory accesses to the same > location, but it's unnecessary. Delete it. > > Signed-off-by: Peter Ma

Re: [Qemu-devel] [PATCH 01/13] target/arm: Define new TBFLAG for v8M stack checking

2018-10-03 Thread Richard Henderson
On 10/2/18 11:35 AM, Peter Maydell wrote: > The Arm v8M architecture includes hardware stack limit checking. > When certain instructions update the stack pointer, if the new > value of SP is below the limit set in the associated limit register > then an exception is taken. Add a TB flag that tracks

[Qemu-devel] [PATCH v3 9/9] target/s390x: Check HAVE_ATOMIC128 and HAVE_CMPXCHG128 at translate

2018-10-03 Thread Richard Henderson
Cc: qemu-s3...@nongnu.org Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 40 +++ target/s390x/translate.c | 25 +--- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x

Re: [Qemu-devel] [PATCH] target/arm: Correct condition for v8M callee stack push

2018-10-03 Thread Richard Henderson
On 10/2/18 9:59 AM, Peter Maydell wrote: > In v7m_exception_taken() we were incorrectly using a > "LR bit EXCRET.ES is 1" check when it should be 0 > (compare the pseudocode ExceptionTaken() function). > This meant we didn't stack the callee-saved registers > when tailchaining from a NonSecure to a

[Qemu-devel] [PATCH v3 3/9] target/arm: Convert to HAVE_CMPXCHG128

2018-10-03 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/arm/helper-a64.c | 259 +--- 1 file changed, 133 insertions(+), 126 deletions(-) diff --git a/target/arm/helper-a64.c b/target/arm/helper-a64.c index 7f6ad3000b..6e4e1b8a19 100644 --- a/t

[Qemu-devel] [PATCH v3 5/9] target/ppc: Convert to HAVE_CMPXCHG128 and HAVE_ATOMIC128

2018-10-03 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/ppc/helper.h | 2 +- target/ppc/mem_helper.c | 33 ++-- target/ppc/translate.c | 115 +--- 3 files changed, 88 insertions(+), 62 deletions(-) diff --git a/target/ppc/helpe

[Qemu-devel] [PATCH v3 1/9] tcg: Split CONFIG_ATOMIC128

2018-10-03 Thread Richard Henderson
GCC7+ will no longer advertise support for 16-byte __atomic operations if only cmpxchg is supported, as for x86_64. Fortunately, x86_64 still has support for __sync_compare_and_swap_16 and we can make use of that. AArch64 does not have, nor ever has had such support, so open-code it. Reviewed-by:

[Qemu-devel] [PATCH v3 7/9] target/s390x: Split do_cdsg, do_lpq, do_stpq

2018-10-03 Thread Richard Henderson
Cc: qemu-s3...@nongnu.org Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 128 ++ 1 file changed, 61 insertions(+), 67 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index e106f61b4e..b5858d2fa2 100644 --- a/ta

[Qemu-devel] [PATCH v3 4/9] target/arm: Check HAVE_CMPXCHG128 at translate time

2018-10-03 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/arm/helper-a64.c| 16 target/arm/translate-a64.c | 38 ++ 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/target/arm/helper-a64.c b/target/arm/helper-

[Qemu-devel] [PATCH v3 8/9] target/s390x: Skip wout, cout helpers if op helper does not return

2018-10-03 Thread Richard Henderson
When op raises an exception, it may not have initialized the output temps that would be written back by wout or cout. Cc: qemu-s3...@nongnu.org Signed-off-by: Richard Henderson --- target/s390x/translate.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target/s3

[Qemu-devel] [PATCH v3 0/9] tcg: Reorg 128-bit atomic operations

2018-10-03 Thread Richard Henderson
For v2, and history, see http://lists.nongnu.org/archive/html/qemu-devel/2018-08/msg04533.html Changes since v2: * Fixed a typo noticed by Emilio. * Brought the target/s390x changes back, as the patches with which they conflicted are now in mainline. r~ Richard Henderson (9): tcg:

[Qemu-devel] [PATCH v3 6/9] target/s390x: Convert to HAVE_CMPXCHG128 and HAVE_ATOMIC128

2018-10-03 Thread Richard Henderson
Cc: qemu-s3...@nongnu.org Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 92 +-- 1 file changed, 41 insertions(+), 51 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index bacae4f503..e106f61b4e 100644 --- a/ta

[Qemu-devel] [PATCH v3 2/9] target/i386: Convert to HAVE_CMPXCHG128

2018-10-03 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/i386/mem_helper.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/target/i386/mem_helper.c b/target/i386/mem_helper.c index 30c26b9d9c..6cc53bcb40 100644 --- a/target/i386/mem_helper.c +++ b/targ

Re: [Qemu-devel] [PATCH] qapi/misc.json: Remove superfluous words in CpuModelExpansionType

2018-10-03 Thread Eduardo Habkost
On Wed, Oct 03, 2018 at 12:46:05PM +0200, Kashyap Chamarthy wrote: > While at it, s/QMU/QEMU in @CpuDefinitionInfo. > > Signed-off-by: Kashyap Chamarthy Reviewed-by: Eduardo Habkost Will this go through the QAPI tree? -- Eduardo

Re: [Qemu-devel] [PATCH v3 18/18] block/backup: use fleecing-hook instead of write notifiers

2018-10-03 Thread Vladimir Sementsov-Ogievskiy
01.10.2018 13:29, Vladimir Sementsov-Ogievskiy wrote: > Drop write notifiers and use filter node instead. Changes: > > 1. copy-before-writes now handled by filter node, so, drop all > is_write_notifier arguments. > > 2. we don't have intersecting requests, so their handling is dropped. > Instea

Re: [Qemu-devel] [PATCH v4 1/6] block/dirty-bitmaps: add user_locked status checker

2018-10-03 Thread Eric Blake
On 10/3/18 1:28 PM, John Snow wrote: Thanks, I'll just make these edits and trust that Eric is fine with it as well. Yes, works for me --js -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH v2] nbd: Flip qemu-nbd to prefer newstyle; add -O for old behavior

2018-10-03 Thread Vladimir Sementsov-Ogievskiy
03.10.2018 20:55, Eric Blake wrote: Oldstyle NBD negotiation cannot perform any of the extensions that we have recently been relying on. While you can always pass -x "" to get newstyle negotiation, these days, it is better to just default to newstyle (with an empty export name) and fall back to o

Re: [Qemu-devel] [PATCH v4 1/6] block/dirty-bitmaps: add user_locked status checker

2018-10-03 Thread John Snow
On 10/03/2018 08:47 AM, Vladimir Sementsov-Ogievskiy wrote: > 03.10.2018 02:02, John Snow wrote: >> Instead of both frozen and qmp_locked checks, wrap it into one check. >> frozen implies the bitmap is split in two (for backup), and shouldn't >> be modified. qmp_locked implies it's being used by

[Qemu-devel] [RFC PATCH v2 1/3] acceptance tests: Add SeaBIOS boot and debug console checking test

2018-10-03 Thread Philippe Mathieu-Daudé
This test boots SeaBIOS and check the debug console (I/O port on the ISA bus) reports enough information on the initialized devices. Example: $ avocado run tests/acceptance/boot_firmware.py JOB ID : 3dac2e738c941747ec01f043092b882a8370a92f JOB LOG: /home/phil/avocado/job-results/job-2018-

[Qemu-devel] [RFC PATCH v2 3/3] acceptance tests: Add EDK2 ArmVirtQemu boot and console checking test

2018-10-03 Thread Philippe Mathieu-Daudé
This test boots EDK2 ArmVirtQemu and check the debug console (PL011) reports enough information on the initialized devices. $ avocado run -p qemu_bin=aarch64-softmmu/qemu-system-aarch64 tests/acceptance/boot_firmware.py JOB ID : cb1c5bd9e0312483eabeffbb37885a5273ef23bf JOB LOG: /home/phi

Re: [Qemu-devel] ACPI PCI hotplug table updates

2018-10-03 Thread Michael S. Tsirkin
On Wed, Oct 03, 2018 at 10:44:20AM -0700, open sorcerer wrote: > Hi, > > I am digging into an issue where qmp_device_del does not actually delete > devices when a guest OS is in prelaunch. What exactly is meant by prelaunch? E.g. is it prelaunch while bios is doing the pci bus scan? > This seems

[Qemu-devel] [RFC PATCH v2 0/3] acceptance tests: Test firmware checking debug console output

2018-10-03 Thread Philippe Mathieu-Daudé
Hi, This RFC series add simple acceptance tests which boot SeaBIOS and EDK2 on the pc and virt/aarch64 default machines Still PoC but can be useful for the Avocado team to test the multi-arch targets. Since v1: https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg03780.html - more Pythonic c

[Qemu-devel] [RFC PATCH v2 2/3] acceptance tests: Add EDK2 OVMF boot and debug console checking test

2018-10-03 Thread Philippe Mathieu-Daudé
This test boots OVMF and check the debug console (I/O port on the ISA bus) report enough information on the initialized devices. $ avocado --show=app,debugcon run tests/acceptance/boot_firmware.py (1/1) tests/acceptance/boot_firmware.py:BootFirmware.test_ovmf_pc: debugcon: SecCoreStartupWithStack

Re: [Qemu-devel] [PATCH v2] nbd: Flip qemu-nbd to prefer newstyle; add -O for old behavior

2018-10-03 Thread Vladimir Sementsov-Ogievskiy
03.10.2018 20:55, Eric Blake wrote: > Oldstyle NBD negotiation cannot perform any of the extensions that > we have recently been relying on. While you can always pass -x "" > to get newstyle negotiation, these days, it is better to just default > to newstyle (with an empty export name) and fall ba

Re: [Qemu-devel] [PATCH 0/2] nbd server: drop old-style negotiation

2018-10-03 Thread Eric Blake
On 10/3/18 12:59 PM, Vladimir Sementsov-Ogievskiy wrote: 03.10.2018 20:32, Eric Blake wrote: On 10/3/18 12:02 PM, Vladimir Sementsov-Ogievskiy wrote: It's unexpected behavior that without -x option qemu-nbd do old-style negotiation. Let's use "" as a default name instead (as it is already done if

Re: [Qemu-devel] [PATCH 2/3] cputlb: serialize tlb updates with env->tlb_lock

2018-10-03 Thread Emilio G. Cota
On Wed, Oct 03, 2018 at 19:05:51 +0200, Paolo Bonzini wrote: > On 03/10/2018 19:02, Emilio G. Cota wrote: > >> For reads I agree, but you may actually get a torn read if the writer > >> doesn't use atomic_set. > > > > But you cannot get a torn read if all reads that don't hold the lock > > are comi

[Qemu-devel] [PATCH v2 1/4] softfloat: Fix division

2018-10-03 Thread Richard Henderson
The __udiv_qrnnd primitive that we nicked from gmp requires its inputs to be normalized. We were not doing that. Because the inputs are nearly normalized already, finishing that is trivial. Replace div128to64 with a "proper" udiv_qrnnd, so that this remains a reusable primitive. Fixes: cf07323d

[Qemu-devel] [PATCH v2 2/4] softfloat: Specialize udiv_qrnnd for x86_64

2018-10-03 Thread Richard Henderson
The ISA has a 128/64-bit division instruction. Signed-off-by: Richard Henderson --- include/fpu/softfloat-macros.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/fpu/softfloat-macros.h b/include/fpu/softfloat-macros.h index 03312471b2..6d58615709 100644 --- a/include/fpu/softf

[Qemu-devel] [PATCH v2 4/4] softfloat: Specialize udiv_qrnnd for ppc64

2018-10-03 Thread Richard Henderson
The ISA has a 128/64-bit division instruction, though it assumes the low 64-bits of the numerator are 0, and so requires a bit more fixup than a full 128-bit division insn. Cc: qemu-...@nongnu.org Cc: Alexander Graf Cc: David Gibson Signed-off-by: Richard Henderson --- include/fpu/softfloat-ma

[Qemu-devel] [PATCH v2 3/4] softfloat: Specialize udiv_qrnnd for s390x

2018-10-03 Thread Richard Henderson
The ISA has a 128/64-bit division instruction. Cc: qemu-s3...@nongnu.org Cc: Cornelia Huck Cc: David Hildenbrand Signed-off-by: Richard Henderson --- include/fpu/softfloat-macros.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/fpu/softfloat-macros.h b/include/fpu/softfloat-

[Qemu-devel] [PATCH v2 0/4] softfloat: Fix division

2018-10-03 Thread Richard Henderson
Changes from v1: * Preserve udiv_qrnnd as a separate division primitive that could be used as a building block for float128 division. * Include asm fragments for x86_64, s390x, and ppc64. r~ Richard Henderson (4): softfloat: Fix division softfloat: Specialize udiv_qrnnd for x86_64

[Qemu-devel] [PATCH] qemu-nbd: Document --tls-creds

2018-10-03 Thread Eric Blake
Commit 145614a1 introduced --tls-creds, but forgot to document it in 'qemu-nbd --help'. Signed-off-by: Eric Blake --- Sadly, 'git grep -i "qemu.nbd.*tls"' has no hits, making me wonder if our iotests are even covering this. Noticed while writing my other patches for defaulting to newstyle. ---

Re: [Qemu-devel] [PATCH 0/2] nbd server: drop old-style negotiation

2018-10-03 Thread Vladimir Sementsov-Ogievskiy
03.10.2018 20:32, Eric Blake wrote: On 10/3/18 12:02 PM, Vladimir Sementsov-Ogievskiy wrote: It's unexpected behavior that without -x option qemu-nbd do old-style negotiation. Let's use "" as a default name instead (as it is already done if tls is used) and therefore, drop old-style negotiation fro

[Qemu-devel] [PATCH v2] nbd: Flip qemu-nbd to prefer newstyle; add -O for old behavior

2018-10-03 Thread Eric Blake
Oldstyle NBD negotiation cannot perform any of the extensions that we have recently been relying on. While you can always pass -x "" to get newstyle negotiation, these days, it is better to just default to newstyle (with an empty export name) and fall back to oldstyle only on an explicit request.

Re: [Qemu-devel] [PATCH] nbd: Flip qemu-nbd to prefer newstyle; add -O for old behavior

2018-10-03 Thread Eric Blake
On 10/3/18 12:38 PM, Vladimir Sementsov-Ogievskiy wrote: 03.10.2018 20:19, Eric Blake wrote: Oldstyle NBD negotiation cannot perform any of the extensions that we have recently been relying on.  While you can always pass -x "" to get newstyle negotiation, these days, it is better to just default

Re: [Qemu-devel] [PATCH] nbd: Flip qemu-nbd to prefer newstyle; add -O for old behavior

2018-10-03 Thread Vladimir Sementsov-Ogievskiy
03.10.2018 20:19, Eric Blake wrote: Oldstyle NBD negotiation cannot perform any of the extensions that we have recently been relying on. While you can always pass -x "" to get newstyle negotiation, these days, it is better to just default to newstyle (with an empty export name) and fall back to

Re: [Qemu-devel] [PATCH 2/2] nbd/server: drop old-style negotiation

2018-10-03 Thread Eric Blake
On 10/3/18 12:02 PM, Vladimir Sementsov-Ogievskiy wrote: After the previous commit, nbd_client_new first parameter is always NULL. Let's drop it with all corresponding old-style negotiation code path which is unreachable now. Being able to force oldstyle negotiation for interoperability testing

Re: [Qemu-devel] [PATCH 0/2] nbd server: drop old-style negotiation

2018-10-03 Thread Eric Blake
On 10/3/18 12:02 PM, Vladimir Sementsov-Ogievskiy wrote: It's unexpected behavior that without -x option qemu-nbd do old-style negotiation. Let's use "" as a default name instead (as it is already done if tls is used) and therefore, drop old-style negotiation from Qemu NBD server. Oddly enough,

Re: [Qemu-devel] [PATCH] nbd: Flip qemu-nbd to prefer newstyle; add -O for old behavior

2018-10-03 Thread Eric Blake
On 10/3/18 12:19 PM, Eric Blake wrote: Oldstyle NBD negotiation cannot perform any of the extensions that we have recently been relying on. While you can always pass -x "" to get newstyle negotiation, these days, it is better to just default to newstyle (with an empty export name) and fall back

Re: [Qemu-devel] [PATCH 1/2] qemu-nbd: drop old-style negotiation

2018-10-03 Thread Eric Blake
On 10/3/18 12:02 PM, Vladimir Sementsov-Ogievskiy wrote: Use new-style negotiation always, with default "" (empty) export name if it is not specified with '-x' option. If we like this approach (over mine of keeping oldstyle, but via an explicit -O option), then this commit message should add t

Re: [Qemu-devel] [PATCH] fpu/softfloat: Replace countLeadingZeros32/64 with clz32/64

2018-10-03 Thread Richard Henderson
On 9/28/18 2:01 AM, Thomas Huth wrote: > Our minimum required compiler for compiling QEMU is GCC 4.1 these days, > so we can drop the support for compilers which do not provide the > __builtin_clz*() functions yet. Since the countLeadingZeros32/64 are > then identical to the clz32/64 functions, and

Re: [Qemu-devel] [PATCH v4 18/24] qdev: hotplug: provide do_unplug handler

2018-10-03 Thread David Hildenbrand
On 03/10/2018 08:29, David Gibson wrote: > On Wed, Sep 26, 2018 at 11:42:13AM +0200, David Hildenbrand wrote: >> The unplug and unplug_request handlers are special: They are not >> executed when unrealizing a device, but rather trigger the removal of a >> device from device_del() via object_unparen

[Qemu-devel] [PATCH] nbd: Flip qemu-nbd to prefer newstyle; add -O for old behavior

2018-10-03 Thread Eric Blake
Oldstyle NBD negotiation cannot perform any of the extensions that we have recently been relying on. While you can always pass -x "" to get newstyle negotiation, these days, it is better to just default to newstyle (with an empty export name) and fall back to oldstyle only on an explicit request.

Re: [Qemu-devel] [PATCH 2/3] cputlb: serialize tlb updates with env->tlb_lock

2018-10-03 Thread Paolo Bonzini
On 03/10/2018 19:02, Emilio G. Cota wrote: >> For reads I agree, but you may actually get a torn read if the writer >> doesn't use atomic_set. > > But you cannot get a torn read if all reads that don't hold the lock > are coming from the same thread that performed the write. Ah, so you are relying

[Qemu-devel] [PATCH 0/2] nbd server: drop old-style negotiation

2018-10-03 Thread Vladimir Sementsov-Ogievskiy
It's unexpected behavior that without -x option qemu-nbd do old-style negotiation. Let's use "" as a default name instead (as it is already done if tls is used) and therefore, drop old-style negotiation from Qemu NBD server. Vladimir Sementsov-Ogievskiy (2): qemu-nbd: drop old-style negotiation

[Qemu-devel] [PATCH 1/2] qemu-nbd: drop old-style negotiation

2018-10-03 Thread Vladimir Sementsov-Ogievskiy
Use new-style negotiation always, with default "" (empty) export name if it is not specified with '-x' option. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qemu-nbd.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 5

[Qemu-devel] [PATCH 2/2] nbd/server: drop old-style negotiation

2018-10-03 Thread Vladimir Sementsov-Ogievskiy
After the previous commit, nbd_client_new first parameter is always NULL. Let's drop it with all corresponding old-style negotiation code path which is unreachable now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/nbd.h | 3 +-- blockdev-nbd.c | 2 +- nbd/server.c

Re: [Qemu-devel] [PATCH 2/3] cputlb: serialize tlb updates with env->tlb_lock

2018-10-03 Thread Emilio G. Cota
On Wed, Oct 03, 2018 at 17:52:32 +0200, Paolo Bonzini wrote: > On 03/10/2018 17:48, Emilio G. Cota wrote: > >> it's probably best to do all atomic_set instead of just the memberwise > >> copy. > > Atomics aren't necessary here, as long as the copy is protected by the > > lock. This allows other vC

[Qemu-devel] Hotplug handler

2018-10-03 Thread Sameeh Jubran
Hi all, I am trying to get the hotplug handler of a pci device in Qemu using "qdev_get_hotplug_handler" function. This function simply tries to get the hotplug handler from the parent bus. For some reason it's always null. Why it is not initialized? Thanks!

Re: [Qemu-devel] [PATCH v4 5/6] block/backup: prohibit backup from using in use bitmaps

2018-10-03 Thread John Snow
On 10/03/2018 08:28 AM, Eric Blake wrote: > On 10/2/18 6:02 PM, John Snow wrote: >> If the bitmap is frozen, we shouldn't touch it. >> >> Signed-off-by: John Snow >> --- >>   blockdev.c | 12 ++-- >>   1 file changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/blockdev.c b/blockd

Re: [Qemu-devel] [RFC PATCH 0/3] acceptance tests: Test firmware checking debug console output

2018-10-03 Thread Cleber Rosa
On 10/3/18 11:59 AM, Laszlo Ersek wrote: > On 10/03/18 17:20, Cleber Rosa wrote: >> On 10/3/18 3:13 AM, Laszlo Ersek wrote: >>> On 10/03/18 02:23, Cleber Rosa wrote: On 9/28/18 6:51 AM, Laszlo Ersek wrote: >>> > I'm not sure if Avocado provides disk image preparation utilities, but >>

Re: [Qemu-devel] [RFC PATCH 0/3] acceptance tests: Test firmware checking debug console output

2018-10-03 Thread Laszlo Ersek
On 10/03/18 17:20, Cleber Rosa wrote: > On 10/3/18 3:13 AM, Laszlo Ersek wrote: >> On 10/03/18 02:23, Cleber Rosa wrote: >>> On 9/28/18 6:51 AM, Laszlo Ersek wrote: >> I'm not sure if Avocado provides disk image preparation utilities, but perhaps (a) we could use the vvfat driver (*sh

Re: [Qemu-devel] [PATCH 2/3] cputlb: serialize tlb updates with env->tlb_lock

2018-10-03 Thread Paolo Bonzini
On 03/10/2018 17:48, Emilio G. Cota wrote: >> it's probably best to do all atomic_set instead of just the memberwise copy. > Atomics aren't necessary here, as long as the copy is protected by the > lock. This allows other vCPUs to see a consistent view of the data (since > they always acquire the T

  1   2   3   >