Skip to contentSkip to conversation

x86/shim: Refresh pvshim_defconfig

RFC PATCH Superseded Andrew Cooper 3 participants 6 messages Jul 26, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 x86/shim: Refresh pvshim_defconfig

* Add a dependency so the shim gets rebuilt when pvshim_defconfig changes.
* Default to the NULL scheduler now that it works with vcpu online/offline.

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Juergen Gross <[email protected]>
CC: Dario Faggioli <[email protected]>

This patch depends on Dario's series, and cant go in until then.

Also RFC.

CC Stefano Stabellini <[email protected]>
CC Tamas K Lengyel <[email protected]>

I tried turning off MEM_ACCESS, but I can't get Kconfig to actually turn it off in the build. What is the deal with MEM_ACCESS_ALWAYS_ON ? It makes it impossible to turn MEM_ACCESS off, becaue it is selected by x86, which leaves MEM_ACCESS enabled and unmodifiable.

---
 tools/firmware/xen-dir/Makefile       | 2 +-
 xen/arch/x86/configs/pvshim_defconfig | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)
tools/firmware/xen-dir/Makefile +1 -1
index 83597f0017..7435421251 100644
@@ -41,7 +41,7 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE
 $(D): linkfarm.stamp
 	$(MAKE) -C $(D)/xen distclean
 
-$(D)/xen/.config: $(D)
+$(D)/xen/.config: $(D) $(D)/xen/arch/x86/configs/pvshim_defconfig
 	$(MAKE) -C $(@D) KBUILD_DEFCONFIG=pvshim_defconfig XEN_CONFIG_EXPERT=y defconfig
 
 xen-shim: $(D)/xen/.config
xen/arch/x86/configs/pvshim_defconfig +4 -1
index 9710aa6238..329aaf9029 100644
@@ -5,6 +5,7 @@ CONFIG_PVH_GUEST=y
 CONFIG_PV_SHIM=y
 CONFIG_PV_SHIM_EXCLUSIVE=y
 CONFIG_NR_CPUS=32
+CONFIG_SCHED_NULL=y
 # Disable features not used by the PV shim
 # CONFIG_SHADOW_PAGING is not set
 # CONFIG_BIGMEM is not set
@@ -13,10 +14,12 @@ CONFIG_NR_CPUS=32
 # CONFIG_KEXEC is not set
 # CONFIG_XENOPROF is not set
 # CONFIG_XSM is not set
+# CONFIG_SCHED_CREDIT is not set
 # CONFIG_SCHED_CREDIT2 is not set
 # CONFIG_SCHED_RTDS is not set
 # CONFIG_SCHED_ARINC653 is not set
-# CONFIG_SCHED_NULL is not set
 # CONFIG_LIVEPATCH is not set
 # CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS is not set
 # CONFIG_DEBUG is not set
+# CONFIG_MEM_ACCESS_ALWAYS_ON is not set
+# CONFIG_MEM_ACCESS is not set
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw
Quoted 15 lines · Andrew Cooper

* Add a dependency so the shim gets rebuilt when pvshim_defconfig changes.
* Default to the NULL scheduler now that it works with vcpu online/offline.

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Juergen Gross <[email protected]>
CC: Dario Faggioli <[email protected]>

This patch depends on Dario's series, and cant go in until then.

Also RFC.

Quoted 7 lines
CC Stefano Stabellini <[email protected]>
CC Tamas K Lengyel <[email protected]>

I tried turning off MEM_ACCESS, but I can't get Kconfig to actually turn it off in the build. What is the deal with MEM_ACCESS_ALWAYS_ON ? It makes it impossible to turn MEM_ACCESS off, becaue it is selected by x86, which leaves MEM_ACCESS enabled and unmodifiable.

modify arch/x86/Kconfig like:

- select MEM_ACCESS_ALWAYS_ON
+ select MEM_ACCESS_ALWAYS_ON if !PV_SHIM_EXCLUSIVE

???

Juergen

Quoted 35 lines
---
  tools/firmware/xen-dir/Makefile       | 2 +-
  xen/arch/x86/configs/pvshim_defconfig | 5 ++++-
  2 files changed, 5 insertions(+), 2 deletions(-)
tools/firmware/xen-dir/Makefile +1 -1
index 83597f0017..7435421251 100644
@@ -41,7 +41,7 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE
  $(D): linkfarm.stamp
  	$(MAKE) -C $(D)/xen distclean
 
