Re: [PATCH] KVM: PPC: fix ONE_REG AltiVec support

2016-01-04 Thread Greg Kurz
Happy new year ! On Wed, 16 Dec 2015 18:24:03 +0100 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > The get and set operations got exchanged by mistake when moving the > code from book3s.c to powerpc.c. > > Fixes: 3840edc8033ad5b86deee309c1c321ca54257452 > Signed-

Re: [PATCH] KVM: PPC: fix ONE_REG AltiVec support

2016-01-04 Thread Greg Kurz
Happy new year ! On Wed, 16 Dec 2015 18:24:03 +0100 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > The get and set operations got exchanged by mistake when moving the > code from book3s.c to powerpc.c. > > Fixes: 3840edc8033ad5b86deee309c1c321ca54257452 > Signed-

[PATCH] KVM: PPC: fix ONE_REG AltiVec support

2015-12-16 Thread Greg Kurz
The get and set operations got exchanged by mistake when moving the code from book3s.c to powerpc.c. Fixes: 3840edc8033ad5b86deee309c1c321ca54257452 Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- It's been there for over a year but I guess we want that in 4.4, even if doesn't

[PATCH] KVM: PPC: fix ONE_REG AltiVec support

2015-12-16 Thread Greg Kurz
The get and set operations got exchanged by mistake when moving the code from book3s.c to powerpc.c. Fixes: 3840edc8033ad5b86deee309c1c321ca54257452 Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- It's been there for over a year but I guess we want that in 4.4, even if doesn't

Re: [PATCH] vhost: move is_le setup to the backend

2015-12-16 Thread Greg Kurz
On Thu, 12 Nov 2015 15:28:19 +0100 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > On Thu, 12 Nov 2015 15:46:30 +0200 > "Michael S. Tsirkin" <m...@redhat.com> wrote: > > > On Fri, Oct 30, 2015 at 12:42:35PM +0100, Greg Kurz wrote: > > > The vq->is_

Re: [PATCH] vhost: move is_le setup to the backend

2015-11-12 Thread Greg Kurz
On Fri, 30 Oct 2015 12:42:35 +0100 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > The vq->is_le field is used to fix endianness when accessing the vring via > the cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases: > > 1) host is big endian and device is

Re: [PATCH] vhost: move is_le setup to the backend

2015-11-12 Thread Greg Kurz
On Thu, 12 Nov 2015 15:46:30 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Fri, Oct 30, 2015 at 12:42:35PM +0100, Greg Kurz wrote: > > The vq->is_le field is used to fix endianness when accessing the vring via > > the cpu_to_vhost16() and vhost16_to_cp

[PATCH] vhost: move is_le setup to the backend

2015-10-30 Thread Greg Kurz
ur change. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- drivers/vhost/net.c |6 ++ drivers/vhost/scsi.c |3 +++ drivers/vhost/test.c |2 ++ drivers/vhost/vhost.c | 12 +++- drivers/vhost/vhost.h |1 + 5 files changed, 19 insertions(+), 5 deleti

Re: [PATCH] vhost: fix performance on LE hosts

2015-10-27 Thread Greg Kurz
on LE host, vhost_is_little_endian is > checking is_le flag so there's always a branch. > > To fix, simply check virtio_legacy_is_little_endian first. > > Cc: Greg Kurz <gk...@linux.vnet.ibm.com> > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Oops my bad for th

Re: [PATCH v2] Fix AF_PACKET ABI breakage in 4.2

2015-09-25 Thread Greg Kurz
On Thu, 24 Sep 2015 12:50:59 +0300 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Thu, Sep 24, 2015 at 09:25:45AM +0200, Greg Kurz wrote: > > On Wed, 23 Sep 2015 19:45:08 +0100 > > David Woodhouse <dw...@infradead.org> wrote: > > > > > C

Re: [PATCH v2] Fix AF_PACKET ABI breakage in 4.2

2015-09-24 Thread Greg Kurz
On Wed, 23 Sep 2015 19:45:08 +0100 David Woodhouse wrote: > Commit 7d82410950aa ("virtio: add explicit big-endian support to memory > accessors") accidentally changed the virtio_net header used by > AF_PACKET with PACKET_VNET_HDR from host-endian to big-endian. > Hi David,

