[PATCH v4 6/6] virtio: Revert "virtio: find_vqs() add arg sizes"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit a10fba0377145fccefea4dc4dd5915b7ed87e546: the proposed API isn't supported on all transports but no effort was made to address this. It might not be hard to fix if we want to: maybe just rename size to size_hint and make sure legacy transports ignore the hint. But it's not

[PATCH v4 5/6] virtio: Revert "virtio_vdpa: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit 99e8927d8a4da8eb8a8a5904dc13a3156be8e7c0: proposed API isn't supported on all transports but no effort was made to address this. It might not be hard to fix if we want to: maybe just rename size to size_hint and make sure legacy transports ignore the hint. But it's not sure

[PATCH v4 5/6] virtio_vdpa: Revert "virtio_vdpa: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit 99e8927d8a4da8eb8a8a5904dc13a3156be8e7c0: proposed API isn't supported on all transports but no effort was made to address this. It might not be hard to fix if we want to: maybe just rename size to size_hint and make sure legacy transports ignore the hint. But it's not sure

[PATCH v4 4/6] virtio_pci: Revert "virtio_pci: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit cdb44806fca2d0ad29ca644cbf1505433902ee0c: the legacy path is wrong and in fact can not support the proposed API since for a legacy device we never communicate the vq size to the hypervisor. Reported-by: Andres Freund Fixes: cdb44806fca2 ("virtio_pci: support the arg sizes of

[PATCH v4 3/6] virtio-mmio: Revert "virtio_mmio: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit fbed86abba6e0472d98079790e58060e4332608a. The API is now unused, let's not carry dead code around. Fixes: fbed86abba6e ("virtio_mmio: support the arg sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_mmio.c | 8 ++-- 1 file changed, 2

[PATCH v4 2/6] virtio: Revert "virtio: add helper virtio_find_vqs_ctx_size()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit fe3dc04e31aa51f91dc7f741a5f76cc4817eb5b4: the API is now unused and in fact can't be implemented on top of a legacy device. Fixes: fe3dc04e31aa ("virtio: add helper virtio_find_vqs_ctx_size()") Cc: "Xuan Zhuo" Signed-off-by: Michael S. Tsirkin ---

[PATCH v4 1/6] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. This has been reported to trip up guests on GCP (Google Cloud). The reason is that virtio_find_vqs_ctx_size is broken on legacy devices. We can in theory fix virtio_find_vqs_ctx_size but in fact the patch itself has several other

[PATCH v4 0/6] virtio: drop sizing vqs during init

2022-08-15 Thread Michael S. Tsirkin
Supplying size during init does not work for all transports. In fact for legacy pci doing that causes a memory corruption which was reported on Google Cloud. We might get away with changing size to size_hint so it's safe to ignore and then fixing legacy to ignore the hint. But the benefit is

[mst-vhost:vhost 5/8] drivers/virtio/virtio_vdpa.c:291:61: error: 'sizes' undeclared

2022-08-15 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost head: 43ab8a34f3f0c7301813343b9fed2da33c37754a commit: 71545b3c933acbf165e6596d5cfa4fd15e1ef543 [5/8] virtio: Revert "virtio: find_vqs() add arg sizes" config: i386-buildonly-randconfig-r004-20220815 (https:

Re: [PATCH v3 0/5] virtio: drop sizing vqs during init

2022-08-15 Thread Xuan Zhuo
Series: Reviewed-by: Xuan Zhuo There is also a commit, I just submitted, about the problem you pointed out about using container_of(). Can we submit together? On Mon, 15 Aug 2022 18:00:21 -0400, "Michael S. Tsirkin" wrote: > Reporting after I botched up v2 posting. Sorry about the noise. >

[PATCH] virtio_pci: use container_of replace type conversion

2022-08-15 Thread Xuan Zhuo
Replace type conversion with container_of() in vp_modern_set_queue_reset()/vp_modern_get_queue_reset() . Also combine declarations and assignments. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_pci_modern_dev.c | 24 1 file changed, 12 insertions(+), 12

Re: upstream kernel crashes

2022-08-15 Thread Xuan Zhuo
On Mon, 15 Aug 2022 17:32:06 -0400, "Michael S. Tsirkin" wrote: > On Mon, Aug 15, 2022 at 01:53:30PM -0700, Andres Freund wrote: > > Hi, > > > > On 2022-08-15 16:21:51 -0400, Michael S. Tsirkin wrote: > > > On Mon, Aug 15, 2022 at 10:46:17AM -0700, Andres Freund wrote: > > > > Hi, > > > > > > >

RE: [PATCH 2/2] vDPA: conditionally read fields in virtio-net dev

2022-08-15 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Monday, August 15, 2022 5:27 AM > > Some fields of virtio-net device config space are conditional on the feature > bits, the spec says: > > "The mac address field always exists > (though is only valid if VIRTIO_NET_F_MAC is set)" > > "max_virtqueue_pairs only

Re: [PATCH 2/6] vsock: return errors other than -ENOMEM to socket

2022-08-15 Thread kernel test robot
Hi Bobby, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on mst-vhost/linux-next] [also build test WARNING on linus/master v6.0-rc1 next-20220815] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

