Re: [Qemu-devel] [PATCH] pci-bridge/dec: remove unused code

2018-08-21 Thread Marcel Apfelbaum
On 08/22/2018 04:14 PM, Peng Hao wrote: Signed-off-by: Peng Hao --- hw/pci-bridge/dec.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/hw/pci-bridge/dec.c b/hw/pci-bridge/dec.c index 84492d5..ab39185 100644 --- a/hw/pci-bridge/dec.c +++ b/hw/pci-bridge/dec.c @@ -31,16 +31,6

Re: [Qemu-devel] [PATCH v3 2/2] hw/pci: add PCI resource reserve capability to legacy PCI bridge

2018-08-21 Thread Marcel Apfelbaum
Hi Jing, On 08/22/2018 04:53 AM, Liu, Jing2 wrote: Hi Marcel, On 8/21/2018 5:59 PM, Marcel Apfelbaum wrote: On 08/21/2018 06:18 AM, Jing Liu wrote: Add hint to firmware (e.g. SeaBIOS) to reserve addtional BUS/IO/MEM/PREF resource for legacy pci-pci bridge. Add the resource reserve capabilit

Re: [Qemu-devel] [PATCH 0/4] Fix socket chardev regression

2018-08-21 Thread Peter Xu
On Wed, Aug 22, 2018 at 11:46:32AM +0800, Peter Xu wrote: > On Tue, Aug 21, 2018 at 04:16:27PM +0200, Paolo Bonzini wrote: > > On 21/08/2018 16:04, Marc-André Lureau wrote: > > >> If you don't like the way I proposed, another thing I am > > >> thinking is that whether we can assign the gcontext for

[Qemu-devel] [Bug 1755912] Re: qemu-system-x86_64 crashed with SIGABRT when using option -vga qxl

2018-08-21 Thread  Christian Ehrhardt 
** Description changed: - When using qemu-system-x86_64 with the option -vga qxl, it crashes. The - easiest way to crash it is by trying to change the guest's resolution. - However, the system may randomly crash too, not happening only when - changing resolution. Here is the terminal output of one

Re: [Qemu-devel] [PATCH] job: Fix nested aio_poll() hanging in job_txn_apply

2018-08-21 Thread Fam Zheng
On Tue, 08/21 11:15, Eric Blake wrote: > On 08/21/2018 01:45 AM, Fam Zheng wrote: > > All callers have acquired ctx already. Doing that again results in > > aio_poll() hang. This fixes the problem that a BDRV_POLL_WHILE() in the > > callback cannot make progress because ctx is recursively locked, f

[Qemu-devel] [PATCH] pci-bridge/dec: remove unused code

2018-08-21 Thread Peng Hao
Signed-off-by: Peng Hao --- hw/pci-bridge/dec.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/hw/pci-bridge/dec.c b/hw/pci-bridge/dec.c index 84492d5..ab39185 100644 --- a/hw/pci-bridge/dec.c +++ b/hw/pci-bridge/dec.c @@ -31,16 +31,6 @@ #include "hw/pci/pci_bridge.h" #include "

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

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

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

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

Re: [Qemu-devel] [PATCH v6 01/13] monitor: simplify monitor_qmp_setup_handlers_bh

2018-08-21 Thread Peter Xu
On Tue, Aug 21, 2018 at 08:13:59PM +0200, Marc-André Lureau wrote: > Hi > > On Wed, Aug 15, 2018 at 3:37 PM, Peter Xu wrote: > > When we reach monitor_qmp_setup_handlers_bh() we must be using the > > IOThread then, so no need to check against it any more. Instead, we > > assert. > > > > Reviewed

Re: [Qemu-devel] [PATCH 0/4] Fix socket chardev regression

2018-08-21 Thread Peter Xu
On Tue, Aug 21, 2018 at 04:16:27PM +0200, Paolo Bonzini wrote: > On 21/08/2018 16:04, Marc-André Lureau wrote: > >> If you don't like the way I proposed, another thing I am > >> thinking is that whether we can assign the gcontext for the chardev > >> backend before initialization of it (or by parsi

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

2018-08-21 Thread Jeff Cody
Signed-off-by: Jeff Cody Reviewed-by: John Snow Message-id: df317f617fbe5affcf699cb8560e7b0c2e028a64.1534868459.git.jc...@redhat.com Signed-off-by: Jeff Cody --- tests/qemu-iotests/229 | 95 ++ tests/qemu-iotests/229.out | 23 + tests/qemu-iotest

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

2018-08-21 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 tru

[Qemu-devel] [PULL 0/2] Block patches

2018-08-21 Thread Jeff Cody
The following changes since commit ee135aa0428fe5af2af7be04ff16d2b596a9330a: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.1-20180821' into staging (2018-08-21 13:27:11 +0100) are available in the Git repository at: git://github.com/codyprime/qemu-kvm-jtc.git tags/

