Skip to contentSkip to conversation

arm64/defconfig: Restore built-in 9P rootfs support

PATCH In review Anshuman Khandual 4 participants 5 messages Jul 16 – Jul 17

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64/defconfig: Restore built-in 9P rootfs support

Commit d521c4ca039f ("arm64: defconfig: Switch Ethernet drivers to modules") had changed 9P and virtio-9P support from built-in to modular instead. This breaks simple kvmtool boots using a 9P root filesystem without an initramfs , because the kernel must mount root filesystem before it can load the 9P modules. Also there is no change in image size with these configs built-in.

Restore the relevant 9P options as built-in.

Cc Krzysztof Kozlowski <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Eric Biggers <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Alexandre Belloni <[email protected]>
---
 arch/arm64/configs/defconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/configs/defconfig +3 -3
index 654a102cb5bc..be9715b1e005 100644
@@ -200,8 +200,8 @@ CONFIG_MAC80211=m
 CONFIG_MAC80211_LEDS=y
 CONFIG_RFKILL=m
 CONFIG_RFKILL_GPIO=m
-CONFIG_NET_9P=m
-CONFIG_NET_9P_VIRTIO=m
+CONFIG_NET_9P=y
+CONFIG_NET_9P_VIRTIO=y
 CONFIG_NFC=m
 CONFIG_NFC_NCI=m
 CONFIG_NFC_NXP_NCI=m
@@ -1921,7 +1921,7 @@ CONFIG_NFS_V4=y
 CONFIG_NFS_V4_1=y
 CONFIG_NFS_V4_2=y
 CONFIG_ROOT_NFS=y
-CONFIG_9P_FS=m
+CONFIG_9P_FS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_SECURITY=y
Signature · 1 line
2.30.2
#1 lore raw
Quoted 4 lines · Anshuman Khandual

Commit d521c4ca039f ("arm64: defconfig: Switch Ethernet drivers to modules") had changed 9P and virtio-9P support from built-in to modular instead. This breaks simple kvmtool boots using a 9P root filesystem without an initramfs , because the kernel must mount root filesystem before it can load the 9P

And that commit explained you must use initramfs. Nothing got broken, because there was never a promise that a recent, virtualized environment must work on defconfig without initramfs.

You fully control your software, so just build initramfs which is absolutely trivial and we all moved on to that for arm64 long time ago.

Quoted 1 line

modules. Also there is no change in image size with these configs built-in.

How? How making a module a built in has no effect on size? How is this even possible?

Quoted 20 lines

Restore the relevant 9P options as built-in.

Cc Krzysztof Kozlowski <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Eric Biggers <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Alexandre Belloni <[email protected]>
---
 arch/arm64/configs/defconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/configs/defconfig +0 -0
index 654a102cb5bc..be9715b1e005 100644

arch/arm64/configs/defconfig CONFIG_MAC80211=m · line 204

Quoted 7 lines
arch/arm64/configs/defconfig +2 -2
@@ -200,8 +200,8 @@ CONFIG_MAC80211=m
 CONFIG_MAC80211_LEDS=y
 CONFIG_RFKILL=m
 CONFIG_RFKILL_GPIO=m
-CONFIG_NET_9P=m
-CONFIG_NET_9P_VIRTIO=m
+CONFIG_NET_9P=y
+CONFIG_NET_9P_VIRTIO=y

No, upgrade your build system from 90-ties to decent one to handle initramfs.

Best regards,
Krzysztof

#2 lore raw
Quoted 7 lines · Krzysztof Kozlowski
Quoted 4 lines · Anshuman Khandual

Commit d521c4ca039f ("arm64: defconfig: Switch Ethernet drivers to modules") had changed 9P and virtio-9P support from built-in to modular instead. This breaks simple kvmtool boots using a 9P root filesystem without an initramfs , because the kernel must mount root filesystem before it can load the 9P

Quoted 6 lines

And that commit explained you must use initramfs. Nothing got broken, because there was never a promise that a recent, virtualized environment must work on defconfig without initramfs.

You fully control your software, so just build initramfs which is absolutely trivial and we all moved on to that for arm64 long time ago.

I still regularly boot KVM guests on arm64 without an initramfs, but I just use 'make kvm_guest.config', which turns on all the commonly used virtio drivers as built-in. I wouldn't call 9pfs root trivial without initramfs, configuring 9p built-in is already complicated enough.

So I agree we don't need this patch, but there is a trivial workaround for Anshuman in case he wants to avoid doing this.

Arnd

#3 lore raw
Quoted 8 lines · Arnd Bergmann
Quoted 7 lines · Krzysztof Kozlowski
Quoted 4 lines · Anshuman Khandual

Commit d521c4ca039f ("arm64: defconfig: Switch Ethernet drivers to modules") had changed 9P and virtio-9P support from built-in to modular instead. This breaks simple kvmtool boots using a 9P root filesystem without an initramfs , because the kernel must mount root filesystem before it can load the 9P

Quoted 8 lines
Quoted 6 lines

And that commit explained you must use initramfs. Nothing got broken, because there was never a promise that a recent, virtualized environment must work on defconfig without initramfs.

You fully control your software, so just build initramfs which is absolutely trivial and we all moved on to that for arm64 long time ago.

I still regularly boot KVM guests on arm64 without an initramfs,

Actually that is a very normal use case particularly with KVM tool.

Quoted 4 lines

but I just use 'make kvm_guest.config', which turns on all the commonly used virtio drivers as built-in. I wouldn't call 9pfs root trivial without initramfs, configuring 9p built-in is already complicated enough.

Alright - fair enough.

Quoted 3 lines

So I agree we don't need this patch, but there is a trivial workaround for Anshuman in case he wants to avoid doing this.

The following sequence does indeed solve this problem for now.

make mrproper
make defconfig
make kvm_guest.config

#4 lore raw
In reply to Arnd Bergmann
Quoted 5 lines · Arnd Bergmann
Quoted 2 lines · Krzysztof Kozlowski

You fully control your software, so just build initramfs which is absolutely trivial and we all moved on to that for arm64 long time ago.

Quoted 8 lines

I still regularly boot KVM guests on arm64 without an initramfs, but I just use 'make kvm_guest.config', which turns on all the commonly used virtio drivers as built-in. I wouldn't call 9pfs root trivial without initramfs, configuring 9p built-in is already complicated enough.

So I agree we don't need this patch, but there is a trivial workaround for Anshuman in case he wants to avoid doing this.

Though watch out for the fact that this currently disables KVM which isn't so helpful on the multiple architectures that have nested guest support. I'll send a patch for that.