summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-11-18 12:04:05 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2020-11-18 12:04:05 -0500
commit79af02af1d01ffab6118552c66b4d58eb0745f3e (patch)
treef1cef78b18164daee440ad6fb25dd259018f3402
parent054409ab253d9f31bec5760105144166b4b71e22 (diff)
parent735931f9a51ab09cf795721b37696b420484625f (diff)
Merge tag 'kvm-s390-master-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-master
KVM: s390: Fix for destroy page ultravisor call - handle response code from older firmware - add uv.c to KVM: s390/s390 maintainer list
-rw-r--r--MAINTAINERS1
-rw-r--r--arch/s390/kernel/uv.c9
2 files changed, 9 insertions, 1 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 4a34b25ecc1f..e2de42d80b59 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9655,6 +9655,7 @@ F: Documentation/virt/kvm/s390*
F: arch/s390/include/asm/gmap.h
F: arch/s390/include/asm/kvm*
F: arch/s390/include/uapi/asm/kvm*
+F: arch/s390/kernel/uv.c
F: arch/s390/kvm/
F: arch/s390/mm/gmap.c
F: tools/testing/selftests/kvm/*/s390x/
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;
}