Skip to contentSkip to conversation

pvshim: introduce a PV shim defconfig

PATCH Superseded Roger Pau Monne 4 participants 6 messages Aug 22, 2018 – Sep 3, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pvshim: introduce a PV shim defconfig

In order to build a tailored pvshim-only binary from Xen. Switch the PV shim build from the tools firmware into using the new defconfig.

A diff of the .config generated for the pvshim firmware build before and after this change shows no differences.

---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Andrew Cooper <[email protected]>

---
 tools/firmware/xen-dir/Makefile       |  5 +-
 tools/firmware/xen-dir/shim.config    | 84 ---------------------------
 xen/arch/x86/configs/pvshim_defconfig | 23 ++++++++
 3 files changed, 25 insertions(+), 87 deletions(-)
 delete mode 100644 tools/firmware/xen-dir/shim.config
 create mode 100644 xen/arch/x86/configs/pvshim_defconfig
tools/firmware/xen-dir/Makefile +2 -3
index 84648c3faf..83597f0017 100644
@@ -41,9 +41,8 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE
 $(D): linkfarm.stamp
 	$(MAKE) -C $(D)/xen distclean
 
-$(D)/xen/.config: shim.config $(D)
-	cp $< $@
-	$(MAKE) -C $(@D) olddefconfig XEN_CONFIG_EXPERT=y
+$(D)/xen/.config: $(D)
+	$(MAKE) -C $(@D) KBUILD_DEFCONFIG=pvshim_defconfig XEN_CONFIG_EXPERT=y defconfig
 
 xen-shim: $(D)/xen/.config
 	$(MAKE) -C $(<D) build XEN_CONFIG_EXPERT=y
tools/firmware/xen-dir/shim.config deleted +0 -84

84 lines not on this page · raw message

xen/arch/x86/configs/pvshim_defconfig new file +23 -0
new file mode 100644
index 0000000000..38ba9feb1f
@@ -0,0 +1,23 @@
+# Enable PV shim mode
+CONFIG_PV=y
+CONFIG_XEN_GUEST=y
+CONFIG_PVH_GUEST=y
+CONFIG_PV_SHIM=y
+CONFIG_PV_SHIM_EXCLUSIVE=y
+# Disable features not used by the PV shim
+CONFIG_NR_CPUS=32
+CONFIG_SHADOW_PAGING=n
+CONFIG_BIGMEM=n
+CONFIG_HVM_FEP=n
+CONFIG_TBOOT=n
+CONFIG_KEXEC=n
+CONFIG_TMEM=n
+CONFIG_XENOPROF=n
+CONFIG_XSM=n
+CONFIG_SCHED_CREDIT2=n
+CONFIG_SCHED_RTDS=n
+CONFIG_SCHED_ARINC653=n
+CONFIG_SCHED_NULL=n
+CONFIG_LIVEPATCH=n
+CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS=n
+CONFIG_DEBUG=n
Signature · 7 lines
2.18.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v1 1/1
#1 lore raw

Roger Pau Monne writes ("[PATCH] pvshim: introduce a PV shim defconfig"):

Quoted 5 lines

In order to build a tailored pvshim-only binary from Xen. Switch the PV shim build from the tools firmware into using the new defconfig.

A diff of the .config generated for the pvshim firmware build before and after this change shows no differences.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v1 1/1
#2 lore raw
In reply to Roger Pau Monne
Quoted 7 lines · Roger Pau Monne

In order to build a tailored pvshim-only binary from Xen. Switch the PV shim build from the tools firmware into using the new defconfig.

A diff of the .config generated for the pvshim firmware build before and after this change shows no differences.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
In reply to Roger Pau Monne
Quoted 12 lines · Roger Pau Monne

In order to build a tailored pvshim-only binary from Xen. Switch the PV shim build from the tools firmware into using the new defconfig.

A diff of the .config generated for the pvshim firmware build before and after this change shows no differences.

---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Andrew Cooper <[email protected]>

Quoted 4 lines
---
 tools/firmware/xen-dir/Makefile       |  5 +-
 tools/firmware/xen-dir/shim.config    | 84 ---------------------------
 xen/arch/x86/configs/pvshim_defconfig | 23 ++++++++

FAOD I'm expecting an ack from x86 maintainers because a new file under x86 is created.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
In reply to Roger Pau Monne
Quoted 17 lines
Quoted 1 line
Quoted 1 line · On 22.08.18 at 12:36, <[email protected]> wrote:
xen/arch/x86/configs/pvshim_defconfig new file +13 -0
@@ -0,0 +1,23 @@
+# Enable PV shim mode
+CONFIG_PV=y
+CONFIG_XEN_GUEST=y
+CONFIG_PVH_GUEST=y
+CONFIG_PV_SHIM=y
+CONFIG_PV_SHIM_EXCLUSIVE=y
+# Disable features not used by the PV shim
+CONFIG_NR_CPUS=32
+CONFIG_SHADOW_PAGING=n
+CONFIG_BIGMEM=n
+CONFIG_HVM_FEP=n
+CONFIG_TBOOT=n
+CONFIG_KEXEC=n

xen/arch/x86/configs/pvshim_defconfig line 23

Quoted 10 lines
xen/arch/x86/configs/pvshim_defconfig new file +10 -0
+CONFIG_TMEM=n
+CONFIG_XENOPROF=n
+CONFIG_XSM=n
+CONFIG_SCHED_CREDIT2=n
+CONFIG_SCHED_RTDS=n
+CONFIG_SCHED_ARINC653=n
+CONFIG_SCHED_NULL=n
+CONFIG_LIVEPATCH=n
+CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS=n
+CONFIG_DEBUG=n

Since the *defconfig-s we have so far are all empty, and since the Linux x86 ones aren't written this way I wonder: Is there a reason you use "=n" instead of the "# CONFIG_... is not set" form?

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw
Quoted 23 lines · Jan Beulich
Quoted 23 lines
Quoted 1 line
Quoted 1 line · On 22.08.18 at 12:36, <[email protected]> wrote:
xen/arch/x86/configs/pvshim_defconfig new file +19 -0
@@ -0,0 +1,23 @@
+# Enable PV shim mode
+CONFIG_PV=y
+CONFIG_XEN_GUEST=y
+CONFIG_PVH_GUEST=y
+CONFIG_PV_SHIM=y
+CONFIG_PV_SHIM_EXCLUSIVE=y
+# Disable features not used by the PV shim
+CONFIG_NR_CPUS=32
+CONFIG_SHADOW_PAGING=n
+CONFIG_BIGMEM=n
+CONFIG_HVM_FEP=n
+CONFIG_TBOOT=n
+CONFIG_KEXEC=n
+CONFIG_TMEM=n
+CONFIG_XENOPROF=n
+CONFIG_XSM=n
+CONFIG_SCHED_CREDIT2=n
+CONFIG_SCHED_RTDS=n
+CONFIG_SCHED_ARINC653=n
Quoted 8 lines

xen/arch/x86/configs/pvshim_defconfig line 23

Quoted 4 lines
xen/arch/x86/configs/pvshim_defconfig new file +4 -0
+CONFIG_SCHED_NULL=n
+CONFIG_LIVEPATCH=n
+CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS=n
+CONFIG_DEBUG=n

Since the *defconfig-s we have so far are all empty, and since the Linux x86 ones aren't written this way I wonder: Is there a reason you use "=n" instead of the "# CONFIG_... is not set" form?

My personal preference is to explicitly set them to =n, I think it's clearer. Using "# CONFIG_FOO is not set" looks to me like "CONFIG_FOO will be using the default value". In any case, I've changed this to use the 'is not set' form and will resend shortly.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel