Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: skip configuration section during migration of older machines

2016-02-10 Thread Greg Kurz
Cc'ing Dave and Juan since this is migration stuff. On Mon, 08 Feb 2016 16:59:47 +0100 Greg Kurz wrote: > Since QEMU 2.4, we have a configuration section in the migration stream. > This must be skipped for older machines, like it is already done for x86.

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: skip configuration section during migration of older machines

2016-02-10 Thread Greg Kurz
On Mon, 08 Feb 2016 16:59:47 +0100 Greg Kurz wrote: > Since QEMU 2.4, we have a configuration section in the migration stream. > This must be skipped for older machines, like it is already done for x86. > Ouch ! It is more complex than I thought... the migration of pseries-2.3 m

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: skip configuration section during migration of older machines

2016-02-12 Thread Greg Kurz
On Fri, 12 Feb 2016 16:24:26 +1100 David Gibson wrote: > On Thu, Feb 11, 2016 at 04:53:40PM +, Dr. David Alan Gilbert wrote: > > * Greg Kurz (gk...@linux.vnet.ibm.com) wrote: > > > On Mon, 08 Feb 2016 16:59:47 +0100 > > > Greg Kurz wrote: > > > >

Re: [Qemu-devel] [PATCH] migration: allow configuration section to be optional

2016-02-15 Thread Greg Kurz
On Mon, 15 Feb 2016 13:09:51 +1100 David Gibson wrote: > On Fri, Feb 12, 2016 at 03:44:18PM +0100, Greg Kurz wrote: > > Since QEMU 2.4, the migration stream begins with a configuration section. > > It is known to break migration of pseries machine from older QEMU. It is > >

[Qemu-devel] [PATCH 1/2] migration: allow configuration section to be optional

2016-02-15 Thread Greg Kurz
: Dr. David Alan Gilbert Reviewed-by: David Gibson Signed-off-by: Greg Kurz --- hw/core/machine.c | 21 + include/hw/boards.h |1 + migration/savevm.c | 21 +++-- qemu-options.hx |3 ++- 4 files changed, 39 insertions(+), 7 deletions(-) diff

[Qemu-devel] [PATCH 0/2] Fix migration of old pseries

2016-02-15 Thread Greg Kurz
configuration for older machines (as it done for x86): it allows QEMU to accept incoming migration of older pseries with or without the configuration section. So it fixes migration from QEMU 2.3 without breaking QEMU 2.4. --- Greg Kurz (2): migration: allow configuration section to be optional

[Qemu-devel] [PATCH 2/2] spapr: fix migration of older pseries

2016-02-15 Thread Greg Kurz
Use the config_section machine property to fix migration of older pseries started with an older QEMU (version < 2.4 for both). Older machines started with QEMU 2.4 are not affected by this change since they send the configuration section unconditionally. Signed-off-by: Greg Kurz --- hw/

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: skip configuration section during migration of older machines

2016-02-15 Thread Greg Kurz
On Mon, 15 Feb 2016 13:12:34 +1100 David Gibson wrote: > On Fri, Feb 12, 2016 at 12:14:59PM +0100, Greg Kurz wrote: > > On Fri, 12 Feb 2016 16:24:26 +1100 > > David Gibson wrote: > > > > > On Thu, Feb 11, 2016 at 04:53:40PM +, Dr. David Alan Gilbert wr

Re: [Qemu-devel] [PATCH 1/2] migration: allow configuration section to be optional

2016-02-15 Thread Greg Kurz
On Mon, 15 Feb 2016 12:23:39 +0100 Laurent Vivier wrote: > On 15/02/2016 11:15, Greg Kurz wrote: > > Since QEMU 2.4, the migration stream begins with a configuration section. > > It is known to break migration of pseries machine from older QEMU. It is > > possible to fi

Re: [Qemu-devel] [PATCH 1/2] migration: allow configuration section to be optional

2016-02-16 Thread Greg Kurz
On Mon, 15 Feb 2016 15:49:17 +0100 Laurent Vivier wrote: > On 15/02/2016 13:58, Greg Kurz wrote: > > On Mon, 15 Feb 2016 12:23:39 +0100 > > Laurent Vivier wrote: > > > >> On 15/02/2016 11:15, Greg Kurz wrote: > >>> Since QEMU 2.4, the migration

Re: [Qemu-devel] [PATCH v4 0/6] virtio/vhost cross-endian cleanup

2016-02-16 Thread Greg Kurz
On Wed, 10 Feb 2016 11:22:20 +0100 Laurent Vivier wrote: > On 05/02/2016 11:39, Greg Kurz wrote: > > This series brings some improvements to the cross-endian support in the > > virtio and vhost code: > > - use qemu_set_vnet_be() and qemu_set_vnet_le() directly from virt

Re: [Qemu-devel] [PATCH v4 0/6] virtio/vhost cross-endian cleanup

2016-02-16 Thread Greg Kurz
On Tue, 16 Feb 2016 12:04:21 +0200 "Michael S. Tsirkin" wrote: > On Tue, Feb 16, 2016 at 10:57:19AM +0100, Greg Kurz wrote: > > On Wed, 10 Feb 2016 11:22:20 +0100 > > Laurent Vivier wrote: > > > On 05/02/2016 11:39, Greg Kurz wrote: > > > > Thi

Re: [Qemu-devel] [PATCH 1/2] migration: allow configuration section to be optional

2016-02-16 Thread Greg Kurz
On Tue, 16 Feb 2016 10:31:35 +0100 Laurent Vivier wrote: > On 16/02/2016 10:09, Greg Kurz wrote: > > On Mon, 15 Feb 2016 15:49:17 +0100 > > Laurent Vivier wrote: > > > >> On 15/02/2016 13:58, Greg Kurz wrote: > >>> On Mon, 15 Feb 2016

Re: [Qemu-devel] [PATCH 1/2] migration: allow configuration section to be optional

2016-02-16 Thread Greg Kurz
On Tue, 16 Feb 2016 17:01:40 + "Dr. David Alan Gilbert" wrote: > * Greg Kurz (gk...@linux.vnet.ibm.com) wrote: > > Since QEMU 2.4, the migration stream begins with a configuration section. > > It is known to break migration of pseries machine from older QEMU. It is

Re: [Qemu-devel] [PATCH] add CephFS support in VirtFS

2016-02-17 Thread Greg Kurz
On Wed, 17 Feb 2016 15:32:06 +0800 Jevon Qiao wrote: > Hi Daniel, > > Thank you for reviewing my code, please see my reply in-line. > On 15/2/16 17:17, Daniel P. Berrange wrote: > > On Sun, Feb 14, 2016 at 01:06:40PM +0800, Jevon Qiao wrote: > >> diff --git a/configure b/configure > >> index 8

Re: [Qemu-devel] [PATCH] add CephFS support in VirtFS

2016-02-17 Thread Greg Kurz
On Wed, 17 Feb 2016 16:49:33 +0800 Jevon Qiao wrote: > On 17/2/16 16:01, Greg Kurz wrote: > > On Wed, 17 Feb 2016 15:32:06 +0800 > > Jevon Qiao wrote: > > > >> Hi Daniel, > >> > >> Thank you for reviewing my code, please see my reply in-line.

Re: [Qemu-devel] [PATCH 1/2] migration: allow configuration section to be optional

2016-02-17 Thread Greg Kurz
On Tue, 16 Feb 2016 17:09:52 + "Dr. David Alan Gilbert" wrote: > * Laurent Vivier (lviv...@redhat.com) wrote: > > > > > > On 16/02/2016 10:09, Greg Kurz wrote: > > > On Mon, 15 Feb 2016 15:49:17 +0100 > > > Laurent Vivier wrote: >

Re: [Qemu-devel] [PATCH 2/2] hw/9pfs: fix alignment issue when host filesystem block size is larger than client msize

2016-02-17 Thread Greg Kurz
On Wed, 17 Feb 2016 15:14:48 +0800 Jevon Qiao wrote: > Hi Aneesh, > > Thank you for reviewing my code, please see my reply in-line. Jevon, Please read comments below. > On 14/2/16 21:38, Aneesh Kumar K.V wrote: > > Jevon Qiao writes: > > > >> The following patch is to fix alignment issue w

[Qemu-devel] [PATCH v2 0/3] Fix migration of old pseries

2016-02-17 Thread Greg Kurz
could migrate a pseries-2.3 from QEMU 2.3 or QEMU 2.4 to current head without manual intervention. I could then migrate it back either to QEMU 2.3 with suppress-config-section=on or to QEMU 2.4 without manual intervention. --- Greg Kurz (3): migration: allow configuration section to be opt

[Qemu-devel] [PATCH v2 1/3] migration: allow configuration section to be optional

2016-02-17 Thread Greg Kurz
. Suggested-by: Dr. David Alan Gilbert Reviewed-by: David Gibson Signed-off-by: Greg Kurz --- v2: - renamed property to require-config-section --- hw/core/machine.c | 22 ++ include/hw/boards.h |1 + migration/savevm.c | 21 +++-- qemu-options.hx

[Qemu-devel] [PATCH v2 2/3] spapr: fix migration of older pseries

2016-02-17 Thread Greg Kurz
Use the require-config-section machine property to fix migration of older pseries (version < 2.4) started with an older QEMU (version < 2.4). Older machines started with QEMU 2.4 are not affected by this change since they send the configuration section unconditionally. Signed-off-by: Gre

[Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission

2016-02-17 Thread Greg Kurz
on to QEMU 2.4. If automatic behaviour is needed, it is up to the tooling to handle this. Signed-off-by: Greg Kurz --- hw/core/machine.c | 21 + include/hw/boards.h |1 + migration/savevm.c |8 +++- qemu-options.hx |3 ++- 4 files changed, 31 insert

Re: [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission

2016-02-18 Thread Greg Kurz
On Thu, 18 Feb 2016 12:06:39 +0530 Amit Shah wrote: > On (Thu) 18 Feb 2016 [13:50:25], David Gibson wrote: > > On Wed, Feb 17, 2016 at 05:06:43PM +0100, Greg Kurz wrote: > > > Since the addition of the configuration section in QEMU 2.4, it is > > > impossible >

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu] spapr: Add /system-id

2015-11-26 Thread Greg Kurz
On Thu, 26 Nov 2015 15:29:07 +1100 Alexey Kardashevskiy wrote: > On 11/26/2015 11:49 AM, David Gibson wrote: > > On Wed, Nov 25, 2015 at 04:15:01PM +0100, Alexander Graf wrote: > >> > >> > >> On 18.11.15 11:49, David Gibson wrote: > >>> On Wed, Nov 18, 2015 at 06:45:39PM +1100, Alexey Kardashevsk

Re: [Qemu-devel] [PATCH for-2.5] fsdev-proxy-helper: avoid TOC/TOU race

2015-11-27 Thread Greg Kurz
On Fri, 27 Nov 2015 12:43:05 +0100 Paolo Bonzini wrote: > There is a minor time of check/time of use race between statfs and chroot. > It can be fixed easily by stat-ing the root after it has been changed. > > Signed-off-by: Paolo Bonzini > --- Reviewed-by: Greg Kurz >

Re: [Qemu-devel] [PATCH for-2.5] virtio-9p: use QEMU thread pool

2015-11-27 Thread Greg Kurz
side effect, it silences Coverity's complaint about an unchecked > return value for event_notifier_init. > And it makes the code a lot nicer too ! > Signed-off-by: Paolo Bonzini > --- I have just one minor remark in hw/9pfs/virtio-9p-coth.h but anyway: Reviewed-by: Greg Kurz T

Re: [Qemu-devel] [PATCH for-2.5] virtio-9p: use QEMU thread pool

2015-11-27 Thread Greg Kurz
On Fri, 27 Nov 2015 14:08:47 +0100 Paolo Bonzini wrote: > > > On 27/11/2015 13:42, Greg Kurz wrote: > > On Fri, 27 Nov 2015 12:43:06 +0100 > > Paolo Bonzini wrote: > > > >> The QEMU thread pool already has a mechanism to invoke callbacks in the > &g

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

2015-11-30 Thread Greg Kurz
of the way fdt_add_subnode() inserts new elements to the front of the FDT rather than adding them to the tail. This patch reverts to the historical SLOF ordering by walking PCI devices in reverse order. Signed-off-by: Greg Kurz --- Repost with Cc: to qemu-devel and qemu-ppc :) Michael, David,

[Qemu-devel] [PATCH] mmap-alloc: use same backend for all mappings

2015-11-30 Thread Greg Kurz
AM based mappings. Signed-off-by: Greg Kurz --- This is a bug fix for 2.5 util/mmap-alloc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c index c37acbe58ede..0ff221dd94f4 100644 --- a/util/mmap-alloc.c +++ b/util/mmap-

Re: [Qemu-devel] [PATCH] mmap-alloc: use same backend for all mappings

2015-11-30 Thread Greg Kurz
On Mon, 30 Nov 2015 15:06:33 +0200 "Michael S. Tsirkin" wrote: > On Mon, Nov 30, 2015 at 11:51:57AM +0100, Greg Kurz wrote: > > Since commit 8561c9244ddf1122d "exec: allocate PROT_NONE pages on top of > > RAM", > > it is no longer possible to bac

[Qemu-devel] [PATCH] MAINTAINERS: add maintainer to virtio-9p

2015-11-30 Thread Greg Kurz
As suggested by Paolo, I add myself as maintainer for virtio-9p. Signed-off-by: Greg Kurz --- MAINTAINERS |1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index bb1f3e40622b..e8cee1e2668f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -863,6 +863,7 @@ F: net/vhost

[Qemu-devel] [PULL 1/2] fsdev-proxy-helper: avoid TOC/TOU race

2015-11-30 Thread Greg Kurz
From: Paolo Bonzini There is a minor time of check/time of use race between statfs and chroot. It can be fixed easily by stat-ing the root after it has been changed. Signed-off-by: Paolo Bonzini Reviewed-by: Greg Kurz Signed-off-by: Greg Kurz --- fsdev/virtfs-proxy-helper.c | 20

[Qemu-devel] [PULL 0/2] virtio-9p fixes for 2.5

2015-11-30 Thread Greg Kurz
The following changes since commit 714487515dbe0c65d5904251e796cd3a5b3579fb: Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2015-11-27 10:44:42 +) are available in the git repository at: https://github.com/gkurz/qemu.git tags/for-upstream for you to

[Qemu-devel] [PULL 2/2] virtio-9p: use QEMU thread pool

2015-11-30 Thread Greg Kurz
ecked return value for event_notifier_init. Signed-off-by: Paolo Bonzini Reviewed-by: Greg Kurz (removed no more needed #include from virtio-9p-coth.h) Signed-off-by: Greg Kurz --- hw/9pfs/virtio-9p-coth.c | 69 ++ hw/9pfs/virtio-9p-coth.h

Re: [Qemu-devel] [PATCH 01/40] 9pfs: allocate pdus with g_malloc/g_free

2015-11-30 Thread Greg Kurz
On Tue, 24 Nov 2015 19:00:52 +0100 Paolo Bonzini wrote: > Prepare for moving the allocation to virtqueue_pop. > > Signed-off-by: Paolo Bonzini > --- And aside from this series goal, it makes the code nicer :) > hw/9pfs/virtio-9p-device.c | 7 +-- > hw/9pfs/virtio-9p.c| 10 +++---

Re: [Qemu-devel] [PATCH] mmap-alloc: use same backend for all mappings

2015-12-01 Thread Greg Kurz
On Mon, 30 Nov 2015 18:59:23 +0200 "Michael S. Tsirkin" wrote: > On Mon, Nov 30, 2015 at 02:46:31PM +0100, Greg Kurz wrote: > > On Mon, 30 Nov 2015 15:06:33 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Nov 30, 2015 at 11:51

Re: [Qemu-devel] [PATCH] mmap-alloc: use same backend for all mappings

2015-12-01 Thread Greg Kurz
On Mon, 30 Nov 2015 15:12:08 +0200 "Michael S. Tsirkin" wrote: > On Mon, Nov 30, 2015 at 11:53:41AM +0100, Paolo Bonzini wrote: > > > > > > On 30/11/2015 11:51, Greg Kurz wrote: > > > Since commit 8561c9244ddf1122d "exec: allocate PROT_NONE pages

Re: [Qemu-devel] [PATCH] mmap-alloc: use same backend for all mappings

2015-12-01 Thread Greg Kurz
On Tue, 1 Dec 2015 12:57:47 +0200 "Michael S. Tsirkin" wrote: > On Tue, Dec 01, 2015 at 04:23:11PM +0530, Aneesh Kumar K.V wrote: > > "Michael S. Tsirkin" writes: > > > > > On Mon, Nov 30, 2015 at 02:46:31PM +0100, Greg Kurz wrote: > > >&

Re: [Qemu-devel] [PULL 0/2] virtio-9p fixes for 2.5

2015-12-02 Thread Greg Kurz
On Tue, 1 Dec 2015 16:30:09 + Peter Maydell wrote: > On 30 November 2015 at 16:11, Greg Kurz wrote: > > The following changes since commit 714487515dbe0c65d5904251e796cd3a5b3579fb: > > > > Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request'

Re: [Qemu-devel] [PATCH v2] util/mmap-alloc: fix hugetlb support on ppc64

2015-12-02 Thread Greg Kurz
eate the PROT_NONE mapping using the same fd. > > Naturally, this makes the guard page bigger with hugetlbfs. > > Based on patch by Greg Kurz. > > Cc: Rik van Riel > CC: Greg Kurz > Signed-off-by: Michael S. Tsirkin > --- > It works ! Reviewed-by: Greg Kur

Re: [Qemu-devel] [PATCH] mmap-alloc: tweak a comment on ppc64

2015-12-03 Thread Greg Kurz
instead. > > It's also not clear what does "in this case" refer > to, rearrange text to make it clearer. > > Signed-off-by: Michael S. Tsirkin > --- This is better indeed. Thanks ! Reviewed-by: Greg Kurz > util/mmap-alloc.c | 9 + > 1 file changed, 5

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

2015-12-03 Thread Greg Kurz
On Tue, 1 Dec 2015 22:48:38 +0100 Thomas Huth wrote: > On 30/11/15 11:45, Greg Kurz wrote: > > Since commit 1d2d974244c6 "spapr_pci: enumerate and add PCI device tree", > > QEMU > > populates the PCI device tree in the opposite order compared to SLO

[Qemu-devel] [PATCH for-2.5] virtio-9p-device: add minimal unrealize handler

2015-12-08 Thread Greg Kurz
pported in QEMU, and not supported by linux guests either. Signed-off-by: Greg Kurz --- hw/9pfs/virtio-9p-device.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 944b5f5e9fcc..b42d3b30a027 100644 --- a/hw/9pfs/virtio-9

Re: [Qemu-devel] [PATCH for-2.5] virtio-9p-device: add minimal unrealize handler

2015-12-10 Thread Greg Kurz
On Thu, 10 Dec 2015 11:17:09 + Peter Maydell wrote: > On 8 December 2015 at 16:19, Michael S. Tsirkin wrote: > > On Tue, Dec 08, 2015 at 04:54:57PM +0100, Greg Kurz wrote: > >> Since commit 4652f1640e029e1f2433fa77ba6af285 "virtio-9p: add savevm > >> handler

Re: [Qemu-devel] [PATCH 1/6] virtio-net: use the backend cross-endian capabilities

2016-01-08 Thread Greg Kurz
On Thu, 7 Jan 2016 19:32:37 +0100 Laurent Vivier wrote: > Sorry for the late answer to this one, I got diverted :) > > On 07/01/2016 12:32, Greg Kurz wrote: > > When running a fully emulated device in cross-endian conditions, including > > a virtio 1.0 device offered to a

Re: [Qemu-devel] [PATCH 1/6] virtio-net: use the backend cross-endian capabilities

2016-01-08 Thread Greg Kurz
On Fri, 8 Jan 2016 16:25:18 +0100 Laurent Vivier wrote: > > > On 08/01/2016 15:19, Greg Kurz wrote: > > On Thu, 7 Jan 2016 19:32:37 +0100 > > Laurent Vivier wrote: > >> > > > > Sorry for the late answer to this one, I got diverted :) > >

[Qemu-devel] [PATCH v2 1/5] virtio-net: use the backend cross-endian capabilities

2016-01-11 Thread Greg Kurz
) - merged virtio_net_vhost_status() change from patch 2 - use semicolon in "backend does no support..." error message - merged patch 3 (drop the virtio_needs_swap() helper) - provided some more details in changelog and comments Signed-off-by: Greg Kurz --- hw/net/virtio-net.c

[Qemu-devel] [PATCH v2 0/5] virtio/vhost cross-endian cleanup

2016-01-11 Thread Greg Kurz
virtio_access_is_big_endian() for little-endian targets - various cleanups This v2 addresses Laurent Vivier's comments. --- Greg Kurz (5): virtio-net: use the backend cross-endian capabilities Revert "vhost-net: tell tap backend about the vnet endianness" virtio: move cross-e

[Qemu-devel] [PATCH v2 2/5] Revert "vhost-net: tell tap backend about the vnet endianness"

2016-01-11 Thread Greg Kurz
This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. Cross-endian is now handled by the core virtio-net code. - moved changes not belonging to the revert to patch 1 - updated changelog accordingly Signed-off-by: Greg Kurz --- hw/net/vhost_net.c | 33

Re: [Qemu-devel] [PATCH v2 0/5] virtio/vhost cross-endian cleanup

2016-01-11 Thread Greg Kurz
Realized I had misplaced changelog in the patches... some of them were sent before I could hit ^C :) I'll resend the whole series. On Mon, 11 Jan 2016 17:02:01 +0100 Greg Kurz wrote: > This series brings some improvements to the cross-endian support in the > virtio and vhost co

[Qemu-devel] [PATCH v2 0/5] virtio/vhost cross-endian cleanup

2016-01-11 Thread Greg Kurz
virtio_access_is_big_endian() for little-endian targets - various cleanups This v2 addresses Laurent Vivier's comments. --- Greg Kurz (5): virtio-net: use the backend cross-endian capabilities Revert "vhost-net: tell tap backend about the vnet endianness" virtio: move cross-e

[Qemu-devel] [PATCH v2 1/5] virtio-net: use the backend cross-endian capabilities

2016-01-11 Thread Greg Kurz
network connectivity if rebooted into a different endianness. The current vhost-net code also tries to configure net backends. This will be no more needed and will be reverted in a subsequent patch. Signed-off-by: Greg Kurz --- v2: - dropped useless check in the 'else if'

[Qemu-devel] [PATCH v2 2/5] Revert "vhost-net: tell tap backend about the vnet endianness"

2016-01-11 Thread Greg Kurz
This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. Cross-endian is now handled by the core virtio-net code. Signed-off-by: Greg Kurz --- v2: - moved changes not belonging to the revert to patch 1 - updated changelog accordingly --- hw/net/vhost_net.c | 33

[Qemu-devel] [PATCH v2 3/5] virtio: move cross-endian helper to vhost

2016-01-11 Thread Greg Kurz
, where indeed non bi-endian targets don't have to deal with cross-endian issues. This patch moves the helper to vhost.c and gives it a more appropriate name. Signed-off-by: Greg Kurz Reviewed-by: Cornelia Huck --- hw/virtio/vhost.c | 17 +++-- include/hw/v

[Qemu-devel] [PATCH v2 4/5] vhost: move virtio 1.0 check to cross-endian helper

2016-01-11 Thread Greg Kurz
Indeed vhost doesn't need to ask for vring endian fixing if the device is virtio 1.0, since it is already handled by the in-kernel vhost driver. This patch simply consolidates the logic into the existing helper. Signed-off-by: Greg Kurz Reviewed-by: Cornelia Huck --- hw/virtio/vhost.c |

[Qemu-devel] [PATCH v2 5/5] virtio: optimize virtio_access_is_big_endian() for little-endian targets

2016-01-11 Thread Greg Kurz
added a runtime check for virtio 1.0, which ruins the benefit of the virtio_access_is_big_endian() helper for always little-endian targets. With this patch, always little-endian targets stop checking for virtio 1.0, since the result is little-endian in all cases. Signed-off-by: Greg Kurz -

[Qemu-devel] [PATCH] trace: drop trailing empty strings

2016-01-11 Thread Greg Kurz
Also fix a typo in the virtio_balloon_handle_output() trace while here. Signed-off-by: Greg Kurz --- trace-events | 64 +- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/trace-events b/trace-events index 934a7b6402d1

Re: [Qemu-devel] [PATCH v2 4/5] vhost: move virtio 1.0 check to cross-endian helper

2016-01-12 Thread Greg Kurz
On Tue, 12 Jan 2016 01:23:56 +0100 Laurent Vivier wrote: > On 11/01/2016 17:13, Greg Kurz wrote: > > Indeed vhost doesn't need to ask for vring endian fixing if the device is > > virtio 1.0, since it is already handled by the in-kernel vhost driver. This > > patch sim

[Qemu-devel] [PATCH v3 0/6] virtio/vhost cross-endian cleanup

2016-01-12 Thread Greg Kurz
virtio_access_is_big_endian() for little-endian targets - various cleanups This v3 does the following: - fixes spelling mistake in patch 1 - adds Laurent's R-b tag to patches 1, 2, 3, 5 - adds Cornelia's R-b tag to patches 1, 5 - introduces patch 4 to simplify the vhost code a bit more --- Gr

[Qemu-devel] [PATCH v3 1/6] virtio-net: use the backend cross-endian capabilities

2016-01-12 Thread Greg Kurz
connectivity if rebooted into a different endianness. The current vhost-net code also tries to configure net backends. This will be no more needed and will be reverted in a subsequent patch. Reviewed-by: Cornelia Huck Reviewed-by: Laurent Vivier Signed-off-by: Greg Kurz --- hw/net/virtio

[Qemu-devel] [PATCH v3 2/6] Revert "vhost-net: tell tap backend about the vnet endianness"

2016-01-12 Thread Greg Kurz
This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. Cross-endian is now handled by the core virtio-net code. Reviewed-by: Laurent Vivier Signed-off-by: Greg Kurz --- hw/net/vhost_net.c | 33 + 1 file changed, 1 insertion(+), 32 deletions(-) diff

[Qemu-devel] [PATCH v3 3/6] virtio: move cross-endian helper to vhost

2016-01-12 Thread Greg Kurz
, where indeed non bi-endian targets don't have to deal with cross-endian issues. This patch moves the helper to vhost.c and gives it a more appropriate name. Reviewed-by: Cornelia Huck Reviewed-by: Laurent Vivier Signed-off-by: Greg Kurz --- hw/virtio/vhost.c |

[Qemu-devel] [PATCH v3 4/6] vhost: move virtio 1.0 check to cross-endian helper

