Skip to content

Commit

Permalink
Update kernel command line parameters for sriov
Browse files Browse the repository at this point in the history
With latest kernels, android is not booting in SR-IOV config.

With latest kernel, GuC submission and HuC authentication is determined
by the driver itself. So, enable_guc module parameter should not be
overrided. Also, max_vfs parameter needs to be set for spawning upto
max_vfs number of virtual functions.

Update the kernel command line parameter for Android to boot with
SR-IOV config.

Tests done:
- Android boot
- adb reboot

Tracked-On: OAM-114191
Signed-off-by: Jeevaka Prabu Badrappan <[email protected]>
  • Loading branch information
JeevakaPrabu committed Mar 14, 2024
1 parent 3df17e9 commit 4847828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions host_scripts/setup_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,12 @@ function ubu_enable_host_gvt(){
}

function ubu_enable_host_sriov(){
if [[ ! `cat /etc/default/grub` =~ "i915.enable_guc=0x7" ]]; then
if [[ ! `cat /etc/default/grub` =~ "i915.max_vfs" ]]; then
read -p "Do you want to update the grub entry in '/etc/default/grub' for enabling SRIOV? [Y/n]" res
if [ x$res = xn ]; then
return
fi
sed -i "s/GRUB_CMDLINE_LINUX=\"/GRUB_CMDLINE_LINUX=\"i915.enable_guc=0x7 udmabuf.list_limit=8192 /g" /etc/default/grub
sed -i "s/GRUB_CMDLINE_LINUX=\"/GRUB_CMDLINE_LINUX=\"i915.max_vfs=4 udmabuf.list_limit=8192 /g" /etc/default/grub
update-grub

echo -e "\nkvmgt\nvfio-iommu-type1\nvfio-mdev\n" >> /etc/initramfs-tools/modules
Expand Down

0 comments on commit 4847828

Please sign in to comment.