Skip to contentSkip to conversation

Set CONFIG_X86_GENERIC=y for i386 kernel build

PATCH In review Anthony PERARD 3 participants 11 messages Dec 8, 2023 – Dec 13, 2023

lore
Share & tools
lore
#0 lore raw

cover Set CONFIG_X86_GENERIC=y for i386 kernel build

CONFIG_X86_GENERIC=y and fixes around arch specific config values.

Thanks,

Anthony PERARD (3):
create_build_jobs: Set reset pvops_kconfig_overrides
create_build_jobs: Enable X86_GENERIC for i386 kernel pvops jobs.
ts-kernel-build: Remove use of $XEN_TARGET_ARCH

 mfi-common      | 12 ++++++++----
 ts-kernel-build | 13 -------------
 2 files changed, 8 insertions(+), 17 deletions(-)
Signature · 1 line
Anthony PERARD
#1 lore raw

PATCH 1/3 create_build_jobs: Set reset pvops_kconfig_overrides

Those two variables, and especially "pvops_kconfig_overrides", aren't reset for the next loop of for arch .... So when "pvops_kconfig_overrides" is for "armhf", it is also set for "arm64" as this is the next "arch" in the loop.

Avoid this by setting default values for the variables before the case command.

This changes Linux arm64 builds which will not have "CONFIG_EXT4_FS=y" anymore, but should get "CONFIG_EXT4_FS=m" instead from ts-kernel-build. But resulting build still have "CONFIG_EXT4_FS=y", so no change.

---
 mfi-common | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
mfi-common +5 -6
index 51eb4a9c..1a131c27 100644
@@ -284,6 +284,11 @@ create_build_jobs () {
 
     build_matrix_branch_filter_callback || continue
 
+    pvops_kconfig_overrides=""
+    pvops_kernel="
+      tree_linux=$TREE_LINUX
+      revision_linux=${REVISION_LINUX:-${DEFAULT_REVISION_LINUX}}
+    "
     case "$arch" in
     armhf)
       case "$xenbranch" in
@@ -314,12 +319,6 @@ create_build_jobs () {
         revision_linux=${REVISION_LINUX_ARM:-${DEFAULT_REVISION_LINUX_ARM}}
       "
       ;;
-    *)
-      pvops_kernel="
-        tree_linux=$TREE_LINUX
-        revision_linux=${REVISION_LINUX:-${DEFAULT_REVISION_LINUX}}
-      "
-      ;;
     esac
 
     case "$arch" in
Signature · 1 line
Anthony PERARD
#2 lore raw

PATCH 2/3 create_build_jobs: Enable X86_GENERIC for i386 kernel pvops jobs.

In reply to Anthony PERARD

This is following a failure to build "arch/x86/xen/enlighten.c" in build-i386-pvops jobs with linux 968f35f4ab1c ("Merge tag 'v6.7-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6")
in linux-linus branch.

---
 mfi-common | 5 +++++
 1 file changed, 5 insertions(+)
mfi-common +5 -0
index 1a131c27..d8d167fd 100644
@@ -319,6 +319,11 @@ create_build_jobs () {
         revision_linux=${REVISION_LINUX_ARM:-${DEFAULT_REVISION_LINUX_ARM}}
       "
       ;;
+    i386)
+      pvops_kconfig_overrides="
+        kconfig_override_y=CONFIG_X86_GENERIC
+      "
+      ;;
     esac
 
     case "$arch" in
Signature · 1 line
Anthony PERARD
#3 lore raw

Re: [OSSTEST PATCH 2/3] create_build_jobs: Enable X86_GENERIC for i386 kernel pvops jobs.

Quoted 7 lines · Anthony PERARD

This is following a failure to build "arch/x86/xen/enlighten.c" in build-i386-pvops jobs with linux 968f35f4ab1c ("Merge tag 'v6.7-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6")
in linux-linus branch.

Thanks, much appreciated.