Re: [Qemu-devel] [PATCH] vfio/pci: Fix failure to close file descriptor on error

2018-08-21 Thread Peter Xu
On Tue, Aug 21, 2018 at 12:58:53PM -0600, Alex Williamson wrote: > A new error path fails to close the device file descriptor when > triggered by a ballooning incompatibility within the group. Fix it. > > Fixes: 238e91728503 ("vfio/ccw/pci: Allow devices to opt-in for ballooning") > Signed-off-by

Re: [Qemu-devel] [PATCH v3 2/2] hw/pci: add PCI resource reserve capability to legacy PCI bridge

2018-08-21 Thread Liu, Jing2
Hi Marcel, On 8/21/2018 5:59 PM, Marcel Apfelbaum wrote: On 08/21/2018 06:18 AM, Jing Liu wrote: Add hint to firmware (e.g. SeaBIOS) to reserve addtional BUS/IO/MEM/PREF resource for legacy pci-pci bridge. Add the resource reserve capability deleting in pci_bridge_dev_exitfn. Signed-off-by:

[Qemu-devel] [PULL 3/7] linux-user: Relax single exit from "break"

2018-08-21 Thread Laurent Vivier
From: Richard Henderson Transform outermost "break" to "return ret". If the immediately preceeding statement was an assignment to ret, return the value directly. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-Id: <20180818190118.12911

[Qemu-devel] [PULL 4/7] linux-user: Propagate goto efault to return

2018-08-21 Thread Laurent Vivier
From: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson Message-Id: <20180818190118.12911-5-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 341 ++-

[Qemu-devel] [PULL 6/7] linux-user: Propagate goto unimplemented to default

2018-08-21 Thread Laurent Vivier
From: Richard Henderson There is no point in listing a syscall if you want the same effect as not listing it. In one less trivial case, the goto was demonstrably not reachable. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathi

[Qemu-devel] [PULL 7/7] linux-user: Propagate goto fail to return

2018-08-21 Thread Laurent Vivier
From: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson Message-Id: <20180818190118.12911-8-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 60

[Qemu-devel] [PULL 5/7] linux-user: Propagate goto unimplemented_nowarn to return

2018-08-21 Thread Laurent Vivier
From: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson Message-Id: <20180818190118.12911-6-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 11 --- 1 file changed, 4 insertions(+),

[Qemu-devel] [PULL 0/7] Linux user for 3.1 patches

2018-08-21 Thread Laurent Vivier
The following changes since commit 13b7b188501d419a7d63c016e00065bcc693b7d4: Merge remote-tracking branch 'remotes/kraxel/tags/vga-20180821-pull-request' into staging (2018-08-21 15:57:56 +0100) are available in the Git repository at: git://github.com/vivier/qemu.git tags/linu

[Qemu-devel] [PULL 1/7] linux-user: Remove DEBUG

2018-08-21 Thread Laurent Vivier
From: Richard Henderson This is redundant with both -strace and actual tracing. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson Message-Id: <20180818190118.12911-2-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sys

[Qemu-devel] [PULL 2/7] linux-user: Split out do_syscall1

2018-08-21 Thread Laurent Vivier
From: Richard Henderson There was supposed to be a single point of return for do_syscall so that tracing works properly. However, there are a few bugs in that area. It is significantly simpler to simply split out an inner function to enforce this. Reviewed-by: Philippe Mathieu-Daudé Reviewed-

Re: [Qemu-devel] [PATCH v4 08/16] configure: Use -Wunused-const-variable

2018-08-21 Thread Laurent Vivier
Le 18/08/2018 à 21:01, Richard Henderson a écrit : > For the linux-user syscall split, we have static const structs > that must be matched up with a switch statement that uses them. > By default, gcc will not warn for such a variable, but silently > remove them. > > For C++, such objects are somet

Re: [Qemu-devel] [PATCH v4 10/16] linux-user: Split out some simple file syscalls

2018-08-21 Thread Laurent Vivier
Le 18/08/2018 à 21:01, Richard Henderson a écrit : > This includes close, open, openat, read, readlink, readlinkat, write. > > Signed-off-by: Richard Henderson > --- > linux-user/strace.c | 64 - > linux-user/syscall-file.inc.c | 440 ++ > linux-use

Re: [Qemu-devel] [PATCH 6/7] arm: Instantiate nRF51 peripherals

2018-08-21 Thread Steffen Görtz
Hi Julia, > Do you need this stub to run micropython code? Could you delete this, > please, so that I can post the correct stub structures for js > directly on Joel's code? Sure i can remove the code from my patch. micropython will not work but i dont think this is a problem as long as you provide

Re: [Qemu-devel] [PATCH v2 4/5] target/arm: Check HAVE_CMPXCHG128 at transate time

2018-08-21 Thread Emilio G. Cota
On Tue, Aug 21, 2018 at 07:27:03 -0700, Richard Henderson wrote: > Signed-off-by: Richard Henderson $subject: s/transate/translate/ Reviewed-by: Emilio G. Cota E.

