18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright SUSE Linux Products GmbH 2010 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Authors: Alexander Graf <agraf@suse.de> 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef __ASM_KVM_BOOK3S_32_H__ 108c2ecf20Sopenharmony_ci#define __ASM_KVM_BOOK3S_32_H__ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_cistatic inline struct kvmppc_book3s_shadow_vcpu *svcpu_get(struct kvm_vcpu *vcpu) 138c2ecf20Sopenharmony_ci{ 148c2ecf20Sopenharmony_ci return vcpu->arch.shadow_vcpu; 158c2ecf20Sopenharmony_ci} 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_cistatic inline void svcpu_put(struct kvmppc_book3s_shadow_vcpu *svcpu) 188c2ecf20Sopenharmony_ci{ 198c2ecf20Sopenharmony_ci} 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define PTE_SIZE 12 228c2ecf20Sopenharmony_ci#define VSID_ALL 0 238c2ecf20Sopenharmony_ci#define SR_INVALID 0x00000001 /* VSID 1 should always be unused */ 248c2ecf20Sopenharmony_ci#define SR_KP 0x20000000 258c2ecf20Sopenharmony_ci#define PTE_V 0x80000000 268c2ecf20Sopenharmony_ci#define PTE_SEC 0x00000040 278c2ecf20Sopenharmony_ci#define PTE_M 0x00000010 288c2ecf20Sopenharmony_ci#define PTE_R 0x00000100 298c2ecf20Sopenharmony_ci#define PTE_C 0x00000080 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#define SID_SHIFT 28 328c2ecf20Sopenharmony_ci#define ESID_MASK 0xf0000000 338c2ecf20Sopenharmony_ci#define VSID_MASK 0x00fffffff0000000ULL 348c2ecf20Sopenharmony_ci#define VPN_SHIFT 12 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#endif /* __ASM_KVM_BOOK3S_32_H__ */ 37