[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH 03/14] mshv_vtl: convert mmap hooks to mmap_prepare
- To: "Lorenzo Stoakes (ARM)" <ljs@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, "Christophe Leroy (CS GROUP)" <chleroy@xxxxxxxxxx>, "Ritesh Harjani (IBM)" <ritesh.list@xxxxxxxxx>, Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, Dexuan Cui <decui@xxxxxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Jason Wang <jasowangio@xxxxxxxxx>, Eugenio Pérez <eperezma@xxxxxxxxxx>, Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx>, Jarkko Sakkinen <jarkko@xxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Jan Kara <jack@xxxxxxxx>, Paul Moore <paul@xxxxxxxxxxxxxx>, Stephen Smalley <stephen.smalley.work@xxxxxxxxx>, Ondrej Mosnáček <omosnacek@xxxxxxxxx>, Joel Stanley <joel@xxxxxxxxx>, Andrew Jeffery <andrew@xxxxxxxxxxxxxxxxxxxx>, Ryan Chen <ryan_chen@xxxxxxxxxxxxxx>, Billy Tsai <billy_tsai@xxxxxxxxxxxxxx>, Bjorn Andersson <andersson@xxxxxxxxxx>, Konrad Dybcio <konradybcio@xxxxxxxxxx>, Abel Vesa <abelvesa@xxxxxxxxxx>, Jens Wiklander <jenswi@xxxxxxxxxx>, Sumit Garg <sumit.garg@xxxxxxxxxx>, Scott Branden <scott.branden@xxxxxxxxxxxx>, Broadcom internal kernel review list <bcm-kernel-feedback-list@xxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Richard Cochran <richardcochran@xxxxxxxxx>, David Woodhouse <dwmw2@xxxxxxxxxxxxx>, Andrew Lunn <andrew+netdev@xxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>
- From: Michael Kelley <mhklinux@xxxxxxxxxxx>
- Date: Sun, 22 Nov 2026 21:38:28 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uI6N0yy3nE3r3l3B3HOfIN6e/2icGcmSb0OOdqzMBF8=; b=CMmyqIMRuTxuZMRMH8HgGLtk5WJ3sXq/MaoQi8WOar6ewkWsSBMS/E7W/PpT/fLK7khb1aUhXX0ShnhMZRZ/yZJW5hIFHP4307GrSpj8VjtHpv9rZ6Uq+kq5zk9p6vg32XWUT1NP6n9ObmP+z/VLsb6X+WOUdprYoG7lcn9P+tW8c5qHsxDU8MDjf79anTX5E7pKMo/2BsagBvebodGyzUFJEGVm9jsBSx1NKOxEqakrhA+ooI/a0P6sTC9uQ+HVZKvygbd9RT7BLVoI2XeNDP7mAia2z2uqlm6coFX3RzIXDfYZqKV4GkMAEUI4yn8zA2nEc1pZoqvrRi62++HgmA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eHsedMCn7C50ZvPquEEzIE0KxsSJ1g9WVAkN9oKP78ErnF9bESFAEjxUNYDhCWkSY3xWZFw7+STEKReuBBKAPriHjnBQpCxvzcI19MoLkOFsyLSnVNSmCsuCFu7+5bgXPRM+djCruW2gz5es9jEyDZQph0BIvANXC0ZcOCKjVwYy+6JdKyyqMlVmRVnDpkdbbmIcqIbfWmMmTW7SyQH0JHv2nuzoK4chntljN8AsXUZTFahnsmqLJsQS5xk4v4lxlCwfMF/WA51g+QQgNqMeMp4ryLT+0JK2IVwgL+KgfsRU+FAqv2xREMuJ4j3VSoPDrlLOkqRBVYRcjoAPePvU9A==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=outlook.com header.i="@outlook.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version"
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linuxppc-dev@xxxxxxxxxxxxxxxx" <linuxppc-dev@xxxxxxxxxxxxxxxx>, "kvm@xxxxxxxxxxxxxxx" <kvm@xxxxxxxxxxxxxxx>, "linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, "virtualization@xxxxxxxxxxxxxxx" <virtualization@xxxxxxxxxxxxxxx>, "linux-sgx@xxxxxxxxxxxxxxx" <linux-sgx@xxxxxxxxxxxxxxx>, "selinux@xxxxxxxxxxxxxxx" <selinux@xxxxxxxxxxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "linux-aspeed@xxxxxxxxxxxxxxxx" <linux-aspeed@xxxxxxxxxxxxxxxx>, "linux-arm-msm@xxxxxxxxxxxxxxx" <linux-arm-msm@xxxxxxxxxxxxxxx>, "op-tee@xxxxxxxxxxxxxxxxxxxxxxxxx" <op-tee@xxxxxxxxxxxxxxxxxxxxxxxxx>, "netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>
- Delivery-date: Sun, 22 Nov 2026 21:38:54 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQJWRfE/+SnpOcttkojsctxhrcm2aAGmAms6tjvViOA=
- Thread-topic: [PATCH 03/14] mshv_vtl: convert mmap hooks to mmap_prepare
From: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx> Sent: Thursday, November 5, 2026
1:06 PM
>
> Move from the deprecated mmap hook to the new mmap_prepare hook for both
> the mshv_vtl and mshv_vtl_low devices. These only set VMA operations and
> flags.
>
> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
Reviewed-by: Michael Kelley <mhklinux@xxxxxxxxxxx>
> ---
> drivers/hv/mshv_vtl_main.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/hv/mshv_vtl_main.c b/drivers/hv/mshv_vtl_main.c
> index d8225242c73f..e372d4c0188d 100644
> --- a/drivers/hv/mshv_vtl_main.c
> +++ b/drivers/hv/mshv_vtl_main.c
> @@ -832,9 +832,9 @@ static const struct vm_operations_struct mshv_vtl_vm_ops
> = {
> .fault = mshv_vtl_fault,
> };
>
> -static int mshv_vtl_mmap(struct file *filp, struct vm_area_struct *vma)
> +static int mshv_vtl_mmap_prepare(struct vm_area_desc *desc)
> {
> - vma->vm_ops = &mshv_vtl_vm_ops;
> + desc->vm_ops = &mshv_vtl_vm_ops;
>
> return 0;
> }
> @@ -852,7 +852,7 @@ static const struct file_operations mshv_vtl_fops = {
> .owner = THIS_MODULE,
> .unlocked_ioctl = mshv_vtl_ioctl,
> .release = mshv_vtl_release,
> - .mmap = mshv_vtl_mmap,
> + .mmap_prepare = mshv_vtl_mmap_prepare,
> };
>
> static void mshv_vtl_synic_mask_vmbus_sint(void *info)
> @@ -1283,10 +1283,10 @@ static const struct vm_operations_struct
> mshv_vtl_low_vm_ops = {
> .huge_fault = mshv_vtl_low_huge_fault,
> };
>
> -static int mshv_vtl_low_mmap(struct file *filp, struct vm_area_struct *vma)
> +static int mshv_vtl_low_mmap_prepare(struct vm_area_desc *desc)
> {
> - vma->vm_ops = &mshv_vtl_low_vm_ops;
> - vm_flags_set(vma, VM_HUGEPAGE | VM_MIXEDMAP);
> + desc->vm_ops = &mshv_vtl_low_vm_ops;
> + vma_desc_set_flags(desc, VMA_HUGEPAGE_BIT, VMA_MIXEDMAP_BIT);
>
> return 0;
> }
> @@ -1294,7 +1294,7 @@ static int mshv_vtl_low_mmap(struct file *filp, struct
> vm_area_struct *vma)
> static const struct file_operations mshv_vtl_low_file_ops = {
> .owner = THIS_MODULE,
> .open = mshv_vtl_low_open,
> - .mmap = mshv_vtl_low_mmap,
> + .mmap_prepare = mshv_vtl_low_mmap_prepare,
> };
>
> static struct miscdevice mshv_vtl_low = {
>
> --
> 2.56.0
>
|