2016-01-12 Thread Greg Kurz
Indeed vhost doesn't need to ask for vring endian fixing if the device is virtio 1.0, since it is already handled by the in-kernel vhost driver. This patch simply consolidates the logic into the existing helper. Reviewed-by: Cornelia Huck Signed-off-by: Greg Kurz --- hw/virtio/vhost.c |

[Qemu-devel] [PATCH v3 5/6] vhost: simplify vhost_needs_vring_endian()

2016-01-12 Thread Greg Kurz
t need the assert() either. This open codes the device_endian checking in vhost_needs_vring_endian(). It also adds a comment to explain the logic, as recent reviews showed the cross-endian tweaks aren't that obvious. Signed-off-by: Greg Kurz --- hw/virtio/vhost.c |9 +++-- 1

[Qemu-devel] [PATCH v3 6/6] virtio: optimize virtio_access_is_big_endian() for little-endian targets

2016-01-12 Thread Greg Kurz
ed-by: Laurent Vivier Signed-off-by: Greg Kurz --- include/hw/virtio/virtio-access.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h index f1f12afe9089..8dc84f520316 100644 --- a/include/hw/v

Re: [Qemu-devel] [PATCH v2 1/5] virtio-net: use the backend cross-endian capabilities

2016-01-13 Thread Greg Kurz
On Tue, 12 Jan 2016 18:24:28 +0100 Laurent Vivier wrote: > On 11/01/2016 17:12, Greg Kurz wrote: > > When running a fully emulated device in cross-endian conditions, including > > a virtio 1.0 device offered to a big endian guest, we need to fix the vnet > > headers. This is

Re: [Qemu-devel] [PATCH v2 1/5] virtio-net: use the backend cross-endian capabilities

2016-01-13 Thread Greg Kurz
On Wed, 13 Jan 2016 10:53:11 +0100 Laurent Vivier wrote: > On 13/01/2016 10:06, Greg Kurz wrote: > > On Tue, 12 Jan 2016 18:24:28 +0100 > > Laurent Vivier wrote: > > > >> On 11/01/2016 17:12, Greg Kurz wrote: > >>> When running a fully emulated de

Re: [Qemu-devel] [PATCH v3 0/6] virtio/vhost cross-endian cleanup

2016-01-13 Thread Greg Kurz
On Tue, 12 Jan 2016 18:21:05 +0100 Greg Kurz wrote: > This series brings some improvements to the cross-endian support in the > virtio and vhost code: > - use qemu_set_vnet_be() and qemu_set_vnet_le() directly from virtio-net, > so that backend cross-endian capabilities ben

Re: [Qemu-devel] [PATCH] net: set endianness on all backend devices

2016-01-14 Thread Greg Kurz
f multiqueue, we have multiple devices... This patch sets the > endianness for all the devices of the interface. > > Signed-off-by: Laurent Vivier > --- Thanks for fixing this bug... it's been there since 2.4.0. I guess we should backport this to 2.4 and 2.5. Cc'ing

[Qemu-devel] [PATCH 2/7] target-ppc: rename and export maybe_bswap_register()

2016-01-15 Thread Greg Kurz
This helper will be used to support FP, Altivec and VSX registers when the guest is little-endian. Signed-off-by: Greg Kurz --- target-ppc/cpu.h |1 + target-ppc/gdbstub.c | 10 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc

[Qemu-devel] [PATCH 0/7] target-ppc: gdbstub: endiannes fixes and VSX support

2016-01-15 Thread Greg Kurz
rd (1): target-ppc: gdbstub: Add VSX support Greg Kurz (6): target-ppc: kvm: fix floating point registers sync on little-endian hosts target-ppc: rename and export maybe_bswap_register() target-ppc: gdbstub: fix float registers for little-endian guests target

[Qemu-devel] [PATCH 1/7] target-ppc: kvm: fix floating point registers sync on little-endian hosts

2016-01-15 Thread Greg Kurz
little-endian hosts. Signed-off-by: Greg Kurz --- target-ppc/kvm.c | 12 1 file changed, 12 insertions(+) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 9940a9046220..45249990bda1 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -650,8 +650,13 @@ static int kvm_put_fp

[Qemu-devel] [PATCH 5/7] target-ppc: gdbstub: fix altivec registers for little-endian guests

2016-01-15 Thread Greg Kurz
, for both system and user mode. Signed-off-by: Greg Kurz --- target-ppc/translate_init.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 18e9e561561f..80d53e4dcf5a 100644 --- a/targe

[Qemu-devel] [PATCH 3/7] target-ppc: gdbstub: fix float registers for little-endian guests

2016-01-15 Thread Greg Kurz
Let's reuse the ppc_maybe_bswap_register() helper, like we already do with the general registers. Signed-off-by: Greg Kurz --- target-ppc/translate_init.c |4 1 file changed, 4 insertions(+) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index e88dc7f

[Qemu-devel] [PATCH 4/7] target-ppc: gdbstub: introduce avr_need_swap()

2016-01-15 Thread Greg Kurz
This helper will be used to support Altivec registers in little-endian guests. This patch does not change functionnality. Note: I had to put the helper some lines away from the gdb_*_avr_reg() routines to get a more readable patch. Signed-off-by: Greg Kurz --- target-ppc/translate_init.c

[Qemu-devel] [PATCH 6/7] target-ppc: gdbstub: fix spe registers for little-endian guests

2016-01-15 Thread Greg Kurz
Let's reuse the ppc_maybe_bswap_register() helper, like we already do with the general registers. Signed-off-by: Greg Kurz --- target-ppc/translate_init.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_i