Re: [PATCH v4] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-21 Thread Greg Kurz
On Mon, 21 Sep 2015 12:10:00 +1000 David Gibson <da...@gibson.dropbear.id.au> wrote: > On Fri, Sep 18, 2015 at 11:05:52AM +0200, Greg Kurz wrote: > > On Thu, 17 Sep 2015 10:49:41 +0200 > > Thomas Huth <th...@redhat.com> wrote: > > > > > The PAPR interfac

Re: [PATCH v4] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-18 Thread Greg Kurz
On Thu, 17 Sep 2015 10:49:41 +0200 Thomas Huth wrote: > The PAPR interface defines a hypercall to pass high-quality > hardware generated random numbers to guests. Recent kernels can > already provide this hypercall to the guest if the right hardware > random number generator is

[PATCH] KVM: PPC: fix typo in top comment about locking

2015-09-03 Thread Greg Kurz
Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- arch/powerpc/kvm/book3s_xics.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_xics.c b/arch/powerpc/kvm/book3s_xics.c index c6ca7db64673..905e94a1370f 100644 --- a/arch/power

[PATCH] KVM: PPC: fix typo in top comment about locking

2015-09-03 Thread Greg Kurz
Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- arch/powerpc/kvm/book3s_xics.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_xics.c b/arch/powerpc/kvm/book3s_xics.c index c6ca7db64673..905e94a1370f 100644 --- a/arch/power

Re: [PATCH] KVM: Add Kconfig option to signal cross-endian guests

2015-07-13 Thread Greg Kurz
On Thu, 9 Jul 2015 09:49:05 +0200 Thomas Huth th...@redhat.com wrote: The option for supporting cross-endianness legacy guests in the vhost and tun code should only be available on systems that support cross-endian guests. Signed-off-by: Thomas Huth th...@redhat.com Acked-by: Greg Kurz gk

Re: [PATCH] KVM: Add Kconfig option to signal cross-endian guests

2015-07-13 Thread Greg Kurz
On Thu, 9 Jul 2015 09:49:05 +0200 Thomas Huth th...@redhat.com wrote: The option for supporting cross-endianness legacy guests in the vhost and tun code should only be available on systems that support cross-endian guests. Signed-off-by: Thomas Huth th...@redhat.com Acked-by: Greg Kurz gk

Re: [PULL] virtio/vhost: cross endian support

2015-07-02 Thread Greg Kurz
On Thu, 2 Jul 2015 08:01:28 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jul 01, 2015 at 12:02:50PM -0700, Linus Torvalds wrote: On Wed, Jul 1, 2015 at 2:31 AM, Michael S. Tsirkin m...@redhat.com wrote: virtio/vhost: cross endian support Ugh. Does this really have to be

Re: [PATCH v6 0/8] vhost: support for cross endian guests

2015-05-26 Thread Greg Kurz
On Tue, 12 May 2015 12:52:55 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, May 12, 2015 at 12:44:26PM +0200, Greg Kurz wrote: On Fri, 24 Apr 2015 15:31:54 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Fri, Apr 24, 2015 at 02:24:15PM +0200, Greg Kurz wrote: Only

Re: [PATCH v5 6/8] virtio: add explicit big-endian support to memory accessors

2015-04-24 Thread Greg Kurz
On Fri, 24 Apr 2015 09:04:21 +0200 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Thu, 23 Apr 2015 21:27:19 +0200 Thomas Huth th...@redhat.com wrote: Thomas's e-mail did not make it to my mailbox... weird. :-\ On Thu, 23 Apr 2015 17:29:06 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote

Re: [PATCH v5 7/8] vhost: cross-endian support for legacy devices

2015-04-24 Thread Greg Kurz
On Fri, 24 Apr 2015 09:19:26 +0200 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Thu, 23 Apr 2015 17:29:42 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: This patch brings cross-endian support to vhost when used to implement legacy virtio devices. Since it is a relatively rare

[PATCH v6 5/8] vhost: introduce vhost_is_little_endian() helper

2015-04-24 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/vhost/vhost.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 8c1c792..6a49960 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h

[PATCH v6 6/8] virtio: add explicit big-endian support to memory accessors

2015-04-24 Thread Greg Kurz
, this patch changes the logic to: - little endian if little_endian - big endian if !little_endian The native endian case is handled by all users with a trivial helper. This patch doesn't change any functionality, nor it does add overhead. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes

[PATCH v6 3/8] macvtap: introduce macvtap_is_little_endian() helper

2015-04-24 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/net/macvtap.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 27ecc5c..a2f2958 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -49,14

[PATCH v6 4/8] vringh: introduce vringh_is_little_endian() helper

2015-04-24 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- include/linux/vringh.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/linux/vringh.h b/include/linux/vringh.h index a3fa537..3ed62ef 100644 --- a/include/linux/vringh.h +++ b/include/linux

[PATCH v6 1/8] virtio: introduce virtio_is_little_endian() helper

2015-04-24 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- include/linux/virtio_config.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index ca3ed78..bd1a582 100644 --- a/include/linux

[PATCH v6 8/8] macvtap/tun: cross-endian support for little-endian hosts

2015-04-24 Thread Greg Kurz
, little-endian wins. Since this is isn't a common usecase, the feature is controlled by a kernel config option (not set by default). Both macvtap and tun are covered by this patch since they share the same API with userland. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes since v5

[PATCH v6 2/8] tun: add tun_is_little_endian() helper

2015-04-24 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/net/tun.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 857dca4..3c3d6c0 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -206,14 +206,19 @@ struct

[PATCH v6 7/8] vhost: cross-endian support for legacy devices

2015-04-24 Thread Greg Kurz
that userspace may request a specific endianness. This field is used to override the default when activating the ring of a legacy device. It has no effect on modern devices. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes since v5: - fixed description in Kconfig - fixed error

[PATCH v6 0/8] vhost: support for cross endian guests

2015-04-24 Thread Greg Kurz
Only cosmetic and documentation changes since v5. --- Greg Kurz (8): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian() helper vringh: introduce vringh_is_little_endian() helper

[PATCH v5 2/8] tun: add tun_is_little_endian() helper

2015-04-23 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/net/tun.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 857dca4..3c3d6c0 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -206,14 +206,19 @@ struct

[PATCH v5 3/8] macvtap: introduce macvtap_is_little_endian() helper

2015-04-23 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/net/macvtap.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 27ecc5c..a2f2958 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -49,14

[PATCH v5 4/8] vringh: introduce vringh_is_little_endian() helper

2015-04-23 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- include/linux/vringh.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/linux/vringh.h b/include/linux/vringh.h index a3fa537..3ed62ef 100644 --- a/include/linux/vringh.h +++ b/include/linux

[PATCH v5 5/8] vhost: introduce vhost_is_little_endian() helper

2015-04-23 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/vhost/vhost.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 8c1c792..6a49960 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h

[PATCH v5 1/8] virtio: introduce virtio_is_little_endian() helper

2015-04-23 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- include/linux/virtio_config.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index ca3ed78..bd1a582 100644 --- a/include/linux

[PATCH v5 0/8] vhost: support for cross endian guests

2015-04-23 Thread Greg Kurz
from a ppc64 to a ppc64le host and back. No regressions on x86 as expected. My experimental QEMU tree is here: https://github.com/gkurz/qemu.git vhost/cross-endian I'd be glad if this series could make it to 4.1. Cheers. --- Greg Kurz (8): virtio: introduce virtio_is_little_endian

[PATCH v5 6/8] virtio: add explicit big-endian support to memory accessors

2015-04-23 Thread Greg Kurz
, this patch changes the logic to: - little endian if little_endian - big endian if !little_endian The native endian case is handled by all users with a trivial helper. This patch doesn't change any functionality, nor it does add overhead. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes

[PATCH v5 8/8] macvtap/tun: cross-endian support for little-endian hosts

2015-04-23 Thread Greg Kurz
, little-endian wins. Since this is isn't a common usecase, the feature is controlled by a kernel config option (not set by default). Both macvtap and tun are covered by this patch since they share the same API with userland. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes since v4