RE: [PATCH 1/2] vDPA: allow userspace to query features of a vDPA device

2022-08-15 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Monday, August 15, 2022 9:49 PM > > On 8/16/2022 2:15 AM, Si-Wei Liu wrote: > > > > > > On 8/15/2022 2:26 AM, Zhu Lingshan wrote: > >> This commit adds a new vDPA netlink attribution > >> VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > features > >> of

Re: [PATCH v3 1/5] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Guenter Roeck
On Mon, Aug 15, 2022 at 06:00:25PM -0400, Michael S. Tsirkin wrote: > This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. > > This has been reported to trip up guests on GCP (Google Cloud). > The reason is that virtio_find_vqs_ctx_size is broken on legacy > devices. We can in theory fix

Re: [PATCH v3 0/5] virtio: drop sizing vqs during init

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 03:24:28PM -0700, Linus Torvalds wrote: > On Mon, Aug 15, 2022 at 3:00 PM Michael S. Tsirkin wrote: > > > > But the benefit is unclear in any case, so let's revert for now. > > Should I take this patch series directly, or will you be sending a > pull request (preferred)?

Re: [PATCH 2/2] vDPA: conditionally read fields in virtio-net dev

2022-08-15 Thread Si-Wei Liu
On 8/15/2022 2:26 AM, Zhu Lingshan wrote: Some fields of virtio-net device config space are conditional on the feature bits, the spec says: "The mac address field always exists (though is only valid if VIRTIO_NET_F_MAC is set)" "max_virtqueue_pairs only exists if VIRTIO_NET_F_MQ or

Re: [PATCH 2/6] vsock: return errors other than -ENOMEM to socket

2022-08-15 Thread kernel test robot
config: i386-randconfig-a014-20220815 (https://download.01.org/0day-ci/archive/20220816/202208160737.gxxfmpby-...@intel.com/config) compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 6afcc4a459ead8809a0d6d9b4bf7b64bcc13582b) reproduce (this is a W=1 build): wget https

Re: [PATCH v3 0/5] virtio: drop sizing vqs during init

2022-08-15 Thread Linus Torvalds
On Mon, Aug 15, 2022 at 3:00 PM Michael S. Tsirkin wrote: > > But the benefit is unclear in any case, so let's revert for now. Should I take this patch series directly, or will you be sending a pull request (preferred)? Linus ___

[PATCH] virtio: drop vp_legacy_set_queue_size

2022-08-15 Thread Michael S. Tsirkin
There's actually no way to set queue size on legacy virtio pci. Signed-off-by: Michael S. Tsirkin --- include/linux/virtio_pci_legacy.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/virtio_pci_legacy.h b/include/linux/virtio_pci_legacy.h index e5d665faf00e..a8dc757d0367

[PATCH v3 5/5] virtio: Revert "virtio: find_vqs() add arg sizes"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit a10fba0377145fccefea4dc4dd5915b7ed87e546: the proposed API isn't supported on all transports but no effort was made to address this. It might not be hard to fix if we want to: maybe just rename size to size_hint and make sure legacy transports ignore the hint. But it's not

[PATCH v3 4/5] virtio_pci: Revert "virtio_pci: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit cdb44806fca2d0ad29ca644cbf1505433902ee0c: the legacy path is wrong and in fact can not support the proposed API since for a legacy device we never communicate the vq size to the hypervisor. Reported-by: Andres Freund Fixes: cdb44806fca2 ("virtio_pci: support the arg sizes of

[PATCH v3 3/5] virtio-mmio: Revert "virtio_mmio: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit fbed86abba6e0472d98079790e58060e4332608a. The API is now unused, let's not carry dead code around. Fixes: fbed86abba6e ("virtio_mmio: support the arg sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_mmio.c | 8 ++-- 1 file changed, 2

[PATCH v3 2/5] virtio: Revert "virtio: add helper virtio_find_vqs_ctx_size()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit fe3dc04e31aa51f91dc7f741a5f76cc4817eb5b4: the API is now unused and in fact can't be implemented on top of a legacy device. Fixes: fe3dc04e31aa ("virtio: add helper virtio_find_vqs_ctx_size()") Cc: "Xuan Zhuo" Signed-off-by: Michael S. Tsirkin ---

[PATCH v3 1/5] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. This has been reported to trip up guests on GCP (Google Cloud). The reason is that virtio_find_vqs_ctx_size is broken on legacy devices. We can in theory fix virtio_find_vqs_ctx_size but in fact the patch itself has several other

[PATCH v3 0/5] virtio: drop sizing vqs during init

2022-08-15 Thread Michael S. Tsirkin
Reporting after I botched up v2 posting. Sorry about the noise. Supplying size during init does not work for all transports. In fact for legacy pci doing that causes a memory corruption which was reported on Google Cloud. We might get away with changing size to size_hint so it's safe to ignore

Re: [PATCH v2 1/1] virtio: kerneldocs fixes and enhancements

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 05:53:24PM -0400, Michael S. Tsirkin wrote: > From: Ricardo Cañuelo > > Fix variable names in some kerneldocs, naming in others. > Add kerneldocs for struct vring_desc and vring_interrupt. > > Signed-off-by: Ricardo Cañuelo > Message-Id:

[PATCH v2 5/5] virtio: Revert "virtio: find_vqs() add arg sizes"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit a10fba0377145fccefea4dc4dd5915b7ed87e546: the proposed API isn't supported on all transports but no effort was made to address this. It might not be hard to fix if we want to: maybe just rename size to size_hint and make sure legacy transports ignore the hint. But it's not

[PATCH v2 2/5] virtio: Revert "virtio: add helper virtio_find_vqs_ctx_size()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit fe3dc04e31aa51f91dc7f741a5f76cc4817eb5b4: the API is now unused and in fact can't be implemented on top of a legacy device. Fixes: fe3dc04e31aa ("virtio: add helper virtio_find_vqs_ctx_size()") Cc: "Xuan Zhuo" Signed-off-by: Michael S. Tsirkin ---

[PATCH v2 4/5] virtio_pci: Revert "virtio_pci: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit cdb44806fca2d0ad29ca644cbf1505433902ee0c: the legacy path is wrong and in fact can not support the proposed API since for a legacy device we never communicate the vq size to the hypervisor. Reported-by: Andres Freund Fixes: cdb44806fca2 ("virtio_pci: support the arg sizes of

[PATCH v2 3/5] virtio-mmio: Revert "virtio_mmio: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit fbed86abba6e0472d98079790e58060e4332608a. The API is now unused, let's not carry dead code around. Fixes: fbed86abba6e ("virtio_mmio: support the arg sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_mmio.c | 8 ++-- 1 file changed, 2

[PATCH v2 1/1] virtio: Revert "virtio: find_vqs() add arg sizes"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit a10fba0377145fccefea4dc4dd5915b7ed87e546: the proposed API isn't supported on all transports but no effort was made to address this. It might not be hard to fix if we want to: maybe just rename size to size_hint and make sure legacy transports ignore the hint. But it's not

[PATCH v2 1/5] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. This has been reported to trip up guests on GCP (Google Cloud). The reason is that virtio_find_vqs_ctx_size is broken on legacy devices. We can in theory fix virtio_find_vqs_ctx_size but in fact the patch itself has several other

[PATCH v2 1/1] virtio: kerneldocs fixes and enhancements

2022-08-15 Thread Michael S. Tsirkin
From: Ricardo Cañuelo Fix variable names in some kerneldocs, naming in others. Add kerneldocs for struct vring_desc and vring_interrupt. Signed-off-by: Ricardo Cañuelo Message-Id: <20220810094004.1250-2-ricardo.canu...@collabora.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia

[PATCH v2 0/5] virtio: drop sizing vqs during init

2022-08-15 Thread Michael S. Tsirkin
Supplying size during init does not work for all transports. In fact for legacy pci doing that causes a memory corruption which was reported on Google Cloud. We might get away with changing size to size_hint so it's safe to ignore and then fixing legacy to ignore the hint. But the benefit is

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 02:46:04PM -0700, Andres Freund wrote: > Hi, > > On 2022-08-15 17:39:08 -0400, Michael S. Tsirkin wrote: > > On Mon, Aug 15, 2022 at 02:28:39PM -0700, Andres Freund wrote: > > > On 2022-08-15 17:04:10 -0400, Michael S. Tsirkin wrote: > > > > So virtio has a queue_size

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Andres Freund
Hi, On 2022-08-15 17:39:08 -0400, Michael S. Tsirkin wrote: > On Mon, Aug 15, 2022 at 02:28:39PM -0700, Andres Freund wrote: > > On 2022-08-15 17:04:10 -0400, Michael S. Tsirkin wrote: > > > So virtio has a queue_size register. When read, it will give you > > > originally the maximum queue size.

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 02:28:39PM -0700, Andres Freund wrote: > Hi, > > On 2022-08-15 17:04:10 -0400, Michael S. Tsirkin wrote: > > So virtio has a queue_size register. When read, it will give you > > originally the maximum queue size. Normally we just read it and > > use it as queue size. > >

Re: upstream kernel crashes

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 01:53:30PM -0700, Andres Freund wrote: > Hi, > > On 2022-08-15 16:21:51 -0400, Michael S. Tsirkin wrote: > > On Mon, Aug 15, 2022 at 10:46:17AM -0700, Andres Freund wrote: > > > Hi, > > > > > > On 2022-08-15 12:50:52 -0400, Michael S. Tsirkin wrote: > > > > On Mon, Aug 15,

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Andres Freund
Hi, On 2022-08-15 17:04:10 -0400, Michael S. Tsirkin wrote: > So virtio has a queue_size register. When read, it will give you > originally the maximum queue size. Normally we just read it and > use it as queue size. > > However, when queue memory allocation fails, and unconditionally with a >

Re: upstream kernel crashes

2022-08-15 Thread Andres Freund
Hi, On 2022-08-15 14:04:37 -0700, Andres Freund wrote: > Booting with the equivalent change, atop 5.19, in the legacy setup_vq() > reliably causes boot to hang: I don't know much virtio, so take this with a rock of salt: Legacy setup_vq() doesn't tell the host about the queue size. The modern

Re: upstream kernel crashes

2022-08-15 Thread Andres Freund
On 2022-08-15 13:53:31 -0700, Andres Freund wrote: > The reason the debug patch didn't change anything, and that my debug printk > didn't show, is that gcp uses the legacy paths... > > If there were a bug in the legacy path, it'd explain why the problem only > shows on gcp, and not in other

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 01:50:53PM -0700, Guenter Roeck wrote: > On Mon, Aug 15, 2022 at 04:42:51PM -0400, Michael S. Tsirkin wrote: > > On Mon, Aug 15, 2022 at 01:34:26PM -0700, Guenter Roeck wrote: > > > On Mon, Aug 15, 2022 at 05:16:50AM -0400, Michael S. Tsirkin wrote: > > > > This reverts

Re: [PATCH 5/6] virtio/vsock: add support for dgram

2022-08-15 Thread kernel test robot
Hi Bobby, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on mst-vhost/linux-next] [also build test WARNING on linus/master v6.0-rc1 next-20220815] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

