Skip to content

[LE-3813] RDMA/mana_ib: use the correct page table index based on hardware page size #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

shreeya-patel98
Copy link

@shreeya-patel98 shreeya-patel98 commented Aug 20, 2025

Commit message

RDMA/mana_ib: use the correct page table index based on hardware page size
jira LE-3813
commit-author Long Li <[email protected]>
commit 9e517a8

MANA hardware uses 4k page size. When calculating the page table index,
it should use the hardware page size, not the system page size.

	Cc: [email protected]
Fixes: 0266a17 ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter")
	Signed-off-by: Long Li <[email protected]>
Link: https://patch.msgid.link/[email protected]
	Signed-off-by: Leon Romanovsky <[email protected]>
(cherry picked from commit 9e517a8)
	Signed-off-by: Shreeya Patel <[email protected]>

---------------------------------------------------------------------------------------------------

RDMA/mana_ib: use the correct page size for mapping user-mode doorbell page
jira LE-3813
commit-author Long Li <[email protected]>
commit 4a3b99b

When mapping doorbell page from user-mode, the driver should use the system
page size as this memory is allocated via mmap() from user-mode.

	Cc: [email protected]
Fixes: 0266a17 ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter")
	Signed-off-by: Long Li <[email protected]>
Link: https://patch.msgid.link/[email protected]
	Signed-off-by: Leon Romanovsky <[email protected]>
(cherry picked from commit 4a3b99b)
	Signed-off-by: Shreeya Patel <[email protected]>```

Kernel build logs

/mnt/scratch/workspace/sig-cloud-9/kernel-src-tree
Running make mrproper...
  CLEAN   arch/x86/boot/compressed
  CLEAN   arch/x86/boot
  CLEAN   arch/x86/crypto
  CLEAN   arch/x86/entry/vdso
  CLEAN   arch/x86/kernel/cpu
  CLEAN   arch/x86/kernel
  CLEAN   arch/x86/kvm
  CLEAN   arch/x86/purgatory
  CLEAN   arch/x86/realmode/rm
  CLEAN   arch/x86/tools
  CLEAN   arch/x86/lib
  CLEAN   certs
  CLEAN   crypto/asymmetric_keys
  CLEAN   drivers/firmware/efi/libstub
  CLEAN   drivers/gpu/drm/radeon
  CLEAN   drivers/gpu/drm/xe
  CLEAN   drivers/scsi
  CLEAN   drivers/tty/vt
  CLEAN   drivers/video/logo
  CLEAN   kernel/debug/kdb
  CLEAN   kernel
  CLEAN   lib/raid6
  CLEAN   lib
  CLEAN   net/wireless
  CLEAN   security/selinux
  CLEAN   usr/include
  CLEAN   usr
  CLEAN   vmlinux.symvers modules-only.symvers modules.builtin modules.builtin.modinfo
  CLEAN   scripts/basic
  CLEAN   scripts/genksyms
  CLEAN   scripts/kconfig
  CLEAN   scripts/mod
  CLEAN   scripts/selinux/genheaders
  CLEAN   scripts/selinux/mdp
  CLEAN   scripts
  CLEAN   include/config include/generated arch/x86/include/generated .config .config.old .version Module.symvers certs/signing_key.pem certs/signing_key.x509 certs/x509.genkey
[TIMER]{MRPROPER}: 8s
x86_64 architecture detected, copying config
'configs/kernel-x86_64-rhel.config' -> '.config'
Setting Local Version for build
CONFIG_LOCALVERSION="-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0"
Making olddefconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  <--snip-->
  sound/xen/snd_xen_front.ko
  SIGN    /lib/modules/5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+/kernel/sound/virtio/virtio_snd.ko
  SIGN    /lib/modules/5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+/kernel/sound/x86/snd-hdmi-lpe-audio.ko
  SIGN    /lib/modules/5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+/kernel/sound/usb/snd-usb-audio.ko
  SIGN    /lib/modules/5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+/kernel/sound/xen/snd_xen_front.ko
  SIGN    /lib/modules/5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+/kernel/drivers/hwmon/adm1031.ko
  DEPMOD  /lib/modules/5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+
[TIMER]{MODULES}: 11s
Making Install
sh ./arch/x86/boot/install.sh 5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+ \
	arch/x86/boot/bzImage System.map "/boot"
sed: can't read /boot/.vmlinuz-5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+.hmac: No such file or directory
Can't create '/boot/.vmlinuz-0-rescue-c3004629c739468680b07075d6fee68a.hmac' from '/boot/.vmlinuz-5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+.hmac'!
[TIMER]{INSTALL}: 40s
Checking kABI
kABI check passed
Setting Default Kernel to /boot/vmlinuz-5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+ and Index to 2
The default is /boot/loader/entries/c3004629c739468680b07075d6fee68a-5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+.conf with index 2 and kernel /boot/vmlinuz-5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+
The default is /boot/loader/entries/c3004629c739468680b07075d6fee68a-5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+.conf with index 2 and kernel /boot/vmlinuz-5.14.0-shreeya_sig-cloud-9_5.14.0-570.30.1.el9_6-512aa8d1edc0+
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
Hopefully Grub2.0 took everything ... rebooting after time metrices
[TIMER]{MRPROPER}: 8s
[TIMER]{BUILD}: 1826s
[TIMER]{MODULES}: 11s
[TIMER]{INSTALL}: 40s
[TIMER]{TOTAL} 1891s
Rebooting in 10 seconds

kernel-build.log

Kselftests

shreeya@spatel-dev-bom ~/c/w/sig-cloud-9> grep '^ok ' kselftest-before.log | wc -l && grep '^ok ' kselftest-after.log | wc -l
382
382
shreeya@spatel-dev-bom ~/c/w/sig-cloud-9> grep '^not ok ' kselftest-before.log | wc -l && grep '^not ok ' kselftest-after.log | wc -l
89
89

kselftest-after.log
kselftest-before.log

…l page

jira LE-3813
commit-author Long Li <[email protected]>
commit 4a3b99b

When mapping doorbell page from user-mode, the driver should use the system
page size as this memory is allocated via mmap() from user-mode.

	Cc: [email protected]
Fixes: 0266a17 ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter")
	Signed-off-by: Long Li <[email protected]>
Link: https://patch.msgid.link/[email protected]
	Signed-off-by: Leon Romanovsky <[email protected]>
(cherry picked from commit 4a3b99b)
	Signed-off-by: Shreeya Patel <[email protected]>
… size

jira LE-3813
commit-author Long Li <[email protected]>
commit 9e517a8

MANA hardware uses 4k page size. When calculating the page table index,
it should use the hardware page size, not the system page size.

	Cc: [email protected]
Fixes: 0266a17 ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter")
	Signed-off-by: Long Li <[email protected]>
Link: https://patch.msgid.link/[email protected]
	Signed-off-by: Leon Romanovsky <[email protected]>
(cherry picked from commit 9e517a8)
	Signed-off-by: Shreeya Patel <[email protected]>
@thefossguy-ciq
Copy link

There's a miss in the markdown formatting 👀

@shreeya-patel98
Copy link
Author

There's a miss in the markdown formatting 👀

oops, fixed it now.

Copy link

@thefossguy-ciq thefossguy-ciq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚤

Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

@shreeya-patel98 shreeya-patel98 merged commit c771763 into sig-cloud-9/5.14.0-570.30.1.el9_6 Aug 20, 2025
4 checks passed
@shreeya-patel98 shreeya-patel98 deleted the {shreeya}_sig-cloud-9/5.14.0-570.30.1.el9_6 branch August 20, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants