Re: [Qemu-ppc] [PATCH v2] powerpc/pseries: start rtasd before PCI probing

2016-06-21 Thread Greg Kurz
On Wed, 15 Jun 2016 22:26:41 +0200 Greg Kurz wrote: > A strange behaviour is observed when comparing PCI hotplug in QEMU, between > x86 and pseries. If you consider the following steps: > - start a VM > - add a PCI device via the QEMU monitor before the rtasd has started (for

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

2015-10-27 Thread Greg Kurz
le_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 > Signed-off-by: Michael S. Tsirkin Oops my bad for this oversight... Reviewed-by: Greg Kurz > --- > drivers

Re: [V9fs-developer] [PATCH v2] net/9p/trans_virtio.c: add null terminal for mount tag

2018-08-02 Thread Greg Kurz
On Thu, 2 Aug 2018 09:59:38 +0800 piaojun wrote: > Hi Dominique, > > On 2018/8/2 9:54, Dominique Martinet wrote: > > piaojun wrote on Thu, Aug 02, 2018: > >> chan->tag is Non-null terminated which will result in printing messy code > >> when debugging code. So we should add '\0' for tag to mak

Re: [PATCH] net/9p/trans_virtio.c: add a terminal char for mount tag

2018-08-01 Thread Greg Kurz
On Wed, 1 Aug 2018 16:24:27 +0800 piaojun wrote: > Hi Dominique, > > On 2018/8/1 16:11, Dominique Martinet wrote: > > piaojun wrote on Wed, Aug 01, 2018: > >> chan->tag has no terminal char at last which will result in printing messy > >> code when debugging code. So we should add '\0' for tag

Re: [V9fs-developer] [PATCH 1/2] net/9p: embed fcall in req to round down buffer allocs

2018-08-01 Thread Greg Kurz
On Mon, 30 Jul 2018 11:34:22 +0200 Dominique Martinet wrote: > From: Dominique Martinet > > 'msize' is often a power of two, or at least page-aligned, so avoiding > an overhead of two dozen bytes for each allocation will help the > allocator do its work and reduce memory fragmentation. > > Sug

Re: [V9fs-developer] [PATCH 2/2] net/9p: add a per-client fcall kmem_cache

2018-08-01 Thread Greg Kurz
On Mon, 30 Jul 2018 11:34:23 +0200 Dominique Martinet wrote: > From: Dominique Martinet > > Having a specific cache for the fcall allocations helps speed up > allocations a bit, especially in case of non-"round" msizes. > > The caches will automatically be merged if there are multiple caches >

Re: [V9fs-developer] [PATCH 1/2] net/9p: embed fcall in req to round down buffer allocs

2018-08-01 Thread Greg Kurz
On Wed, 1 Aug 2018 16:38:40 +0200 Dominique Martinet wrote: > Greg Kurz wrote on Wed, Aug 01, 2018: > > > @@ -263,13 +261,13 @@ p9_tag_alloc(struct p9_client *c, int8_t type, > > > unsigned int max_size) > > > if (!req) > > > return NULL; >

Re: [PATCH v2 1/2] net/9p: embed fcall in req to round down buffer allocs

2018-08-02 Thread Greg Kurz
duce memory fragmentation. > > Suggested-by: Matthew Wilcox > Signed-off-by: Dominique Martinet > Cc: Matthew Wilcox > Cc: Greg Kurz > Cc: Jun Piao > --- > > v2: > - Add extra label to not free uninitialized memory on alloc failure > - Rename p9_fcall_alloc to 9p_fc

Re: [PATCH v2 5/6] 9p: Use a slab for allocating requests

2018-07-23 Thread Greg Kurz
On Wed, 18 Jul 2018 12:05:54 +0200 Dominique Martinet wrote: > +Cc Greg, I could use your opinion on this if you have a moment. > Hi Dominique, The patch is quite big and I'm not sure I can find time to review it carefully, but I'll try to help anyway. > Matthew Wilcox wrote on Wed, Jul 11, 2

Re: [PATCH v2 5/6] 9p: Use a slab for allocating requests

2018-07-23 Thread Greg Kurz
On Mon, 23 Jul 2018 14:25:31 +0200 Dominique Martinet wrote: > Greg Kurz wrote on Mon, Jul 23, 2018: > > The patch is quite big and I'm not sure I can find time to review it > > carefully, but I'll try to help anyway. > > No worry, thanks for this already. &g

Re: [V9fs-developer] [PATCH v2 1/6] 9p: Fix comment on smp_wmb

2018-07-12 Thread Greg Kurz
On Wed, 11 Jul 2018 14:02:20 -0700 Matthew Wilcox wrote: > The previous comment misled me into thinking the barrier wasn't needed > at all. > > Signed-off-by: Matthew Wilcox > --- Reviewed-by: Greg Kurz > net/9p/client.c | 2 +- > 1 file changed, 1 insertion(+

Re: [V9fs-developer] [PATCH v2 2/6] 9p: Change p9_fid_create calling convention

2018-07-12 Thread Greg Kurz
g. > > Signed-off-by: Matthew Wilcox > --- Reviewed-by: Greg Kurz > net/9p/client.c | 23 +-- > 1 file changed, 9 insertions(+), 14 deletions(-) > > diff --git a/net/9p/client.c b/net/9p/client.c > index 999eceb8af98..389a2904b7b3 100644 > --

Re: [V9fs-developer] [PATCH v2 4/6] 9p: Embed wait_queue_head into p9_req_t

2018-07-12 Thread Greg Kurz
s changed, 7 insertions(+), 16 deletions(-) > ... and the diffstat is nice :) so Reviewed-by: Greg Kurz > diff --git a/include/net/9p/client.h b/include/net/9p/client.h > index e405729cd1c7..0fa0fbab33b0 100644 > --- a/include/net/9p/client.h > +++ b/include/net/9p/client

Re: [V9fs-developer] [PATCH v2 4/6] 9p: Embed wait_queue_head into p9_req_t

2018-07-12 Thread Greg Kurz
On Thu, 12 Jul 2018 16:40:12 +0200 Dominique Martinet wrote: > Greg Kurz wrote on Thu, Jul 12, 2018: > > This is true when all tags have been used at least once. But the current > > code > > lazily allocates the wait_queue_head_t, ie, only when a tag is used for the >

Re: [PATCH 1/2] virtio: allow to detach a buffer from the virtqueue

2018-01-20 Thread Greg Kurz
On Fri, 19 Jan 2018 21:49:38 +0200 "Michael S. Tsirkin" wrote: > On Wed, Dec 20, 2017 at 06:46:42PM +0100, Greg Kurz wrote: > > It is possible for a device to stop using buffers without pushing them > > back to the driver. This is the case for example with the 9p virtio

[PATCH] 9p/trans_virtio: discard zero-length reply

2018-01-22 Thread Greg Kurz
client will erroneously assume the request has not been flushed. Signed-off-by: Greg Kurz --- net/9p/trans_virtio.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 0845aad4ba51..ca08c72ef4de 100644 --- a/net/9p/trans_virtio.c

Re: [PATCH 0/2] 9p/trans_virtio: handle request cancellation

2018-01-08 Thread Greg Kurz
Hi Michael, I wish you a happy new year, and I really need some feedback on this series because it holds down some patches on the QEMU side. Thanks, -- Greg On Wed, 20 Dec 2017 18:46:27 +0100 Greg Kurz wrote: > The 9p protocol mostly relies on a request/reply dialog between the > clie

[PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-03-09 Thread Greg Kurz
both functions with a trivial label+goto. Thanks to Laurent Dufour for his help and suggestions on how to find the root cause and how to fix it. Signed-off-by: Greg Kurz --- net/9p/client.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/9p/client.c b/net/9p/cli

Re: [PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-03-10 Thread Greg Kurz
Hi Andrew, Thank you very much for taking care of this. Please find my answers to your remarks below. On Fri, 9 Mar 2018 14:12:52 -0800 Andrew Morton wrote: > On Fri, 09 Mar 2018 21:41:38 +0100 Greg Kurz wrote: > > > If it was interrupted by a signal, the 9p client may need

[PATCH] radix tree: Don't return internal entries on lookup

2018-12-06 Thread Greg Kurz
radix_tree_lookup(), ie, 0x406 == RADIX_TREE_RETRY. Fix this by not breaking out of the loop if the node points to an internal entry. Fixes: 66ee620f06f9 ("idr: Permit any valid kernel pointer to be stored") Signed-off-by: Greg Kurz --- lib/radix-tree.c |2 +- 1 file changed, 1 insertio

Re: [PATCH] radix tree: Don't return internal entries on lookup

2018-12-06 Thread Greg Kurz
On Thu, 6 Dec 2018 05:36:20 -0800 Matthew Wilcox wrote: > On Thu, Dec 06, 2018 at 08:54:03AM +0100, Greg Kurz wrote: > > Commit 66ee620f06f9 ("idr: Permit any valid kernel pointer to > > be stored") changed the radix tree lookup so that it stops when > > reach

Re: [V9fs-developer] [PATCH] net/9p/client.c: put refcount of trans_mod in error case in parse_opts()

2018-07-09 Thread Greg Kurz
fcount of trans_mod in error case. > > Fixes: 9421c3e64137ec ("net/9p/client.c: fix potential refcnt problem of > trans module") > > Signed-off-by: Jun Piao > --- Reviewed-by: Greg Kurz > net/9p/client.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH] radix tree: Don't return internal entries on lookup

2018-12-13 Thread Greg Kurz
On Thu, 6 Dec 2018 17:21:02 +0100 Greg Kurz wrote: > On Thu, 6 Dec 2018 05:36:20 -0800 > Matthew Wilcox wrote: > > > On Thu, Dec 06, 2018 at 08:54:03AM +0100, Greg Kurz wrote: > > > Commit 66ee620f06f9 ("idr: Permit any valid kernel pointer to > > > be

[PATCH v2] powerpc/pseries: Don't enforce MSI affinity with kdump

2021-02-15 Thread Greg Kurz
that during kdump. Simply revert to the previous working behavior of ignoring affinity masks in this case only. Fixes: 9ea69a55b3b9 ("powerpc/pseries: Pass MSI affinity to irq_create_mapping()") Cc: lviv...@redhat.com Cc: sta...@vger.kernel.org Reviewed-by: Laurent Vivier Reviewed-b

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 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 called with size > 0. >

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

2015-04-02 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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/virtio_config.h +++ b/include/linux

[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() h

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

2015-04-02 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 tun_struct { u32

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

2015-04-02 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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/vringh.h @@ -226,33 +226,38

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

2015-04-02 Thread Greg Kurz
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 --- drivers/net/macv

[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 --- drivers/vhost/Kconfig | 10 ++ drivers/vhost/net.c|5 + drivers/vhost/scsi.c |4

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

2015-04-02 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 +49,19 @@ struct

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

2015-04-02 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 @@ -173,34 +173,39

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" 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

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" 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_endi

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" 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 spe

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" 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. > &

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" 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 > > > > +stati

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" 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" wrote: > > > > > On Fri, Apr 10, 2015 at 12:20:21PM +0

[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_e

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

2015-04-23 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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/virtio_config.h +++ b/include/linux

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

2015-04-23 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 +49,19 @@ struct

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

2015-04-23 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 tun_struct { u32

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

2015-04-23 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 @@ -173,34 +173,39

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

2015-04-23 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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/vringh.h @@ -226,33 +226,38

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

2015-04-23 Thread Greg Kurz
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 --- Changes since v4: - style

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

2015-04-23 Thread Greg Kurz
added so 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 --- Changes since v4: - rewrote patch title to mention cross-endian - renamed con

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

2015-04-23 Thread Greg Kurz
e set, 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 --- Changes since v4: - rewrote p

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 wrote: > On Thu, 23 Apr 2015 21:27:19 +0200 > Thomas Huth wrote: > Thomas's e-mail did not make it to my mailbox... weird. :-\ > > On Thu, 23 Apr 2015 17:29:06 +0200 > > Greg Kurz 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 wrote: > On Thu, 23 Apr 2015 17:29:42 +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 > &

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

2015-04-24 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 @@ -173,34 +173,39

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

2015-04-24 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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/vringh.h @@ -226,33 +226,38

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

2015-04-24 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 tun_struct { u32

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

2015-04-24 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 +49,19 @@ struct

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

2015-04-24 Thread Greg Kurz
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 --- Changes since v5: - ch

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

2015-04-24 Thread Greg Kurz
added so 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 --- Changes since v5: - fixed description in Kconfig - fixed error description in uapi

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

2015-04-24 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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/virtio_config.h +++ b/include/linux

[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 v6 8/8] macvtap/tun: cross-endian support for little-endian hosts

2015-04-24 Thread Greg Kurz
e set, 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 --- Changes since v5: - changed {ma

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 wrote: > On Fri, 10 Apr 2015 12:19:16 +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 > &

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 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 in

[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() h

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

2015-04-07 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 tun_struct { u32

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

2015-04-07 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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/virtio_config.h +++ b/include/linux

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

2015-04-07 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 +49,19 @@ struct

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

2015-04-07 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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/vringh.h @@ -226,33 +226,38

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

2015-04-07 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 @@ -173,34 +173,39

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

2015-04-07 Thread Greg Kurz
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 --- drivers/net/macv

[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 --- drivers/vhost/Kconfig | 10 drivers/vhost/vhost.c | 55 drivers/vhost/vhost.h | 17 +- include/uapi/linux/vhost.h |5 4 files changed, 86 insertions

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" 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. > &

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 wrote: > On Tue, 07 Apr 2015 14:19:31 +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 > &

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" 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

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" 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

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" 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 >

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 wrote: > On Fri, 10 Apr 2015 12:15:00 +0200 > Greg Kurz wrote: > > > Hi, > > > > This patchset allows vhost to be used with legacy virtio when guest and host > > have a different endianness. > > > > Patc

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" 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

Re: [PATCH 2/5] ocxl: Clean up printf formats

2019-03-13 Thread Greg Kurz
On Wed, 13 Mar 2019 15:06:58 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > Use %# instead of using a literal '0x' > > Signed-off-by: Alastair D'Silva > --- Reviewed-by: Greg Kurz > drivers/misc/ocxl/config.c | 6

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Greg Kurz
On Wed, 27 Feb 2019 15:57:37 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > The term 'link' is ambiguous (especially when the struct is used for a > list), so rename it for clarity. > > Signed-off-by: Alastair D'Silva > R

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Greg Kurz
esday, 27 February 2019 6:55 PM > >>> To: Alastair D'Silva ; 'Alastair D'Silva' > >>> > >>> Cc: 'Greg Kurz' ; 'Frederic Barrat' > >>> ; 'Arnd Bergmann' ; 'Greg Kroah- > >>> Hartman

[PATCH] powerpc/pseries: Don't enforce MSI affinity with kdump

2021-02-12 Thread Greg Kurz
that during kdump. Simply revert to the previous working behavior of ignoring affinity masks in this case only. Fixes: 9ea69a55b3b9 ("powerpc/pseries: Pass MSI affinity to irq_create_mapping()") Cc: lviv...@redhat.com Cc: sta...@vger.kernel.org Signed-off-by: Greg Kurz -

Re: [V9fs-developer] [PATCH kernel] 9p/trans_fd: Check file mode at opening

2020-07-29 Thread Greg Kurz
On Wed, 29 Jul 2020 09:50:21 +1000 Alexey Kardashevskiy wrote: > > > On 29/07/2020 03:42, Greg Kurz wrote: > > Hi Alexey, > > > > Working on 9p now ?!? ;-) > > No, I am running syzkaller and seeing things :) > :) > > > Cc'ing Dominique Ma

Re: [PATCH v2] KVM: PPC: Book3S HV: relax check on H_SVM_INIT_ABORT

2020-05-20 Thread Greg Kurz
RT, this hcall will be > filtered out in kvmppc_h_svm_init_abort() because kvm->arch.secure_guest is > not set in that case. > > Fixes: 8c47b6ff29e3 ("KVM: PPC: Book3S HV: Check caller of H_SVM_* Hcalls") > Signed-off-by: Laurent Dufour > --- Reviewed-by: Greg Ku

Re: [PATCH] KVM: PPC: Book3S HV: relax check on H_SVM_INIT_ABORT

2020-05-20 Thread Greg Kurz
On Wed, 20 May 2020 18:51:10 +0200 Laurent Dufour wrote: > The commit 8c47b6ff29e3 ("KVM: PPC: Book3S HV: Check caller of H_SVM_* > Hcalls") added checks of secure bit of SRR1 to filter out the Hcall > reserved to the Ultravisor. > > However, the Hcall H_SVM_INIT_ABORT is made by the Ultravisor

[PATCH] mailmap: Add entry for Greg Kurz

2020-08-12 Thread Greg Kurz
I had stopped using gk...@linux.vnet.ibm.com a while back already but this email address was shutdown last June when I quit IBM. It's about time to map it to gr...@kaod.org. Signed-off-by: Greg Kurz --- .mailmap |1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap

[PATCH] virtiofs: propagate sync() to file server

2021-04-19 Thread Greg Kurz
to DoS sync(). Since a typical FUSE file server is an untrusted piece of software running in userspace, this is disabled by default. Only enable it with virtiofs for now since virtiofsd is supposedly trusted by the guest kernel. Reported-by: Robert Krawitz Signed-off-by: Greg Kurz --- Can be tested usi

Re: [Virtio-fs] [PATCH v3 2/3] dax: Add a wakeup mode parameter to put_unlocked_entry()

2021-04-20 Thread Greg Kurz
e code which is simple enough, so I'd simply drop it. This is minor though and it shouldn't prevent this fix to go forward. Reviewed-by: Greg Kurz > if (entry && !dax_is_conflict(entry)) > - dax_wake_entry(xas, entry, WAKE_NEXT); > + dax_wake

Re: [Virtio-fs] [PATCH v3 1/3] dax: Add an enum for specifying dax wakup mode

2021-04-20 Thread Greg Kurz
t; explicity at the callsite itself. Easier to read code. > > This patch should not introduce any change of behavior. > > Suggested-by: Dan Williams > Signed-off-by: Vivek Goyal > --- Reviewed-by: Greg Kurz > fs/dax.c | 23 +-- > 1 file ch

[PATCH] KVM: PPC: Book3S HV: XIVE: Fix vCPU id sanity check

2020-11-30 Thread Greg Kurz
ce. Fix kvmppc_xive_vcpu_id_valid() so that it checks the packed vCPU id is below xive->nr_servers, which is explicitly what we want. Fixes: 062cfab7069f ("KVM: PPC: Book3S HV: XIVE: Make VP block size configurable") Cc: sta...@vger.kernel.org # v5.5+ Signed-off-by: Greg Kurz --

Re: [PATCH v2 2/2] powerpc/pseries: pass MSI affinity to irq_create_mapping()

2020-11-25 Thread Greg Kurz
virtqueues are correctly dispatched between the CPUs > on pseries. > Since it is public, maybe add: BugId: https://bugzilla.redhat.com/show_bug.cgi?id=1702939 ? > Signed-off-by: Laurent Vivier > --- Anyway, Reviewed-by: Greg Kurz > arch/powerpc/platforms/pseries/msi.c | 3

Re: [PATCH v2 1/2] genirq: add an irq_create_mapping_affinity() function

2020-11-25 Thread Greg Kurz
ss NULL for the affinity parameter. > > No functional change. > > Signed-off-by: Laurent Vivier > --- Reviewed-by: Greg Kurz > include/linux/irqdomain.h | 12 ++-- > kernel/irq/irqdomain.c| 13 - > 2 files changed, 18 insertions(+), 7 delet

Re: [PATCH v3 2/2] powerpc/pseries: pass MSI affinity to irq_create_mapping()

2020-11-25 Thread Greg Kurz
On Wed, 25 Nov 2020 16:42:30 + Marc Zyngier wrote: > On 2020-11-25 16:24, Laurent Vivier wrote: > > On 25/11/2020 17:05, Denis Kirjanov wrote: > >> On 11/25/20, Laurent Vivier wrote: > >>> With virtio multiqueue, normally each queue IRQ is mapped to a CPU. > >>> > >>> But since commit 0d9f0

[PATCH] powerpc/le: fix endianness of the arguments passed to the ppc_rtas() syscall

2014-03-05 Thread Greg Kurz
RTAS manipulates its input and output arguments in big endian order. I have looked at factoring some lines with rtas_call() but it is not really worth it because of the variable arguments. Signed-off-by: Greg Kurz --- arch/powerpc/kernel/rtas.c | 15 +-- 1 file changed, 13

[PATCH] powerpc/le: big endian arguments for ppc_rtas()

2014-03-19 Thread Greg Kurz
RTAS, it is far better to stick with a simple rationale: ppc_rtas() should be called with a big endian rtas_args structure. With this patch, it is now up to userspace to forge big endian arguments, as expected by RTAS. Signed-off-by: Greg Kurz --- Ben, The chunk with the -1 return code check may

Re: [RFC PATCH] powerpc/le: enable RTAS events support

2014-04-02 Thread Greg Kurz
On Tue, 1 Apr 2014 12:26:32 +0200 Geert Uytterhoeven wrote: > On Mon, Mar 31, 2014 at 5:02 PM, Nathan Fontenot > wrote: > > struct rtas_error_log { > > - unsigned long version:8;/* Architectural version */ > > - unsigned long severity:3; /* Severity lev

[PATCH v2] powerpc/le: enable RTAS events support

2014-04-04 Thread Greg Kurz
e bit fields in the RTAS event structures (even the unused ones, for consistency). We also introduce endian safe accessors for the fields used by the kernel (trivial rtas_error_type() accessor added for consistency). Cc: Nathan Fontenot Signed-off-by: Greg Kurz --- Changes since v2: - kill al

[PATCH] powerpc/le: enable RTAS events support

2014-03-28 Thread Greg Kurz
The current kernel code assumes big endian and parses RTAS events all wrong. The most visible effect is that we cannot honor EPOW events, meaning, for example, we cannot shut down a guest properly from the hypervisor. This patch fixes that. Signed-off-by: Greg Kurz --- arch/powerpc/include/asm

Re: [PATCH] powerpc/le: enable RTAS events support

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 09:29:22 +0100 Laurent Dufour wrote: > On 28/03/2014 08:33, Greg Kurz wrote: > > The current kernel code assumes big endian and parses RTAS events all > > wrong. The most visible effect is that we cannot honor EPOW events, > > meaning, for example, we can

Re: [PATCH] powerpc/le: enable RTAS events support

2014-03-28 Thread Greg Kurz
e called > other places where the scope variable is not originally big endian. > > -Nathan > Nathan, rtas_call() in arch/powerpc/kernel/rtas.c already does the conversion for us. Thanks. > On 03/28/2014 02:33 AM, Greg Kurz wrote: > > The current kernel code assumes big

Re: [PATCH] powerpc/le: enable RTAS events support

2014-03-31 Thread Greg Kurz
On Mon, 31 Mar 2014 09:27:16 +1100 Stewart Smith wrote: > Greg Kurz writes: > > struct rtas_error_log { > > +#ifdef __BIG_ENDIAN__ > > + /* Byte 0 */ > > unsigned long version:8;/* Architectural version */ > > + /* Byte 1 */ > >

[PATCH] hwrng: pseries - port to new read API and fix stack corruption

2014-10-30 Thread Greg Kurz
intermediate well sized buffer to plpar_hcall(). This is acceptalbe since we're not on a hot path. - move to the new read API so that we know the return buffer size for sure. Signed-off-by: Greg Kurz --- Cc'ing stable as I could reproduce back to 3.15.10 drivers/char/hw_random/pseries-rn

  1   2   3   >