vmmon/vmnet: Build fixes for kernel 6.17.0-14-generic#329
Open
MorphyKutay wants to merge 1 commit intomkubecek:masterfrom
Open
vmmon/vmnet: Build fixes for kernel 6.17.0-14-generic#329MorphyKutay wants to merge 1 commit intomkubecek:masterfrom
MorphyKutay wants to merge 1 commit intomkubecek:masterfrom
Conversation
|
I'm wondering why changes to 168 files are needed to fix some problems with kernel API? |
|
I can confirm it worked for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: vmmon/vmnet – Linux 6.17.0 Compatibility
Overview
These changes enable the vmware-host-modules project to build against Linux kernel 6.17.0-14-generic. Kernel API changes, removed symbols, and objtool warnings have been addressed.
1. Makefile / Build System
Issue
driver-config.hcould not be found.SRCROOTwas not propagated correctly in the kernel sub-build.Solution
VMWARE_MOD_ROOT=$(cd $$PWD && pwd)during the build.VMWARE_MOD_ROOTforMOD_ROOT, and pass-DVMMON/-DVMCOREand include paths viaccflags-y.Objtool Skipped
common/phystrack.o: objtool tail-call / fallthrough warningscommon/task.o: objtool "unexpected end of section" forTask_Switch()userif.o(vmnet): objtool csum_partial_copy_nocheck uaccess warningOBJECT_FILES_NON_STANDARDwas added for these files.2. Timer API
Issue
del_timer_sync; it was replaced bytimer_delete_sync.Solution
#include <linux/timer.h>LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0):#define del_timer_sync timer_delete_synccompat_timer.hin driver.c and hostif.c.3. Page Table API
Issue
pgd_large,p4d_large,pud_large, andpmd_large.pgd_leaf,p4d_leaf,pud_leaf, andpmd_leaf.pud_leafandpmd_leafexist;pgd_leafandp4d_leafare not defined.Solution
compat_pud_large→pud_leafandcompat_pmd_large→pmd_leaf; use(0)forcompat_pgd_largeandcompat_p4d_largeon x86.compat_*macros.4. MSR API
Issue
rdmsrl_safeis no longer available;rdmsrq_safeshould be used instead.Solution
rdmsrl_safewithrdmsrq_safeand added#include <asm/msr.h>.5. Crosspage Assembly (RETHUNK / objtool)
Issue
retmust use the return thunk (__x86_return_thunk).GDT_SIZEconflicted with a kernel header definition.Solution
#include <asm/linkage.h>and replacedretwithASM_RET.GDT_SIZE→VMMON_GDT_SIZEandGDT_LIMIT→VMMON_GDT_LIMIT.VMMON_GDT_LIMIT.6. random_get_entropy_fallback (vmx86.c)
Issue
asm/timex.hcallsrandom_get_entropy_fallback().Solution
extern unsigned long random_get_entropy_fallback(void);before includingasm/timex.h.7. vmnet: dev_base_lock
Issue
dev_base_lock.Solution
dev_lock_list()→rtnl_lock()anddev_unlock_list()→rtnl_unlock().Modified / Added Files
Testing
makesuccessfully builds both vmmon and vmnet modules.make installinstalls them under/lib/modules/6.17.0-14-generic/misc/.