Re: [PATCH] tools: hv: suppress the invalid warning for packed member alignment

2024-05-04 Thread Greg KH
On Wed, Apr 17, 2024 at 01:21:49AM -0700, Saurabh Singh Sengar wrote: > On Wed, Apr 17, 2024 at 10:17:21AM +0200, Greg KH wrote: > > On Wed, Apr 17, 2024 at 01:00:48AM -0700, Saurabh Sengar wrote: > > > Packed struct vmbus_bufring is 4096 byte aligned and the repor

Re: [PATCH] tools: hv: suppress the invalid warning for packed member alignment

2024-04-17 Thread Greg KH
On Wed, Apr 17, 2024 at 01:00:48AM -0700, Saurabh Sengar wrote: > Packed struct vmbus_bufring is 4096 byte aligned and the reporting > warning is for the first member of that struct which shouldn't add > any offset to create alignment issue. > > Suppress the warning by adding

Re: [PATCH 4/9] USB: Convert from tasklet to BH workqueue

2024-03-27 Thread Greg KH
On Wed, Mar 27, 2024 at 04:03:09PM +, Allen Pais wrote: > The only generic interface to execute asynchronously in the BH context is > tasklet; however, it's marked deprecated and has some design flaws. To > replace tasklets, BH workqueue support was recently added. A BH workqueue > behaves

Re: [PATCH 2/6] uio_hv_generic: Query the ringbuffer size for device

2024-02-19 Thread Greg KH
On Mon, Feb 19, 2024 at 01:40:23AM -0800, Saurabh Singh Sengar wrote: > On Mon, Feb 19, 2024 at 09:50:54AM +0100, Greg KH wrote: > > On Sat, Feb 17, 2024 at 10:03:36AM -0800, Saurabh Sengar wrote: > > > Query the ring buffer size from pre defined table per device. &

Re: [PATCH 5/6] tools: hv: Add new fcopy application based on uio driver

2024-02-19 Thread Greg KH
On Mon, Feb 19, 2024 at 01:24:21AM -0800, Saurabh Singh Sengar wrote: > > > +#define HV_RING_SIZE (4 * 4096) > > > > Hey, that doesn't match the kernel driver! Why these values? > > This application talks to device which is recognize as HV_FCOPY > is kernel. In the first patch of

Re: [PATCH 5/6] tools: hv: Add new fcopy application based on uio driver

2024-02-19 Thread Greg KH
On Sat, Feb 17, 2024 at 10:03:39AM -0800, Saurabh Sengar wrote: > New fcopy application which utilizes uio_hv_vmbus_client driver What does this "application" do? > > Signed-off-by: Saurabh Sengar > --- > tools/hv/Build | 3 +- > tools/hv/Makefile | 10 +- >

Re: [PATCH 2/6] uio_hv_generic: Query the ringbuffer size for device

2024-02-19 Thread Greg KH
On Sat, Feb 17, 2024 at 10:03:36AM -0800, Saurabh Sengar wrote: > Query the ring buffer size from pre defined table per device. > Keep the size as is if the device doesn't have any preferred > ring size. What is the "as is" size? > > Signed-off-by: Saurabh Sengar > --- >

Re: [PATCH 1/6] Drivers: hv: vmbus: Add utility function for querying ring size

2024-02-18 Thread Greg KH
On Sun, Feb 18, 2024 at 12:03:06AM -0800, Saurabh Singh Sengar wrote: > On Sun, Feb 18, 2024 at 08:11:58AM +0100, Greg KH wrote: > > On Sat, Feb 17, 2024 at 10:03:35AM -0800, Saurabh Sengar wrote: > > > Add a function to query for the preferred ring buffer size of

Re: [PATCH 0/6] Low speed Hyper-V devices support

2024-02-18 Thread Greg KH
On Sat, Feb 17, 2024 at 11:51:14PM -0800, Saurabh Singh Sengar wrote: > On Sun, Feb 18, 2024 at 08:10:36AM +0100, Greg KH wrote: > > On Sat, Feb 17, 2024 at 10:03:34AM -0800, Saurabh Sengar wrote: > > > Hyper-V is adding multiple low speed "speciality" synthetic devic

Re: [PATCH 1/6] Drivers: hv: vmbus: Add utility function for querying ring size

2024-02-17 Thread Greg KH
On Sat, Feb 17, 2024 at 10:03:35AM -0800, Saurabh Sengar wrote: > Add a function to query for the preferred ring buffer size of VMBus > device. That says what you did, but not why you did it. > > Signed-off-by: Saurabh Sengar > --- > drivers/hv/channel_mgmt.c | 7 +-- >

Re: [PATCH 0/6] Low speed Hyper-V devices support

2024-02-17 Thread Greg KH
On Sat, Feb 17, 2024 at 10:03:34AM -0800, Saurabh Sengar wrote: > Hyper-V is adding multiple low speed "speciality" synthetic devices. > Instead of writing a new kernel-level VMBus driver for each device, > make the devices accessible to user space through UIO-based > uio_hv_generic driver. Each

