Skip to contentSkip to conversation

qemu: fix host virtfs option

PATCH New Vincent Stehlé 3 participants 5 messages Aug 1, 2019 – Aug 21, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu: fix host virtfs option

Fix the build of host-qemu with virtfs enabled: fix a typo in makefile conditional and add a dependency on host-libcap.

The virtfs configuration option was added by commit e0f49e648401 ("package/qemu: add option to enable virtual filesystem in host qemu").

Cc Etienne Carriere <[email protected]>

---

Hi,

I build-tested this with a number of architectures[1], with VIRTFS=y/n and this looks fine.
During testing I remarked that VIRTFS=n is somewhat "weak", as it does
not forcibly disable virtfs. This means qemu can still auto-detect libcap and libattr, and decide to auto-enable virtfs. I think this does not harm, but we could also add an explicit --disable-virtfs if preferred. Do not hesitate to let me know if I should respin with this change.

...et au passage un petit coucou ? Etienne :)

Vincent.

[1]: aarch64, arm, i386, m68k, microblaze, microblazeel, mips, mips64, mips64el, mipsel, ppc, ppc64, riscv32, riscv64, sh4, sh4eb, sparc and x86_64.

 package/qemu/qemu.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/qemu/qemu.mk +2 -1
index 73e0778d73..eff4bb6213 100644
@@ -271,8 +271,9 @@ HOST_QEMU_OPTS += --enable-vde
 HOST_QEMU_DEPENDENCIES += host-vde2
 endif
 
-ifdef ($(BR2_PACKAGE_HOST_QEMU_VIRTFS),y)
+ifeq ($(BR2_PACKAGE_HOST_QEMU_VIRTFS),y)
 HOST_QEMU_OPTS += --enable-virtfs
+HOST_QEMU_DEPENDENCIES += host-libcap
 endif
 
 # Override CPP, as it expects to be able to call it like it'd
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 qemu: fix host virtfs option

Hello Vincent,

Quoted 13 lines · On Thu, 1 Aug 2019 11:27:01 +0200 Vincent Stehl? <[email protected]>…

Fix the build of host-qemu with virtfs enabled: fix a typo in makefile conditional and add a dependency on host-libcap.

The virtfs configuration option was added by commit e0f49e648401 ("package/qemu: add option to enable virtual filesystem in host qemu").

Cc Etienne Carriere <[email protected]>

---

Hi,

Quoted 7 lines

I build-tested this with a number of architectures[1], with VIRTFS=y/n and this looks fine.
During testing I remarked that VIRTFS=n is somewhat "weak", as it does
not forcibly disable virtfs. This means qemu can still auto-detect libcap and libattr, and decide to auto-enable virtfs. I think this does not harm, but we could also add an explicit --disable-virtfs if preferred. Do not hesitate to let me know if I should respin with this change.

Yes, we like to explicitly disable features, when possible.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH v2 1/1 qemu: fix host virtfs option

Fix the build of host-qemu with virtfs enabled: fix a typo in makefile conditional and add a dependency on host-libcap.

The virtfs configuration option was added by commit e0f49e648401 ("package/qemu: add option to enable virtual filesystem in host qemu").

Cc Etienne Carriere <[email protected]>

---
Changes v1 -> v2:
- Forcibly disable virtfs when config option is =n rather than letting qemu auto-detect (as per Thomas' feedback)

 package/qemu/qemu.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
package/qemu/qemu.mk +4 -1
index 73e0778d73..2c11f64ad0 100644
@@ -271,8 +271,11 @@ HOST_QEMU_OPTS += --enable-vde
 HOST_QEMU_DEPENDENCIES += host-vde2
 endif
 
-ifdef ($(BR2_PACKAGE_HOST_QEMU_VIRTFS),y)
+ifeq ($(BR2_PACKAGE_HOST_QEMU_VIRTFS),y)
 HOST_QEMU_OPTS += --enable-virtfs
+HOST_QEMU_DEPENDENCIES += host-libcap
+else
+HOST_QEMU_OPTS += --disable-virtfs
 endif
 
 # Override CPP, as it expects to be able to call it like it'd
Signature · 1 line
2.20.1
#3 lore raw

PATCH v2 1/1 qemu: fix host virtfs option

Quoted 24 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vincent" == Vincent Stehl? <[email protected]> writes:

Fix the build of host-qemu with virtfs enabled: fix a typo in makefile conditional and add a dependency on host-libcap.

The virtfs configuration option was added by commit e0f49e648401 ("package/qemu: add option to enable virtual filesystem in host qemu").

Cc Etienne Carriere <[email protected]>

---
Changes v1 -> v2:
- Forcibly disable virtfs when config option is =n rather than letting qemu auto-detect (as per Thomas' feedback)

 package/qemu/qemu.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
package/qemu/qemu.mk +0 -0
index 73e0778d73..2c11f64ad0 100644

package/qemu/qemu.mk HOST_QEMU_OPTS += --enable-vde · line 276

Quoted 7 lines
package/qemu/qemu.mk +2 -1
@@ -271,8 +271,11 @@ HOST_QEMU_OPTS += --enable-vde
 HOST_QEMU_DEPENDENCIES += host-vde2
 endif
 
-ifdef ($(BR2_PACKAGE_HOST_QEMU_VIRTFS),y)
+ifeq ($(BR2_PACKAGE_HOST_QEMU_VIRTFS),y)
 HOST_QEMU_OPTS += --enable-virtfs
+HOST_QEMU_DEPENDENCIES += host-libcap

I was going to say that we also need host-attr, but looking closer at the configure step I see that the xattr support in glibc is also accepted.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH v2 1/1 qemu: fix host virtfs option

In reply to Vincent Stehlé
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vincent" == Vincent Stehl? <[email protected]> writes:

Fix the build of host-qemu with virtfs enabled: fix a typo in makefile conditional and add a dependency on host-libcap.

The virtfs configuration option was added by commit e0f49e648401 ("package/qemu: add option to enable virtual filesystem in host qemu").

Quoted 7 lines
Cc Etienne Carriere <[email protected]>

---
Changes v1 -> v2:
- Forcibly disable virtfs when config option is =n rather than letting qemu auto-detect (as per Thomas' feedback)

Committed to 2019.02.x and 2019.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard