Skip to content

Commit 4c80d05

Browse files
committed
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 <[email protected]> Fixes: 1a80b54 ("s390/uv: add destroy page call") Reviewed-by: David Hildenbrand <[email protected]> Acked-by: Cornelia Huck <[email protected]> Reviewed-by: Janosch Frank <[email protected]>
1 parent 6cbf1e9 commit 4c80d05

File tree

1 file changed

+8
-1
lines changed
  • arch/s390/kernel

1 file changed

+8
-1
lines changed

arch/s390/kernel/uv.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,15 @@ int uv_destroy_page(unsigned long paddr)
129129
.paddr = paddr
130130
};
131131

132-
if (uv_call(0, (u64)&uvcb))
132+
if (uv_call(0, (u64)&uvcb)) {
133+
/*
134+
* Older firmware uses 107/d as an indication of a non secure
135+
* page. Let us emulate the newer variant (no-op).
136+
*/
137+
if (uvcb.header.rc == 0x107 && uvcb.header.rrc == 0xd)
138+
return 0;
133139
return -EINVAL;
140+
}
134141
return 0;
135142
}
136143

0 commit comments

Comments
 (0)