Re: [Qemu-devel] [PATCH v2 1/5] tcg: Split CONFIG_ATOMIC128

2018-08-21 Thread Emilio G. Cota
On Tue, Aug 21, 2018 at 07:27:00 -0700, Richard Henderson wrote: (snip) > +++ b/accel/tcg/atomic_template.h (snip) > +#else > +/* Fallback definitions that must be optimized away, or error. */ > +Int128 __attribute__((error("unsupported atomic"))) > +atomic16_read(Int128 *ptr); > +Int128 __att

[Qemu-devel] [PATCH v1 2/2] qcow2-snapshot: remove redundant find_snapshot_by_id_and_name call

2018-08-21 Thread Daniel Henrique Barboza
In qcow2_snapshot_create there is the following code block: /* Generate an ID */ find_new_snapshot_id(bs, sn_info->id_str, sizeof(sn_info->id_str)); /* Check that the ID is unique */ if (find_snapshot_by_id_and_name(bs, sn_info->id_str, NULL) >= 0) { return -EEXIST; }

[Qemu-devel] [PATCH v1 1/2] block/snapshot.c: eliminate use of ID input in snapshot operations

2018-08-21 Thread Daniel Henrique Barboza
At this moment, QEMU attempts to create/load/delete snapshots by using either an ID (id_str) or a name. The problem is that the code isn't consistent of whether the entered argument is an ID or a name, causing unexpected behaviors. For example, when creating snapshots via savevm , what happens is

[Qemu-devel] [RFC PATCH v1 0/2] HMP/snapshot changes - do not use ID anymore

2018-08-21 Thread Daniel Henrique Barboza
I am marking the patch series as "RFC" because it was supposed to be a discussion but, when I was investigating, it turned out to be easier to send the patches right away. It is not uncommon to see bugs being opened by testers that attempt to create VM snapshots using HMP. It turns out that "0" an

[Qemu-devel] [Bug 1788275] [NEW] -cpu ..., +topoext works only with EPYC CPU model

2018-08-21 Thread Eduardo Habkost
Public bug reported: See bug report at: https://bugzilla.redhat.com/show_bug.cgi?id=1615682 Probably this is caused by the inconsistent legacy cache information on all CPU models except EPYC. - Description of problem: Guest should get 2 threads per cor

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

2018-08-21 Thread Phillip Susi
On 8/17/2018 11:51 AM, Daniel P. Berrangé wrote: > Since you're using tightvnc on Windows, it won't be using the raw scancode > extension to RFB, so it'll be sending X keysyms across the wire eg > > "|" has X11 keysym 0x7c (XK_bar) > "\" has X11 keysym 0x5c (XK_backslash) > > First thing i

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

2018-08-21 Thread Jeff Cody
On Tue, Aug 21, 2018 at 12:26:18PM -0400, Jeff Cody wrote: > v3 changes: > Rebased to master > Patch 2: Wait for pause after mirror instead of error, to gobble the > right message (Thanks John) > Patch 2: Replace a hard-coded 'qcow2' with '$IMGFMT', oops. > > v2 changes: >

Re: [Qemu-devel] [RFC 00/15] s390: vfio-ccw dasd ipl support

2018-08-21 Thread Jason J. Herne
On 08/15/2018 07:48 AM, Cornelia Huck wrote: On Thu, 5 Jul 2018 13:25:28 -0400 "Jason J. Herne" wrote: This is to support booting from vfio-ccw dasd devices. We basically implement the real hardware ipl procedure. This allows for booting Linux guests on vfio-ccw devices. vfio-ccw's channel p

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

2018-08-21 Thread Eduardo Habkost
CCing qemu-stable. On Thu, Aug 16, 2018 at 10:34:00PM -0300, Eduardo Habkost wrote: > 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. > > Thi

[Qemu-devel] [PATCH] tests/libqos: Utilize newer glib spawn check

2018-08-21 Thread Eric Blake
During development, I got a 'make check' failure that claimed: qemu-img returned status code 32512 ** ERROR:tests/libqos/libqos.c:202:mkimg: assertion failed: (!rc) But 32512 is too big for a normal exit status value, which means we failed to use WEXITSTATUS() to shift the bits to the desired val

[Qemu-devel] [PATCH] vfio/pci: Fix failure to close file descriptor on error

2018-08-21 Thread Alex Williamson
A new error path fails to close the device file descriptor when triggered by a ballooning incompatibility within the group. Fix it. Fixes: 238e91728503 ("vfio/ccw/pci: Allow devices to opt-in for ballooning") Signed-off-by: Alex Williamson --- hw/vfio/common.c |1 + 1 file changed, 1 insert

Re: [Qemu-devel] [PATCH v4 06/16] linux-user: Propagate goto unimplemented to default