Re: upstream kernel crashes

2022-08-15 Thread Andres Freund
Hi, On 2022-08-15 16:21:51 -0400, Michael S. Tsirkin wrote: > On Mon, Aug 15, 2022 at 10:46:17AM -0700, Andres Freund wrote: > > Hi, > > > > On 2022-08-15 12:50:52 -0400, Michael S. Tsirkin wrote: > > > On Mon, Aug 15, 2022 at 09:45:03AM -0700, Andres Freund wrote: > > > > Hi, > > > > > > > > On

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Guenter Roeck
On Mon, Aug 15, 2022 at 04:42:51PM -0400, Michael S. Tsirkin wrote: > On Mon, Aug 15, 2022 at 01:34:26PM -0700, Guenter Roeck wrote: > > On Mon, Aug 15, 2022 at 05:16:50AM -0400, Michael S. Tsirkin wrote: > > > This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. > > > > > > This has

Re: upstream kernel crashes

2022-08-15 Thread Guenter Roeck
Michael, On Mon, Aug 15, 2022 at 12:50:52PM -0400, Michael S. Tsirkin wrote: [ ...] > > Okay! And just to be 100% sure, can you try the following on top of 5.19: > You should now be able to test any patches using the syzkaller infrastructure. Pick any (or all) of the now-published syzkaller

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 01:34:26PM -0700, Guenter Roeck wrote: > On Mon, Aug 15, 2022 at 05:16:50AM -0400, Michael S. Tsirkin wrote: > > This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. > > > > This has been reported to trip up guests on GCP (Google Cloud). Why is > > not yet clear

