// SPDX-License-Identifier: GPL-2.0/* * kvm nested virtualization support for s390x * * Copyright IBM Corp. 2016, 2018 * * Author(s): David Hildenbrand <dahi@linux.vnet.ibm.com> */#include<linux/vmalloc.h>#include<linux/kvm_host.h>#include<linux/bug.h>#include<linux/list.h>#include<linux/bitmap.h>#include<linux/sched/signal.h>#include<asm/gmap.h>#include<asm/mmu_context.h>#include<asm/sclp.h>#include<asm/nmi.h>#include<asm/dis.h>#include"kvm-s390.h"#include"gaccess.h"structvsie_page{structkvm_s390_sie_blockscb_s;/* 0x0000 *//* * the backup info for machine check. ensure it's at * the same offset as that in struct sie_page! */structmcck_volatile_infomcck_info;/* 0x0200 *//* * The pinned original scb. Be aware that other VCPUs can modify * it while we read from it. Values that are used for conditions or * are reused conditionally, should be accessed via READ_ONCE. */structkvm_s390_sie_block*scb_o;/* 0x0218 *//* the shadow gmap in use by the vsie_page */structgmap*gmap;/* 0x0220 *//* address of the last reported fault to guest2 */unsignedlongfault_addr;/* 0x0228 *//* calculated guest addresses of satellite control blocks */gpa_tsca_gpa;/* 0x0230 */gpa_titdba_gpa;/* 0x0238 */gpa_tgvrd_gpa;/* 0x0240 */gpa_triccbd_gpa;/* 0x0248 */gpa_tsdnx_gpa;/* 0x0250 */__u8reserved[0x0700-0x0258];/* 0x0258 */structkvm_s390_crypto_cbcrycb;/* 0x0700 */__u8fac[S390_ARCH_FAC_LIST_SIZE_BYTE];/* 0x0800 */};/* trigger a validity icpt for the given scb */staticintset_validity_icpt(structkvm_s390_sie_block*scb,__u16reason_code){scb->ipa=0x1000;scb->ipb=((__u32)reason_code)<<16;scb->i