[Qemu-devel] [PATCH 7/7] target-ppc: gdbstub: Add VSX support

2016-01-15 Thread Greg Kurz
From: Anton Blanchard Add the XML and functions to get and set VSX registers. Signed-off-by: Anton Blanchard (fixed little-endian guests) Signed-off-by: Greg Kurz --- configure |6 +++--- gdb-xml/power-vsx.xml | 44

Re: [Qemu-devel] [PATCH 1/7] target-ppc: kvm: fix floating point registers sync on little-endian hosts

2016-01-18 Thread Greg Kurz
On Mon, 18 Jan 2016 13:16:44 +1100 David Gibson wrote: > On Fri, Jan 15, 2016 at 04:00:12PM +0100, Greg Kurz wrote: > > On VSX capable CPUs, the 32 FP registers are mapped to the high-bits > > of the 32 first VSX registers. So if you have: > >

[Qemu-devel] [PATCH 0/2] 9pfs: fsdev: use error_report() instead of fprintf(stderr)

2016-01-18 Thread Greg Kurz
Hi, This series moves all the 9pfs/fsdev code to use error_report(), with the notable exception of virtfs-proxy-helper, which doesn't need it. Markus, Should this patches go through your tree ? Or can they go through my 9p tree if you ack them ? Cheers. -- Greg --- Greg Kurz (2):

[Qemu-devel] [PATCH 1/2] 9pfs: use error_report() instead of fprintf(stderr)

2016-01-18 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/9pfs/9p-handle.c |5 +++-- hw/9pfs/9p-local.c | 15 --- hw/9pfs/9p-proxy.c | 12 ++-- hw/9pfs/9p.c|2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/hw/9pfs/9p-handle.c b/hw/9pfs/9p-handle.c index

[Qemu-devel] [PATCH 2/2] fsdev: use error_report() instead of fprintf(stderr)

2016-01-18 Thread Greg Kurz
Only fix the code that gets built into QEMU. Signed-off-by: Greg Kurz --- fsdev/qemu-fsdev.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c index ccfec139ab2b..55e2f7a0fb58 100644 --- a/fsdev/qemu-fsdev.c +++ b/fsdev/qemu

Re: [Qemu-devel] [PATCH] trace: drop trailing empty strings