2018-08-21 Thread Philippe Mathieu-Daudé
On 08/18/2018 04:01 PM, Richard Henderson wrote: > There is no point in listing a syscall if you want the same effect as > not listing it. In one less trivial case, the goto was demonstrably > not reachable. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Philipp

Re: [Qemu-devel] [PATCH v4 03/16] linux-user: Relax single exit from "break"

2018-08-21 Thread Philippe Mathieu-Daudé
On 08/18/2018 04:01 PM, Richard Henderson wrote: > Transform outermost "break" to "return ret". If the immediately > preceeding statement was an assignment to ret, return the value > directly. > > Reviewed-by: Laurent Vivier > Signed-off-by: Richard Henderson > --- > linux-user/syscall.c | 972

Re: [Qemu-devel] [PULL 0/1] vfio coverity reported error fix

2018-08-21 Thread Alex Williamson
On Tue, 21 Aug 2018 10:47:10 -0600 Alex Williamson wrote: > The following changes since commit ee135aa0428fe5af2af7be04ff16d2b596a9330a: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.1-20180821' > into staging (2018-08-21 13:27:11 +0100) > &

Re: [Qemu-devel] [PULL 27/74] checkpatch: allow space in more places before a bracket

2018-08-21 Thread Linus Torvalds
This is commit 38dca988bb20 ("checkpatch: allow space between colon and bracket") upstream, why is that not mentioned anywhere? *Please* mention the upstream commits when back-porting things. Linus On Tue, Aug 21, 2018 at 10:03 AM Paolo Bonzini wrote: > > From: Heinrich Schuch

Re: [Qemu-devel] [PATCH 01/22] hw/misc/mps2-fpgaio: Implement 1Hz and 100Hz counters

2018-08-21 Thread Richard Henderson
On 08/20/2018 07:10 AM, Peter Maydell wrote: > The MPS2 FPGAIO block includes some simple free-running counters. > Implement these. > > Signed-off-by: Peter Maydell > --- > include/hw/misc/mps2-fpgaio.h | 4 +++ > hw/misc/mps2-fpgaio.c | 53 ++- > 2 files

Re: [Qemu-devel] [PATCH] char: Enable build of pty on macOS

2018-08-21 Thread Peter Maydell
On 21 August 2018 at 18:23, Roman Bolshakov wrote: > For some reason __APPLE__ was not checked in pty code. pty chardev > should be available on macOS, according to man page. > > Signed-off-by: Roman Bolshakov > --- > chardev/char-pty.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [Qemu-devel] [PATCH v6 01/13] monitor: simplify monitor_qmp_setup_handlers_bh

2018-08-21 Thread Marc-André Lureau
Hi On Wed, Aug 15, 2018 at 3:37 PM, Peter Xu wrote: > When we reach monitor_qmp_setup_handlers_bh() we must be using the > IOThread then, so no need to check against it any more. Instead, we > assert. > > Reviewed-by: Markus Armbruster > Signed-off-by: Peter Xu That's a clear simplification t

Re: [Qemu-devel] [PATCH] char: Enable build of pty on macOS

2018-08-21 Thread Eric Blake
On 08/21/2018 12:23 PM, Roman Bolshakov wrote: For some reason __APPLE__ was not checked in pty code. pty chardev should be available on macOS, according to man page. Signed-off-by: Roman Bolshakov --- chardev/char-pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cha

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

2018-08-21 Thread Laine Stump
On 08/17/2018 06:35 AM, Andrea Bolognani wrote: > On Fri, 2018-08-17 at 10:29 +0100, Daniel P. Berrangé wrote: >> On Thu, Aug 16, 2018 at 06:20:29PM -0400, Laine Stump wrote: >>> 5) Some guest OSes that we still want to support (and which would >>> otherwise work okay on a Q35 virtual machine) have

[Qemu-devel] [PATCH] char: Enable build of pty on macOS

2018-08-21 Thread Roman Bolshakov
For some reason __APPLE__ was not checked in pty code. pty chardev should be available on macOS, according to man page. Signed-off-by: Roman Bolshakov --- chardev/char-pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chardev/char-pty.c b/chardev/char-pty.c index 68fd4e20

[Qemu-devel] [PULL 59/74] util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()

2018-08-21 Thread Paolo Bonzini
From: David Hildenbrand Let's set the alignment just like for the posix variant. This will implicitly set the alignment of the underlying memory region and therefore make memory_region_get_alignment(mr) return something > 0 for all memory backends applicable to PCDIMM/NVDIMM. The allocation gran

Re: [Qemu-devel] [PATCH v4 08/16] configure: Use -Wunused-const-variable

2018-08-21 Thread Laurent Vivier
Le 18/08/2018 à 21:01, Richard Henderson a écrit : > For the linux-user syscall split, we have static const structs > that must be matched up with a switch statement that uses them. > By default, gcc will not warn for such a variable, but silently > remove them. > > For C++, such objects are somet

[Qemu-devel] [PULL 29/74] fw_cfg: import & use linux/qemu_fw_cfg.h

