1*d94d71cbSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 28c60b9fbSAlexander Graf /* 38c60b9fbSAlexander Graf * 48c60b9fbSAlexander Graf * Copyright SUSE Linux Products GmbH 2010 58c60b9fbSAlexander Graf * 68c60b9fbSAlexander Graf * Authors: Alexander Graf <agraf@suse.de> 78c60b9fbSAlexander Graf */ 88c60b9fbSAlexander Graf 98c60b9fbSAlexander Graf #ifndef __ASM_KVM_BOOK3S_32_H__ 108c60b9fbSAlexander Graf #define __ASM_KVM_BOOK3S_32_H__ 118c60b9fbSAlexander Graf svcpu_get(struct kvm_vcpu * vcpu)12468a12c2SAlexander Grafstatic inline struct kvmppc_book3s_shadow_vcpu *svcpu_get(struct kvm_vcpu *vcpu) 138c60b9fbSAlexander Graf { 143ff95502SPaul Mackerras return vcpu->arch.shadow_vcpu; 158c60b9fbSAlexander Graf } 168c60b9fbSAlexander Graf svcpu_put(struct kvmppc_book3s_shadow_vcpu * svcpu)17468a12c2SAlexander Grafstatic inline void svcpu_put(struct kvmppc_book3s_shadow_vcpu *svcpu) 18468a12c2SAlexander Graf { 19468a12c2SAlexander Graf } 20468a12c2SAlexander Graf 218c60b9fbSAlexander Graf #define PTE_SIZE 12 228c60b9fbSAlexander Graf #define VSID_ALL 0 238c60b9fbSAlexander Graf #define SR_INVALID 0x00000001 /* VSID 1 should always be unused */ 248c60b9fbSAlexander Graf #define SR_KP 0x20000000 258c60b9fbSAlexander Graf #define PTE_V 0x80000000 268c60b9fbSAlexander Graf #define PTE_SEC 0x00000040 278c60b9fbSAlexander Graf #define PTE_M 0x00000010 288c60b9fbSAlexander Graf #define PTE_R 0x00000100 298c60b9fbSAlexander Graf #define PTE_C 0x00000080 308c60b9fbSAlexander Graf 318c60b9fbSAlexander Graf #define SID_SHIFT 28 328c60b9fbSAlexander Graf #define ESID_MASK 0xf0000000 338c60b9fbSAlexander Graf #define VSID_MASK 0x00fffffff0000000ULL 34ce236ab5SAneesh Kumar K.V #define VPN_SHIFT 12 358c60b9fbSAlexander Graf 368c60b9fbSAlexander Graf #endif /* __ASM_KVM_BOOK3S_32_H__ */ 37