Juergen (not knowing enough of OSStest to give a "R-b:" for the patch)

Quoted 20 lines
---
  mfi-common | 5 +++++
  1 file changed, 5 insertions(+)
mfi-common +5 -0
index 1a131c27..d8d167fd 100644
@@ -319,6 +319,11 @@ create_build_jobs () {
          revision_linux=${REVISION_LINUX_ARM:-${DEFAULT_REVISION_LINUX_ARM}}
        "
        ;;
+    i386)
+      pvops_kconfig_overrides="
+        kconfig_override_y=CONFIG_X86_GENERIC
+      "
+      ;;
      esac
 
      case "$arch" in
#4 lore raw

Re: [OSSTEST PATCH 2/3] create_build_jobs: Enable X86_GENERIC for i386 kernel pvops jobs.

In reply to Anthony PERARD
Quoted 4 lines · Anthony PERARD

This is following a failure to build "arch/x86/xen/enlighten.c" in build-i386-pvops jobs with linux 968f35f4ab1c ("Merge tag 'v6.7-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6")
in linux-linus branch.

Could we expand a bit on why CONFIG_X86_GENERIC is required? It would seem to me that option should have been selected by default already?

Thanks, Roger.

#5 lore raw

Re: [OSSTEST PATCH 2/3] create_build_jobs: Enable X86_GENERIC for i386 kernel pvops jobs.

Quoted 8 lines · Roger Pau Monné
Quoted 4 lines · Anthony PERARD

This is following a failure to build "arch/x86/xen/enlighten.c" in build-i386-pvops jobs with linux 968f35f4ab1c ("Merge tag 'v6.7-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6")
in linux-linus branch.

Could we expand a bit on why CONFIG_X86_GENERIC is required? It would seem to me that option should have been selected by default already?

No, the kernel's default for 32-bit x86 builds is still using the M686.

I guess this is for historical reasons.

BTW, there is a kernel patch pending letting CONFIG_XEN depend on more recent cpu types for 32-bit builds. I'm planning to take that patch after OSStest has been changed to no longer use M686.

Juergen

#6 lore raw

Re: [OSSTEST PATCH 2/3] create_build_jobs: Enable X86_GENERIC for i386 kernel pvops jobs.

Quoted 7 lines · Juergen Gross
Quoted 6 lines · Roger Pau Monné
Quoted 4 lines · Anthony PERARD

This is following a failure to build "arch/x86/xen/enlighten.c" in build-i386-pvops jobs with linux 968f35f4ab1c ("Merge tag 'v6.7-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6")
in linux-linus branch.

Quoted 6 lines
Quoted 2 lines

Could we expand a bit on why CONFIG_X86_GENERIC is required? It would seem to me that option should have been selected by default already?

No, the kernel's default for 32-bit x86 builds is still using the M686.

I guess this is for historical reasons.

If I add the following to the patch description, taken from Juergen patch, would that be ok?

Today the cpu type for a 32-bit x86 kernel is not specified in the used kernel config, resulting in the M686 to be used.

Instead of using the M686 which isn't even a 64-bit cpu (thus not capable to run a Xen guest), use the X86_GENERIC variant which is more appropriate.

ref: https://lore.kernel.org/all/[email protected]/

I'm not sure what you mean Juergen with "not 64bit cpu -> can't run xen guest", maybe it's because we can only run Xen on 64-bit cpus nowadays, so if we can't run Xen, there's no Xen guest?

As for X86_GENERIC, I think I've read the description which says something like distro should enable it, so I guess 32-bit distro would usually have the config enabled, so it make sense that we test with it.

Cheers,

Signature · 1 line
Anthony PERARD
#7 lore raw

Re: [OSSTEST PATCH 2/3] create_build_jobs: Enable X86_GENERIC for i386 kernel pvops jobs.