-$(D)/xen/.config: $(D)
+$(D)/xen/.config: $(D) $(D)/xen/arch/x86/configs/pvshim_defconfig
  	$(MAKE) -C $(@D) KBUILD_DEFCONFIG=pvshim_defconfig XEN_CONFIG_EXPERT=y defconfig
 
  xen-shim: $(D)/xen/.config
xen/arch/x86/configs/pvshim_defconfig +1 -0
index 9710aa6238..329aaf9029 100644
@@ -5,6 +5,7 @@ CONFIG_PVH_GUEST=y
  CONFIG_PV_SHIM=y
  CONFIG_PV_SHIM_EXCLUSIVE=y
  CONFIG_NR_CPUS=32
+CONFIG_SCHED_NULL=y
  # Disable features not used by the PV shim
  # CONFIG_SHADOW_PAGING is not set
  # CONFIG_BIGMEM is not set
@@ -13,10 +14,12 @@ CONFIG_NR_CPUS=32
  # CONFIG_KEXEC is not set
  # CONFIG_XENOPROF is not set
  # CONFIG_XSM is not set

xen/arch/x86/configs/pvshim_defconfig CONFIG_NR_CPUS=32 · line 25

Quoted 10 lines
xen/arch/x86/configs/pvshim_defconfig +3 -1
+# CONFIG_SCHED_CREDIT is not set
  # CONFIG_SCHED_CREDIT2 is not set
  # CONFIG_SCHED_RTDS is not set
  # CONFIG_SCHED_ARINC653 is not set
-# CONFIG_SCHED_NULL is not set
  # CONFIG_LIVEPATCH is not set
  # CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS is not set
  # CONFIG_DEBUG is not set
+# CONFIG_MEM_ACCESS_ALWAYS_ON is not set
+# CONFIG_MEM_ACCESS is not set

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

#2 lore raw
In reply to Andrew Cooper
Quoted 16 lines · Andrew Cooper

* Add a dependency so the shim gets rebuilt when pvshim_defconfig changes.
* Default to the NULL scheduler now that it works with vcpu online/offline.

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Juergen Gross <[email protected]>
CC: Dario Faggioli <[email protected]>

This patch depends on Dario's series, and cant go in until then.

Also RFC.

Quoted 7 lines
CC Stefano Stabellini <[email protected]>
CC Tamas K Lengyel <[email protected]>

I tried turning off MEM_ACCESS, but I can't get Kconfig to actually turn it off in the build. What is the deal with MEM_ACCESS_ALWAYS_ON ? It makes it impossible to turn MEM_ACCESS off, becaue it is selected by x86, which leaves MEM_ACCESS enabled and unmodifiable.

We never made it configurable to have MEM_ACCESS be disabled on x86. The option only exists because when I started moving vm_event to common code it had to be disabled for ARM at first. Then it looks like Stefano did make it configurable for ARM so there it can actually be disabled.

Tamas

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

#3 lore raw
Quoted 23 lines · Tamas K Lengyel
Quoted 15 lines · Andrew Cooper

* Add a dependency so the shim gets rebuilt when pvshim_defconfig changes.
* Default to the NULL scheduler now that it works with vcpu online/offline.

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Juergen Gross <[email protected]>
CC: Dario Faggioli <[email protected]>

This patch depends on Dario's series, and cant go in until then.

Also RFC.

Quoted 7 lines
CC Stefano Stabellini <[email protected]>
CC Tamas K Lengyel <[email protected]>

I tried turning off MEM_ACCESS, but I can't get Kconfig to actually turn it off in the build. What is the deal with MEM_ACCESS_ALWAYS_ON ? It makes it impossible to turn MEM_ACCESS off, becaue it is selected by x86, which leaves MEM_ACCESS enabled and unmodifiable.

Quoted 5 lines

We never made it configurable to have MEM_ACCESS be disabled on x86. The option only exists because when I started moving vm_event to common code it had to be disabled for ARM at first. Then it looks like Stefano did make it configurable for ARM so there it can actually be disabled.

Is it something we could consider making configurable at this point? Its certainly something we'd want to turn off in the PV shim build.

While thinking about it, it is specific to HVM guests, so ought to depend on CONFIG_HVM anyway, which might be the easiest way to exclude it for the PV shim build if we don't want to make it actively configurable yet.

