36e8a3
From fd091394e52cd652ff5163735b2a91a8c0efe415 Mon Sep 17 00:00:00 2001
36e8a3
From: Lukas Nykryn <lnykryn@redhat.com>
36e8a3
Date: Tue, 13 Sep 2016 13:18:38 +0200
36e8a3
Subject: [PATCH] rules: don't hoplug memory on s390x
36e8a3
36e8a3
Related: #1523227
36e8a3
---
36e8a3
 rules/40-redhat.rules | 2 +-
36e8a3
 1 file changed, 1 insertion(+), 1 deletion(-)
36e8a3
36e8a3
diff --git a/rules/40-redhat.rules b/rules/40-redhat.rules
36e8a3
index 3335fe507..4c56950da 100644
36e8a3
--- a/rules/40-redhat.rules
36e8a3
+++ b/rules/40-redhat.rules
36e8a3
@@ -4,7 +4,7 @@
36e8a3
 SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1"
36e8a3
 
36e8a3
 # Memory hotadd request
36e8a3
-SUBSYSTEM=="memory", ACTION=="add", ATTR{state}=="offline", ATTR{state}="online"
36e8a3
+SUBSYSTEM=="memory", ACTION=="add", PROGRAM="/usr/bin/systemd-detect-virt", RESULT!="zvm", ATTR{state}=="offline", ATTR{state}="online"
36e8a3
 
36e8a3
 # reload sysctl.conf / sysctl.conf.d settings when the bridge module is loaded
36e8a3
 ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/bridge"