2016-01-18 Thread Greg Kurz
On Mon, 18 Jan 2016 20:37:58 +0300 Michael Tokarev wrote: > 11.01.2016 20:30, Greg Kurz wrote: > > > -virtio_balloon_handle_output(const char *name, uint64_t gpa) "section > > name: %s gpa: %"PRIx64"" > > +virtio_balloon_handle_output(const char *na

Re: [Qemu-devel] [PATCH 5/7] target-ppc: gdbstub: fix altivec registers for little-endian guests

2016-01-19 Thread Greg Kurz
On Mon, 18 Jan 2016 13:25:19 +1100 David Gibson wrote: > On Fri, Jan 15, 2016 at 04:00:38PM +0100, Greg Kurz wrote: > > Altivec registers are 128-bit wide. They are stored in memory as two > > 64-bit values that must be byteswapped when the guest is little-endian. >

Re: [Qemu-devel] [PATCH 1/2] 9pfs: use error_report() instead of fprintf(stderr)

2016-01-19 Thread Greg Kurz
On Mon, 18 Jan 2016 17:35:25 +0100 Markus Armbruster wrote: > Greg Kurz writes: > > > Signed-off-by: Greg Kurz > > --- I agree to all your suggestions. Thanks ! > > hw/9pfs/9p-handle.c |5 +++-- > > hw/9pfs/9p-local.c | 15 --- &

Re: [Qemu-devel] [PATCH 0/2] 9pfs: fsdev: use error_report() instead of fprintf(stderr)

2016-01-19 Thread Greg Kurz
On Mon, 18 Jan 2016 17:39:28 +0100 Markus Armbruster wrote: > Greg Kurz writes: > > > Hi, > > > > This series moves all the 9pfs/fsdev code to use error_report(), with the > > notable exception of virtfs-proxy-helper, which doesn't need it. > > &

Re: [Qemu-devel] [PATCH 1/7] target-ppc: kvm: fix floating point registers sync on little-endian hosts

2016-01-19 Thread Greg Kurz
On Tue, 19 Jan 2016 11:55:10 +1100 David Gibson wrote: > On Mon, Jan 18, 2016 at 09:51:56AM +0100, Greg Kurz wrote: > > On Mon, 18 Jan 2016 13:16:44 +1100 > > David Gibson wrote: > > > > > On Fri, Jan 15, 2016 at 04:00:12PM +0100, Greg Kurz wrote: > >

[Qemu-devel] [PATCH v2 0/2] 9pfs: fsdev: use error_report() instead of fprintf(stderr)

2016-01-19 Thread Greg Kurz
This v2 does the following: - addresses Markus Ambruster's comments for patch 1 - capitalized some messages in patch 1 - added R-b tags I've pushed this series to my 9p-next branch. Thanks ! -- Greg --- Greg Kurz (2): 9pfs: use error_report() instead of fprintf(stderr)

[Qemu-devel] [PATCH v2 2/2] fsdev: use error_report() instead of fprintf(stderr)

2016-01-19 Thread Greg Kurz
Only fix the code that gets built into QEMU. Reviewed-by: Markus Armbruster Signed-off-by: Greg Kurz --- fsdev/qemu-fsdev.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c index ccfec139ab2b..55e2f7a0fb58 100644 --- a/fsdev

[Qemu-devel] [PATCH v2 1/2] 9pfs: use error_report() instead of fprintf(stderr)

2016-01-19 Thread Greg Kurz
Reviewed-by: Markus Armbruster Signed-off-by: Greg Kurz --- hw/9pfs/9p-handle.c |5 +++-- hw/9pfs/9p-local.c | 15 --- hw/9pfs/9p-proxy.c | 12 ++-- hw/9pfs/9p.c|2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/hw/9pfs/9p-handle.c

Re: [Qemu-devel] [Qemu-ppc] [PATCH 5/7] target-ppc: gdbstub: fix altivec registers for little-endian guests

2016-01-19 Thread Greg Kurz
On Wed, 20 Jan 2016 13:13:57 +1100 David Gibson wrote: > On Tue, Jan 19, 2016 at 10:59:20AM +0100, Greg Kurz wrote: > > On Mon, 18 Jan 2016 13:25:19 +1100 > > David Gibson wrote: > > > > > On Fri, Jan 15, 2016 at 04:00:38PM +0100, Greg Kurz wrote: > > &g

Re: [Qemu-devel] [PATCH v3 0/3] virtio-net/vhost-net: share cross-endian enablement

2015-12-17 Thread Greg Kurz
On Wed, 18 Nov 2015 22:46:55 +0100 Greg Kurz wrote: > On Wed, 18 Nov 2015 22:48:06 +0200 > "Michael S. Tsirkin" wrote: > > > On Wed, Nov 18, 2015 at 05:23:00PM +0100, Greg Kurz wrote: > > > Since QEMU 2.4.0, vhost-net uses the cross-endian support of TA

[Qemu-devel] [PATCH v2 0/3] virtio: cross-endian helpers fixes

2015-12-17 Thread Greg Kurz
This series tries to rework cross-endian helpers for better clarity. It does not change behaviour, except perhaps patch 3/3 even if I could not measure any performance gain. --- Greg Kurz (3): virtio: move cross-endian helper to vhost vhost: move virtio 1.0 check to cross-endian

[Qemu-devel] [PATCH v2 1/3] virtio: move cross-endian helper to vhost

2015-12-17 Thread Greg Kurz
, where indeed non bi-endian targets don't have to deal with cross-endian issues. This patch moves the helper to vhost.c and gives it a more appropriate name. Signed-off-by: Greg Kurz Reviewed-by: Cornelia Huck --- hw/virtio/vhost.c | 17 +++-- include/hw/v

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

2015-12-17 Thread Greg Kurz
On Thu, 3 Dec 2015 15:53:17 +0100 Greg Kurz wrote: > On Tue, 1 Dec 2015 22:48:38 +0100 > Thomas Huth wrote: > > > On 30/11/15 11:45, Greg Kurz wrote: > > > Since commit 1d2d974244c6 "spapr_pci: enumerate and add PCI device tree", > > > QEMU > >

[Qemu-devel] [PATCH v2 2/3] vhost: move virtio 1.0 check to cross-endian helper

2015-12-17 Thread Greg Kurz
Indeed vhost doesn't need to ask for vring endian fixing if the device is virtio 1.0, since it is already handled by the in-kernel vhost driver. This patch simply consolidates the logic into the existing helper. Signed-off-by: Greg Kurz Reviewed-by: Cornelia Huck --- hw/virtio/vhost.c |

[Qemu-devel] [PATCH v2 3/3] virtio: optimize virtio_access_is_big_endian() for little-endian targets

2015-12-17 Thread Greg Kurz
added a runtime check for virtio 1.0, which ruins the benefit of the virtio_access_is_big_endian() helper for always little-endian targets. With this patch, always little-endian targets stop checking for virtio 1.0, since the result is little-endian in all cases. Signed-off-by: Greg Kurz -

[Qemu-devel] [PATCH 0/7] target-ppc: endian fixes for KVM and gdbstub

2015-12-18 Thread Greg Kurz
pushed the fix to patch 1 since it is needed for the gdbstub fixes to actually work, but it could even be handled separately. And finally, patch 7 is Anton's + the byteswapping for little-endian guests. Cheers. --- Anton Blanchard (1): target-ppc: gdbstub: Add VSX support Greg Kurz (

[Qemu-devel] [PATCH 2/7] target-ppc: rename and export maybe_bswap_register()

2015-12-18 Thread Greg Kurz
This helper will be used to support FP, Altivec and VSX registers when the guest is little-endian. Signed-off-by: Greg Kurz --- target-ppc/cpu.h |1 + target-ppc/gdbstub.c | 10 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc

[Qemu-devel] [PATCH 3/7] target-ppc: gdbstub: fix float registers for little-endian guests

2015-12-18 Thread Greg Kurz
Let's reuse the ppc_maybe_bswap_register() helper, like we already do with the general registers. Signed-off-by: Greg Kurz --- target-ppc/translate_init.c |4 1 file changed, 4 insertions(+) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index e88dc7f

[Qemu-devel] [PATCH 1/7] target-ppc: kvm: fix floating point registers sync on little-endian hosts

2015-12-18 Thread Greg Kurz
little-endian hosts. Signed-off-by: Greg Kurz --- target-ppc/kvm.c | 12 1 file changed, 12 insertions(+) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index ac70f0897b35..acd327538ce2 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -650,8 +650,13 @@ static int kvm_put_fp

<    1   2   3   4   5   6   7   8   9   10   >