Re: [PATCH v2 13/15] uapi: hyperv: Add mshv driver headers hvhdk.h, hvhdk_mini.h, hvgdk.h, hvgdk_mini.h

2023-10-11 Thread Greg KH
On Tue, Oct 10, 2023 at 03:49:48PM -0700, Nuno Das Neves wrote: > On 8/25/2023 11:24 AM, Nuno Das Neves wrote: > > On 8/19/2023 3:26 AM, Greg KH wrote: > > > > > > My "strong" opinion is the one kernel development rule that we have, > > > &qu

Re: [PATCH v4 13/15] uapi: hyperv: Add mshv driver headers defining hypervisor ABIs

2023-10-05 Thread Greg KH
On Fri, Sep 29, 2023 at 11:01:39AM -0700, Nuno Das Neves wrote: > +/* Define connection identifier type. */ > +union hv_connection_id { > + __u32 asu32; > + struct { > + __u32 id:24; > + __u32 reserved:8; Meta-commment, I don't see anywhere you are properly

Re: [PATCH v4 13/15] uapi: hyperv: Add mshv driver headers defining hypervisor ABIs

2023-10-05 Thread Greg KH
On Wed, Oct 04, 2023 at 11:16:46AM -0700, Nuno Das Neves wrote: > On 10/4/2023 10:50 AM, Greg KH wrote: > > On Wed, Oct 04, 2023 at 05:36:32PM +, Dexuan Cui wrote: > > > > From: Greg KH > > > > Sent: Tuesday, October 3, 2023 11:10 PM > > > > [..

Re: [PATCH v4 13/15] uapi: hyperv: Add mshv driver headers defining hypervisor ABIs

2023-10-04 Thread Greg KH
On Wed, Oct 04, 2023 at 05:36:32PM +, Dexuan Cui wrote: > > From: Greg KH > > Sent: Tuesday, October 3, 2023 11:10 PM > > [...] > > On Tue, Oct 03, 2023 at 04:37:01PM -0700, Nuno Das Neves wrote: > > > On 9/30/2023 11:19 PM, Greg KH wrote: > > > >

Re: [PATCH v4 13/15] uapi: hyperv: Add mshv driver headers defining hypervisor ABIs

2023-10-04 Thread Greg KH
On Tue, Oct 03, 2023 at 11:29:42PM +, Wei Liu wrote: > > > > > diff --git a/include/uapi/hyperv/hvgdk.h b/include/uapi/hyperv/hvgdk.h > > > > > new file mode 100644 > > > > > index ..9bcbb7d902b2 > > > > > --- /dev/null > > > > > +++ b/include/uapi/hyperv/hvgdk.h > > > > > @@ -0,0

Re: [PATCH v4 13/15] uapi: hyperv: Add mshv driver headers defining hypervisor ABIs

2023-10-04 Thread Greg KH
On Tue, Oct 03, 2023 at 04:37:01PM -0700, Nuno Das Neves wrote: > On 9/30/2023 11:19 PM, Greg KH wrote: > > On Sat, Sep 30, 2023 at 10:01:58PM +, Wei Liu wrote: > > > On Sat, Sep 30, 2023 at 08:09:19AM +0200, Greg KH wrote: > > > > On Fri, Sep 29, 2023 at 11:01:39

Re: [PATCH v4 15/15] Drivers: hv: Add modules to expose /dev/mshv to VMMs running on Hyper-V

2023-10-01 Thread Greg KH
On Sat, Sep 30, 2023 at 09:13:07PM +, Wei Liu wrote: > On Sat, Sep 30, 2023 at 08:31:13PM +0200, Greg KH wrote: > > On Sat, Sep 30, 2023 at 06:11:19PM +, Wei Liu wrote: > > > On Sat, Sep 30, 2023 at 08:11:37AM +0200, Greg KH wrote: > > > > On Fri, Sep 29, 2023

Re: [PATCH v4 13/15] uapi: hyperv: Add mshv driver headers defining hypervisor ABIs

2023-10-01 Thread Greg KH
On Sat, Sep 30, 2023 at 10:01:58PM +, Wei Liu wrote: > On Sat, Sep 30, 2023 at 08:09:19AM +0200, Greg KH wrote: > > On Fri, Sep 29, 2023 at 11:01:39AM -0700, Nuno Das Neves wrote: > > > These must be in uapi because they will be used in the mshv ioctl API. > > > >

Re: [PATCH v4 15/15] Drivers: hv: Add modules to expose /dev/mshv to VMMs running on Hyper-V

2023-09-30 Thread Greg KH
On Sat, Sep 30, 2023 at 06:11:19PM +, Wei Liu wrote: > On Sat, Sep 30, 2023 at 08:11:37AM +0200, Greg KH wrote: > > On Fri, Sep 29, 2023 at 11:01:41AM -0700, Nuno Das Neves wrote: > > > --- /dev/null > > > +++ b/include/uapi/linux/mshv.h > > > @@ -

Re: [PATCH v4 15/15] Drivers: hv: Add modules to expose /dev/mshv to VMMs running on Hyper-V

2023-09-30 Thread Greg KH
On Fri, Sep 29, 2023 at 11:01:41AM -0700, Nuno Das Neves wrote: > --- /dev/null > +++ b/include/uapi/linux/mshv.h > @@ -0,0 +1,306 @@ > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ Much better. > +#ifndef _UAPI_LINUX_MSHV_H > +#define _UAPI_LINUX_MSHV_H > + > +/* > + *

Re: [PATCH v4 13/15] uapi: hyperv: Add mshv driver headers defining hypervisor ABIs

2023-09-30 Thread Greg KH
On Fri, Sep 29, 2023 at 11:01:39AM -0700, Nuno Das Neves wrote: > These must be in uapi because they will be used in the mshv ioctl API. > > Version numbers for each file: > hvhdk.h 25212 > hvhdk_mini.h 25294 > hvgdk.h 25125 > hvgdk_mini.h 25294 what are version

Re: [PATCH v3 15/15] Drivers: hv: Add modules to expose /dev/mshv to VMMs running on Hyper-V

2023-09-27 Thread Greg KH
On Wed, Sep 27, 2023 at 08:04:42AM +, Wei Liu wrote: > On Wed, Sep 27, 2023 at 08:01:01AM +0200, Greg KH wrote: > [...] > > > > > If we're working with real devices like network cards or graphics > > > > > cards > > > > > I would agree

Re: [PATCH v3 15/15] Drivers: hv: Add modules to expose /dev/mshv to VMMs running on Hyper-V

2023-09-27 Thread Greg KH
On Tue, Sep 26, 2023 at 02:52:36PM -0700, Nuno Das Neves wrote: > On 9/26/2023 1:03 AM, Greg KH wrote: > > On Tue, Sep 26, 2023 at 07:00:51AM +, Wei Liu wrote: > > > On Tue, Sep 26, 2023 at 08:31:03AM +0200, Greg KH wrote: > > > > On Tue, Sep 26, 2023 at 0

Re: [PATCH v3 15/15] Drivers: hv: Add modules to expose /dev/mshv to VMMs running on Hyper-V

2023-09-26 Thread Greg KH
On Tue, Sep 26, 2023 at 07:00:51AM +, Wei Liu wrote: > On Tue, Sep 26, 2023 at 08:31:03AM +0200, Greg KH wrote: > > On Tue, Sep 26, 2023 at 05:54:34AM +, Wei Liu wrote: > > > On Tue, Sep 26, 2023 at 06:52:46AM +0200, Greg KH wrote: > > > > On Mon, Sep 25, 2023

Re: [PATCH v3 15/15] Drivers: hv: Add modules to expose /dev/mshv to VMMs running on Hyper-V

2023-09-26 Thread Greg KH
On Tue, Sep 26, 2023 at 05:54:34AM +, Wei Liu wrote: > On Tue, Sep 26, 2023 at 06:52:46AM +0200, Greg KH wrote: > > On Mon, Sep 25, 2023 at 05:07:24PM -0700, Nuno Das Neves wrote: > > > On 9/23/2023 12:58 AM, Greg KH wrote: > > > > Also, drivers should never

Re: [PATCH v3 15/15] Drivers: hv: Add modules to expose /dev/mshv to VMMs running on Hyper-V

2023-09-25 Thread Greg KH
On Mon, Sep 25, 2023 at 05:07:24PM -0700, Nuno Das Neves wrote: > On 9/23/2023 12:58 AM, Greg KH wrote: > > Also, drivers should never call pr_*() calls, always use the proper > > dev_*() calls instead. > > > > We only use struct device in one place in this driver,

Re: [PATCH net, 3/3] net: mana: Fix oversized sge0 for GSO packets

2023-09-23 Thread Greg KH
On Sat, Sep 23, 2023 at 06:31:47PM -0700, Haiyang Zhang wrote: > Handle the case when GSO SKB linear length is too large. > > MANA NIC requires GSO packets to put only the header part to SGE0, > otherwise the TX queue may stop at the HW level. > > So, use 2 SGEs for the skb linear part which

Re: [PATCH v3 15/15] Drivers: hv: Add modules to expose /dev/mshv to VMMs running on Hyper-V

2023-09-23 Thread Greg KH
On Fri, Sep 22, 2023 at 11:38:35AM -0700, Nuno Das Neves wrote: > +static int mshv_vtl_get_vsm_regs(void) > +{ > + struct hv_register_assoc registers[2]; > + union hv_input_vtl input_vtl; > + int ret, count = 2; > + > + input_vtl.as_uint8 = 0; > + registers[0].name =

Re: [PATCH v3 15/15] Drivers: hv: Add modules to expose /dev/mshv to VMMs running on Hyper-V

2023-09-23 Thread Greg KH
On Fri, Sep 22, 2023 at 11:38:35AM -0700, Nuno Das Neves wrote: > +static int __init mshv_vtl_init(void) > +{ > + int ret; > + > + tasklet_init(_dpc, mshv_vtl_sint_on_msg_dpc, 0); > + init_waitqueue_head(_wait_queue); > + > + if (mshv_vtl_get_vsm_regs()) { > +