~Andrew

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

#4 lore raw
Quoted 31 lines · Andrew Cooper
Quoted 23 lines · Tamas K Lengyel
Quoted 15 lines · Andrew Cooper

* Add a dependency so the shim gets rebuilt when pvshim_defconfig changes.
* Default to the NULL scheduler now that it works with vcpu online/offline.

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Juergen Gross <[email protected]>
CC: Dario Faggioli <[email protected]>

This patch depends on Dario's series, and cant go in until then.

Also RFC.

Quoted 7 lines
CC Stefano Stabellini <[email protected]>
CC Tamas K Lengyel <[email protected]>

I tried turning off MEM_ACCESS, but I can't get Kconfig to actually turn it off in the build. What is the deal with MEM_ACCESS_ALWAYS_ON ? It makes it impossible to turn MEM_ACCESS off, becaue it is selected by x86, which leaves MEM_ACCESS enabled and unmodifiable.

Quoted 5 lines

We never made it configurable to have MEM_ACCESS be disabled on x86. The option only exists because when I started moving vm_event to common code it had to be disabled for ARM at first. Then it looks like Stefano did make it configurable for ARM so there it can actually be disabled.

Quoted 7 lines

Is it something we could consider making configurable at this point? Its certainly something we'd want to turn off in the PV shim build.

While thinking about it, it is specific to HVM guests, so ought to depend on CONFIG_HVM anyway, which might be the easiest way to exclude it for the PV shim build if we don't want to make it actively configurable yet.

Sure, I would Ack a patch that makes it configurable. There were some works in the past to make mem_access for PV domains as well but that was a while ago, I don't think anyone has interest in that anymore. Making it depend on HVM for x86 builds sounds reasonable to me, not sure if that would work for ARM though as I don't think it has HVM config option. Anyway, if someone makes changes to this I would highly prefer to get rid of the MEM_ACCESS_ALWAYS_ON config option as it's a confusing option name.

Tamas

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

#5 lore raw
Quoted 33 lines · Tamas K Lengyel
Quoted 32 lines · Andrew Cooper
Quoted 23 lines · Tamas K Lengyel
Quoted 15 lines · Andrew Cooper

* Add a dependency so the shim gets rebuilt when pvshim_defconfig changes.
* Default to the NULL scheduler now that it works with vcpu online/offline.

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Juergen Gross <[email protected]>
CC: Dario Faggioli <[email protected]>

This patch depends on Dario's series, and cant go in until then.

Also RFC.

Quoted 7 lines
CC Stefano Stabellini <[email protected]>
CC Tamas K Lengyel <[email protected]>

I tried turning off MEM_ACCESS, but I can't get Kconfig to actually turn it off in the build. What is the deal with MEM_ACCESS_ALWAYS_ON ? It makes it impossible to turn MEM_ACCESS off, becaue it is selected by x86, which leaves MEM_ACCESS enabled and unmodifiable.

Quoted 5 lines

We never made it configurable to have MEM_ACCESS be disabled on x86. The option only exists because when I started moving vm_event to common code it had to be disabled for ARM at first. Then it looks like Stefano did make it configurable for ARM so there it can actually be disabled.

Is it something we could consider making configurable at this point? Its certainly something we'd want to turn off in the PV shim build.

Quoted 7 lines
Quoted 4 lines

While thinking about it, it is specific to HVM guests, so ought to depend on CONFIG_HVM anyway, which might be the easiest way to exclude it for the PV shim build if we don't want to make it actively configurable yet.

Sure, I would Ack a patch that makes it configurable. There were some works in the past to make mem_access for PV domains as well but that was a while ago, I don't think anyone has interest in that anymore.

The access ring is obtained via an HVM_PARAM.  There is no conceivable way it works for PV.

This is one of the reasons for the different design of "NG" interface which Petre is doing, so functionality like this could (in principle) be made compatible with PV in the future.

Quoted 5 lines

Making it depend on HVM for x86 builds sounds reasonable to me, not sure if that would work for ARM though as I don't think it has HVM config option. Anyway, if someone makes changes to this I would highly prefer to get rid of the MEM_ACCESS_ALWAYS_ON config option as it's a confusing option name.

Ok - I'll see about finding some copious free time.

~Andrew

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