Re: [Qemu-devel] [PATCH v7 00/17] VT-d: vfio enablement and misc enhances

2017-02-27 Thread Peter Xu
On Tue, Feb 07, 2017 at 04:28:02PM +0800, Peter Xu wrote: > This is v7 of vt-d vfio enablement series. > > v7: > - for the two traces patches: Change subjects. Remove vtd_err() and > vtd_err_nonzero_rsvd() tracers, instead using standalone trace for > each of the places. Don't remove any

Re: [Qemu-devel] [PULL 00/31] 9p patches 2017-02-27 for 2.9 soft freeze

2017-02-27 Thread Greg Kurz
On Tue, 28 Feb 2017 08:58:55 +0300 Michael Tokarev wrote: > Greg, can you please send a separate pull request > just for the symlink attack issue, so it can be > easily picked up by downstreams if needed? > It makes sense indeed. I'll do that. Cheers. -- Greg > Thanks, > >

[Qemu-devel] [PULL 03/14] hw/core/or-irq: Mark the device with cannot_instantiate_with_device_add_yet

2017-02-27 Thread Michael Tokarev
From: Thomas Huth The "or-irq" device needs to be wired up in source code, there is no way the user can make any real use of this device with the "-device" parameter or the "device_add" monitor command yet. Signed-off-by: Thomas Huth Reviewed-by: Markus

[Qemu-devel] [PULL 12/14] lm32: milkymist-tmu2: fix a third integer overflow

2017-02-27 Thread Michael Tokarev
From: Peter Maydell Don't truncate the multiplication and do a 64 bit one instead because the result is stored in a 64 bit variable. This fixes a similar coverity warning to commits 237a8650d640 and 4382fa655498, in a similar way, and is the final third of the fix for

[Qemu-devel] [PULL 02/14] softfloat: Use correct type in float64_to_uint64_round_to_zero()

2017-02-27 Thread Michael Tokarev
From: Peter Maydell In float64_to_uint64_round_to_zero() a typo meant that we were taking the uint64_t return value from float64_to_uint64() and putting it into an int64_t variable before returning it as uint64_t again. Use uint64_t instead of pointlessly casting it

[Qemu-devel] [PULL 07/14] register: fix incorrect read mask

2017-02-27 Thread Michael Tokarev
From: Philippe Mathieu-Daudé The register_read() and register_write() functions expect a bitmask argument. To avoid duplicated code, a new inlined function register_enabled_mask() is introduced. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair

[Qemu-devel] [PULL 04/14] hw/core/register: Mark the device with cannot_instantiate_with_device_add_yet

2017-02-27 Thread Michael Tokarev
From: Thomas Huth The "qemu,register" device needs to be wired up in source code, there is no way the user can make any real use of this device with the "-device" parameter or the "device_add" monitor command yet. Signed-off-by: Thomas Huth Reviewed-by:

[Qemu-devel] [PULL 11/14] qemu-options.hx: add missing id=chr0 chardev argument in vhost-user example

2017-02-27 Thread Michael Tokarev
From: Vincenzo Maffione In the vhost-user example, a chardev with id chr0 is referenced by the vhost-user net backend, but the id is not specified in the chardev option. Signed-off-by: Vincenzo Maffione Reviewed-by: Markus Armbruster

[Qemu-devel] [PULL 09/14] tests/prom-env: Enable the test for the sun4u machine, too

2017-02-27 Thread Michael Tokarev
From: Thomas Huth The 32-bit TCG bug has been fixed a while ago, so we can enable this test for sparc64 now, too. Unfortunately, OpenBIOS does not work with the sun4v machine anymore (it needs to catch up with the improved emulation), so we can only enable this test for the

[Qemu-devel] [PULL 08/14] cadence_gem: Remove unused parameter debug message

2017-02-27 Thread Michael Tokarev
From: Fam Zheng Reported by cppcheck. Signed-off-by: Fam Zheng Signed-off-by: Michael Tokarev --- hw/net/cadence_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index

Re: [Qemu-devel] [PATCH v4 02/26] ppc/xics: fix ICP and ICS reset

2017-02-27 Thread Cédric Le Goater
On 02/28/2017 03:00 AM, David Gibson wrote: > On Mon, Feb 27, 2017 at 03:29:09PM +0100, Cédric Le Goater wrote: >> commit 5b17c7207938 ("xics: XICS should not be a SysBusDevice") >> changed the nature of the XICS object to be a descendent of >> TYPE_DEVICE. By doing so, the object is not on a bus

[Qemu-devel] [PULL 10/14] Update copyright year

2017-02-27 Thread Michael Tokarev
From: Marc-André Lureau It's still time to wish happy new year! The Year of the Rooster will begin on January 28, 2017! Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Tokarev

[Qemu-devel] [PULL 14/14] syscall: fixed mincore(2) not failing with ENOMEM

2017-02-27 Thread Michael Tokarev
From: "Franklin \\\"Snaipe\\\" Mathieu" The current implementation of the mincore(2) syscall sets errno to EFAULT when the region identified by the first two parameters is invalid. This goes against the man page specification, where mincore(2) should only fail with EFAULT

