<div dir="ltr"><br><br>On Fri, 24 Nov 2023 at 04:59, Michael Ellerman <<a href="mailto:mpe@ellerman.id.au">mpe@ellerman.id.au</a>> wrote:<br>><br>> Dimitri John Ledkov <<a href="mailto:dimitri.ledkov@canonical.com">dimitri.ledkov@canonical.com</a>> writes:<br>> > BugLink: <a href="https://bugs.launchpad.net/bugs/2038587">https://bugs.launchpad.net/bugs/2038587</a><br>> ><br>> > ppc64le is exclusively little endian and 64-bit, thus there is no need<br>> > for COMPAT_32BIT_TIME, nor COMPAT.<br>><br>> To be pedantic, the ppc64le kernel does support running 32-bit little<br>> endian userspace in compat mode (CONFIG_COMPAT=y). It's a distro choice<br>> as to whether you support COMPAT. Notably there are two other major<br>> distros that don't support COMPAT for ppc64le, and the set of 32-bit LE<br>> software is effectively empty.<div><br></div><div>🤯<br></div><div><br>><br>> > diffconfig result of these changes is:<br>> ><br>> > Â -ARCH_MMAP_RND_COMPAT_BITS 13<br>> > Â -ARCH_WANT_COMPAT_IPC_PARSE_VERSION y<br>> > Â -ARCH_WANT_OLD_COMPAT_IPC y<br>> > Â -COMPAT_BINFMT_ELF y<br>> > Â -COMPAT_NETLINK_MESSAGES y<br>> > Â -COMPAT_OLD_SIGACTION y<br>> > Â -HAVE_ARCH_MMAP_RND_COMPAT_BITS y<br>> > Â -KVM_COMPAT y<br>> > Â -NETFILTER_XTABLES_COMPAT y<br>> > Â -SYSVIPC_COMPAT y<br>> > Â -VDSO32 y<br>> > Â  COMPAT y -> n<br>> > Â  COMPAT_32BIT_TIME y -> n<br>> > Â +ARCH_HAS_SYSCALL_WRAPPER y<br>> > Â +INTERRUPT_SANITIZE_REGISTERS y<br>> ><br>> > What confused me, if the above combination is even valid or just pure<br>> > dead code.<br>><br>> I don't entirely understand what that diff is saying, but I'll try and<br>> answer anyway.</div><div><br></div><div>This is output from diffconfig, lines with "y -> n" are changes to a key that is available as a choice.</div><div>Lines prefixed with minus ('-') become unavailable.</div><div>Lines prefixed with plus ('+') are NEW options that become available.</div><div><br></div><div>So the effect of turning COMPAT off removes lots of compat things in other places, and makes INTERRUPT_SANITIZE_REGISTERS available.</div><div><br>><br>> > Is it really possible to run 32bit big-endian KVM on a 64bit<br>> > little-endian POWER?<br>><br>> Are you referring to KVM_COMPAT being disabled?<br>><br>> That's nothing to do with big-endian. It's just controlling whether the<br>> KVM ioctls (which qemu calls) support compat handling, ie. whether you<br>> can run a 32-bit qemu under a 64-bit kernel.<br>></div><div><br></div><div>Thank you for the explanation. And also "no thank you, do not want 32-bit qemu".</div><div><br>> It's entirely expected that when COMPAT is turned off KVM_COMPAT also<br>> gets turned off.<br>><br>> > Or is Kconfig slightly buggy and should be fixed up to prevent<br>> > offering COMPAT options when little-endian 64bit POWER kernel is being<br>> > configured?<br>><br>> No. Like I said at the top, the kernel does support 32-bit LE compat,<br>> eventhough it's not very widely used.<br>><br><br>Thank you for explaining all of this.</div><div><br></div><div>-- <br>okurrr,<br><br>Dimitri</div></div>