Re: [PATCH 0/6] virtio/vsock: introduce dgrams, sk_buff, and qdisc

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 10:56:03AM -0700, Bobby Eshleman wrote: > Hey everybody, > > This series introduces datagrams, packet scheduling, and sk_buff usage > to virtio vsock. > > The usage of struct sk_buff benefits users by a) preparing vsock to use > other related systems that require sk_buff,

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Guenter Roeck
On Mon, Aug 15, 2022 at 05:16:50AM -0400, Michael S. Tsirkin wrote: > This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. > > This has been reported to trip up guests on GCP (Google Cloud). Why is > not yet clear - to be debugged, but the patch itself has several other > issues: > > -

Re: upstream kernel crashes

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 10:46:17AM -0700, Andres Freund wrote: > Hi, > > On 2022-08-15 12:50:52 -0400, Michael S. Tsirkin wrote: > > On Mon, Aug 15, 2022 at 09:45:03AM -0700, Andres Freund wrote: > > > Hi, > > > > > > On 2022-08-15 11:40:59 -0400, Michael S. Tsirkin wrote: > > > > OK so this

Re: [PATCH 2/6] vsock: return errors other than -ENOMEM to socket

2022-08-15 Thread kernel test robot
Hi Bobby, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on mst-vhost/linux-next] [also build test WARNING on linus/master v6.0-rc1 next-20220815] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

Re: [PATCH 1/2] vDPA: allow userspace to query features of a vDPA device

2022-08-15 Thread Si-Wei Liu
On 8/15/2022 2:26 AM, Zhu Lingshan wrote: This commit adds a new vDPA netlink attribution VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query features of vDPA devices through this new attr. Signed-off-by: Zhu Lingshan --- drivers/vdpa/vdpa.c | 17 +

Re: upstream kernel crashes

2022-08-15 Thread Andres Freund
Hi, On 2022-08-15 12:50:52 -0400, Michael S. Tsirkin wrote: > On Mon, Aug 15, 2022 at 09:45:03AM -0700, Andres Freund wrote: > > Hi, > > > > On 2022-08-15 11:40:59 -0400, Michael S. Tsirkin wrote: > > > OK so this gives us a quick revert as a solution for now. > > > Next, I would appreciate it

Re: upstream kernel crashes

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 09:45:03AM -0700, Andres Freund wrote: > Hi, > > On 2022-08-15 11:40:59 -0400, Michael S. Tsirkin wrote: > > OK so this gives us a quick revert as a solution for now. > > Next, I would appreciate it if you just try this simple hack. > > If it crashes we either have a long

Re: upstream kernel crashes

2022-08-15 Thread Andres Freund
Hi, On 2022-08-15 11:40:59 -0400, Michael S. Tsirkin wrote: > OK so this gives us a quick revert as a solution for now. > Next, I would appreciate it if you just try this simple hack. > If it crashes we either have a long standing problem in virtio > code or more likely a gcp bug where it can't

Re: [PATCH v1 2/2] Drivers: virtio: balloon: Report inflated memory

2022-08-15 Thread Nadav Amit via Virtualization
On Aug 15, 2022, at 5:52 AM, Alexander Atanasov wrote: > ⚠ External Email > > Hi, > > On 9.08.22 20:44, Nadav Amit wrote: >> On Aug 9, 2022, at 2:53 AM, Alexander Atanasov >> wrote: >> >>> Update the value in page_alloc on balloon fill/leak. >> >> Some general comments if this patch goes

Re: [PATCH 2/2] vDPA: conditionally read fields in virtio-net dev

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 05:26:38PM +0800, Zhu Lingshan wrote: > Some fields of virtio-net device config space are > conditional on the feature bits, the spec says: > > "The mac address field always exists > (though is only valid if VIRTIO_NET_F_MAC is set)" > > "max_virtqueue_pairs only exists

