vsie.c (1260ed77798502de9c98020040d2995008de10cc) | vsie.c (d6c8097803cbc3bb8d875baef542e6d77d10c203) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * kvm nested virtualization support for s390x 4 * 5 * Copyright IBM Corp. 2016, 2018 6 * 7 * Author(s): David Hildenbrand <dahi@linux.vnet.ibm.com> 8 */ --- 9 unchanged lines hidden (view full) --- 18#include <asm/gmap.h> 19#include <asm/mmu_context.h> 20#include <asm/sclp.h> 21#include <asm/nmi.h> 22#include <asm/dis.h> 23#include <asm/facility.h> 24#include "kvm-s390.h" 25#include "gaccess.h" | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * kvm nested virtualization support for s390x 4 * 5 * Copyright IBM Corp. 2016, 2018 6 * 7 * Author(s): David Hildenbrand <dahi@linux.vnet.ibm.com> 8 */ --- 9 unchanged lines hidden (view full) --- 18#include <asm/gmap.h> 19#include <asm/mmu_context.h> 20#include <asm/sclp.h> 21#include <asm/nmi.h> 22#include <asm/dis.h> 23#include <asm/facility.h> 24#include "kvm-s390.h" 25#include "gaccess.h" |
26#include "gmap.h" | |
27 28enum vsie_page_flags { 29 VSIE_PAGE_IN_USE = 0, 30}; 31 32struct vsie_page { 33 struct kvm_s390_sie_block scb_s; /* 0x0000 */ 34 /* --- 28 unchanged lines hidden (view full) --- 63 * looked up by other CPUs. 64 */ 65 unsigned long flags; /* 0x0260 */ 66 __u8 reserved[0x0700 - 0x0268]; /* 0x0268 */ 67 struct kvm_s390_crypto_cb crycb; /* 0x0700 */ 68 __u8 fac[S390_ARCH_FAC_LIST_SIZE_BYTE]; /* 0x0800 */ 69}; 70 | 26 27enum vsie_page_flags { 28 VSIE_PAGE_IN_USE = 0, 29}; 30 31struct vsie_page { 32 struct kvm_s390_sie_block scb_s; /* 0x0000 */ 33 /* --- 28 unchanged lines hidden (view full) --- 62 * looked up by other CPUs. 63 */ 64 unsigned long flags; /* 0x0260 */ 65 __u8 reserved[0x0700 - 0x0268]; /* 0x0268 */ 66 struct kvm_s390_crypto_cb crycb; /* 0x0700 */ 67 __u8 fac[S390_ARCH_FAC_LIST_SIZE_BYTE]; /* 0x0800 */ 68}; 69 |
70/** 71 * gmap_shadow_valid() - check if a shadow guest address space matches the 72 * given properties and is still valid 73 * @sg: pointer to the shadow guest address space structure 74 * @asce: ASCE for which the shadow table is requested 75 * @edat_level: edat level to be used for the shadow translation 76 * 77 * Returns 1 if the gmap shadow is still valid and matches the given 78 * properties, the caller can continue using it. Returns 0 otherwise; the 79 * caller has to request a new shadow gmap in this case. 80 */ 81int gmap_shadow_valid(struct gmap *sg, unsigned long asce, int edat_level) 82{ 83 if (sg->removed) 84 return 0; 85 return sg->orig_asce == asce && sg->edat_level == edat_level; 86} 87 |
|
71/* trigger a validity icpt for the given scb */ 72static int set_validity_icpt(struct kvm_s390_sie_block *scb, 73 __u16 reason_code) 74{ 75 scb->ipa = 0x1000; 76 scb->ipb = ((__u32) reason_code) << 16; 77 scb->icptcode = ICPT_VALIDITY; 78 return 1; --- 1471 unchanged lines hidden --- | 88/* trigger a validity icpt for the given scb */ 89static int set_validity_icpt(struct kvm_s390_sie_block *scb, 90 __u16 reason_code) 91{ 92 scb->ipa = 0x1000; 93 scb->ipb = ((__u32) reason_code) << 16; 94 scb->icptcode = ICPT_VALIDITY; 95 return 1; --- 1471 unchanged lines hidden --- |