summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorAlexander Egorenkov <egorenar@linux.ibm.com>2021-06-25 09:51:15 +0200
committerHeiko Carstens <hca@linux.ibm.com>2021-07-27 09:39:14 +0200
commit7f33565b256697727fec7fc86bc1ca07683d7c81 (patch)
tree7e2cb5b6442ccabec231353a21a1e524bab3576e /arch/s390/kernel
parent42c89439b9fa0368fabd4e1564bdb4a05aeed7eb (diff)
downloadlinux-7f33565b256697727fec7fc86bc1ca07683d7c81.tar.bz2
s390/uv: de-duplicate checks for Protected Host Virtualization
De-duplicate checks for Protected Host Virtualization in decompressor and kernel. Set prot_virt_host=0 in the decompressor in *any* of the following cases and hand it over to the decompressed kernel: * No explicit prot_virt=1 is given on the kernel command-line * Protected Guest Virtualization is enabled * Hardware support not present * kdump or stand-alone dump The decompressed kernel needs to use only is_prot_virt_host() instead of performing again all checks done by the decompressor. Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/uv.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c
index aeb0a15bcbb7..5a656c7b7a67 100644
--- a/arch/s390/kernel/uv.c
+++ b/arch/s390/kernel/uv.c
@@ -51,24 +51,9 @@ void __init setup_uv(void)
{
unsigned long uv_stor_base;
- /*
- * keep these conditions in line with has_uv_sec_stor_limit()
- */
if (!is_prot_virt_host())
return;
- if (is_prot_virt_guest()) {
- prot_virt_host = 0;
- pr_warn("Protected virtualization not available in protected guests.");
- return;
- }
-
- if (!test_facility(158)) {
- prot_virt_host = 0;
- pr_warn("Protected virtualization not supported by the hardware.");
- return;
- }
-
uv_stor_base = (unsigned long)memblock_alloc_try_nid(
uv_info.uv_base_stor_len, SZ_1M, SZ_2G,
MEMBLOCK_ALLOC_ACCESSIBLE, NUMA_NO_NODE);