[Qemu-devel] [PATCH v3 3/3] tests: Add unit tests for image locking

2018-08-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/Makefile.include | 2 + tests/test-image-locking.c | 152 + 2 files changed, 154 insertions(+) create mode 100644 tests/test-image-locking.c diff --git a/tests/Makefile.include b/tests/Makefile.include index

[Qemu-devel] [PATCH v3 2/3] file-posix: Drop s->lock_fd

2018-08-16 Thread Fam Zheng
The lock_fd field is not strictly necessary because transferring locked bytes from old fd to the new one shouldn't fail anyway. This spares the user one fd per image. Signed-off-by: Fam Zheng --- block/file-posix.c | 37 + 1 file changed, 13 insertions(+), 24

[Qemu-devel] [PATCH v3 1/3] file-posix: Skip effectiveless OFD lock operations

2018-08-16 Thread Fam Zheng
If we know we've already locked the bytes, don't do it again; similarly don't unlock a byte if we haven't locked it. This doesn't change the behavior, but fixes a corner case explained below. Libvirt had an error handling bug that an image can get its (ownership, file mode, SELinux) permissions

[Qemu-devel] [PATCH v3 0/3] file-posix: Simplifications on image locking

2018-08-16 Thread Fam Zheng
The first patch reduces chances of QEMU crash in unusual (but not unlikely) cases especially when used by Libvirt (see commit message). The second patch halves fd for images. The third adds some more test for patch one (would have caught the regression caused by v2). Fam Zheng (3):

Re: [Qemu-devel] [PATCH v2 7/9] chardev: tcp: postpone async connection setup

2018-08-16 Thread Peter Xu
On Thu, Aug 16, 2018 at 08:27:40PM +0200, Marc-André Lureau wrote: > Hi > On Thu, Aug 16, 2018 at 7:49 PM Marc-André Lureau > wrote: > > > > Hi > > On Tue, Mar 6, 2018 at 6:41 AM Peter Xu wrote: > > > > > > This patch allows the socket chardev async connection be setup with > > > non-default

[Qemu-devel] [PATCH 1/9] qsp: QEMU's Synchronization Profiler

2018-08-16 Thread Emilio G. Cota
The goal of this module is to profile synchronization primitives (i.e. mutexes, recursive mutexes and condition variables) so that scalability issues can be quickly diagnosed. Sync primitives are profiled by QSP based on the vaddr of the object accessed as well as the call site (file:line_nr).

[Qemu-devel] [PATCH 9/9] hmp-commands-info: add sync-profile

2018-08-16 Thread Emilio G. Cota
The command introduced here is just for developers. This means that: - the info displayed and the output format could change in the future - the command is only meant to be used from HMP, not from QMP Sample output: (qemu) sync-profile sync-profile is off (qemu) info sync-profile Type

[Qemu-devel] [PATCH 3/9] qsp: add qsp_reset

2018-08-16 Thread Emilio G. Cota
I first implemented this by deleting all entries in the global hash table. But doing that safely slows down profiling, since we'd need to introduce rcu_read_lock/unlock in the fast path. What's implemented here avoids messing with the thread-local data in the global hash table. It achieves this

[Qemu-devel] [PATCH v2 0/9] synchronization profiler

2018-08-16 Thread Emilio G. Cota
v1: https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg02186.html Changes since v1: - Rebase on current master. - Update copyright to 2018. - Add -m option to the HMP info command to sort by average wait time, as suggested by Paolo. - Add -n option to the HMP info command to NOT merge

[Qemu-devel] [PATCH 8/9] hmp-commands: add sync-profile

2018-08-16 Thread Emilio G. Cota
The command introduced here is just for developers. This means that: - the interface implemented here could change in the future - the command is only meant to be used from HMP, not from QMP Signed-off-by: Emilio G. Cota --- hmp.h | 1 + hmp.c | 24

[Qemu-devel] [PATCH 4/9] qsp: support call site coalescing

2018-08-16 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/qemu/qsp.h | 2 +- util/qsp.c | 102 ++--- 2 files changed, 89 insertions(+), 15 deletions(-) diff --git a/include/qemu/qsp.h b/include/qemu/qsp.h index f8c6c9648a..a94c464f90 100644 ---

[Qemu-devel] [PATCH 5/9] qsp: track BQL callers explicitly

2018-08-16 Thread Emilio G. Cota
The BQL is acquired via qemu_mutex_lock_iothread(), which makes the profiler assign the associated wait time (i.e. most of BQL wait time) entirely to that function. This loses the original call site information, which does not help diagnose BQL contention. Fix it by tracking the callers

[Qemu-devel] [PATCH 6/9] tests/atomic_add-bench: add -p to enable sync profiler

2018-08-16 Thread Emilio G. Cota
When used together with -m, this allows us to benchmark the profiler's performance impact on qemu_mutex_lock. Signed-off-by: Emilio G. Cota --- tests/atomic_add-bench.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/atomic_add-bench.c b/tests/atomic_add-bench.c