[PATCH v5 7/8] vhost: cross-endian support for legacy devices

2015-04-23 Thread Greg Kurz
that userspace may request a specific endianness. This field is used to override the default when activating the ring of a legacy device. It has no effect on modern devices. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes since v4: - rewrote patch title to mention cross-endian

Re: [PATCH v4 8/8] macvtap/tun: add VNET_BE flag

2015-04-22 Thread Greg Kurz
On Tue, 21 Apr 2015 20:30:23 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, Apr 21, 2015 at 06:22:20PM +0200, Greg Kurz wrote: On Tue, 21 Apr 2015 16:06:33 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Fri, Apr 10, 2015 at 12:20:21PM +0200, Greg Kurz wrote

Re: [PATCH v4 7/8] vhost: feature to set the vring endianness

2015-04-22 Thread Greg Kurz
On Tue, 21 Apr 2015 20:25:03 +0200 Michael S. Tsirkin m...@redhat.com wrote: [ ... ] @@ -630,6 +634,53 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m) return 0; } +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY +static long

Re: [PATCH v4 0/8] vhost: support for cross endian guests

2015-04-21 Thread Greg Kurz
On Fri, 17 Apr 2015 11:18:13 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: On Fri, 10 Apr 2015 12:15:00 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. Patch 7 got

Re: [PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors

2015-04-21 Thread Greg Kurz
On Tue, 7 Apr 2015 17:56:25 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, Apr 07, 2015 at 02:15:52PM +0200, Greg Kurz wrote: The current memory accessors logic is: - little endian if little_endian - native endian (i.e. no byteswap) if !little_endian If we want to fully

Re: [PATCH v4 7/8] vhost: feature to set the vring endianness

2015-04-21 Thread Greg Kurz
On Tue, 21 Apr 2015 16:04:23 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Fri, Apr 10, 2015 at 12:19:16PM +0200, Greg Kurz wrote: This patch brings cross-endian support to vhost when used to implement legacy virtio devices. Since it is a relatively rare situation, the feature

Re: [PATCH v4 6/8] virtio: add explicit big-endian support to memory accessors

2015-04-21 Thread Greg Kurz
On Tue, 21 Apr 2015 16:09:44 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Fri, Apr 10, 2015 at 12:16:20PM +0200, Greg Kurz wrote: The current memory accessors logic is: - little endian if little_endian - native endian (i.e. no byteswap) if !little_endian If we want to fully

Re: [PATCH v4 8/8] macvtap/tun: add VNET_BE flag

2015-04-21 Thread Greg Kurz
On Tue, 21 Apr 2015 16:06:33 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Fri, Apr 10, 2015 at 12:20:21PM +0200, Greg Kurz wrote: The VNET_LE flag was introduced to fix accesses to virtio 1.0 headers that are always little-endian. It can also be used to handle the special case

Re: [PATCH v4 0/8] vhost: support for cross endian guests

2015-04-21 Thread Greg Kurz
On Tue, 21 Apr 2015 16:10:18 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Fri, Apr 10, 2015 at 12:15:00PM +0200, Greg Kurz wrote: Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. Patch 7 got rewritten according

Re: [PATCH v4 0/8] vhost: support for cross endian guests

2015-04-17 Thread Greg Kurz
On Fri, 10 Apr 2015 12:15:00 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. Patch 7 got rewritten according to Cornelia's and Michael's comments. I have also introduced patch 8

Re: [PATCH v4 7/8] vhost: feature to set the vring endianness

2015-04-14 Thread Greg Kurz
On Tue, 14 Apr 2015 16:20:23 +0200 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Fri, 10 Apr 2015 12:19:16 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: This patch brings cross-endian support to vhost when used to implement legacy virtio devices. Since it is a relatively rare

Re: [PATCH v3 7/7] vhost: feature to set the vring endianness

2015-04-08 Thread Greg Kurz
On Tue, 7 Apr 2015 17:52:28 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, Apr 07, 2015 at 02:19:31PM +0200, Greg Kurz wrote: This patch brings cross-endian support to vhost when used to implement legacy virtio devices. Since it is a relatively rare situation, the feature

Re: [PATCH v3 7/7] vhost: feature to set the vring endianness

2015-04-08 Thread Greg Kurz
On Tue, 7 Apr 2015 17:01:31 +0200 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Tue, 07 Apr 2015 14:19:31 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: This patch brings cross-endian support to vhost when used to implement legacy virtio devices. Since it is a relatively rare

Re: [PATCH v3 7/7] vhost: feature to set the vring endianness

2015-04-08 Thread Greg Kurz
On Tue, 7 Apr 2015 18:11:29 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, Apr 07, 2015 at 02:19:31PM +0200, Greg Kurz wrote: This patch brings cross-endian support to vhost when used to implement legacy virtio devices. Since it is a relatively rare situation, the feature

[PATCH v3 0/7] vhost: support for cross endian guests

2015-04-07 Thread Greg Kurz
Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. Patches 1-6 remain the same as the previous post. Patch 7 was heavily changed according to MST's comments. --- Greg Kurz (7): virtio: introduce virtio_is_little_endian() helper

[PATCH v3 3/7] macvtap: introduce macvtap_is_little_endian() helper

2015-04-07 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/net/macvtap.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 27ecc5c..a2f2958 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -49,14

[PATCH v3 2/7] tun: add tun_is_little_endian() helper

2015-04-07 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/net/tun.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 857dca4..3c3d6c0 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -206,14 +206,19 @@ struct

[PATCH v3 1/7] virtio: introduce virtio_is_little_endian() helper

2015-04-07 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- include/linux/virtio_config.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index ca3ed78..bd1a582 100644 --- a/include/linux

[PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors

2015-04-07 Thread Greg Kurz
, this patch changes the logic to: - little endian if little_endian - big endian if !little_endian The native endian case is handled by all users with a trivial helper. This patch doesn't change any functionality, nor it does add overhead. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers

[PATCH v3 5/7] vhost: introduce vhost_is_little_endian() helper

2015-04-07 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/vhost/vhost.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 8c1c792..6a49960 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h

[PATCH v3 7/7] vhost: feature to set the vring endianness

2015-04-07 Thread Greg Kurz
are returned EPERM. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/vhost/Kconfig | 10 drivers/vhost/vhost.c | 55 drivers/vhost/vhost.h | 17 +- include/uapi/linux/vhost.h |5 4 files

[PATCH v3 4/7] vringh: introduce vringh_is_little_endian() helper

2015-04-07 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- include/linux/vringh.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/linux/vringh.h b/include/linux/vringh.h index a3fa537..3ed62ef 100644 --- a/include/linux/vringh.h +++ b/include/linux

Re: [PATCH v3 0/7] vhost: support for cross endian guests

2015-04-07 Thread Greg Kurz
On Tue, 7 Apr 2015 17:55:08 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, Apr 07, 2015 at 02:09:29PM +0200, Greg Kurz wrote: Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. Patches 1-6 remain the same

[PATCH v2 3/7] macvtap: introduce macvtap_is_little_endian() helper

2015-04-02 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/net/macvtap.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 27ecc5c..a2f2958 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -49,14

[PATCH v2 4/7] vringh: introduce vringh_is_little_endian() helper

2015-04-02 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- include/linux/vringh.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/linux/vringh.h b/include/linux/vringh.h index a3fa537..3ed62ef 100644 --- a/include/linux/vringh.h +++ b/include/linux

[PATCH v2 1/7] virtio: introduce virtio_is_little_endian() helper

2015-04-02 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- include/linux/virtio_config.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index ca3ed78..bd1a582 100644 --- a/include/linux

[PATCH v2 5/7] vhost: introduce vhost_is_little_endian() helper

2015-04-02 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/vhost/vhost.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 8c1c792..6a49960 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h

[PATCH v2 2/7] tun: add tun_is_little_endian() helper

2015-04-02 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/net/tun.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 857dca4..3c3d6c0 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -206,14 +206,19 @@ struct

[PATCH v2 0/7] vhost: support for cross endian guests

2015-04-02 Thread Greg Kurz
vnet headers was dropped for the moment. As a consequnce, vhost_net still fails to work with cross-endian. It will be fixed in another patchset I'm currently working on. --- Greg Kurz (7): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper

[PATCH v2 6/7] virtio: add explicit big-endian support to memory accessors

2015-04-02 Thread Greg Kurz
, this patch changes the logic to: - little endian if little_endian - big endian if !little_endian The native endian case is handled by all users with a trivial helper. This patch doesn't change any functionality, nor it does add overhead. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers

[PATCH v2 7/7] vhost: feature to set the vring endianness

2015-04-02 Thread Greg Kurz
for both at the same time. Hot paths are being preserved from any penalty when the config option is disabled or when virtio 1.0 is being used. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/vhost/Kconfig | 10 ++ drivers/vhost/net.c|5 + drivers

Re: [PATCH v2 7/7] vhost: feature to set the vring endianness

2015-04-02 Thread Greg Kurz
On Thu, 2 Apr 2015 16:20:46 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Apr 02, 2015 at 03:17:13PM +0200, Greg Kurz wrote: This patch brings cross-endian support to vhost when used to implement legacy virtio devices. Since it is a relatively rare situation, the feature

Re: [PATCH] kvm: move advertising of KVM_CAP_IRQFD to common code

2015-03-05 Thread Greg Kurz
in the future make the same mistake, let common code handle KVM_CAP_IRQFD the same way as KVM_CAP_IRQFD_RESAMPLE. Reported-by: Greg Kurz gk...@linux.vnet.ibm.com Cc: sta...@vger.kernel.org Fixes: 297e21053a52f060944e9f0de4c64fad9bcd72fc Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- Thanks

Re: [PATCH 0/3] vhost_net: support for cross endian guests

2015-02-23 Thread Greg Kurz
On Sun, 22 Feb 2015 10:53:51 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Fri, Feb 20, 2015 at 11:07:24AM +0100, Greg Kurz wrote: Hi, This patchset allows vhost_net to be used with legacy virtio when guest and host have a different endianness. It is based on previous work

[PATCH 3/3] vhost_net: fix virtio_net header endianness

2015-02-20 Thread Greg Kurz
Without this patch, packets are being silently dropped by the tap backend. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/vhost/net.c | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c

[PATCH 2/3] vhost: add support for legacy virtio

2015-02-20 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/vhost/vhost.h | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) Michael, The vhost_is_little_endian() helper adds unconditionnal overhead to fixed endian architectures: that is all architectures except arm

[PATCH 1/3] vhost: add VHOST_VRING_F_LEGACY_BIG_ENDIAN flag

2015-02-20 Thread Greg Kurz
a legacy device, in case host and guest endianness differ. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/vhost/vhost.c |6 +- drivers/vhost/vhost.h |3 +++ include/uapi/linux/vhost.h |2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git

[PATCH 0/3] vhost_net: support for cross endian guests

2015-02-20 Thread Greg Kurz
(big endian) instead of the hint whether byteswap is needed or not (patch 1) - rebased on top of the virtio-1 accessors (patch 2) Patch 3 is a separate fix: I think it is also valid for virtio-1. Please comment. --- Greg Kurz (3): vhost: add VHOST_VRING_F_LEGACY_BIG_ENDIAN flag vhost

Re: [PATCH v8 34/50] vhost/net: virtio 1.0 byte swap

2015-01-07 Thread Greg Kurz
On Tue, 06 Jan 2015 16:55:30 -0700 Alex Williamson alex.william...@redhat.com wrote: On Mon, 2014-12-01 at 18:05 +0200, Michael S. Tsirkin wrote: I had to add an explicit tag to suppress compiler warning: gcc isn't smart enough to notice that len is always initialized since function is

Re: [PATCH RFC v3 07/12] dataplane: allow virtio-1 devices

2014-11-26 Thread Greg Kurz
On Wed, 26 Nov 2014 18:28:38 +0100 Cornelia Huck cornelia.h...@de.ibm.com wrote: Handle endianness conversion for virtio-1 virtqueues correctly. Note that dataplane now needs to be built per-target. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com Build is ok now. Acked-by: Greg

Re: [Qemu-devel] [PATCH RFC v3 05/12] virtio: introduce legacy virtio devices

2014-11-26 Thread Greg Kurz
On Wed, 26 Nov 2014 18:28:36 +0100 Cornelia Huck cornelia.h...@de.ibm.com wrote: Introduce a helper function to indicate whether a virtio device is operating in legacy or virtio standard mode. It may be used to make decisions about the endianess of virtio accesses and other virtio-1

Re: [PATCH RFC v2 07/12] dataplane: allow virtio-1 devices

2014-11-25 Thread Greg Kurz
On Tue, 25 Nov 2014 14:24:18 +0100 Cornelia Huck cornelia.h...@de.ibm.com wrote: Handle endianness conversion for virtio-1 virtqueues correctly. Note that dataplane now needs to be built per-target. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- We still have the same error as

Re: [Qemu-devel] [PATCH RFC 05/11] virtio: introduce legacy virtio devices

2014-10-30 Thread Greg Kurz
On Thu, 30 Oct 2014 19:02:01 +0100 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Tue, 28 Oct 2014 16:40:18 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: On Tue, 7 Oct 2014 16:40:01 +0200 Cornelia Huck cornelia.h...@de.ibm.com wrote: Introduce a helper function to indicate

Re: [Qemu-devel] [PATCH RFC 07/11] dataplane: allow virtio-1 devices

2014-10-28 Thread Greg Kurz
On Tue, 7 Oct 2014 16:40:03 +0200 Cornelia Huck cornelia.h...@de.ibm.com wrote: Handle endianness conversion for virtio-1 virtqueues correctly. Note that dataplane now needs to be built per-target. It also affects hw/virtio/virtio-pci.c: In file included from

Re: [Qemu-devel] [PATCH RFC 05/11] virtio: introduce legacy virtio devices

2014-10-28 Thread Greg Kurz
On Tue, 7 Oct 2014 16:40:01 +0200 Cornelia Huck cornelia.h...@de.ibm.com wrote: Introduce a helper function to indicate whether a virtio device is operating in legacy or virtio standard mode. It may be used to make decisions about the endianess of virtio accesses and other virtio-1

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Greg Kurz
On Wed, 07 May 2014 10:52:01 +0100 Marc Zyngier marc.zyng...@arm.com wrote: On Wed, May 07 2014 at 10:34:30 am BST, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 19:38, Peter Maydell peter.mayd...@linaro.org wrote: On 6 May 2014 18:25, Marc Zyngier marc.zyng...@arm.com wrote:

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-07 Thread Greg Kurz
On Wed, 7 May 2014 13:17:51 +0100 Peter Maydell peter.mayd...@linaro.org wrote: On 7 May 2014 12:04, Marc Zyngier marc.zyng...@arm.com wrote: On Wed, May 07 2014 at 11:40:54 am BST, Greg Kurz gk...@linux.vnet.ibm.com wrote: All the fuzz is not really about enforcing kernel access... PPC

Re: Preparing kvm/next for first pull request of 3.15 merge window

2014-03-26 Thread Greg Kurz
On Wed, 26 Mar 2014 10:19:52 +0100 Paolo Bonzini pbonz...@redhat.com wrote: Il 26/03/2014 04:51, Paul Mackerras ha scritto: I would like to know from ARM and PPC maintainers *now* (before the merge window opens) what will be in 3.15. Also, PPC guys, please make sure the pull requests

Re: [PATCH 0/4] PPC: KVM: fix RESUME_GUEST checks

2014-02-07 Thread Greg Kurz
On Thu, 6 Feb 2014 18:39:30 +0100 Alexander Graf ag...@suse.de wrote: On 06.02.2014, at 17:36, Greg Kurz gk...@linux.vnet.ibm.com wrote: As discussed in this thread: http://patchwork.ozlabs.org/patch/309166/ We need some consistency in the way we check whether the guest should

[PATCH 1/4] PPC: KVM: introduce helper to check RESUME_GUEST and related

2014-02-06 Thread Greg Kurz
to the kvm_book3s.h header file. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/include/asm/kvm_book3s.h |5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h index 83851aa..bb1e38a 100644

[PATCH 2/4] PPC: KVM: fix VCPU run for HV KVM (v2)

2014-02-06 Thread Greg Kurz
a...@ozlabs.ru Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/kvm/book3s_hv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 17fc949..d62dc6c 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b

[PATCH 0/4] PPC: KVM: fix RESUME_GUEST checks

2014-02-06 Thread Greg Kurz
a helper and patches the locations where it should be called. There is yet another location in __kvmppc_vcpu_run, but it is assembly and cannot call a C inlined function. --- Alexey Kardashevskiy (1): PPC: KVM: fix VCPU run for HV KVM (v2) Greg Kurz (3): PPC: KVM: introduce helper to check

[PATCH 4/4] PPC: KVM: fix RESUME_GUEST check before returning from kvmppc_run_core()

2014-02-06 Thread Greg Kurz
Let's use a helper for this, in case new RESUME_GUEST_XXX values are introduced. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/kvm/book3s_hv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c

[PATCH 3/4] PPC: KVM: fix RESUME_GUEST check before ending CEDE in kvmppc_run_core()

2014-02-06 Thread Greg Kurz
Let's use a helper for this, in case new RESUME_GUEST_XXX values are introduced. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/kvm/book3s_hv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c

[PATCH 3/4] PPC: KVM: fix RESUME_GUEST check before ending CEDE in kvmppc_run_core()

2014-02-06 Thread Greg Kurz
Let's use a helper for this, in case new RESUME_GUEST_XXX values are introduced. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/kvm/book3s_hv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c

[PATCH 1/4] PPC: KVM: introduce helper to check RESUME_GUEST and related

2014-02-06 Thread Greg Kurz
to the kvm_book3s.h header file. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/include/asm/kvm_book3s.h |5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h index 83851aa..bb1e38a 100644

[PATCH 0/4] PPC: KVM: fix RESUME_GUEST checks

2014-02-06 Thread Greg Kurz
a helper and patches the locations where it should be called. There is yet another location in __kvmppc_vcpu_run, but it is assembly and cannot call a C inlined function. --- Alexey Kardashevskiy (1): PPC: KVM: fix VCPU run for HV KVM (v2) Greg Kurz (3): PPC: KVM: introduce helper to check

Re: [Qemu-ppc] KVM and variable-endianness guest CPUs

2014-01-23 Thread Greg Kurz
On Wed, 22 Jan 2014 20:25:05 -0800 Victor Kamensky victor.kamen...@linaro.org wrote: Hi Alex, Sorry, for delayed reply, I was focusing on discussion with Peter. Hope you and other folks may get something out of it :). Please see responses inline On 22 January 2014 02:52, Alexander

