summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/uv.c
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2020-11-17 20:00:33 +0100
committerChristian Borntraeger <borntraeger@de.ibm.com>2020-11-18 13:08:49 +0100
commit4c80d05714d347405865802b7098f1c97362cbef (patch)
treebc8947b333ace0bf85174b3c35f02bdb45365d5b /arch/s390/kernel/uv.c
parentKVM: s390: remove diag318 reset code (diff)
downloadlinux-4c80d05714d347405865802b7098f1c97362cbef.tar.xz
linux-4c80d05714d347405865802b7098f1c97362cbef.zip
s390/uv: handle destroy page legacy interface
Older firmware can return rc=0x107 rrc=0xd for destroy page if the page is already non-secure. This should be handled like a success as already done by newer firmware. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Fixes: 1a80b54d1ce1 ("s390/uv: add destroy page call") Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/uv.c')
-rw-r--r--arch/s390/kernel/uv.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c
index 14bd9d58edc9..883bfed9f5c2 100644
--- a/arch/s390/kernel/uv.c
+++ b/arch/s390/kernel/uv.c
@@ -129,8 +129,15 @@ int uv_destroy_page(unsigned long paddr)
.paddr = paddr
};
- if (uv_call(0, (u64)&uvcb))
+ if (uv_call(0, (u64)&uvcb)) {
+ /*
+ * Older firmware uses 107/d as an indication of a non secure
+ * page. Let us emulate the newer variant (no-op).
+ */
+ if (uvcb.header.rc == 0x107 && uvcb.header.rrc == 0xd)
+ return 0;
return -EINVAL;
+ }
return 0;
}