Re: upstream kernel crashes

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 01:34:41AM -0700, Andres Freund wrote: > Hi, > > On August 15, 2022 1:28:29 AM PDT, "Michael S. Tsirkin" > wrote: > >On Mon, Aug 15, 2022 at 01:15:27AM -0700, Andres Freund wrote: > >> Hi, > >> > >> On 2022-08-15 03:51:34 -0400, Michael S. Tsirkin wrote: > >> > It is

Re: [PATCH v1] drm/ttm: Refcount allocated tail pages

2022-08-15 Thread Christian König via Virtualization
Am 15.08.22 um 15:45 schrieb Dmitry Osipenko: [SNIP] Well that comment sounds like KVM is doing the right thing, so I'm wondering what exactly is going on here. KVM actually doesn't hold the page reference, it takes the temporal reference during page fault and then drops the reference once

Re: [PATCH v1] drm/ttm: Refcount allocated tail pages

2022-08-15 Thread Christian König via Virtualization
Am 15.08.22 um 13:50 schrieb Dmitry Osipenko: On 8/15/22 14:28, Christian König wrote: Maybe it was discussed privately? In this case I will be happy to get more info from you about the root of the problem so I could start to look at how to fix it properly. It's not apparent where the problem

Re: [PATCH v1] drm/ttm: Refcount allocated tail pages

2022-08-15 Thread Christian König via Virtualization
Am 15.08.22 um 13:19 schrieb Dmitry Osipenko: [SNIP] I'll try to dig out the older discussions, thank you for the quick reply! Are you sure it was really discussed in public previously? All I can find is yours two answers to a similar patches where you're saying that this it's a wrong solution

Re: [PATCH] virtio_net: fix endian-ness for RSS

2022-08-15 Thread Andrew Melnichenko
Reviewed-by: Andrew Melnychenko and...@daynix.com On Fri, Aug 12, 2022 at 1:30 PM wrote: > > Hello: > > This patch was applied to netdev/net.git (master) > by David S. Miller : > > On Thu, 11 Aug 2022 08:51:58 -0400 you wrote: > > Using native endian-ness for device supplied fields is wrong > >

Re: [PATCH v1] drm/ttm: Refcount allocated tail pages

2022-08-15 Thread Christian König via Virtualization
Am 15.08.22 um 12:47 schrieb Dmitry Osipenko: On 8/15/22 13:18, Dmitry Osipenko wrote: On 8/15/22 13:14, Christian König wrote: Am 15.08.22 um 12:11 schrieb Christian König: Am 15.08.22 um 12:09 schrieb Dmitry Osipenko: On 8/15/22 13:05, Christian König wrote: Am 15.08.22 um 11:54 schrieb

Re: [PATCH v1] drm/ttm: Refcount allocated tail pages

2022-08-15 Thread Christian König via Virtualization
Am 15.08.22 um 12:18 schrieb Dmitry Osipenko: On 8/15/22 13:14, Christian König wrote: Am 15.08.22 um 12:11 schrieb Christian König: Am 15.08.22 um 12:09 schrieb Dmitry Osipenko: On 8/15/22 13:05, Christian König wrote: Am 15.08.22 um 11:54 schrieb Dmitry Osipenko: Higher order pages

Re: [PATCH v1] drm/ttm: Refcount allocated tail pages

2022-08-15 Thread Christian König via Virtualization
Am 15.08.22 um 12:11 schrieb Christian König: Am 15.08.22 um 12:09 schrieb Dmitry Osipenko: On 8/15/22 13:05, Christian König wrote: Am 15.08.22 um 11:54 schrieb Dmitry Osipenko: Higher order pages allocated using alloc_pages() aren't refcounted and they need to be refcounted, otherwise it's

Re: [PATCH v1] drm/ttm: Refcount allocated tail pages

2022-08-15 Thread Christian König via Virtualization
Am 15.08.22 um 12:09 schrieb Dmitry Osipenko: On 8/15/22 13:05, Christian König wrote: Am 15.08.22 um 11:54 schrieb Dmitry Osipenko: Higher order pages allocated using alloc_pages() aren't refcounted and they need to be refcounted, otherwise it's impossible to map them by KVM. This patch sets

Re: [PATCH v1] drm/ttm: Refcount allocated tail pages