Re: [Qemu-ppc] [RFC] QEMU/KVM PowerPC: virtio and guest endianness

2013-10-04 Thread Greg Kurz
On Fri, 4 Oct 2013 13:43:38 +0200 Alexander Graf ag...@suse.de wrote: CC'ing qemu-devel - please use qemu-ppc@ only as a tag, every mail needs to go to qemu-devel as well. Sure I will. On 03.10.2013, at 16:29, Greg Kurz wrote: [...] I have searched for an appropriate place to add

Re: [Qemu-ppc] [RFC] QEMU/KVM PowerPC: virtio and guest endianness

2013-10-04 Thread Greg Kurz
Answering to both Paul and Alex. On Fri, 4 Oct 2013 13:54:25 +0200 Alexander Graf ag...@suse.de wrote: On 04.10.2013, at 13:53, Paul Mackerras wrote: I don't mind particularly whether H_SET_MODE for the endianness setting gets handled in the kernel or in QEMU, but I don't think it

[RFC] QEMU/KVM PowerPC: virtio and guest endianness

2013-10-03 Thread Greg Kurz
virtio specification which should address the endian issue: probably not worth to add too many temporary lines in the QEMU code... Of course, I probably lack some essential knowledge that would be more favorable to (1)... so please comment and argue ! :) Thanks. -- Greg Kurz -- To unsubscribe from