[Qemu-devel] [PATCH 7/9] vl: add -enable-sync-profile

2018-08-16 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- vl.c| 3 +++ qemu-options.hx | 10 ++ 2 files changed, 13 insertions(+) diff --git a/vl.c b/vl.c index 16b913f9d5..5f4e24f29b 100644 --- a/vl.c +++ b/vl.c @@ -3959,6 +3959,9 @@ int main(int argc, char **argv, char **envp)

[Qemu-devel] [PATCH 2/9] qsp: add sort_by option to qsp_report

2018-08-16 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/qemu/qsp.h | 8 +++- util/qsp.c | 33 +++-- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/include/qemu/qsp.h b/include/qemu/qsp.h index 9c2bb60ff0..209480b687 100644 --- a/include/qemu/qsp.h +++

Re: [Qemu-devel] [PATCH 0/5] tcg: Reorg 128-bit atomic operations

2018-08-16 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180816025452.21358-1-richard.hender...@linaro.org Subject: [Qemu-devel] [PATCH 0/5] tcg: Reorg 128-bit atomic operations === TEST SCRIPT BEGIN === #!/bin/bash BASE=base

Re: [Qemu-devel] [PATCH v2 0/3] hw/pci: PCI resource reserve capability

2018-08-16 Thread Liu, Jing2
Hi Laszlo, Thanks very much for your reminder. Looking forward to comments from all! Thanks, Jing On 8/17/2018 12:17 AM, Laszlo Ersek wrote: Hi, On 08/16/18 11:28, Jing Liu wrote: This patch serial is about PCI resource reserve capability. First patch refactors the resource reserve fields

Re: [Qemu-devel] [PATCH v3 1/3] x86: Data structure changes to support MSR based features

2018-08-16 Thread Eduardo Habkost
Hi, Thanks for the patch and sorry for taking so long to review. Comments below: On Fri, Aug 10, 2018 at 10:06:27PM +0800, Robert Hoo wrote: > Define FeatureWordType. > Expand FeatureWordInfo to support both CPUID type feature word as well as > MSR type's. > Change feature_word_info[]

Re: [Qemu-devel] [PATCH] qtest: Add set_irq_in command to set IRQ/GPIO level

2018-08-16 Thread no-reply
Hi, This series failed docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180815200922.9928-1-cont...@steffen-goertz.de Subject: [Qemu-devel] [PATCH] qtest: Add

Re: [Qemu-devel] [PATCH] qtest: Add set_irq_in command to set IRQ/GPIO level

2018-08-16 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180815200922.9928-1-cont...@steffen-goertz.de Subject: [Qemu-devel] [PATCH] qtest: Add

Re: [Qemu-devel] [PATCH 3/4] scripts/qemu: add render_block_graph method for QEMUMachine

2018-08-16 Thread Eduardo Habkost
On Thu, Aug 16, 2018 at 08:20:26PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Render block nodes graph with help of graphviz > > Signed-off-by: Vladimir Sementsov-Ogievskiy Thanks for your patch. Comments below: > --- > scripts/qemu.py | 53

Re: [Qemu-devel] [PATCH v2 01/16] qom/object: Add a new function object_initialize_child()

2018-08-16 Thread Eduardo Habkost
On Thu, Aug 16, 2018 at 01:59:49PM +0200, Thomas Huth wrote: > On 07/14/2018 12:57 AM, Eduardo Habkost wrote: > > On Fri, Jul 13, 2018 at 10:27:29AM +0200, Thomas Huth wrote: > >> A lot of code is using the object_initialize() function followed by a call > >> to object_property_add_child() to add

[Qemu-devel] [PULL 6/8] i386: Add new CPU model Icelake-{Server, Client}

2018-08-16 Thread Eduardo Habkost
From: 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

[Qemu-devel] [PULL 8/8] i386: Disable TOPOEXT by default on "-cpu host"

2018-08-16 Thread Eduardo Habkost
Enabling TOPOEXT is always allowed, but it can't be enabled blindly by "-cpu host" because it may make guests crash if the rest of the cache topology information isn't provided or isn't consistent. This addresses the bug reported at: https://bugzilla.redhat.com/show_bug.cgi?id=1613277

[Qemu-devel] [PULL 1/8] docs: add guidance on configuring CPU models for x86

2018-08-16 Thread Eduardo Habkost
From: Daniel P. Berrangé With the recent set of CPU hardware vulnerabilities on x86, it is increasingly difficult to understand which CPU configurations are good to use and what flaws they might be vulnerable to. This doc attempts to help management applications and administrators in picking

[Qemu-devel] [PULL 4/8] i386: Add CPUID bit for PCONFIG

2018-08-16 Thread Eduardo Habkost
From: Robert Hoo PCONFIG: Platform configuration, enumerated by CPUID.(EAX=07H, ECX=0): EDX[bit18]. Signed-off-by: Robert Hoo Message-Id: <1530781798-183214-4-git-send-email-robert...@linux.intel.com> Signed-off-by: Eduardo Habkost --- target/i386/cpu.h | 1 + target/i386/cpu.c | 2 +- 2