[Qemu-devel] [PULL 05/14] CODING_STYLE: Mention preferred comment form

2017-02-27 Thread Michael Tokarev
From: Peter Maydell Our defacto coding style strongly prefers /* */ style comments over the single-line // style, and checkpatch enforces this, but we don't actually document this. Mention it in CODING_STYLE. Suggested-by: Thomas Huth Signed-off-by:

[Qemu-devel] [PULL 06/14] ide: remove undefined behavior in ide-test

2017-02-27 Thread Michael Tokarev
From: John Snow trivial: initialize the dirty buffer with a random-ish byte. Stops valgrind from whining about uninitialized buffers. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Tokarev

[Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28

2017-02-27 Thread Michael Tokarev
This is yet another trivial patches pull request. Please consider applying/pulling. The following changes since commit 8f2d7c341184a95d05476ea3c45dbae2b9ddbe51: Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-02-27-1' into staging (2017-02-27 15:33:21 +) are

[Qemu-devel] [PULL 01/14] target/s390x: Fix typo

2017-02-27 Thread Michael Tokarev
From: Stefan Weil Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- target/s390x/cpu_models.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index

[Qemu-devel] [PULL 13/14] hw/acpi/tco.c: fix tco timer stop

2017-02-27 Thread Michael Tokarev
From: Igor Pavlikevich TCO timer does not actually stop Signed-off-by: Igor Pavlikevich Signed-off-by: Michael Tokarev --- hw/acpi/tco.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/acpi/tco.c b/hw/acpi/tco.c index

Re: [Qemu-devel] [PATCH V2 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-02-27 Thread Zhang Chen
On 02/28/2017 01:47 PM, Jason Wang wrote: On 2017年02月28日 13:18, Zhang Chen wrote: Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Before compare all tcp packet, we compare tcp checksum firstly,

Re: [Qemu-devel] [PATCH] syscall: fixed mincore(2) not failing with ENOMEM

2017-02-27 Thread Michael Tokarev
16.02.2017 11:58, Franklin Snaipe Mathieu wrote: > From: "Franklin \"Snaipe\" Mathieu" > > The current implementation of the mincore(2) syscall sets errno to > EFAULT when the region identified by the first two parameters is > invalid. > > This goes against the man page

Re: [Qemu-devel] [PULL 00/31] 9p patches 2017-02-27 for 2.9 soft freeze

2017-02-27 Thread Michael Tokarev
Greg, can you please send a separate pull request just for the symlink attack issue, so it can be easily picked up by downstreams if needed? Thanks, /mjt

[Qemu-devel] [PATCH] linux-user: Fix fork() and vfork()

2017-02-27 Thread Tim Hentenaar
A check was introduced in 5ea2fc84da1bffce749c9d0848f5336def2818bb which causes fork() and vfork() to fail if TARGET_SIGCHLD != SIGCHLD. Signed-off-by: Tim Hentenaar --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [PATCH V2 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-02-27 Thread Jason Wang
On 2017年02月28日 13:18, Zhang Chen wrote: Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Before compare all tcp packet, we compare tcp checksum firstly, this function can get better performance.

[Qemu-devel] [PATCH] mttcg/i386: Patch instruction using async_safe_* framework

2017-02-27 Thread Pranith Kumar
In mttcg, calling pause_all_vcpus() during execution from the generated TBs causes a deadlock if some vCPU is waiting for exclusive execution in start_exclusive(). Fix this by using the aync_safe_* framework instead of pausing vcpus for patching instructions. CC: Paolo Bonzini

[Qemu-devel] [PATCH V2 1/3] COLO-compare: Rename compare function and remove duplicate codes

2017-02-27 Thread Zhang Chen
Rename colo_packet_compare() to colo_packet_compare_common() that make tcp_compare udp_compare icmp_compare reuse this function. Remove minimum packet size check in icmp_compare, because we have check this in parse_packet_early(). Signed-off-by: Zhang Chen ---

[Qemu-devel] [PATCH V2 3/3] COLO-compare: Fix icmp and udp compare different packet always dump bug

2017-02-27 Thread Zhang Chen
Signed-off-by: Zhang Chen --- net/colo-compare.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 61fcdf2..6b38723 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@

[Qemu-devel] [PATCH V2 2/3] COLO-compare: Optimize compare_common and compare_tcp

2017-02-27 Thread Zhang Chen
Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Before compare all tcp packet, we compare tcp checksum firstly, this function can get better performance. Signed-off-by: Zhang Chen

[Qemu-devel] [PATCH V2 0/3] COLO-compare: Optimize the code and fix some bug

2017-02-27 Thread Zhang Chen
This series we will Optimize the code and fix some bug. Patch1: Rename colo_packet_compare() and remove duplicate check in compare icmp. Patch2: Optimize compare_common and increase compare performance. Patch3: Fix debug info always print bug. Zhang Chen (3): COLO-compare: Rename compare

Re: [Qemu-devel] [PATCH Risu 1/5] risugen_ppc64: Load random 128-bit data to VSX registers

2017-02-27 Thread Nikunj A Dadhania
Jose Ricardo Ziviani writes: > Signed-off-by: Jose Ricardo Ziviani > --- > risugen_ppc64.pm | 40 +--- > 1 file changed, 29 insertions(+), 11 deletions(-) > > diff --git a/risugen_ppc64.pm

Re: [Qemu-devel] [PATCH v3 0/2] filter-rewriter: fix one bug and one improvement

2017-02-27 Thread Jason Wang
On 2017年02月28日 11:54, zhanghailiang wrote: Hi, Patch 1 fixes a double free bug. Patch 2 is an optimization for filter-rewriter. Please review, thanks. zhanghailiang (2): net/colo: fix memory double free error filter-rewriter: skip net_checksum_calculate() while offset = 0

[Qemu-devel] [PULL 1/2] block/mirror: fix broken sparseness detection

2017-02-27 Thread Jeff Cody
From: John Snow int64_t is in all likelihood the actual scalar type we want. Yep, really. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1219541 Signed-off-by: John Snow Reviewed-by: Jeff Cody Signed-off-by: Jeff Cody

[Qemu-devel] [PULL 2/2] iscsi: add missing colons to the qapi docs

2017-02-27 Thread Jeff Cody
The missing colons make the iscsi part of the documentation not render quite as nicely, so add those in. Signed-off-by: Jeff Cody --- qapi/block-core.json | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/qapi/block-core.json

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

2017-02-27 Thread Jeff Cody
The following changes since commit 8f2d7c341184a95d05476ea3c45dbae2b9ddbe51: Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-02-27-1' into staging (2017-02-27 15:33:21 +) are available in the git repository at: https://github.com/codyprime/qemu-kvm-jtc.git

Re: [Qemu-devel] [PATCH 1/1] iscsi: add missing colons to the qapi docs

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 11:29:07PM -0500, Jeff Cody wrote: > The missing colons make the iscsi part of the documentation not render > quite as nicely, so add those in. > > Signed-off-by: Jeff Cody > --- > qapi/block-core.json | 18 +- > 1 file changed, 9

[Qemu-devel] [PATCH 1/1] iscsi: add missing colons to the qapi docs

2017-02-27 Thread Jeff Cody
The missing colons make the iscsi part of the documentation not render quite as nicely, so add those in. Signed-off-by: Jeff Cody --- qapi/block-core.json | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/qapi/block-core.json

[Qemu-devel] [PATCH] Add PowerPC 32-bit guest memory dump support

2017-02-27 Thread Mike Nawrocki
Signed-off-by: Mike Nawrocki I've rebased my branch on master and regenerated the patch. I've run the patch through checkstyle.pl and it reported no issues, whitespace or otherwise. I suspect that Outlook was messing with my formatting, so let's give git

[Qemu-devel] [PATCH v3 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-27 Thread Jeff Cody
This adds support for three additional options that may be specified by QAPI in blockdev-add: server: host, port auth method: either 'cephx' or 'none' The "server" and "auth-supported" QAPI parameters are arrays. To conform with the rados API, the array items are join as a single string

[Qemu-devel] [PATCH v3 4/5] block/rbd: add blockdev-add support

2017-02-27 Thread Jeff Cody
Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- qapi/block-core.json | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 5f82d35..f152953 100644 ---

[Qemu-devel] [PATCH v3 3/5] block/rbd: parse all options via bdrv_parse_filename

2017-02-27 Thread Jeff Cody
Get rid of qemu_rbd_parsename in favor of bdrv_parse_filename. This simplifies a lot of the parsing as well, as we can treat everything a bit simpler since nonexistent options are simply NULL pointers instead of empty strings. An important item to note: Ceph has many extra option values that can

[Qemu-devel] [PATCH v3 1/5] block/rbd: don't copy strings in qemu_rbd_next_tok()

2017-02-27 Thread Jeff Cody
This patch is prep work for parsing options for .bdrv_parse_filename, and using QDict options. The function qemu_rbd_next_tok() searched for various key/value pairs, and copied them into buffers. This will soon be an unnecessary extra step, so we will now return found strings by reference only,

[Qemu-devel] [PATCH v3 2/5] block/rbd: add all the currently supported runtime_opts

2017-02-27 Thread Jeff Cody
This adds all the currently supported runtime opts, which are the options as parsed from the filename. All of these options are explicitly checked for during during runtime, with an exception to the "keyvalue-pairs" option. This option contains all the key/value pairs that the QEMU rbd driver

[Qemu-devel] [PATCH v3 0/5] RBD: blockdev-add (for 2.9?)

2017-02-27 Thread Jeff Cody
This series adds blockdev-add for rbd. Changes from v2: Patch 2: Updated commit message, and documented the runtime opts (Thanks Eric) Patch 3: Fixed commit type, added "FIXME" in ugly string concat spot (Thanks Eric) Patch 4: Fixed all the nits - deleted lines, spaces.

[Qemu-devel] [PATCH v3 1/2] net/colo: fix memory double free error

2017-02-27 Thread zhanghailiang
The 'primary_list' and 'secondary_list' members of struct Connection is not allocated through dynamically g_queue_new(), but we free it by using g_queue_free(), which will lead to a double-free bug. Reviewed-by: Zhang Chen Signed-off-by: zhanghailiang

Re: [Qemu-devel] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 04:47:54PM -0600, Eric Blake wrote: > On 02/27/2017 12:58 PM, Jeff Cody wrote: > > This adds support for two additional options that may be specified > > by QAPI in blockdev-add: > > > > mon_host: servername and port > > auth_supported: either 'cephx' or 'none' >

[Qemu-devel] [PATCH v3 0/2] filter-rewriter: fix one bug and one improvement

2017-02-27 Thread zhanghailiang
Hi, Patch 1 fixes a double free bug. Patch 2 is an optimization for filter-rewriter. Please review, thanks. zhanghailiang (2): net/colo: fix memory double free error filter-rewriter: skip net_checksum_calculate() while offset = 0 net/colo.c| 4 ++-- net/filter-rewriter.c |

[Qemu-devel] [PATCH v3 2/2] filter-rewriter: skip net_checksum_calculate() while offset = 0

2017-02-27 Thread zhanghailiang
While the offset of packets's sequence for primary side and secondary side is zero, it is unnecessary to call net_checksum_calculate() to recalculate the checksume value of packets. Signed-off-by: zhanghailiang --- net/filter-rewriter.c | 17 +++-- 1

Re: [Qemu-devel] [PATCH v4 00/26] ppc/xics: simplify ICS and ICP creation

2017-02-27 Thread David Gibson
On Mon, Feb 27, 2017 at 03:29:07PM +0100, Cédric Le Goater wrote: > > Hello, > > The goal behind this series is to simplify the XICS interface by > moving back in the machine the way the ICS and ICP objects interact > together. It's up to the machine to implement this "fabric" logic by >

Re: [Qemu-devel] [RFC PATCH v2 08/12] spapr: Only setup HTP if necessary.

2017-02-27 Thread David Gibson
On Tue, Feb 28, 2017 at 01:25:17PM +1100, Suraj Jitindar Singh wrote: > On Tue, 2017-02-28 at 11:28 +1100, David Gibson wrote: > > s/HTP/HPT/ in subject line. > > > > > > On Thu, Feb 23, 2017 at 05:00:01PM +1100, Sam Bobroff wrote: > > > > > > If QEMU is using KVM, and KVM is capable of running

Re: [Qemu-devel] [PATCH 1/3] COLO-compare: Add packet size check and some fix

2017-02-27 Thread Zhang Chen
On 02/28/2017 11:22 AM, Jason Wang wrote: On 2017年02月25日 11:43, Zhang Chen wrote: Sorry, This patch has been renamed. please ignore this patch. Thanks Zhang Chen Want to repost to just withdraw this series (patch 2 does not apply)? I have repost this patch, and will send V2 about

Re: [Qemu-devel] [PATCH 1/3] COLO-compare: Add packet size check and some fix

2017-02-27 Thread Jason Wang
On 2017年02月25日 11:43, Zhang Chen wrote: Sorry, This patch has been renamed. please ignore this patch. Thanks Zhang Chen Want to repost to just withdraw this series (patch 2 does not apply)? Thanks

Re: [Qemu-devel] [PATCH v2 2/3] filter-rewriter: fix memory leak for connection in connection_track_table

2017-02-27 Thread Jason Wang
On 2017年02月27日 18:29, Hailiang Zhang wrote: On 2017/2/27 17:05, Jason Wang wrote: On 2017年02月27日 14:53, Hailiang Zhang wrote: I think the issue is that your code can not differ A from B. We have a parameter 'fin_ack_seq' recording the sequence of 'FIN=1,ACK=1,seq=w,ack=u+1' and if the

Re: [Qemu-devel] [PATCH v4 02/26] ppc/xics: fix ICP and ICS reset

2017-02-27 Thread David Gibson
On Mon, Feb 27, 2017 at 03:29:09PM +0100, Cédric Le Goater wrote: > commit 5b17c7207938 ("xics: XICS should not be a SysBusDevice") > changed the nature of the XICS object to be a descendent of > TYPE_DEVICE. By doing so, the object is not on a bus and its reset > handler is not called anymore.

Re: [Qemu-devel] [RFC PATCH v2 06/12] spapr: Add ibm, processor-radix-AP-encodings to the device tree

2017-02-27 Thread Suraj Jitindar Singh
On Tue, 2017-02-28 at 11:12 +1100, David Gibson wrote: > On Thu, Feb 23, 2017 at 04:59:59PM +1100, Sam Bobroff wrote: > > > > Use the new ioctl, KVM_PPC_GET_RMMU_INFO, to fetch radix MMU > > information from KVM and present the page encodings in the device > > tree > > under

Re: [Qemu-devel] [RFC PATCH v2 08/12] spapr: Only setup HTP if necessary.

2017-02-27 Thread Suraj Jitindar Singh
On Tue, 2017-02-28 at 11:28 +1100, David Gibson wrote: > s/HTP/HPT/ in subject line. > > > On Thu, Feb 23, 2017 at 05:00:01PM +1100, Sam Bobroff wrote: > > > > If QEMU is using KVM, and KVM is capable of running in radix mode, > > guests can be run in real-mode without allocating a HPT (because

[Qemu-devel] [PATCH v4] vfio error recovery: kernel support

2017-02-27 Thread Cao jin
From: "Michael S. Tsirkin" 0. What happens now (PCIE AER only) Fatal errors cause a link reset. Non fatal errors don't. All errors stop the VM eventually, but not immediately because it's detected and reported asynchronously. Interrupts are forwarded as usual.

Re: [Qemu-devel] [RFC PATCH v2 04/12] Move virtio_mmio.h to fix update-linux-headers.sh

2017-02-27 Thread Sam Bobroff
On Fri, Feb 24, 2017 at 06:47:03PM +0200, Michael S. Tsirkin wrote: > On Thu, Feb 23, 2017 at 04:59:57PM +1100, Sam Bobroff wrote: > > Currently, running update-linux-headers.sh will produce a patch that > > deletes virtio_mmio.h, which is still needed. This happens because > > virtio_mmio.h is in

Re: [Qemu-devel] [RFC 00/13] Live memory snapshot based on userfaultfd

2017-02-27 Thread Hailiang Zhang
Hi, On 2017/2/27 23:37, Christian Pinto wrote: Hello Hailiang, are there any updates on this patch series? Are you planning to release a new version? No, userfaultfd still does not support write-protect for KVM. You can see the newest discussion about it here:

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-02-27 Thread Alistair Francis
On Fri, Jan 27, 2017 at 9:06 AM, Peter Maydell wrote: > On 26 January 2017 at 05:50, Thomas Huth wrote: >> I think there is no real use case yet. But this fix is 1) simpler than >> doing an error_report() + exit() here, and 2) maybe the vision of >>

Re: [Qemu-devel] [PATCH] vfio pci: kernel support of error recovery only for non fatal error

2017-02-27 Thread Cao jin
On 02/28/2017 12:16 AM, Michael S. Tsirkin wrote: > On Mon, Feb 27, 2017 at 03:28:43PM +0800, Cao jin wrote: >> Subject: Re: [PATCH] vfio pci: kernel support of error recovery only for non >> fatal error > > Don't make the subject so long. This is why I had > [PATCH v3] vfio error

Re: [Qemu-devel] [PATCH] spapr/pci: populate PCI DT in reverse order

2017-02-27 Thread David Gibson
On Wed, Feb 22, 2017 at 11:56:53AM +0100, Greg Kurz wrote: > From: Greg Kurz > > Since commit 1d2d974244c6 "spapr_pci: enumerate and add PCI device tree", QEMU > populates the PCI device tree in the opposite order compared to SLOF. > > Before 1d2d974244c6: > >

Re: [Qemu-devel] [Qemu-ppc] [PATCH] linux-user: fill target sigcontext struct accordingly

2017-02-27 Thread David Gibson
On Wed, Feb 01, 2017 at 09:43:57PM +0100, Laurent Vivier wrote: > Le 31/01/2017 à 23:05, Jose Ricardo Ziviani a écrit : > > A segfault is noticed when an emulated program uses any of ucontext > > regs fields. Risu detected this issue in the following operation when > > handling a signal: > >

Re: [Qemu-devel] [PATCH V10 0/2] Add new qmp commands to suppurt Xen COLO

2017-02-27 Thread Hailiang Zhang
On 2017/2/28 6:52, Stefano Stabellini wrote: On Mon, 27 Feb 2017, Eric Blake wrote: On 02/27/2017 04:31 PM, Stefano Stabellini wrote: Eric, are you OK with this series going upstream? If so, do you want me to send the pull request for it or are you going to handle it? Both patches have my

Re: [Qemu-devel] [PATCH v2] memory: Introduce DEVICE_HOST_ENDIAN for ram device

2017-02-27 Thread Alexey Kardashevskiy
On 28/02/17 11:41, David Gibson wrote: > On Mon, Feb 27, 2017 at 12:52:44PM +0800, Yongji Xie wrote: >> At the moment ram device's memory regions are DEVICE_NATIVE_ENDIAN. It's >> incorrect. This memory region is backed by a MMIO area in host, so the >> uint64_t data that MemoryRegionOps read

[Qemu-devel] [PULL] target/alpha: Enable MTTCG by default

2017-02-27 Thread Richard Henderson
Alpha has a weak memory ordering and issues all of the required barriers. Signed-off-by: Richard Henderson --- configure | 1 + target/alpha/cpu.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/configure b/configure index df58e91..6c21975 100755 ---

Re: [Qemu-devel] [PATCH] spapr/pci: populate PCI DT in reverse order

2017-02-27 Thread Alexey Kardashevskiy
On 25/02/17 21:40, Greg Kurz wrote: > On Sat, 25 Feb 2017 20:39:18 +1100 > Alexey Kardashevskiy wrote: > >> On 22/02/17 21:56, Greg Kurz wrote: >>> From: Greg Kurz >>> >>> Since commit 1d2d974244c6 "spapr_pci: enumerate and add PCI device tree", >>>

Re: [Qemu-devel] [RFC PATCH v2 10/12] spapr: move spapr_populate_pa_features()

2017-02-27 Thread David Gibson
On Thu, Feb 23, 2017 at 05:00:03PM +1100, Sam Bobroff wrote: > In the next patch, spapr_fixup_cpu_dt() will need to call > spapr_populate_pa_features() so move it's definition up without making > any other changes. s/it's/its/ > > Signed-off-by: Sam Bobroff > --- >

Re: [Qemu-devel] [PATCH] Add PowerPC 32-bit guest memory dump support

2017-02-27 Thread da...@gibson.dropbear.id.au
On Wed, Feb 08, 2017 at 08:39:36PM +, Nawrocki, Michael wrote: > This patch extends support for the `dump-guest-memory` command to the 32-bit > PowerPC architecture. It relies on the assumption that a 64-bit guest will > not dump a 32-bit core file (and vice versa); if this assumption is

[Qemu-devel] [PULL] Enable MTTCG for target/alpha

2017-02-27 Thread Richard Henderson
Thanks to Alex for the heroics getting the patch set in. This is a tiny follow-up to enable it for Alpha. r~ The following changes since commit 8f2d7c341184a95d05476ea3c45dbae2b9ddbe51: Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-02-27-1' into staging (2017-02-27

Re: [Qemu-devel] [PATCH v2] memory: Introduce DEVICE_HOST_ENDIAN for ram device

2017-02-27 Thread David Gibson
On Mon, Feb 27, 2017 at 12:52:44PM +0800, Yongji Xie wrote: > At the moment ram device's memory regions are DEVICE_NATIVE_ENDIAN. It's > incorrect. This memory region is backed by a MMIO area in host, so the > uint64_t data that MemoryRegionOps read from/write to this area should be > host-endian

Re: [Qemu-devel] [RFC PATCH v2 08/12] spapr: Only setup HTP if necessary.

2017-02-27 Thread David Gibson
s/HTP/HPT/ in subject line. On Thu, Feb 23, 2017 at 05:00:01PM +1100, Sam Bobroff wrote: > If QEMU is using KVM, and KVM is capable of running in radix mode, > guests can be run in real-mode without allocating a HPT (because KVM > will use a minimal RPT). So in this case, we avoid creating the

Re: [Qemu-devel] [RFC PATCH v2 07/12] target-ppc: support KVM_CAP_PPC_MMU_RADIX, KVM_CAP_PPC_MMU_HASH_V3

2017-02-27 Thread David Gibson
On Thu, Feb 23, 2017 at 05:00:00PM +1100, Sam Bobroff wrote: > Query and cache the value of two new KVM capabilities that indicate > KVM's support for new radix and hash modes of the MMU. > > Signed-off-by: Sam Bobroff Reviewed-by: David Gibson

Re: [Qemu-devel] [PULL 00/31] 9p patches 2017-02-27 for 2.9 soft freeze

2017-02-27 Thread Greg Kurz
Peter, I have some issues with this pull request. Please don't apply it, I'll respin a new one. Thanks. On Mon, 27 Feb 2017 23:59:50 +0100 Greg Kurz wrote: > The following changes since commit 8f2d7c341184a95d05476ea3c45dbae2b9ddbe51: > > Merge remote-tracking branch >

Re: [Qemu-devel] [PULL 00/31] 9p patches 2017-02-27 for 2.9 soft freeze

2017-02-27 Thread Greg Kurz
On Mon, 27 Feb 2017 16:00:25 -0800 (PST) no-re...@patchew.org wrote: > Hi, > > This series failed build test on s390x host. Please find the details below. > Hmm... I don't understand how this is related to this pull request... :-\ > Type: series > Subject: [Qemu-devel] [PULL 00/31] 9p patches

Re: [Qemu-devel] [PATCH v2] target-s390x: Implement lpp instruction

2017-02-27 Thread Richard Henderson
On 02/27/2017 07:53 PM, Miroslav Benes wrote: Linux arch/s390/kernel/head(64).S uses lpp instruction if it is available in facilities list provided by stfl/stfle instruction. This is the case of newer z/System generations and their qemu definition. Signed-off-by: Miroslav Benes

Re: [Qemu-devel] [RFC PATCH v2 06/12] spapr: Add ibm, processor-radix-AP-encodings to the device tree

2017-02-27 Thread David Gibson
On Thu, Feb 23, 2017 at 04:59:59PM +1100, Sam Bobroff wrote: > Use the new ioctl, KVM_PPC_GET_RMMU_INFO, to fetch radix MMU > information from KVM and present the page encodings in the device tree > under ibm,processor-radix-AP-encodings. This provides page size > information to the guest which is

Re: [Qemu-devel] [RFC PATCH v2 12/12] spapr: Workaround for broken radix guests

2017-02-27 Thread David Gibson
On Thu, Feb 23, 2017 at 05:00:05PM +1100, Sam Bobroff wrote: > For a little while around 4.9, Linux kernels that saw the radix bit in > ibm,pa-features would attempt to set up the MMU as if they were a > hypervisor, even if they were a guest, which would cause them to > crash. > > Work around

Re: [Qemu-devel] [PATCH v2 04/28] 9pfs: introduce openat_nofollow() helper

2017-02-27 Thread Greg Kurz
On Mon, 27 Feb 2017 17:28:33 -0600 Eric Blake wrote: > On 02/26/2017 04:42 PM, Greg Kurz wrote: > > When using the passthrough security mode, symbolic links created by the > > guest are actual symbolic links on the host file system. > > > > > > > diff --git

Re: [Qemu-devel] [PULL 07/31] 9pfs: introduce relative_openat_nofollow() helper

2017-02-27 Thread Greg Kurz
On Mon, 27 Feb 2017 17:37:56 -0600 Eric Blake wrote: > On 02/27/2017 04:59 PM, Greg Kurz wrote: > > When using the passthrough security mode, symbolic links created by the > > guest are actual symbolic links on the host file system. > > > > Hmm, I just barely started

Re: [Qemu-devel] [PATCH 2/2] linux-user: fix do_rt_sigreturn on m68k linux userspace emulation

2017-02-27 Thread Richard Henderson
On 02/25/2017 10:05 PM, Laurent Vivier wrote: From: Michael Karcher do_rt_sigreturn uses an uninitialised local variable instead of fetching the old signal mask directly from the signal frame when restoring the mask, so the signal mask is undefined after

Re: [Qemu-devel] [PATCH 1/2] linux-user: correctly manage SR in ucontext

2017-02-27 Thread Richard Henderson
On 02/25/2017 10:05 PM, Laurent Vivier wrote: Use cpu_m68k_get_ccr()/cpu_m68k_set_ccr() to setup and restore correctly the value of SR in the ucontext structure Signed-off-by: Laurent Vivier --- linux-user/signal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [PULL 00/31] 9p patches 2017-02-27 for 2.9 soft freeze

2017-02-27 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Type: series Subject: [Qemu-devel] [PULL 00/31] 9p patches 2017-02-27 for 2.9 soft freeze Message-id: 1488236421-30983-1-git-send-email-gr...@kaod.org === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be

Re: [Qemu-devel] [PATCH v6 0/8] POWER9 TCG enablements - part15

2017-02-27 Thread David Gibson
On Mon, Feb 27, 2017 at 10:27:53AM +0530, Nikunj A Dadhania wrote: > This series contains implentation of CA32 and OV32 bits added to the > ISA 3.0. Various fixed-point arithmetic instructions are updated to take > care of the newer flags. > > Finally the last patch adds new instruction mcrxrx,

Re: [Qemu-devel] [PULL 00/31] 9p patches 2017-02-27 for 2.9 soft freeze

2017-02-27 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 1488236421-30983-1-git-send-email-gr...@kaod.org Type: series Subject: [Qemu-devel] [PULL 00/31] 9p patches 2017-02-27 for 2.9 soft freeze === TEST SCRIPT BEGIN === #!/bin/bash

Re: [Qemu-devel] [PULL 07/31] 9pfs: introduce relative_openat_nofollow() helper

2017-02-27 Thread Eric Blake
On 02/27/2017 04:59 PM, Greg Kurz wrote: > When using the passthrough security mode, symbolic links created by the > guest are actual symbolic links on the host file system. > Hmm, I just barely started reviewing the series, and see a pull request. At this point, anything I point out can

Re: [Qemu-devel] [PATCH v2 04/28] 9pfs: introduce openat_nofollow() helper

2017-02-27 Thread Eric Blake
On 02/26/2017 04:42 PM, Greg Kurz wrote: > When using the passthrough security mode, symbolic links created by the > guest are actual symbolic links on the host file system. > > > diff --git a/hw/9pfs/9p-util.c b/hw/9pfs/9p-util.c > new file mode 100644 > index ..62fd7a76212a > ---

Re: [Qemu-devel] [PATCH v16 08/22] qcow2: add bitmaps extension

2017-02-27 Thread John Snow
On 02/27/2017 07:27 AM, Max Reitz wrote: > On 25.02.2017 18:07, Vladimir Sementsov-Ogievskiy wrote: >> Add bitmap extension as specified in docs/specs/qcow2.txt. >> For now, just mirror extension header into Qcow2 state and check >> constraints. Also, calculate refcounts for qcow2 bitmaps, to

Re: [Qemu-devel] [PATCH v2 3/5] block/rbd: parse all options via bdrv_parse_filename

2017-02-27 Thread Eric Blake
On 02/27/2017 04:56 PM, Jeff Cody wrote: >>> static BlockDriver bdrv_rbd = { > >>> -.instance_size = sizeof(BDRVRBDState), >>> -.bdrv_needs_filename = true, >>> -.bdrv_file_open = qemu_rbd_open, >>> -.bdrv_close = qemu_rbd_close, >>> -.bdrv_create=

[Qemu-devel] [PULL 28/31] 9pfs: local: mknod: don't follow symlinks

2017-02-27 Thread Greg Kurz
The local_mknod() callback is vulnerable to symlink attacks because it calls: (1) mknod() which follows symbolic links for all path elements but the rightmost one (2) local_set_xattr()->setxattr() which follows symbolic links for all path elements (3) local_set_mapped_file_attr() which

[Qemu-devel] [PULL 29/31] 9pfs: local: mkdir: don't follow symlinks

2017-02-27 Thread Greg Kurz
The local_mkdir() callback is vulnerable to symlink attacks because it calls: (1) mkdir() which follows symbolic links for all path elements but the rightmost one (2) local_set_xattr()->setxattr() which follows symbolic links for all path elements (3) local_set_mapped_file_attr() which

[Qemu-devel] [PULL 24/31] 9pfs: local: link: don't follow symlinks

2017-02-27 Thread Greg Kurz
The local_link() callback is vulnerable to symlink attacks because it calls: (1) link() which follows symbolic links for all path elements but the rightmost one (2) local_create_mapped_attr_dir()->mkdir() which follows symbolic links for all path elements but the rightmost one This patch

[Qemu-devel] [PULL 30/31] 9pfs: local: open2: don't follow symlinks

2017-02-27 Thread Greg Kurz
The local_open2() callback is vulnerable to symlink attacks because it calls: (1) open() which follows symbolic links for all path elements but the rightmost one (2) local_set_xattr()->setxattr() which follows symbolic links for all path elements (3) local_set_mapped_file_attr() which

Re: [Qemu-devel] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 04:47:54PM -0600, Eric Blake wrote: > On 02/27/2017 12:58 PM, Jeff Cody wrote: > > This adds support for two additional options that may be specified > > by QAPI in blockdev-add: > > > > mon_host: servername and port > > auth_supported: either 'cephx' or 'none' >

[Qemu-devel] [PULL 25/31] 9pfs: local: chmod: don't follow symlinks

2017-02-27 Thread Greg Kurz
The local_chmod() callback is vulnerable to symlink attacks because it calls: (1) chmod() which follows symbolic links for all path elements (2) local_set_xattr()->setxattr() which follows symbolic links for all path elements (3) local_set_mapped_file_attr() which calls in turn local_fopen()

[Qemu-devel] [PULL 09/31] 9pfs: local: open/opendir: don't follow symlinks

2017-02-27 Thread Greg Kurz
The local_open() and local_opendir() callbacks are vulnerable to symlink attacks because they call: (1) open(O_NOFOLLOW) which follows symbolic links in all path elements but the rightmost one (2) opendir() which follows symbolic links in all path elements This patch converts both callbacks

[Qemu-devel] [PULL 31/31] 9pfs: local: drop unused code

2017-02-27 Thread Greg Kurz
Now that the all callbacks have been converted to use "at" syscalls, we can drop this code. Signed-off-by: Greg Kurz Reviewed-by: Stefan Hajnoczi --- hw/9pfs/9p-local.c | 198 - 1 file changed, 198

[Qemu-devel] [PULL 27/31] 9pfs: local: symlink: don't follow symlinks

2017-02-27 Thread Greg Kurz
The local_symlink() callback is vulnerable to symlink attacks because it calls: (1) symlink() which follows symbolic links for all path elements but the rightmost one (2) open(O_NOFOLLOW) which follows symbolic links for all path elements but the rightmost one (3)

[Qemu-devel] [PULL 26/31] 9pfs: local: chown: don't follow symlinks

2017-02-27 Thread Greg Kurz
The local_chown() callback is vulnerable to symlink attacks because it calls: (1) lchown() which follows symbolic links for all path elements but the rightmost one (2) local_set_xattr()->setxattr() which follows symbolic links for all path elements (3) local_set_mapped_file_attr() which

[Qemu-devel] [PULL 22/31] 9pfs: local: rename: use renameat

2017-02-27 Thread Greg Kurz
The local_rename() callback is vulnerable to symlink attacks because it uses rename() which follows symbolic links in all path elements but the rightmost one. This patch simply transforms local_rename() into a wrapper around local_renameat() which is symlink-attack safe. This partly fixes

[Qemu-devel] [PULL 21/31] 9pfs: local: renameat: don't follow symlinks

2017-02-27 Thread Greg Kurz
The local_renameat() callback is currently a wrapper around local_rename() which is vulnerable to symlink attacks. This patch rewrites local_renameat() to have its own implementation, based on local_opendir_nofollow() and renameat(). This partly fixes CVE-2016-9602. Signed-off-by: Greg Kurz

[Qemu-devel] [PULL 19/31] 9pfs: local: readlink: don't follow symlinks

2017-02-27 Thread Greg Kurz
The local_readlink() callback is vulnerable to symlink attacks because it calls: (1) open(O_NOFOLLOW) which follows symbolic links for all path elements but the rightmost one (2) readlink() which follows symbolic links for all path elements but the rightmost one This patch converts

  1   2   3   4   5   6   >