~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/powerpc/include/uapi/asm/kvm_para.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 /*
  3  * This program is free software; you can redistribute it and/or modify
  4  * it under the terms of the GNU General Public License, version 2, as
  5  * published by the Free Software Foundation.
  6  *
  7  * This program is distributed in the hope that it will be useful,
  8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 10  * GNU General Public License for more details.
 11  *
 12  * You should have received a copy of the GNU General Public License
 13  * along with this program; if not, write to the Free Software
 14  * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 15  *
 16  * Copyright IBM Corp. 2008
 17  *
 18  * Authors: Hollis Blanchard <hollisb@us.ibm.com>
 19  */
 20 
 21 #ifndef _UAPI__POWERPC_KVM_PARA_H__
 22 #define _UAPI__POWERPC_KVM_PARA_H__
 23 
 24 #include <linux/types.h>
 25 
 26 /*
 27  * Additions to this struct must only occur at the end, and should be
 28  * accompanied by a KVM_MAGIC_FEAT flag to advertise that they are present
 29  * (albeit not necessarily relevant to the current target hardware platform).
 30  *
 31  * Struct fields are always 32 or 64 bit aligned, depending on them being 32
 32  * or 64 bit wide respectively.
 33  *
 34  * See Documentation/virt/kvm/ppc-pv.rst
 35  */
 36 struct kvm_vcpu_arch_shared {
 37         __u64 scratch1;
 38         __u64 scratch2;
 39         __u64 scratch3;
 40         __u64 critical;         /* Guest may not get interrupts if == r1 */
 41         __u64 sprg0;
 42         __u64 sprg1;
 43         __u64 sprg2;
 44         __u64 sprg3;
 45         __u64 srr0;
 46         __u64 srr1;
 47         __u64 dar;              /* dear on BookE */
 48         __u64 msr;
 49         __u32 dsisr;
 50         __u32 int_pending;      /* Tells the guest if we have an interrupt */
 51         __u32 sr[16];
 52         __u32 mas0;
 53         __u32 mas1;
 54         __u64 mas7_3;
 55         __u64 mas2;
 56         __u32 mas4;
 57         __u32 mas6;
 58         __u32 esr;
 59         __u32 pir;
 60 
 61         /*
 62          * SPRG4-7 are user-readable, so we can only keep these consistent
 63          * between the shared area and the real registers when there's an
 64          * intervening exit to KVM.  This also applies to SPRG3 on some
 65          * chips.
 66          *
 67          * This suffices for access by guest userspace, since in PR-mode
 68          * KVM, an exit must occur when changing the guest's MSR[PR].
 69          * If the guest kernel writes to SPRG3-7 via the shared area, it
 70          * must also use the shared area for reading while in kernel space.
 71          */
 72         __u64 sprg4;
 73         __u64 sprg5;
 74         __u64 sprg6;
 75         __u64 sprg7;
 76 };
 77 
 78 #define KVM_SC_MAGIC_R0         0x4b564d21 /* "KVM!" */
 79 
 80 #define KVM_HCALL_TOKEN(num)     _EV_HCALL_TOKEN(EV_KVM_VENDOR_ID, num)
 81 
 82 #include <asm/epapr_hcalls.h>
 83 
 84 #define KVM_FEATURE_MAGIC_PAGE  1
 85 
 86 /* Magic page flags from host to guest */
 87 
 88 #define KVM_MAGIC_FEAT_SR               (1 << 0)
 89 
 90 /* MASn, ESR, PIR, and high SPRGs */
 91 #define KVM_MAGIC_FEAT_MAS0_TO_SPRG7    (1 << 1)
 92 
 93 /* Magic page flags from guest to host */
 94 
 95 #define MAGIC_PAGE_FLAG_NOT_MAPPED_NX   (1 << 0)
 96 
 97 
 98 #endif /* _UAPI__POWERPC_KVM_PARA_H__ */
 99 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php