[Qemu-devel] [PULL 5/8] i386: Add CPUID bit for WBNOINVD

2018-08-16 Thread Eduardo Habkost
From: 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 Message-Id: <1530781798-183214-5-git-send-email-robert...@linux.intel.com> Signed-off-by: Eduardo Habkost --- target/i386/cpu.h | 2 ++

[Qemu-devel] [PULL 7/8] target-i386: adds PV_SEND_IPI CPUID feature bit

2018-08-16 Thread Eduardo Habkost
From: Wanpeng Li Adds PV_SEND_IPI CPUID feature bit. Cc: Paolo Bonzini Cc: Eduardo Habkost Cc: Radim Krčmář Cc: Vitaly Kuznetsov Signed-off-by: Wanpeng Li Message-Id: <1530526971-1812-1-git-send-email-wanpen...@tencent.com> Signed-off-by: Eduardo Habkost --- target/i386/cpu.c | 2 +- 1

[Qemu-devel] [PULL 0/8] x86 queue, 2018-08-16

2018-08-16 Thread Eduardo Habkost
The following changes since commit bb16c0412a572c2c9cd44496deb3ad430bc49c1a: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180816' into staging (2018-08-16 14:35:50 +0100) are available in the Git repository at: git://github.com/ehabkost/qemu.git tags/x86-next-pull

[Qemu-devel] [PULL 3/8] i386: Add CPUID bit and feature words for IA32_ARCH_CAPABILITIES MSR

2018-08-16 Thread Eduardo Habkost
From: 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 Message-Id: <1530781798-183214-3-git-send-email-robert...@linux.intel.com>

[Qemu-devel] [PULL 2/8] i386: Add new MSR indices for IA32_PRED_CMD and IA32_ARCH_CAPABILITIES

2018-08-16 Thread Eduardo Habkost
From: 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,

Re: [Qemu-devel] [PATCH] qemu-img.c: increase spacing between commands in documentation

2018-08-16 Thread Programmingkid
> On Aug 14, 2018, at 4:40 AM, Kevin Wolf wrote: > > Am 13.08.2018 um 20:19 hat Eric Blake geschrieben: >> On 08/13/2018 11:56 AM, Max Reitz wrote: >>> >>> Ah, hm, so much for that. Hm... I don't quite know what to think of >>> this. It does indeed improve legibility. But the question is

[Qemu-devel] [Bug 1787505] [NEW] Solaris host: no network connection, mouse pointer mismatch

2018-08-16 Thread Michele Denber
Public bug reported: This is probably a bit far afield but on a Solaris 10 SPARC host (Sun M3000) running a Windows XP guest like this: ./qemu-system-x86_64 -m 1024 -boot d -smp 3 -net nic -net user -hda /bkpool/qemuimages/XP.img -cdrom /bkpool/qemuimages/xp.iso & the vnc server starts up and

[Qemu-devel] clean/simple Q35 support in libvirt+QEMU for guest OSes that don't support virtio-1.0

2018-08-16 Thread Laine Stump
(Several of us started an offline discussion on this topic, and it quickly became complicated, so we decided it should continue upstream. Here is a synopsis of the discussion so far (as *I've* interpreted it, so corrections are welcome and apologies in advance for anything I got wrong!) Some of

Re: [Qemu-devel] [PATCH 0/2] Improve qemu-img dd

2018-08-16 Thread no-reply
Hi, This series failed docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180815025614.53588-1-ebl...@redhat.com Subject: [Qemu-devel] [PATCH 0/2] Improve

[Qemu-devel] Handling signal of Qemu thread

2018-08-16 Thread Probir Roy
I am registering a signal handler per Qemu thread (per VCPU) and expecting to handle it in that thread context. But I never receive the signal on the Qemu thread that is causing the event, rather the signal is sent to parent thread context. Can you please explain the reason behind this? I also see

Re: [Qemu-devel] [PATCH v4 6/7] qmp: add pmemload command

2018-08-16 Thread Eric Blake
On 08/16/2018 04:01 AM, Simon Ruderich wrote: Adapted patch from Baojun Wang [1] with the following commit message: I found this could be useful to have qemu-softmmu as a cross debugger (launch with -s -S command line option), then if we can have a command to load guest physical

Re: [Qemu-devel] [PATCH v4 3/7] cpus: use size_t in qmp_memsave/qmp_pmemsave

2018-08-16 Thread Eric Blake
On 08/16/2018 04:01 AM, Simon Ruderich wrote: It's the natural type for object sizes and matches the return value of sizeof(buf). Signed-off-by: Simon Ruderich --- cpus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software

Re: [Qemu-devel] [PATCH v4 2/7] cpus: convert qmp_memsave/qmp_pmemsave to use qemu_open

2018-08-16 Thread Eric Blake
On 08/16/2018 04:01 AM, Simon Ruderich wrote: qemu_open() allow passing file descriptors to qemu which is used in restricted environments like libvirt where open() is prohibited. Suggested-by: Eric Blake Signed-off-by: Simon Ruderich --- cpus.c | 20 ++-- 1 file changed, 10

Re: [Qemu-devel] [PATCH v4 1/7] cpus: correct coding style in qmp_memsave/qmp_pmemsave

2018-08-16 Thread Eric Blake
On 08/16/2018 04:01 AM, Simon Ruderich wrote: Signed-off-by: Simon Ruderich --- cpus.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org |

Re: [Qemu-devel] nbd oldstyle negotiation

2018-08-16 Thread Eric Blake
On 08/16/2018 02:02 PM, Vladimir Sementsov-Ogievskiy wrote: Hi Eric! There is a small problem with our qemu-nbd cmdline interface: people forget to use option -x or don't know about it and face into problems with old protocol version. One of may colleagues after such situation (because of

Re: [Qemu-devel] [PATCH v9 58/84] elf: On elf loading, treat both EM_MIPS and EM_NANOMIPS as legal for MIPS

2018-08-16 Thread Richard Henderson
On 08/16/2018 07:57 AM, Aleksandar Markovic wrote: > From: Aleksandar Rikalo > > Modify load_elf32()/load_elf64() to treat EM_NANOMIPS as legal as > EM_MIPS is. > > Reviewed-by: Aleksandar Markovic > Signed-off-by: Aleksandar Markovic > Signed-off-by: Stefan Markovic > --- >

Re: [Qemu-devel] Pipe key broken on US keyboards

2018-08-16 Thread Phillip Susi
On 8/16/2018 1:27 PM, Daniel P. Berrangé wrote: > Did you actually 'git bisect' to that commit, or is that just a guess ? No, I haven't actually tried to build it from sources myself yet so I just found the source file that handles the keyboard, saw a bunch of scancode translation stuff in it,

Re: [Qemu-devel] [PATCH 0/2] Improve qemu-img dd

2018-08-16 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180815025614.53588-1-ebl...@redhat.com Subject: [Qemu-devel] [PATCH 0/2] Improve

Re: [Qemu-devel] [PATCH v9 55/84] elf: Add EM_NANOMIPS value as a valid one for e_machine field

2018-08-16 Thread Richard Henderson
On 08/16/2018 07:57 AM, Aleksandar Markovic wrote: > From: Aleksandar Rikalo > > Value 249 is registered as valid for usage for nanoMIPS executables. > > Reviewed-by: Aleksandar Markovic > Signed-off-by: Aleksandar Markovic > Signed-off-by: Stefan Markovic > --- > include/elf.h | 2 ++ > 1

Re: [Qemu-devel] [PATCH v9 54/84] target/mips: Fix ERET/ERETNC behavior related to ADEL exception

2018-08-16 Thread Richard Henderson
On 08/16/2018 07:57 AM, Aleksandar Markovic wrote: > From: Yongbok Kim > > Fix ERET/ERETNC so that ADEL exception can be raised. > > Reviewed-by: Aleksandar Markovic > Signed-off-by: Yongbok Kim > Signed-off-by: Aleksandar Markovic > Signed-off-by: Stefan Markovic > --- >

Re: [Qemu-devel] [PATCH v9 50/84] target/mips: Add updating BadInstr, BadInstrP, BadInstrX for nanoMIPS

2018-08-16 Thread Richard Henderson
On 08/16/2018 07:57 AM, Aleksandar Markovic wrote: > +if ((env->CP0_Config3 & (1 << CP0C3_BP)) && > +(env->hflags & MIPS_HFLAG_BMASK)) { > +if (!(env->hflags & MIPS_HFLAG_B16)) { > +env->CP0_BadInstrP = cpu_ldl_code(env, env->active_tc.PC - > 4); >

Re: [Qemu-devel] [PATCH] doc: Permit BLOCK_STATUS reply to extend beyond request

2018-08-16 Thread Eric Blake
On 08/15/2018 04:23 AM, Vladimir Sementsov-Ogievskiy wrote: ping. Finally, Qemu 3.0 released, and it is incompatible with current NBD protocol. Please, commit this patch. Indeed, qemu 3.0 with the qemu:dirty-bitmap:NAME context does exceed the final length when REQ_ONE is not in force. As

Re: [Qemu-devel] [PATCH v9 49/84] target/mips: Add handling of ISA mode bit for nanoMIPS

2018-08-16 Thread Richard Henderson
On 08/16/2018 07:57 AM, Aleksandar Markovic wrote: > From: Matthew Fortune > > ISA mode bit (LSB of address) is no longer required but is also > masked to allow for tools transition. The flag has_isa_mode has the > key role in the implementation. > > Reviewed-by: Aleksandar Markovic >

Re: [Qemu-devel] [PATCH for-3.1 v10 02/31] block: Use children list in bdrv_refresh_filename

2018-08-16 Thread Eric Blake
On 08/09/2018 04:34 PM, Max Reitz wrote: bdrv_refresh_filename() should invoke itself recursively on all children, not just on file. With that change, we can remove the manual invocations in blkverify, quorum, commit, mirror, and blklogwrites. Signed-off-by: Max Reitz --- block.c

[Qemu-devel] nbd oldstyle negotiation

2018-08-16 Thread Vladimir Sementsov-Ogievskiy
Hi Eric! There is a small problem with our qemu-nbd cmdline interface: people forget to use option -x or don't know about it and face into problems with old protocol version. One of may colleagues after such situation (because of this option, he could not use utility nbd-client, which

Re: [Qemu-devel] [PATCH v2] sh4: fix use_icount with linux-user

2018-08-16 Thread Laurent Vivier
Le 11/08/2018 à 17:26, Richard Henderson a écrit : > On 08/11/2018 01:23 AM, Laurent Vivier wrote: >> This fixes java in a linux-user chroot: >> $ java --version >> qemu-sh4: .../accel/tcg/cpu-exec.c:634: cpu_loop_exec_tb: Assertion >> `use_icount' failed. >> qemu: uncaught target signal 6

Re: [Qemu-devel] [PATCH v4 7/7] hmp: add pmemload command

2018-08-16 Thread Dr. David Alan Gilbert
* Simon Ruderich (si...@ruderich.org) wrote: > Adapted patch from Baojun Wang [1] with the following commit message: > > I found this could be useful to have qemu-softmmu as a cross > debugger (launch with -s -S command line option), then if we can > have a command to load guest

Re: [Qemu-devel] [PATCH v4 5/7] hmp: use F for filename arguments in memsave/pmemsave

2018-08-16 Thread Dr. David Alan Gilbert
* Simon Ruderich (si...@ruderich.org) wrote: > This enables completion for the filename arguments. > > Suggested-by: Dr. David Alan Gilbert > Signed-off-by: Simon Ruderich Reviewed-by: Dr. David Alan Gilbert > --- > hmp-commands.hx | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [PATCH v4 4/7] hmp: use l for size argument in memsave/pmemsave

2018-08-16 Thread Dr. David Alan Gilbert
* Simon Ruderich (si...@ruderich.org) wrote: > i is only 32-bit. To prevent possible truncation when dumping large > memory regions use l which is target long. > > Suggested-by: Dr. David Alan Gilbert > Signed-off-by: Simon Ruderich Reviewed-by: Dr. David Alan Gilbert > --- >

[Qemu-devel] [PATCH v2 1/2] block: for jobs, do not clear user_paused until after the resume

2018-08-16 Thread Jeff Cody
The function job_cancel_async() will always cause an assert for blockjob user resume. We set job->user_paused to false, and then call job->driver->user_resume(). In the case of blockjobs, this is the block_job_user_resume() function. In that function, we assert that job.user_paused is set to

[Qemu-devel] [PATCH v2 0/2] block: for jobs, do not clear user_paused until after the resume

2018-08-16 Thread Jeff Cody
v2 changes: Patch 1: Added r-b from John, Eric (Thanks) Patch 2: Attached an iotest as patch 2 * cc'ed qemu-stable For the test in patch 2, failure here is the failure output w/o patch 1: {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event":

[Qemu-devel] [PATCH v2 2/2] block: iotest to catch abort on forced blockjob cancel

2018-08-16 Thread Jeff Cody
Signed-off-by: Jeff Cody --- tests/qemu-iotests/229 | 95 ++ tests/qemu-iotests/229.out | 23 + tests/qemu-iotests/group | 1 + 3 files changed, 119 insertions(+) create mode 100755 tests/qemu-iotests/229 create mode 100644

[Qemu-devel] [PATCH] i386: Fix arch_query_cpu_model_expansion() leak

2018-08-16 Thread Eduardo Habkost
Reported by Coverity: Error: RESOURCE_LEAK (CWE-772): [#def439] qemu-2.12.0/target/i386/cpu.c:3179: alloc_fn: Storage is returned from allocation function "qdict_new". qemu-2.12.0/qobject/qdict.c:34:5: alloc_fn: Storage is returned from allocation function "g_malloc0".

Re: [Qemu-devel] [PATCH v2 7/9] chardev: tcp: postpone async connection setup

2018-08-16 Thread Marc-André Lureau
Hi On Thu, Aug 16, 2018 at 7:49 PM Marc-André Lureau wrote: > > Hi > On Tue, Mar 6, 2018 at 6:41 AM Peter Xu wrote: > > > > This patch allows the socket chardev async connection be setup with > > non-default gcontext. We do it by postponing the setup to machine done, > > since until then we can

Re: [Qemu-devel] [PATCH 00/33] Qtest driver framework

2018-08-16 Thread Emanuele
On 15/08/2018 14:38, Markus Armbruster wrote: Emanuele Giuseppe Esposito writes: Qgraph API for the qtest driver framework This series of patches introduce a different qtest driver organization, viewing machines, drivers and tests as node in a graph, each having one or multiple edges

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

2018-08-16 Thread Alex Williamson
On Tue, 7 Aug 2018 13:31:23 -0600 Alex Williamson wrote: > Remove KVM specific tests in balloon_page(), instead marking > ballooning as inhibited without KVM_CAP_SYNC_MMU support. > > Reviewed-by: David Hildenbrand > Reviewed-by: Peter Xu > Reviewed-by: Cornelia Huck > Signed-off-by: Alex

Re: [Qemu-devel] [PATCH v9 48/84] disas: Add support for microMIPS and nanoMIPS

2018-08-16 Thread Richard Henderson
On 08/16/2018 07:57 AM, Aleksandar Markovic wrote: > +#define umips_decode_gpr3_reg_names(rn) mips_gpr_names[umips_decode_gpr3[rn]] > +#define umips_decode_gpr3_src_store_reg_names(rn) \ > +mips_gpr_names[umips_decode_gpr3_src_store[rn]] > + > +int nanomips_dis(char *buf, unsigned address,

Re: [Qemu-devel] [Qemu-arm] [PATCH 00/16] arm: Implement MPS2 watchdogs and DMA

2018-08-16 Thread Peter Maydell
Ping for code review, please? (It's only been a week so this is a little bit eager, but I have some more MPS patches which wire up the PL022 SPI controllers, which I'm holding off on posting until this and the preceding FPGAIO set get reviewed and committed, so as not to have too many MPS patches

[Qemu-devel] [PULL v2 15/15] qemu-doc: Amend MIPS-related items

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Amend MIPS-related items in qemu-doc.texi Reviewed-by: Thomas Huth Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- qemu-doc.texi | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/qemu-doc.texi b/qemu-doc.texi

[Qemu-devel] [PULL v2 14/15] linux-user: Add preprocessor availability control to some syscalls

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add ability to target platforms to individually include user-mode support for system calls from "stat" group of system calls. This change is related to new nanoMIPS platform in the sense that it supports a different set of "stat" system calls than any other target.

[Qemu-devel] [PULL v2 12/15] elf: Add ELF flags for MIPS machine variants

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Add MIPS machine variants ELF flags so that the emulation behavior can be adjusted if needed. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic ---

[Qemu-devel] [PULL v2 08/15] target/mips: Implement CP0 Config1.WR bit functionality

2018-08-16 Thread Aleksandar Markovic
From: Stefan Markovic Add testing Config1.WR bit into watch exception handling logic. Reviewed-by: Richard Henderson Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 8 1 file changed, 8 insertions(+)

Re: [Qemu-devel] [RFC v2] new, node-graph-based fleecing and backup

2018-08-16 Thread Eric Blake
On 08/16/2018 12:28 PM, Vladimir Sementsov-Ogievskiy wrote: Hmm, how should I properly set based-on, if there two series under this one? Based on:    [PATCH v3 0/8] dirty-bitmap: rewrite bdrv_dirty_iter_next_area    and    [PATCH 0/2] block: make .bdrv_close optional patchew goes off mail

[Qemu-devel] [PULL v2 11/15] elf: Remove duplicate preprocessor constant definition

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Remove duplicate preprocessor constant definition for EF_MIPS_ARCH. The duplicate was introduced in commit 45506bdd. It placed the constant EF_MIPS_ARCH in a better place, however it did not remove the original. This patch removes the original occurrence. Reviewed-by:

[Qemu-devel] [PULL v2 07/15] target/mips: Add CP0 BadInstrX register

2018-08-16 Thread Aleksandar Markovic
From: Stefan Markovic Add CP0 BadInstrX register. This register will be used in nanoMIPS. Reviewed-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Stefan Markovic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic ---

[Qemu-devel] [PULL v2 05/15] target/mips: Fix two instances of shadow variables

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Fix two instances of shadow variables. This cleans up entire file translate.c from shadow variables. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c |

[Qemu-devel] [PULL v2 13/15] linux-user: Update MIPS syscall numbers up to kernel 4.18 headers

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Synchronize content of linux-user/mips/syscall_nr.h and linux-user/mips64/syscall_nr.h with Linux kernel 4.18 headers. This adds 9 new syscall numbers, the last being NR_io_pgetevents. Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by:

[Qemu-devel] [PULL v2 06/15] target/mips: Update some CP0 registers bit definitions

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Update CP0 registers Config0, Config1, Config2, Config3, Config4, and Config5 bit definitions. Some of these bits will be utilized by upcoming nanoMIPS changes. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic

[Qemu-devel] [PULL v2 09/15] target/mips: Don't update BadVAddr register in Debug Mode

2018-08-16 Thread Aleksandar Markovic
From: Yongbok Kim BadVAddr should not be updated if (env->hflags & MIPS_HFLAG_DM) is set. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- target/mips/helper.c| 4 +++- target/mips/op_helper.c | 12

[Qemu-devel] [PULL v2 03/15] target/mips: Avoid case statements formulated by ranges - part 2

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Rikalo Remove "range style" case statements to make code analysis easier. This patch handles cases when the values in the range in question were not properly defined. Reviewed-by: Richard Henderson Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic

[Qemu-devel] [PULL v2 10/15] target/mips: Check ELPA flag only in some cases of MFHC0 and MTHC0

2018-08-16 Thread Aleksandar Markovic
From: Yongbok Kim MFHC0 and MTHC0 used to handle EntryLo0 and EntryLo1 registers only, and placing ELPA flag checks before switch statement were technically correct. However, after adding handling more registers, these checks should be moved to act only in cases of handling EntryLo0 and

[Qemu-devel] [PULL v2 02/15] target/mips: Avoid case statements formulated by ranges - part 1

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Remove "range style" case statements to make code analysis easier. This is needed also for some upcoming nanoMIPS-related refactorings. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic ---

[Qemu-devel] [PULL v2 04/15] target/mips: Mark switch fallthroughs with interpretable comments

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Mark switch fallthroughs with comments, in cases fallthroughs are intentional. The comments "/* fall through */" are interpreted by compilers and other tools, and they will not issue warnings in such cases. For gcc, the warning is turnend on by -Wimplicit-fallthrough.

[Qemu-devel] [PULL v2 00/15] MIPS queue for QEMU upstream, August 16, 2018

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic The following changes since commit c542a9f9794ec8e0bc3fcf5956d3cc8bce667789: Merge remote-tracking branch 'remotes/armbru/tags/pull-tests-2018-08-16' into staging (2018-08-16 09:50:54 +0100) are available in the git repository at:

[Qemu-devel] [PULL v2 01/15] MAINTAINERS: Update target/mips maintainer's email addresses

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Update email addresses of Aleksandar Markovic and Paul Burton in the MAINTAINERS file. Also, add corresponding items in the .mailmap file. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- .mailmap| 7

Re: [Qemu-devel] [PATCH 55/56] json: Clean up headers

2018-08-16 Thread Eric Blake
On 08/08/2018 07:03 AM, Markus Armbruster wrote: The JSON parser has three public headers, json-lexer.h, json-parser.h, json-streamer.h. They all contain stuff that is of no interest outside qobject/json-*.c. Collect the public interface in include/qapi/qmp/json-parser.h, and everything else

Re: [Qemu-devel] [PATCH v2 7/9] chardev: tcp: postpone async connection setup

2018-08-16 Thread Marc-André Lureau
Hi On Tue, Mar 6, 2018 at 6:41 AM Peter Xu wrote: > > This patch allows the socket chardev async connection be setup with > non-default gcontext. We do it by postponing the setup to machine done, > since until then we can know which context we should run the async > operation on. > >

[Qemu-devel] [PATCH 2/2] target/xtensa: clean up gdbstub register handling

2018-08-16 Thread Max Filippov
- move register counting to xtensa/gdbstub.c - add symbolic names for register types and flags from GDB and use them in register counting and access functions. Signed-off-by: Max Filippov --- target/xtensa/cpu.h | 2 ++ target/xtensa/gdbstub.c | 60

[Qemu-devel] [PATCH 1/2] target/xtensa: fix gdbstub register counts

2018-08-16 Thread Max Filippov
This fixes communication with gdb in the presence of type-5 (TIE state mapped on user registers) and type-7 (special case of masked registers) registers in the xtensa core config. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Filippov --- target/xtensa/helper.c | 4 +++- 1 file changed, 3

[Qemu-devel] [PATCH 0/2] target/xtensa: gdbstub fixes

2018-08-16 Thread Max Filippov
Hello, this series fixes communication between xtensa gdb and QEMU gdbstub in the presence of TIE states mapped to user registers in the core configuration and does a cleanup on top of it. Max Filippov (2): target/xtensa: fix gdbstub register counts target/xtensa: clean up gdbstub register

Re: [Qemu-devel] [PATCH v9 47/84] target/mips: Add emulation of DSP ASE for nanoMIPS - part 6

2018-08-16 Thread Richard Henderson
On 08/16/2018 07:57 AM, Aleksandar Markovic wrote: > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 6. > > Reviewed-by: Aleksandar Markovic > Signed-off-by: Aleksandar Markovic > Signed-off-by: Stefan Markovic > --- > target/mips/translate.c | 62 >

Re: [Qemu-devel] [PATCH 1/4] block: improve blk_root_get_parent_desc

2018-08-16 Thread Vladimir Sementsov-Ogievskiy
Hmm, now I think, that instead of this, it is better to use pointer as parent id for nod-bds parents, to be sure they will not intersect. And add special field to qapi block relation info "parent-description" for such parents. Also I'm afraid that this patch may break iotests.. 16.08.2018

Re: [Qemu-devel] [RFC v2] new, node-graph-based fleecing and backup

2018-08-16 Thread Vladimir Sementsov-Ogievskiy
Hmm, how should I properly set based-on, if there two series under this one? Based on: [PATCH v3 0/8] dirty-bitmap: rewrite bdrv_dirty_iter_next_area and [PATCH 0/2] block: make .bdrv_close optional 16.08.2018 18:05, no-re...@patchew.org wrote: Hi, This series failed

Re: [Qemu-devel] [PATCH v9 46/84] target/mips: Add emulation of DSP ASE for nanoMIPS - part 5

2018-08-16 Thread Richard Henderson
On 08/16/2018 07:57 AM, Aleksandar Markovic wrote: > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 5. > > Reviewed-by: Aleksandar Markovic > Signed-off-by: Aleksandar Markovic > Signed-off-by: Stefan Markovic > --- > target/mips/translate.c | 142 >

Re: [Qemu-devel] Pipe key broken on US keyboards

2018-08-16 Thread Daniel P . Berrangé
On Thu, Aug 16, 2018 at 01:11:05PM -0400, Phillip Susi wrote: > Hello, I recently upgraded my Xen server from Ubuntu 16.04 to 18.04 and > am no longer able to type a | over vnc to the xen vms. When I press \ > it works, but when I hold down shift and press \ which should generate a > |, the vm

[Qemu-devel] [PATCH 3/4] scripts/qemu: add render_block_graph method for QEMUMachine

2018-08-16 Thread Vladimir Sementsov-Ogievskiy
Render block nodes graph with help of graphviz Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/qemu.py | 53 + 1 file changed, 53 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index f099ce7278..cff562c713 100644 ---

[Qemu-devel] [PATCH 2/4] qapi: add x-query-block-nodes-relations

2018-08-16 Thread Vladimir Sementsov-Ogievskiy
Add new command, returning list of block nodes graph edges. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 71 +++ include/block/block.h | 1 + block.c | 57 +

[Qemu-devel] [PATCH v9 45/84] target/mips: Add emulation of DSP ASE for nanoMIPS - part 4

2018-08-16 Thread Richard Henderson
On 08/16/2018 07:57 AM, Aleksandar Markovic wrote: > +switch (opc) { > +case NM_POOL32AXF_2_0_7: > +switch (extract32(ctx->opcode, 9, 3)) { For future cleanup, I can't help but thinking you'd be better served by extracting a different set of opcode bits and having a single switch.

Re: [Qemu-devel] [PATCH v9 40/84] target/mips: Fix pre-nanoMIPS MT ASE instructions availability control

2018-08-16 Thread Richard Henderson
On 08/16/2018 10:06 AM, Aleksandar Markovic wrote: > I think some of the previously-implemented similar cases involving read-only > bits were handled the same way, and we just built on that. What would you > suggest as a more appropriate solution in such cases (of accessing "preset by >

Re: [Qemu-devel] [PATCH v9 22/84] target/mips: Add emulation of nanoMIPS 16-bit branch instructions

2018-08-16 Thread Aleksandar Markovic
> From: Richard Henderson > Sent: Thursday, August 16, 2018 6:33 PM > > Subject: Re: [PATCH v9 22/84] target/mips: Add emulation of nanoMIPS 16-bit > branch instructions > > On 08/16/2018 07:57 AM, Aleksandar Markovic wrote: > > From: Yongbok Kim > > > > Add emulation of nanoMIPS 16-bit

[Qemu-devel] [PATCH 4/4] not-for-commit: example of new command usage for debugging

2018-08-16 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/222 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/222 b/tests/qemu-iotests/222 index 0ead56d574..6e2d96cd72 100644 --- a/tests/qemu-iotests/222 +++ b/tests/qemu-iotests/222 @@ -137,6 +137,7 @@ with

[Qemu-devel] [PATCH 0/4] block nodes graph visualization

2018-08-16 Thread Vladimir Sementsov-Ogievskiy
Hi all! On the way of backup schemes development (and in general any complicated developments in Qemu block layer) it would be good to have a way to print out graph of block nodes with their permissions. Here is this way. Instead of a lot of words I'll reply to this cover letter with example

[Qemu-devel] [PATCH 1/4] block: improve blk_root_get_parent_desc

2018-08-16 Thread Vladimir Sementsov-Ogievskiy
Make blk_root_get_parent_desc return different descriptions for different blk's in worst case. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/block-backend.c b/block/block-backend.c index

[Qemu-devel] Pipe key broken on US keyboards

2018-08-16 Thread Phillip Susi
Hello, I recently upgraded my Xen server from Ubuntu 16.04 to 18.04 and am no longer able to type a | over vnc to the xen vms. When I press \ it works, but when I hold down shift and press \ which should generate a |, the vm sees the scan code for some key that the keymap thinks should sit

  1   2   3   4   5   >