Thanks for the suggestion. I don't see your previous redefinition of PAGE_SIZE upstream, just 3 lines above the warning redefinition:
In file included from include/x86/svm_util.h:13, from include/x86/sev.h:15, from lib/x86/sev.c:5: include/x86/processor.h:373:9: error: "PAGE_SIZE" redefined [-Werror] 373 | #define PAGE_SIZE (1ULL << PAGE_SHIFT) | ^~~~~~~~~ include/x86/processor.h:370:9: note: this is the location of the previous definition 370 | #define PAGE_SIZE BIT(12) | ^~~~~~~~~
But I investigated further and found that both glibc and musl define PAGE_SIZE in sys/user.h:
glibc (sys/user.h): #define PAGE_SHIFT 12 #define PAGE_SIZE (1UL << PAGE_SHIFT)
musl (sys/user.h): #define PAGE_SIZE 4096
KVM selftests (include/x86/processor.h): #define PAGE_SHIFT 12 #define PAGE_SIZE (1ULL << PAGE_SHIFT)
This creates redefinition warnings with both C libraries on my system. I've already sent a v2 patch series with the PAGE_SIZE patch dropped but I'm not sure what the next course of action would be for this?
Please keep discussions on-list unless there's something that can't/shouldn't be posted publicly, e.g. for confidentiality or security reasons.
Apologies, doing this for the first time! Hopefully this one works as it should.