[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SA6PR21MB4231AFA71519914D77F8EC07CEBA2@SA6PR21MB4231.namprd21.prod.outlook.com>
Date: Wed, 23 Apr 2025 18:30:18 +0000
From: Long Li <longli@...rosoft.com>
To: Michael Kelley <mhklinux@...look.com>, "longli@...uxonhyperv.com"
<longli@...uxonhyperv.com>, KY Srinivasan <kys@...rosoft.com>, Haiyang Zhang
<haiyangz@...rosoft.com>, Wei Liu <wei.liu@...nel.org>, Dexuan Cui
<decui@...rosoft.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 0/2] Fix uio_hv_generic on 64k page systems
> -----Original Message-----
> From: Michael Kelley <mhklinux@...look.com>
> Sent: Sunday, April 20, 2025 4:57 PM
> To: longli@...uxonhyperv.com; KY Srinivasan <kys@...rosoft.com>; Haiyang
> Zhang <haiyangz@...rosoft.com>; Wei Liu <wei.liu@...nel.org>; Dexuan Cui
> <decui@...rosoft.com>; Greg Kroah-Hartman <gregkh@...uxfoundation.org>;
> linux-hyperv@...r.kernel.org; linux-kernel@...r.kernel.org
> Cc: Long Li <longli@...rosoft.com>
> Subject: [EXTERNAL] RE: [PATCH 0/2] Fix uio_hv_generic on 64k page systems
>
> From: longli@...uxonhyperv.com <longli@...uxonhyperv.com>
> >
>
> The Subject line of this cover letter is a bit too narrow in scope. The scope should
> be any page size larger than 4K. For example, the arm64 architecture permits a
> page size of 16K, and Linux kernels built that way work just fine on Hyper-V arm64
> hosts. Perhaps:
>
> Fix uio_hv_generic for guests with page size > 4 KiB
>
> > UIO framework requires the device memory aligned to page boundary.
> > Hyper-V may allocate some memory that is Hyper-V page aligned (4k) but
> > not system page aligned.
> >
> > Fix this by having Hyper-V always allocate those pages on system page
> > boundary and expose them to user-mode.
>
> Also within the scope of making uio_hv_generic work with page size > 4KiB,
> there's an issue with the ring size. When hv_dev_ring_size() returns 0,
> hv_uio_probe() uses 2 MiB as the ring size. That works OK with the larger page
> sizes. But when hv_dev_ring_size() returns a specific value, it might not work. The
> fcopy device returns 16 KiB, which will fail. hv_uio_probe() needs to use the
> VMBUS_RING_SIZE() macro to increase the ring size if necessary to handle the
> larger ring header that results if the page size is > 4 KiB. You might want to
> include such a patch in this series.
Sure, will use VMBUS_RING_SIZE() to increase ring size if necessary.
Long
>
> Separately, tools/hv/vmbus_bufring.c needs work to operate correctly on
> arm64 and with page sizes > 4 KiB. But that's probably a different patch series.
>
> Michael
>
> >
> > Long Li (2):
> > Drivers: hv: Allocate interrupt and monitor pages aligned to system
> > page boundary
> > uio_hv_generic: Use correct size for interrupt and monitor pages
> >
> > drivers/hv/hv_common.c | 29 +++++++----------------------
> > drivers/uio/uio_hv_generic.c | 4 ++--
> > 2 files changed, 9 insertions(+), 24 deletions(-)
> >
> > --
> > 2.34.1
> >
Powered by blists - more mailing lists