--- v2
+++ v1
@@ -1,22 +1,20 @@
This patchset allows for setup_rfi_flush() to be called again
-after PowerVM LPM (live partition mobility) aka LPAR migration,
-in order to possibly switch to a different flush method.
+after PowerVM LPM (live partition mobility) aka LPAR migration.
-The patches are mostly from Michael Ellerman, I have rebased to
-powerpc/linux.git merge branch as of commit 249d7ba (March 12th),
-and added one extra commit to force init of fallback flush area
-on pseries.
+It's originally written by Michael Ellerman; I just rebased it
+on top of powerpc/merge as of 2018-02-14 BRST (commit 3f6f556).
+
+I tested it with a debug patch (sending shortly) to shortcut
+the LPM functions migration_store() and post_mobility_fixup()
+to just reach pseries_setup_rfi_flush(), and abuse the boot
+option 'no_rfi_flush' not to allocate the fallback flush area
+at boot (to simulate the migration from patched to unpatched
+system).
Testing:
-------
-I've disabled most code in the LPM functions migration_store()
-and post_mobility_fixup() to just reach pseries_setup_rfi_flush(),
-and modified pseries_setup_rfi_flush() a few times to fake the
-first and non-first calls to either enable instructions or the
-fallback flush method, to cover all 4 possible scenarios.
-
-Case 1) fallback -> fallback
+Fallback flush area allocated at boot time:
# dmesg | grep rfi-flush
[ 0.000000] rfi-flush: Using fallback displacement flush
@@ -27,60 +25,25 @@
# dmesg | grep rfi-flush
[ 0.000000] rfi-flush: Using fallback displacement flush
[ 0.000000] rfi-flush: patched 8 locations
- [ 20.583029] rfi-flush: Using fallback displacement flush
- [ 20.583038] rfi-flush: patched 8 locations
+ [ 51.793238] rfi-flush: Using fallback displacement flush
+ [ 51.793258] rfi-flush: patched 8 locations
-Case 2) instructions -> fallback
+Fallback flush area NOT allocated at boot time:
+ # grep -o no_rfi_flush /proc/cmdline
+ no_rfi_flush
+
# dmesg | grep rfi-flush
- [ 0.000000] rfi-flush: Using ori type flush
- [ 0.000000] rfi-flush: Using mttrig type flush
- [ 0.000000] rfi-flush: patched 8 locations
+ [ 0.000000] rfi-flush: disabled on command line.
+ [ 0.000000] rfi-flush: re-enabled
# echo > /sys/kernel/mobility/migration
# dmesg | grep rfi-flush
- [ 0.000000] rfi-flush: Using ori type flush
- [ 0.000000] rfi-flush: Using mttrig type flush
- [ 0.000000] rfi-flush: patched 8 locations
- [ 36.023759] rfi-flush: Using fallback displacement flush
- [ 36.023764] rfi-flush: patched 8 locations
-
-Case 3) fallback -> instructions
-
- # dmesg | grep rfi-flush
- [ 0.000000] rfi-flush: Using fallback displacement flush
- [ 0.000000] rfi-flush: patched 8 locations
-
- # echo > /sys/kernel/mobility/migration
-
- # dmesg | grep rfi-flush
- [ 0.000000] rfi-flush: Using fallback displacement flush
- [ 0.000000] rfi-flush: patched 8 locations
- [ 23.373037] rfi-flush: Using ori type flush
- [ 23.373039] rfi-flush: Using mttrig type flush
- [ 23.373044] rfi-flush: patched 8 locations
-
-Case 4) instructions -> instructions
-
- # dmesg | grep rfi-flush
- [ 0.000000] rfi-flush: Using ori type flush
- [ 0.000000] rfi-flush: Using mttrig type flush
- [ 0.000000] rfi-flush: patched 8 locations
-
- # echo > /sys/kernel/mobility/migration
-
- # dmesg | grep rfi-flush
- [ 0.000000] rfi-flush: Using ori type flush
- [ 0.000000] rfi-flush: Using mttrig type flush
- [ 0.000000] rfi-flush: patched 8 locations
- [ 23.243564] rfi-flush: Using ori type flush
- [ 23.243566] rfi-flush: Using mttrig type flush
- [ 23.243570] rfi-flush: patched 8 locations
-
-
-Mauricio Faria de Oliveira (1):
- rfi-flush: Allow pseries to force init of fallback flush area
+ [ 0.000000] rfi-flush: disabled on command line.
+ [ 0.000000] rfi-flush: re-enabled
+ [ 31.817921] rfi-flush: Error unable to use fallback displacement flush!
+ [ 31.817927] rfi-flush: patched 8 locations
Michael Ellerman (3):
rfi-flush: Move the logic to avoid a redo into the debugfs code
@@ -88,12 +51,11 @@
rfi-flush: Call setup_rfi_flush() after LPM migration
arch/powerpc/include/asm/setup.h | 2 +-
- arch/powerpc/kernel/setup_64.c | 22 +++++++++++++++-------
- arch/powerpc/platforms/powernv/setup.c | 3 ++-
+ arch/powerpc/kernel/setup_64.c | 38 +++++++++++++++++++++++--------
arch/powerpc/platforms/pseries/mobility.c | 3 +++
arch/powerpc/platforms/pseries/pseries.h | 2 ++
- arch/powerpc/platforms/pseries/setup.c | 6 +++---
- 6 files changed, 26 insertions(+), 12 deletions(-)
+ arch/powerpc/platforms/pseries/setup.c | 2 +-
+ 5 files changed, 36 insertions(+), 11 deletions(-)
--
2.7.4