2018-08-21 Thread Paolo Bonzini
From: Marc-André Lureau Use kernel common header for fw_cfg. (unfortunately, optionrom.h must have its own define, since it's actually an assembler header) Signed-off-by: Marc-André Lureau Message-Id: <20180817155910.5722-2-marcandre.lur...@redhat.com> Signed-off-by: Paolo Bonzini Signed-off

Re: [Qemu-devel] [PATCH v4 08/16] configure: Use -Wunused-const-variable

2018-08-21 Thread Laurent Vivier
Le 18/08/2018 à 21:01, Richard Henderson a écrit : > For the linux-user syscall split, we have static const structs > that must be matched up with a switch statement that uses them. > By default, gcc will not warn for such a variable, but silently > remove them. > > For C++, such objects are somet

[Qemu-devel] [PULL 42/74] test-rcu-list: abstract the list implementation

2018-08-21 Thread Paolo Bonzini
From: "Emilio G. Cota" So that we can test other implementations. Signed-off-by: Emilio G. Cota Message-Id: <20180819091335.22863-8-c...@braap.org> Signed-off-by: Paolo Bonzini --- tests/test-rcu-list.c | 42 ++ 1 file changed, 30 insertions(+), 12 dele

[Qemu-devel] [PULL 62/74] i2c: pm_smbus: Clean up some style issues

2018-08-21 Thread Paolo Bonzini
From: Corey Minyard Fix some spacing issues, remove extraneous comments, add some defines instead of hard-coding numbers. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini Message-Id: <1534796770-10295-2-git-send-email-miny...@acm.org> Signed-off-by: Paolo Bonzini --- hw

[Qemu-devel] [PULL 56/74] vhost-scsi: expose 't10_pi' property for VIRTIO_SCSI_F_T10_PI

2018-08-21 Thread Paolo Bonzini
From: Greg Edwards Allow toggling on/off the VIRTIO_SCSI_F_T10_PI feature bit for both vhost-scsi and vhost-user-scsi devices. Signed-off-by: Greg Edwards Message-Id: <20180808195235.5843-4-gedwa...@ddn.com> Reviewed-by: Felipe Franciosi Reviewed-by: Fam Zheng Signed-off-by: Paolo Bonzini --

[Qemu-devel] [PULL 68/74] i2c: pm_smbus: Add the ability to force block transfer enable

2018-08-21 Thread Paolo Bonzini
From: Corey Minyard The PIIX4 hardware has block transfer buffer always enabled in the hardware, but the i801 does not. Add a parameter to pm_smbus_init to force on the block transfer so the PIIX4 handler can enable this by default, as it was disabled by default before. Signed-off-by: Corey Min

[Qemu-devel] [PULL 40/74] test-rcu-list: access goflag with atomics

2018-08-21 Thread Paolo Bonzini
From: "Emilio G. Cota" Instead of declaring it volatile. Signed-off-by: Emilio G. Cota Message-Id: <20180819091335.22863-6-c...@braap.org> Signed-off-by: Paolo Bonzini --- tests/test-rcu-list.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test-r

[Qemu-devel] [PULL 57/74] ipmi: Use proper struct reference for BT vmstate

2018-08-21 Thread Paolo Bonzini
From: Corey Minyard The vmstate for isa_ipmi_bt was referencing into the bt structure, instead create a bt structure separate and use that. The version 1 of the BT transfer was fairly broken, if a migration occured during an IPMI operation, it is likely the migration would be corrupted because I

[Qemu-devel] [PULL 30/74] i386: Fix arch_query_cpu_model_expansion() leak

2018-08-21 Thread Paolo Bonzini
From: 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". qe

[Qemu-devel] [PULL 63/74] i2c: pm_smbus: Fix the semantics of block I2C transfers

2018-08-21 Thread Paolo Bonzini
From: Corey Minyard The I2C block transfer commands was not implemented correctly, it read a length byte and such like it was an smbus transfer. So fix the smbus_read_block() and smbus_write_block() functions so they can properly handle I2C transfers, and normal SMBus transfers (for upcoming cha

Re: [Qemu-devel] [PATCH v4 00/16] linux-user: Split do_syscall

2018-08-21 Thread Richard Henderson
On 08/21/2018 10:33 AM, Laurent Vivier wrote: > if you want I can include patches 1 to 7 in my next pull request, this > will avoid you to rebase them for every new version of the series. That would be great, thanks. r~

[Qemu-devel] [PULL 73/74] char-socket: update all ioc handlers when changing context

2018-08-21 Thread Paolo Bonzini
From: Marc-André Lureau So far, tcp_chr_update_read_handler() only updated the read handler. Let's also update the hup handler. Factorize the code while at it. (note that s->ioc != NULL when s->connected) Signed-off-by: Marc-André Lureau Message-Id: <20180817135224.22971-4-marcandre.lur...@re

[Qemu-devel] [PULL 52/74] cpus: protect TimerState writes with a spinlock

2018-08-21 Thread Paolo Bonzini
In the next patch, we will need to write cpu_ticks_offset from any thread, even outside the BQL. Currently, it is protected by the BQL just because cpu_enable_ticks and cpu_disable_ticks happen to hold it, but the critical sections are well delimited and it's easy to remove the BQL dependency. Ad

[Qemu-devel] [PULL 67/74] i2c: pm_smbus: Don't delay host status register busy bit when interrupts are enabled

2018-08-21 Thread Paolo Bonzini
From: Corey Minyard Change 880b1ffe6ec2f0ae "smbus: do not immediately complete commands" changed pm_smbus to delay setting the host busy bit until the status register was read, to work around a bug in AMIBIOS. Unfortunately, when interrupts are enabled, the status register will never get read a

Re: [Qemu-devel] [PATCH v4 00/16] linux-user: Split do_syscall

2018-08-21 Thread Laurent Vivier
Le 18/08/2018 à 21:01, Richard Henderson a écrit : > Version 4 continues the split into multiple files, but for > inclusion rather than separate compilation. This allows us > to get warnings if there are mistakes in the switch statement > that looks up the structures. > > > r~ > > > Richard He

[Qemu-devel] [PULL 71/74] Revert "chardev: tcp: postpone TLS work until machine done"

2018-08-21 Thread Paolo Bonzini
From: Marc-André Lureau This reverts commit 99f2f54174a595e3ada6e4332fcd2b37ebb0d55d. See next commit reverting 25679e5d58e258e9950685ffbd0cae4cd40d9cc2 as well for rationale. Signed-off-by: Marc-André Lureau Message-Id: <20180817135224.22971-2-marcandre.lur...@redhat.com> Signed-off-by: Paol

[Qemu-devel] [PULL 50/74] cpus: protect all icount computation with seqlock

2018-08-21 Thread Paolo Bonzini
Move the icount->ns computation to cpu_get_icount, and make cpu_get_icount_locked return the raw value. This makes the atomic_read__nocheck safe, because it now happens always inside a seqlock and any torn reads will be retried. qemu_icount_bias and icount_time_shift also need to be accessed with

[Qemu-devel] [PULL 58/74] pc-dimm: assign and verify the "slot" property during pre_plug

2018-08-21 Thread Paolo Bonzini
From: David Hildenbrand We can assign and verify the slot before realizing and trying to plug. reading/writing the slot property should never fail, so let's reduce error handling a bit by using &error_abort. To do this during pre_plug, add and use (x86, ppc) pc_dimm_pre_plug(). Reviewed-by: Dav

[Qemu-devel] [PULL 70/74] KVM: cleanup unnecessary #ifdef KVM_CAP_...

2018-08-21 Thread Paolo Bonzini
The capability macros are always defined, since they come from kernel headers that are copied into the QEMU tree. Remove the unnecessary #ifdefs. Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 2 -- target/i386/kvm.c | 8 2 files changed, 10 deletions(-) diff --git a/accel/k

[Qemu-devel] [PULL 54/74] vhost-user-scsi: move host_features into VHostSCSICommon

2018-08-21 Thread Paolo Bonzini
From: Greg Edwards In preparation for having vhost-scsi also make use of host_features, move it from struct VHostUserSCSI into struct VHostSCSICommon. Signed-off-by: Greg Edwards Message-Id: <20180808195235.5843-2-gedwa...@ddn.com> Reviewed-by: Felipe Franciosi Reviewed-by: Fam Zheng Signed-o

[Qemu-devel] [PULL 74/74] test-char: add socket reconnect test

2018-08-21 Thread Paolo Bonzini
From: Marc-André Lureau This test exhibits a regression fixed by the previous reverts. Signed-off-by: Marc-André Lureau Message-Id: <20180817135224.22971-5-marcandre.lur...@redhat.com> Signed-off-by: Paolo Bonzini Signed-off-by: Marc-André Lureau --- tests/test-char.c | 18 ++---

[Qemu-devel] [PULL 60/74] pc: drop memory region alignment check for 0

2018-08-21 Thread Paolo Bonzini
From: David Hildenbrand All applicable memory regions always have an alignment > 0. All memory backends result in file_ram_alloc() or qemu_anon_ram_alloc() getting called, setting the alignment to > 0. So a PCDIMM memory region always has an alignment > 0. NVDIMM copy the alignment of the origin

[Qemu-devel] [PULL 45/74] spapr: do not use CPU_FOREACH_REVERSE

2018-08-21 Thread Paolo Bonzini
From: "Emilio G. Cota" This paves the way for implementing the CPU list with an RCU list, which cannot be traversed in reverse order. Note that this is the only caller of CPU_FOREACH_REVERSE. Acked-by: David Gibson Signed-off-by: Emilio G. Cota Message-Id: <20180819091335.22863-11-c...@braap.

[Qemu-devel] [PULL 69/74] target/i386: update MPX flags when CPL changes

2018-08-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 9cad581..b572a8e 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1515,6 +1515,8 @@ int cpu_x86_support_mca_broadcast

[Qemu-devel] [PULL 41/74] test-rcu-list: access counters with atomics

2018-08-21 Thread Paolo Bonzini
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Message-Id: <20180819091335.22863-7-c...@braap.org> Signed-off-by: Paolo Bonzini --- tests/test-rcu-list.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/test-rcu-list.c b/tests/test-rcu-list.c index b

[Qemu-devel] [PULL 55/74] vhost-scsi: unify vhost-scsi get_features implementations

2018-08-21 Thread Paolo Bonzini
From: Greg Edwards Move the enablement of preset host features into the common vhost_scsi_common_get_features() function. This is in preparation for having vhost-scsi also make use of host_features. Signed-off-by: Greg Edwards Message-Id: <20180808195235.5843-3-gedwa...@ddn.com> Reviewed-by: F

[Qemu-devel] [PULL 65/74] i2c: pm_smbus: Add block transfer capability

2018-08-21 Thread Paolo Bonzini
From: Corey Minyard There was no block transfer code in pm_smbus.c, and it is needed for some devices. So add it. This adds both byte-by-byte block transfers and buffered block transfers. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini Message-Id: <1534796770-10295-5-g

[Qemu-devel] [PULL 23/74] tests/atomic_add-bench: add -p to enable sync profiler

2018-08-21 Thread Paolo Bonzini
From: "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 Signed-off-by: Paolo Bonzini --- tests/atomic_add-bench.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a

[Qemu-devel] [PULL 53/74] cpus: allow cpu_get_ticks out of BQL

2018-08-21 Thread Paolo Bonzini
Because of cpu_ticks_prev, we cannot use a seqlock. But then the conversion is even easier. :) Signed-off-by: Paolo Bonzini --- cpus.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/cpus.c b/cpus.c index a810a95..8ee6e5d 100644 --- a/cp

[Qemu-devel] [PULL 49/74] module: Use QEMU_MODULE_DIR as a search path

2018-08-21 Thread Paolo Bonzini
From: ryang The current paths for modules are CONFIG_QEMU_MODDIR and paths relative to the executable. Qemu and its modules can be installed and executed in paths that are different from these search paths. This change allows a search path to be specified by environment variable. An example usag

[Qemu-devel] [PULL 66/74] i2c: pm_smbus: Add interrupt handling

2018-08-21 Thread Paolo Bonzini
From: Corey Minyard Add the necessary code so that interrupts actually work from the pm_smbus device. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini Message-Id: <1534796770-10295-7-git-send-email-miny...@acm.org> Signed-off-by: Paolo Bonzini --- hw/i2c/pm_smbus.c

[Qemu-devel] [PULL 46/74] qom: convert the CPU list to RCU

2018-08-21 Thread Paolo Bonzini
From: "Emilio G. Cota" Iterating over the list without using atomics is undefined behaviour, since the list can be modified concurrently by other threads (e.g. every time a new thread is created in user-mode). Fix it by implementing the CPU list as an RCU QTAILQ. This requires a little bit of ex

[Qemu-devel] [PULL 26/74] hmp-commands-info: add sync-profile

2018-08-21 Thread Paolo Bonzini
From: "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 syn

[Qemu-devel] [PULL 28/74] update-linux-headers.sh: add qemu_fw_cfg.h

2018-08-21 Thread Paolo Bonzini
From: Marc-André Lureau The fw_cfg header was added during 4.17 cycle. Signed-off-by: Marc-André Lureau Message-Id: <20180817155910.5722-1-marcandre.lur...@redhat.com> Signed-off-by: Paolo Bonzini Signed-off-by: Marc-André Lureau --- scripts/update-linux-headers.sh | 4 +++- 1 file changed,

[Qemu-devel] [PULL 44/74] tests: add test-rcu-tailq

2018-08-21 Thread Paolo Bonzini
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Message-Id: <20180819091335.22863-10-c...@braap.org> Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 4 tests/test-rcu-list.c | 15 +++ tests/test-rcu-tailq.c | 2 ++ 3 files changed, 21 insertions(+) create mo

[Qemu-devel] [PULL 64/74] i2c: pm_smbus: Make the I2C block read command read-only

2018-08-21 Thread Paolo Bonzini
From: Corey Minyard It did have write capability, but the manual says the behavior with write enabled is undefined. So just set an error in this case. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini Message-Id: <1534796770-10295-4-git-send-email-miny...@acm.org> Signed-

[Qemu-devel] [PULL 37/74] rcu_queue: remove barrier from QLIST_EMPTY_RCU

2018-08-21 Thread Paolo Bonzini
From: "Emilio G. Cota" It's unnecessary because the pointer isn't dereferenced. Signed-off-by: Emilio G. Cota Message-Id: <20180819091335.22863-3-c...@braap.org> Signed-off-by: Paolo Bonzini --- include/qemu/rcu_queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inclu

[Qemu-devel] [PULL 17/74] seqlock: constify seqlock_read_begin

2018-08-21 Thread Paolo Bonzini
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Signed-off-by: Paolo Bonzini --- include/qemu/seqlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/seqlock.h b/include/qemu/seqlock.h index 8dee11d..c367516 100644 --- a/include/qemu/seqlock.h +++ b/incl

[Qemu-devel] [PULL 51/74] seqlock: add QemuLockable support

2018-08-21 Thread Paolo Bonzini
A shortcut when the seqlock write is protected by a spinlock or any mutex other than the BQL. Signed-off-by: Paolo Bonzini --- include/qemu/seqlock.h | 20 1 file changed, 20 insertions(+) diff --git a/include/qemu/seqlock.h b/include/qemu/seqlock.h index c367516..fd408b7 1

[Qemu-devel] [PULL 72/74] Revert "chardev: tcp: postpone async connection setup"

2018-08-21 Thread Paolo Bonzini
From: Marc-André Lureau This reverts commit 25679e5d58e258e9950685ffbd0cae4cd40d9cc2. This commit broke "reconnect socket" chardev that are created after "machine_done": they no longer try to connect. It broke also vhost-user-test that uses chardev while there is no "machine_done" event. The go

[Qemu-devel] [PULL 48/74] qemu-guest-agent: freeze-hook to ignore dpkg files as well

2018-08-21 Thread Paolo Bonzini
From: Christian Ehrhardt The hook already skips a set of rpm upgrade artifacts. Do the same with such files that might be created by dpkg. Fixes: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1484990 Signed-off-by: Christian Ehrhardt Message-Id: <1513160272-15921-1-git-send-email-christi

[Qemu-devel] [PULL 47/74] hw/intc/apic: Switch away from old_mmio

2018-08-21 Thread Paolo Bonzini
From: Peter Maydell Switch the apic away from using the old_mmio MemoryRegionOps accessor functions. Signed-off-by: Peter Maydell Message-Id: <20180803101943.23722-1-peter.mayd...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/intc/apic.c | 42 +++

[Qemu-devel] [PULL 33/74] build-sys: remove glib_subprocess check

2018-08-21 Thread Paolo Bonzini
From: Marc-André Lureau The check should be unnecessary since commit e7b3af81597db1a6b55f2c15d030d703c6b2c6ac "glib: bump min required glib library version to 2.40". Signed-off-by: Marc-André Lureau Message-Id: <20180730153639.26466-1-marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé

[Qemu-devel] [PULL 25/74] hmp-commands: add sync-profile

2018-08-21 Thread Paolo Bonzini
From: "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 Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Emilio G. Cota Signed-off-by

[Qemu-devel] [PULL 32/74] kvm: add call to qemu_add_opts() for -overcommit option

2018-08-21 Thread Paolo Bonzini
From: Prasad Singamsetty qemu command fails to process -overcommit option. Add the missing call to qemu_add_opts() in vl.c. Signed-off-by: Prasad Singamsetty Message-Id: <20180815175704.105902-1-prasad.singamse...@oracle.com> Reviewed-by: Mark Kanda Signed-off-by: Paolo Bonzini --- vl.c | 1

[Qemu-devel] [PULL 61/74] pc-dimm: assign and verify the "addr" property during pre_plug

2018-08-21 Thread Paolo Bonzini
From: David Hildenbrand We can assign and verify the address before realizing and trying to plug. reading/writing the address property should never fail for DIMMs, so let's reduce error handling a bit by using &error_abort. Getting access to the memory region now might however fail. So forward er

[Qemu-devel] [PULL 35/74] target-i386: fix segment limit check in ljmp

2018-08-21 Thread Paolo Bonzini
From: Andrew Oates The current implementation has three bugs, * segment limits are not enforced in protected mode if the L bit is set in the target segment descriptor * segment limits are not enforced in compatibility mode (ljmp to 32-bit code segment in long mode) * #GP(new_cs) is gener

[Qemu-devel] [PULL 36/74] rcu_queue: use atomic_set in QLIST_REMOVE_RCU

2018-08-21 Thread Paolo Bonzini
From: "Emilio G. Cota" To avoid undefined behaviour. Signed-off-by: Emilio G. Cota Message-Id: <20180819091335.22863-2-c...@braap.org> Signed-off-by: Paolo Bonzini --- include/qemu/rcu_queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/rcu_queue.h b/inclu

[Qemu-devel] [PULL 22/74] qsp: track BQL callers explicitly

2018-08-21 Thread Paolo Bonzini
From: "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 trackin

[Qemu-devel] [PULL 21/74] qsp: support call site coalescing

2018-08-21 Thread Paolo Bonzini
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Signed-off-by: Paolo Bonzini --- 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/

  1   2   3   4   5   >