Quoted 25 lines · Anthony PERARD
Quoted 7 lines · Juergen Gross
Quoted 6 lines · Roger Pau Monné
Quoted 4 lines · Anthony PERARD

This is following a failure to build "arch/x86/xen/enlighten.c" in build-i386-pvops jobs with linux 968f35f4ab1c ("Merge tag 'v6.7-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6")
in linux-linus branch.

Quoted 6 lines
Quoted 2 lines

Could we expand a bit on why CONFIG_X86_GENERIC is required? It would seem to me that option should have been selected by default already?

No, the kernel's default for 32-bit x86 builds is still using the M686.

I guess this is for historical reasons.

If I add the following to the patch description, taken from Juergen patch, would that be ok?

Today the cpu type for a 32-bit x86 kernel is not specified in the used kernel config, resulting in the M686 to be used.

Instead of using the M686 which isn't even a 64-bit cpu (thus not capable to run a Xen guest), use the X86_GENERIC variant which is more appropriate.

Quoted 5 lines

ref: https://lore.kernel.org/all/[email protected]/

I'm not sure what you mean Juergen with "not 64bit cpu -> can't run xen guest", maybe it's because we can only run Xen on 64-bit cpus nowadays, so if we can't run Xen, there's no Xen guest?

Correct.

Juergen

#8 lore raw

PATCH 3/3 ts-kernel-build: Remove use of $XEN_TARGET_ARCH

In reply to Anthony PERARD

osstest doesn't set $XEN_TARGET_ARCH, and this is a Xen build variable, not a Linux build one. So, this code have been running with an empty $XEN_TARGET_ARCH for a while which mean none of those setopt has run in a while.

---
 ts-kernel-build | 13 -------------
 1 file changed, 13 deletions(-)
ts-kernel-build +0 -13
index 719b33aa..05da9a7f 100755
@@ -607,19 +607,6 @@ setopt CONFIG_AHCI_XGENE y
 setopt CONFIG_POWER_RESET_XGENE y
 setopt CONFIG_RTC_DRV_XGENE y
 
-case ${XEN_TARGET_ARCH} in
-    x86_32) setopt CONFIG_64BIT n ;;
-    x86_64)
-	setopt CONFIG_64BIT y
-	setopt CONFIG_IA32_EMULATION y
-	setopt CONFIG_IA32_AOUT n
-	setopt CONFIG_CRYPTO_AES_X86_64 n
-	setopt CONFIG_CRYPTO_SALSA20_X86_64 n
-	setopt CONFIG_CRYPTO_TWOFISH_X86_64 n
-	;;
-    *) ;;
-esac
-
 # Disable components that don't build
 setopt CONFIG_TEGRA_HOST1X n
 
Signature · 1 line
Anthony PERARD
Acked-by on the v1 series
#9 lore raw
In reply to Anthony PERARD
Quoted 8 lines · Anthony PERARD

CONFIG_X86_GENERIC=y and fixes around arch specific config values.

Thanks,

Anthony PERARD (3):
create_build_jobs: Set reset pvops_kconfig_overrides
create_build_jobs: Enable X86_GENERIC for i386 kernel pvops jobs.
ts-kernel-build: Remove use of $XEN_TARGET_ARCH

I would however request that if possible you expand a bit the description on patch 2 with the additional information provided by Juergen.

Thanks, Roger.

#10 lore raw
Quoted 10 lines · Roger Pau Monné
Quoted 8 lines · Anthony PERARD

CONFIG_X86_GENERIC=y and fixes around arch specific config values.

Thanks,

Anthony PERARD (3):
create_build_jobs: Set reset pvops_kconfig_overrides
create_build_jobs: Enable X86_GENERIC for i386 kernel pvops jobs.
ts-kernel-build: Remove use of $XEN_TARGET_ARCH

Quoted 5 lines

I would however request that if possible you expand a bit the description on patch 2 with the additional information provided by Juergen.

Pushed.

Thanks,

Signature · 1 line
Anthony PERARD