2022-08-15 Thread Christian König via Virtualization
Am 15.08.22 um 11:54 schrieb Dmitry Osipenko: Higher order pages allocated using alloc_pages() aren't refcounted and they need to be refcounted, otherwise it's impossible to map them by KVM. This patch sets the refcount of the tail pages and fixes the KVM memory mapping faults. Without this

[PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. This has been reported to trip up guests on GCP (Google Cloud). Why is not yet clear - to be debugged, but the patch itself has several other issues: - It treats unknown speed as < 10G - It leaves userspace no way to find out the

Re: upstream kernel crashes

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 12:46:36AM -0700, Andres Freund wrote: > Hi, > > On Mon, Aug 15, 2022, at 00:29, Michael S. Tsirkin wrote: > > On Mon, Aug 15, 2022 at 12:11:43AM -0700, Andres Freund wrote: > >> Hi, > >> > >> On 2022-08-14 20:18:44 -0700, Linus Torvalds wrote: > >> > On Sun, Aug 14, 2022

Re: [PATCH v14 37/42] virtio_net: set the default max ring size by find_vqs()

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 03:28:18PM +0800, Xuan Zhuo wrote: > On Mon, 15 Aug 2022 03:14:43 -0400, "Michael S. Tsirkin" > wrote: > > On Mon, Aug 15, 2022 at 02:35:03PM +0800, Xuan Zhuo wrote: > > > On Mon, 15 Aug 2022 02:00:16 -0400, "Michael S. Tsirkin" > > > wrote: > > > > On Mon, Aug 01, 2022

Re: [PATCH v14 37/42] virtio_net: set the default max ring size by find_vqs()

2022-08-15 Thread Xuan Zhuo
On Mon, 15 Aug 2022 03:14:43 -0400, "Michael S. Tsirkin" wrote: > On Mon, Aug 15, 2022 at 02:35:03PM +0800, Xuan Zhuo wrote: > > On Mon, 15 Aug 2022 02:00:16 -0400, "Michael S. Tsirkin" > > wrote: > > > On Mon, Aug 01, 2022 at 02:38:57PM +0800, Xuan Zhuo wrote: > > > > Use

Re: [PATCH v14 37/42] virtio_net: set the default max ring size by find_vqs()

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 02:35:03PM +0800, Xuan Zhuo wrote: > On Mon, 15 Aug 2022 02:00:16 -0400, "Michael S. Tsirkin" > wrote: > > On Mon, Aug 01, 2022 at 02:38:57PM +0800, Xuan Zhuo wrote: > > > Use virtio_find_vqs_ctx_size() to specify the maximum ring size of tx, > > > rx at the same time. >

Re: [GIT PULL] virtio: fatures, fixes

2022-08-15 Thread Andres Freund
Hi, On 2022-08-14 12:40:31 -0700, Andres Freund wrote: > On 2022-08-14 04:59:48 -0400, Michael S. Tsirkin wrote: > > On Sat, Aug 13, 2022 at 09:39:06PM -0700, Andres Freund wrote: > > > Hi, > > > > > > On 2022-08-13 20:52:39 -0700, Andres Freund wrote: > > > > Is there specific information you'd

Re: [PATCH v14 37/42] virtio_net: set the default max ring size by find_vqs()

2022-08-15 Thread Xuan Zhuo
On Mon, 15 Aug 2022 02:00:16 -0400, "Michael S. Tsirkin" wrote: > On Mon, Aug 01, 2022 at 02:38:57PM +0800, Xuan Zhuo wrote: > > Use virtio_find_vqs_ctx_size() to specify the maximum ring size of tx, > > rx at the same time. > > > > | rx/tx ring size > >

Re: [PATCH v14 30/42] virtio_pci: introduce helper to get/set queue reset

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 01, 2022 at 02:38:50PM +0800, Xuan Zhuo wrote: > Introduce new helpers to implement queue reset and get queue reset > status. > > https://github.com/oasis-tcs/virtio-spec/issues/124 > https://github.com/oasis-tcs/virtio-spec/issues/139 > > Signed-off-by: Xuan Zhuo > Acked-by:

Re: [PATCH v14 37/42] virtio_net: set the default max ring size by find_vqs()

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 01, 2022 at 02:38:57PM +0800, Xuan Zhuo wrote: > Use virtio_find_vqs_ctx_size() to specify the maximum ring size of tx, > rx at the same time. > > | rx/tx ring size > --- > speed == UNKNOWN or < 10G| 1024 > speed < 40G