1*60021220SAndre Przywara /* 2*60021220SAndre Przywara * This program is free software; you can redistribute it and/or modify 3*60021220SAndre Przywara * it under the terms of the GNU General Public License, version 2, as 4*60021220SAndre Przywara * published by the Free Software Foundation. 5*60021220SAndre Przywara * 6*60021220SAndre Przywara * This program is distributed in the hope that it will be useful, 7*60021220SAndre Przywara * but WITHOUT ANY WARRANTY; without even the implied warranty of 8*60021220SAndre Przywara * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9*60021220SAndre Przywara * GNU General Public License for more details. 10*60021220SAndre Przywara * 11*60021220SAndre Przywara * You should have received a copy of the GNU General Public License 12*60021220SAndre Przywara * along with this program; if not, write to the Free Software 13*60021220SAndre Przywara * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 14*60021220SAndre Przywara * 15*60021220SAndre Przywara * Copyright IBM Corp. 2007 16*60021220SAndre Przywara * 17*60021220SAndre Przywara * Authors: Hollis Blanchard <hollisb@us.ibm.com> 18*60021220SAndre Przywara */ 19*60021220SAndre Przywara 20*60021220SAndre Przywara #ifndef __LINUX_KVM_POWERPC_H 21*60021220SAndre Przywara #define __LINUX_KVM_POWERPC_H 22*60021220SAndre Przywara 23*60021220SAndre Przywara #include <linux/types.h> 24*60021220SAndre Przywara 25*60021220SAndre Przywara /* Select powerpc specific features in <linux/kvm.h> */ 26*60021220SAndre Przywara #define __KVM_HAVE_SPAPR_TCE 27*60021220SAndre Przywara #define __KVM_HAVE_PPC_SMT 28*60021220SAndre Przywara #define __KVM_HAVE_IRQCHIP 29*60021220SAndre Przywara #define __KVM_HAVE_IRQ_LINE 30*60021220SAndre Przywara #define __KVM_HAVE_GUEST_DEBUG 31*60021220SAndre Przywara 32*60021220SAndre Przywara struct kvm_regs { 33*60021220SAndre Przywara __u64 pc; 34*60021220SAndre Przywara __u64 cr; 35*60021220SAndre Przywara __u64 ctr; 36*60021220SAndre Przywara __u64 lr; 37*60021220SAndre Przywara __u64 xer; 38*60021220SAndre Przywara __u64 msr; 39*60021220SAndre Przywara __u64 srr0; 40*60021220SAndre Przywara __u64 srr1; 41*60021220SAndre Przywara __u64 pid; 42*60021220SAndre Przywara 43*60021220SAndre Przywara __u64 sprg0; 44*60021220SAndre Przywara __u64 sprg1; 45*60021220SAndre Przywara __u64 sprg2; 46*60021220SAndre Przywara __u64 sprg3; 47*60021220SAndre Przywara __u64 sprg4; 48*60021220SAndre Przywara __u64 sprg5; 49*60021220SAndre Przywara __u64 sprg6; 50*60021220SAndre Przywara __u64 sprg7; 51*60021220SAndre Przywara 52*60021220SAndre Przywara __u64 gpr[32]; 53*60021220SAndre Przywara }; 54*60021220SAndre Przywara 55*60021220SAndre Przywara #define KVM_SREGS_E_IMPL_NONE 0 56*60021220SAndre Przywara #define KVM_SREGS_E_IMPL_FSL 1 57*60021220SAndre Przywara 58*60021220SAndre Przywara #define KVM_SREGS_E_FSL_PIDn (1 << 0) /* PID1/PID2 */ 59*60021220SAndre Przywara 60*60021220SAndre Przywara /* 61*60021220SAndre Przywara * Feature bits indicate which sections of the sregs struct are valid, 62*60021220SAndre Przywara * both in KVM_GET_SREGS and KVM_SET_SREGS. On KVM_SET_SREGS, registers 63*60021220SAndre Przywara * corresponding to unset feature bits will not be modified. This allows 64*60021220SAndre Przywara * restoring a checkpoint made without that feature, while keeping the 65*60021220SAndre Przywara * default values of the new registers. 66*60021220SAndre Przywara * 67*60021220SAndre Przywara * KVM_SREGS_E_BASE contains: 68*60021220SAndre Przywara * CSRR0/1 (refers to SRR2/3 on 40x) 69*60021220SAndre Przywara * ESR 70*60021220SAndre Przywara * DEAR 71*60021220SAndre Przywara * MCSR 72*60021220SAndre Przywara * TSR 73*60021220SAndre Przywara * TCR 74*60021220SAndre Przywara * DEC 75*60021220SAndre Przywara * TB 76*60021220SAndre Przywara * VRSAVE (USPRG0) 77*60021220SAndre Przywara */ 78*60021220SAndre Przywara #define KVM_SREGS_E_BASE (1 << 0) 79*60021220SAndre Przywara 80*60021220SAndre Przywara /* 81*60021220SAndre Przywara * KVM_SREGS_E_ARCH206 contains: 82*60021220SAndre Przywara * 83*60021220SAndre Przywara * PIR 84*60021220SAndre Przywara * MCSRR0/1 85*60021220SAndre Przywara * DECAR 86*60021220SAndre Przywara * IVPR 87*60021220SAndre Przywara */ 88*60021220SAndre Przywara #define KVM_SREGS_E_ARCH206 (1 << 1) 89*60021220SAndre Przywara 90*60021220SAndre Przywara /* 91*60021220SAndre Przywara * Contains EPCR, plus the upper half of 64-bit registers 92*60021220SAndre Przywara * that are 32-bit on 32-bit implementations. 93*60021220SAndre Przywara */ 94*60021220SAndre Przywara #define KVM_SREGS_E_64 (1 << 2) 95*60021220SAndre Przywara 96*60021220SAndre Przywara #define KVM_SREGS_E_SPRG8 (1 << 3) 97*60021220SAndre Przywara #define KVM_SREGS_E_MCIVPR (1 << 4) 98*60021220SAndre Przywara 99*60021220SAndre Przywara /* 100*60021220SAndre Przywara * IVORs are used -- contains IVOR0-15, plus additional IVORs 101*60021220SAndre Przywara * in combination with an appropriate feature bit. 102*60021220SAndre Przywara */ 103*60021220SAndre Przywara #define KVM_SREGS_E_IVOR (1 << 5) 104*60021220SAndre Przywara 105*60021220SAndre Przywara /* 106*60021220SAndre Przywara * Contains MAS0-4, MAS6-7, TLBnCFG, MMUCFG. 107*60021220SAndre Przywara * Also TLBnPS if MMUCFG[MAVN] = 1. 108*60021220SAndre Przywara */ 109*60021220SAndre Przywara #define KVM_SREGS_E_ARCH206_MMU (1 << 6) 110*60021220SAndre Przywara 111*60021220SAndre Przywara /* DBSR, DBCR, IAC, DAC, DVC */ 112*60021220SAndre Przywara #define KVM_SREGS_E_DEBUG (1 << 7) 113*60021220SAndre Przywara 114*60021220SAndre Przywara /* Enhanced debug -- DSRR0/1, SPRG9 */ 115*60021220SAndre Przywara #define KVM_SREGS_E_ED (1 << 8) 116*60021220SAndre Przywara 117*60021220SAndre Przywara /* Embedded Floating Point (SPE) -- IVOR32-34 if KVM_SREGS_E_IVOR */ 118*60021220SAndre Przywara #define KVM_SREGS_E_SPE (1 << 9) 119*60021220SAndre Przywara 120*60021220SAndre Przywara /* 121*60021220SAndre Przywara * DEPRECATED! USE ONE_REG FOR THIS ONE! 122*60021220SAndre Przywara * External Proxy (EXP) -- EPR 123*60021220SAndre Przywara */ 124*60021220SAndre Przywara #define KVM_SREGS_EXP (1 << 10) 125*60021220SAndre Przywara 126*60021220SAndre Przywara /* External PID (E.PD) -- EPSC/EPLC */ 127*60021220SAndre Przywara #define KVM_SREGS_E_PD (1 << 11) 128*60021220SAndre Przywara 129*60021220SAndre Przywara /* Processor Control (E.PC) -- IVOR36-37 if KVM_SREGS_E_IVOR */ 130*60021220SAndre Przywara #define KVM_SREGS_E_PC (1 << 12) 131*60021220SAndre Przywara 132*60021220SAndre Przywara /* Page table (E.PT) -- EPTCFG */ 133*60021220SAndre Przywara #define KVM_SREGS_E_PT (1 << 13) 134*60021220SAndre Przywara 135*60021220SAndre Przywara /* Embedded Performance Monitor (E.PM) -- IVOR35 if KVM_SREGS_E_IVOR */ 136*60021220SAndre Przywara #define KVM_SREGS_E_PM (1 << 14) 137*60021220SAndre Przywara 138*60021220SAndre Przywara /* 139*60021220SAndre Przywara * Special updates: 140*60021220SAndre Przywara * 141*60021220SAndre Przywara * Some registers may change even while a vcpu is not running. 142*60021220SAndre Przywara * To avoid losing these changes, by default these registers are 143*60021220SAndre Przywara * not updated by KVM_SET_SREGS. To force an update, set the bit 144*60021220SAndre Przywara * in u.e.update_special corresponding to the register to be updated. 145*60021220SAndre Przywara * 146*60021220SAndre Przywara * The update_special field is zero on return from KVM_GET_SREGS. 147*60021220SAndre Przywara * 148*60021220SAndre Przywara * When restoring a checkpoint, the caller can set update_special 149*60021220SAndre Przywara * to 0xffffffff to ensure that everything is restored, even new features 150*60021220SAndre Przywara * that the caller doesn't know about. 151*60021220SAndre Przywara */ 152*60021220SAndre Przywara #define KVM_SREGS_E_UPDATE_MCSR (1 << 0) 153*60021220SAndre Przywara #define KVM_SREGS_E_UPDATE_TSR (1 << 1) 154*60021220SAndre Przywara #define KVM_SREGS_E_UPDATE_DEC (1 << 2) 155*60021220SAndre Przywara #define KVM_SREGS_E_UPDATE_DBSR (1 << 3) 156*60021220SAndre Przywara 157*60021220SAndre Przywara /* 158*60021220SAndre Przywara * In KVM_SET_SREGS, reserved/pad fields must be left untouched from a 159*60021220SAndre Przywara * previous KVM_GET_REGS. 160*60021220SAndre Przywara * 161*60021220SAndre Przywara * Unless otherwise indicated, setting any register with KVM_SET_SREGS 162*60021220SAndre Przywara * directly sets its value. It does not trigger any special semantics such 163*60021220SAndre Przywara * as write-one-to-clear. Calling KVM_SET_SREGS on an unmodified struct 164*60021220SAndre Przywara * just received from KVM_GET_SREGS is always a no-op. 165*60021220SAndre Przywara */ 166*60021220SAndre Przywara struct kvm_sregs { 167*60021220SAndre Przywara __u32 pvr; 168*60021220SAndre Przywara union { 169*60021220SAndre Przywara struct { 170*60021220SAndre Przywara __u64 sdr1; 171*60021220SAndre Przywara struct { 172*60021220SAndre Przywara struct { 173*60021220SAndre Przywara __u64 slbe; 174*60021220SAndre Przywara __u64 slbv; 175*60021220SAndre Przywara } slb[64]; 176*60021220SAndre Przywara } ppc64; 177*60021220SAndre Przywara struct { 178*60021220SAndre Przywara __u32 sr[16]; 179*60021220SAndre Przywara __u64 ibat[8]; 180*60021220SAndre Przywara __u64 dbat[8]; 181*60021220SAndre Przywara } ppc32; 182*60021220SAndre Przywara } s; 183*60021220SAndre Przywara struct { 184*60021220SAndre Przywara union { 185*60021220SAndre Przywara struct { /* KVM_SREGS_E_IMPL_FSL */ 186*60021220SAndre Przywara __u32 features; /* KVM_SREGS_E_FSL_ */ 187*60021220SAndre Przywara __u32 svr; 188*60021220SAndre Przywara __u64 mcar; 189*60021220SAndre Przywara __u32 hid0; 190*60021220SAndre Przywara 191*60021220SAndre Przywara /* KVM_SREGS_E_FSL_PIDn */ 192*60021220SAndre Przywara __u32 pid1, pid2; 193*60021220SAndre Przywara } fsl; 194*60021220SAndre Przywara __u8 pad[256]; 195*60021220SAndre Przywara } impl; 196*60021220SAndre Przywara 197*60021220SAndre Przywara __u32 features; /* KVM_SREGS_E_ */ 198*60021220SAndre Przywara __u32 impl_id; /* KVM_SREGS_E_IMPL_ */ 199*60021220SAndre Przywara __u32 update_special; /* KVM_SREGS_E_UPDATE_ */ 200*60021220SAndre Przywara __u32 pir; /* read-only */ 201*60021220SAndre Przywara __u64 sprg8; 202*60021220SAndre Przywara __u64 sprg9; /* E.ED */ 203*60021220SAndre Przywara __u64 csrr0; 204*60021220SAndre Przywara __u64 dsrr0; /* E.ED */ 205*60021220SAndre Przywara __u64 mcsrr0; 206*60021220SAndre Przywara __u32 csrr1; 207*60021220SAndre Przywara __u32 dsrr1; /* E.ED */ 208*60021220SAndre Przywara __u32 mcsrr1; 209*60021220SAndre Przywara __u32 esr; 210*60021220SAndre Przywara __u64 dear; 211*60021220SAndre Przywara __u64 ivpr; 212*60021220SAndre Przywara __u64 mcivpr; 213*60021220SAndre Przywara __u64 mcsr; /* KVM_SREGS_E_UPDATE_MCSR */ 214*60021220SAndre Przywara 215*60021220SAndre Przywara __u32 tsr; /* KVM_SREGS_E_UPDATE_TSR */ 216*60021220SAndre Przywara __u32 tcr; 217*60021220SAndre Przywara __u32 decar; 218*60021220SAndre Przywara __u32 dec; /* KVM_SREGS_E_UPDATE_DEC */ 219*60021220SAndre Przywara 220*60021220SAndre Przywara /* 221*60021220SAndre Przywara * Userspace can read TB directly, but the 222*60021220SAndre Przywara * value reported here is consistent with "dec". 223*60021220SAndre Przywara * 224*60021220SAndre Przywara * Read-only. 225*60021220SAndre Przywara */ 226*60021220SAndre Przywara __u64 tb; 227*60021220SAndre Przywara 228*60021220SAndre Przywara __u32 dbsr; /* KVM_SREGS_E_UPDATE_DBSR */ 229*60021220SAndre Przywara __u32 dbcr[3]; 230*60021220SAndre Przywara /* 231*60021220SAndre Przywara * iac/dac registers are 64bit wide, while this API 232*60021220SAndre Przywara * interface provides only lower 32 bits on 64 bit 233*60021220SAndre Przywara * processors. ONE_REG interface is added for 64bit 234*60021220SAndre Przywara * iac/dac registers. 235*60021220SAndre Przywara */ 236*60021220SAndre Przywara __u32 iac[4]; 237*60021220SAndre Przywara __u32 dac[2]; 238*60021220SAndre Przywara __u32 dvc[2]; 239*60021220SAndre Przywara __u8 num_iac; /* read-only */ 240*60021220SAndre Przywara __u8 num_dac; /* read-only */ 241*60021220SAndre Przywara __u8 num_dvc; /* read-only */ 242*60021220SAndre Przywara __u8 pad; 243*60021220SAndre Przywara 244*60021220SAndre Przywara __u32 epr; /* EXP */ 245*60021220SAndre Przywara __u32 vrsave; /* a.k.a. USPRG0 */ 246*60021220SAndre Przywara __u32 epcr; /* KVM_SREGS_E_64 */ 247*60021220SAndre Przywara 248*60021220SAndre Przywara __u32 mas0; 249*60021220SAndre Przywara __u32 mas1; 250*60021220SAndre Przywara __u64 mas2; 251*60021220SAndre Przywara __u64 mas7_3; 252*60021220SAndre Przywara __u32 mas4; 253*60021220SAndre Przywara __u32 mas6; 254*60021220SAndre Przywara 255*60021220SAndre Przywara __u32 ivor_low[16]; /* IVOR0-15 */ 256*60021220SAndre Przywara __u32 ivor_high[18]; /* IVOR32+, plus room to expand */ 257*60021220SAndre Przywara 258*60021220SAndre Przywara __u32 mmucfg; /* read-only */ 259*60021220SAndre Przywara __u32 eptcfg; /* E.PT, read-only */ 260*60021220SAndre Przywara __u32 tlbcfg[4];/* read-only */ 261*60021220SAndre Przywara __u32 tlbps[4]; /* read-only */ 262*60021220SAndre Przywara 263*60021220SAndre Przywara __u32 eplc, epsc; /* E.PD */ 264*60021220SAndre Przywara } e; 265*60021220SAndre Przywara __u8 pad[1020]; 266*60021220SAndre Przywara } u; 267*60021220SAndre Przywara }; 268*60021220SAndre Przywara 269*60021220SAndre Przywara struct kvm_fpu { 270*60021220SAndre Przywara __u64 fpr[32]; 271*60021220SAndre Przywara }; 272*60021220SAndre Przywara 273*60021220SAndre Przywara /* 274*60021220SAndre Przywara * Defines for h/w breakpoint, watchpoint (read, write or both) and 275*60021220SAndre Przywara * software breakpoint. 276*60021220SAndre Przywara * These are used as "type" in KVM_SET_GUEST_DEBUG ioctl and "status" 277*60021220SAndre Przywara * for KVM_DEBUG_EXIT. 278*60021220SAndre Przywara */ 279*60021220SAndre Przywara #define KVMPPC_DEBUG_NONE 0x0 280*60021220SAndre Przywara #define KVMPPC_DEBUG_BREAKPOINT (1UL << 1) 281*60021220SAndre Przywara #define KVMPPC_DEBUG_WATCH_WRITE (1UL << 2) 282*60021220SAndre Przywara #define KVMPPC_DEBUG_WATCH_READ (1UL << 3) 283*60021220SAndre Przywara struct kvm_debug_exit_arch { 284*60021220SAndre Przywara __u64 address; 285*60021220SAndre Przywara /* 286*60021220SAndre Przywara * exiting to userspace because of h/w breakpoint, watchpoint 287*60021220SAndre Przywara * (read, write or both) and software breakpoint. 288*60021220SAndre Przywara */ 289*60021220SAndre Przywara __u32 status; 290*60021220SAndre Przywara __u32 reserved; 291*60021220SAndre Przywara }; 292*60021220SAndre Przywara 293*60021220SAndre Przywara /* for KVM_SET_GUEST_DEBUG */ 294*60021220SAndre Przywara struct kvm_guest_debug_arch { 295*60021220SAndre Przywara struct { 296*60021220SAndre Przywara /* H/W breakpoint/watchpoint address */ 297*60021220SAndre Przywara __u64 addr; 298*60021220SAndre Przywara /* 299*60021220SAndre Przywara * Type denotes h/w breakpoint, read watchpoint, write 300*60021220SAndre Przywara * watchpoint or watchpoint (both read and write). 301*60021220SAndre Przywara */ 302*60021220SAndre Przywara __u32 type; 303*60021220SAndre Przywara __u32 reserved; 304*60021220SAndre Przywara } bp[16]; 305*60021220SAndre Przywara }; 306*60021220SAndre Przywara 307*60021220SAndre Przywara /* Debug related defines */ 308*60021220SAndre Przywara /* 309*60021220SAndre Przywara * kvm_guest_debug->control is a 32 bit field. The lower 16 bits are generic 310*60021220SAndre Przywara * and upper 16 bits are architecture specific. Architecture specific defines 311*60021220SAndre Przywara * that ioctl is for setting hardware breakpoint or software breakpoint. 312*60021220SAndre Przywara */ 313*60021220SAndre Przywara #define KVM_GUESTDBG_USE_SW_BP 0x00010000 314*60021220SAndre Przywara #define KVM_GUESTDBG_USE_HW_BP 0x00020000 315*60021220SAndre Przywara 316*60021220SAndre Przywara /* definition of registers in kvm_run */ 317*60021220SAndre Przywara struct kvm_sync_regs { 318*60021220SAndre Przywara }; 319*60021220SAndre Przywara 320*60021220SAndre Przywara #define KVM_INTERRUPT_SET -1U 321*60021220SAndre Przywara #define KVM_INTERRUPT_UNSET -2U 322*60021220SAndre Przywara #define KVM_INTERRUPT_SET_LEVEL -3U 323*60021220SAndre Przywara 324*60021220SAndre Przywara #define KVM_CPU_440 1 325*60021220SAndre Przywara #define KVM_CPU_E500V2 2 326*60021220SAndre Przywara #define KVM_CPU_3S_32 3 327*60021220SAndre Przywara #define KVM_CPU_3S_64 4 328*60021220SAndre Przywara #define KVM_CPU_E500MC 5 329*60021220SAndre Przywara 330*60021220SAndre Przywara /* for KVM_CAP_SPAPR_TCE */ 331*60021220SAndre Przywara struct kvm_create_spapr_tce { 332*60021220SAndre Przywara __u64 liobn; 333*60021220SAndre Przywara __u32 window_size; 334*60021220SAndre Przywara }; 335*60021220SAndre Przywara 336*60021220SAndre Przywara /* for KVM_ALLOCATE_RMA */ 337*60021220SAndre Przywara struct kvm_allocate_rma { 338*60021220SAndre Przywara __u64 rma_size; 339*60021220SAndre Przywara }; 340*60021220SAndre Przywara 341*60021220SAndre Przywara /* for KVM_CAP_PPC_RTAS */ 342*60021220SAndre Przywara struct kvm_rtas_token_args { 343*60021220SAndre Przywara char name[120]; 344*60021220SAndre Przywara __u64 token; /* Use a token of 0 to undefine a mapping */ 345*60021220SAndre Przywara }; 346*60021220SAndre Przywara 347*60021220SAndre Przywara struct kvm_book3e_206_tlb_entry { 348*60021220SAndre Przywara __u32 mas8; 349*60021220SAndre Przywara __u32 mas1; 350*60021220SAndre Przywara __u64 mas2; 351*60021220SAndre Przywara __u64 mas7_3; 352*60021220SAndre Przywara }; 353*60021220SAndre Przywara 354*60021220SAndre Przywara struct kvm_book3e_206_tlb_params { 355*60021220SAndre Przywara /* 356*60021220SAndre Przywara * For mmu types KVM_MMU_FSL_BOOKE_NOHV and KVM_MMU_FSL_BOOKE_HV: 357*60021220SAndre Przywara * 358*60021220SAndre Przywara * - The number of ways of TLB0 must be a power of two between 2 and 359*60021220SAndre Przywara * 16. 360*60021220SAndre Przywara * - TLB1 must be fully associative. 361*60021220SAndre Przywara * - The size of TLB0 must be a multiple of the number of ways, and 362*60021220SAndre Przywara * the number of sets must be a power of two. 363*60021220SAndre Przywara * - The size of TLB1 may not exceed 64 entries. 364*60021220SAndre Przywara * - TLB0 supports 4 KiB pages. 365*60021220SAndre Przywara * - The page sizes supported by TLB1 are as indicated by 366*60021220SAndre Przywara * TLB1CFG (if MMUCFG[MAVN] = 0) or TLB1PS (if MMUCFG[MAVN] = 1) 367*60021220SAndre Przywara * as returned by KVM_GET_SREGS. 368*60021220SAndre Przywara * - TLB2 and TLB3 are reserved, and their entries in tlb_sizes[] 369*60021220SAndre Przywara * and tlb_ways[] must be zero. 370*60021220SAndre Przywara * 371*60021220SAndre Przywara * tlb_ways[n] = tlb_sizes[n] means the array is fully associative. 372*60021220SAndre Przywara * 373*60021220SAndre Przywara * KVM will adjust TLBnCFG based on the sizes configured here, 374*60021220SAndre Przywara * though arrays greater than 2048 entries will have TLBnCFG[NENTRY] 375*60021220SAndre Przywara * set to zero. 376*60021220SAndre Przywara */ 377*60021220SAndre Przywara __u32 tlb_sizes[4]; 378*60021220SAndre Przywara __u32 tlb_ways[4]; 379*60021220SAndre Przywara __u32 reserved[8]; 380*60021220SAndre Przywara }; 381*60021220SAndre Przywara 382*60021220SAndre Przywara /* For KVM_PPC_GET_HTAB_FD */ 383*60021220SAndre Przywara struct kvm_get_htab_fd { 384*60021220SAndre Przywara __u64 flags; 385*60021220SAndre Przywara __u64 start_index; 386*60021220SAndre Przywara __u64 reserved[2]; 387*60021220SAndre Przywara }; 388*60021220SAndre Przywara 389*60021220SAndre Przywara /* Values for kvm_get_htab_fd.flags */ 390*60021220SAndre Przywara #define KVM_GET_HTAB_BOLTED_ONLY ((__u64)0x1) 391*60021220SAndre Przywara #define KVM_GET_HTAB_WRITE ((__u64)0x2) 392*60021220SAndre Przywara 393*60021220SAndre Przywara /* 394*60021220SAndre Przywara * Data read on the file descriptor is formatted as a series of 395*60021220SAndre Przywara * records, each consisting of a header followed by a series of 396*60021220SAndre Przywara * `n_valid' HPTEs (16 bytes each), which are all valid. Following 397*60021220SAndre Przywara * those valid HPTEs there are `n_invalid' invalid HPTEs, which 398*60021220SAndre Przywara * are not represented explicitly in the stream. The same format 399*60021220SAndre Przywara * is used for writing. 400*60021220SAndre Przywara */ 401*60021220SAndre Przywara struct kvm_get_htab_header { 402*60021220SAndre Przywara __u32 index; 403*60021220SAndre Przywara __u16 n_valid; 404*60021220SAndre Przywara __u16 n_invalid; 405*60021220SAndre Przywara }; 406*60021220SAndre Przywara 407*60021220SAndre Przywara /* Per-vcpu XICS interrupt controller state */ 408*60021220SAndre Przywara #define KVM_REG_PPC_ICP_STATE (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8c) 409*60021220SAndre Przywara 410*60021220SAndre Przywara #define KVM_REG_PPC_ICP_CPPR_SHIFT 56 /* current proc priority */ 411*60021220SAndre Przywara #define KVM_REG_PPC_ICP_CPPR_MASK 0xff 412*60021220SAndre Przywara #define KVM_REG_PPC_ICP_XISR_SHIFT 32 /* interrupt status field */ 413*60021220SAndre Przywara #define KVM_REG_PPC_ICP_XISR_MASK 0xffffff 414*60021220SAndre Przywara #define KVM_REG_PPC_ICP_MFRR_SHIFT 24 /* pending IPI priority */ 415*60021220SAndre Przywara #define KVM_REG_PPC_ICP_MFRR_MASK 0xff 416*60021220SAndre Przywara #define KVM_REG_PPC_ICP_PPRI_SHIFT 16 /* pending irq priority */ 417*60021220SAndre Przywara #define KVM_REG_PPC_ICP_PPRI_MASK 0xff 418*60021220SAndre Przywara 419*60021220SAndre Przywara /* Device control API: PPC-specific devices */ 420*60021220SAndre Przywara #define KVM_DEV_MPIC_GRP_MISC 1 421*60021220SAndre Przywara #define KVM_DEV_MPIC_BASE_ADDR 0 /* 64-bit */ 422*60021220SAndre Przywara 423*60021220SAndre Przywara #define KVM_DEV_MPIC_GRP_REGISTER 2 /* 32-bit */ 424*60021220SAndre Przywara #define KVM_DEV_MPIC_GRP_IRQ_ACTIVE 3 /* 32-bit */ 425*60021220SAndre Przywara 426*60021220SAndre Przywara /* One-Reg API: PPC-specific registers */ 427*60021220SAndre Przywara #define KVM_REG_PPC_HIOR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x1) 428*60021220SAndre Przywara #define KVM_REG_PPC_IAC1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x2) 429*60021220SAndre Przywara #define KVM_REG_PPC_IAC2 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x3) 430*60021220SAndre Przywara #define KVM_REG_PPC_IAC3 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x4) 431*60021220SAndre Przywara #define KVM_REG_PPC_IAC4 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x5) 432*60021220SAndre Przywara #define KVM_REG_PPC_DAC1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x6) 433*60021220SAndre Przywara #define KVM_REG_PPC_DAC2 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x7) 434*60021220SAndre Przywara #define KVM_REG_PPC_DABR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8) 435*60021220SAndre Przywara #define KVM_REG_PPC_DSCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x9) 436*60021220SAndre Przywara #define KVM_REG_PPC_PURR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xa) 437*60021220SAndre Przywara #define KVM_REG_PPC_SPURR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb) 438*60021220SAndre Przywara #define KVM_REG_PPC_DAR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc) 439*60021220SAndre Przywara #define KVM_REG_PPC_DSISR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xd) 440*60021220SAndre Przywara #define KVM_REG_PPC_AMR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xe) 441*60021220SAndre Przywara #define KVM_REG_PPC_UAMOR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xf) 442*60021220SAndre Przywara 443*60021220SAndre Przywara #define KVM_REG_PPC_MMCR0 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x10) 444*60021220SAndre Przywara #define KVM_REG_PPC_MMCR1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x11) 445*60021220SAndre Przywara #define KVM_REG_PPC_MMCRA (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x12) 446*60021220SAndre Przywara #define KVM_REG_PPC_MMCR2 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x13) 447*60021220SAndre Przywara #define KVM_REG_PPC_MMCRS (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x14) 448*60021220SAndre Przywara #define KVM_REG_PPC_SIAR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x15) 449*60021220SAndre Przywara #define KVM_REG_PPC_SDAR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x16) 450*60021220SAndre Przywara #define KVM_REG_PPC_SIER (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x17) 451*60021220SAndre Przywara 452*60021220SAndre Przywara #define KVM_REG_PPC_PMC1 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x18) 453*60021220SAndre Przywara #define KVM_REG_PPC_PMC2 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x19) 454*60021220SAndre Przywara #define KVM_REG_PPC_PMC3 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x1a) 455*60021220SAndre Przywara #define KVM_REG_PPC_PMC4 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x1b) 456*60021220SAndre Przywara #define KVM_REG_PPC_PMC5 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x1c) 457*60021220SAndre Przywara #define KVM_REG_PPC_PMC6 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x1d) 458*60021220SAndre Przywara #define KVM_REG_PPC_PMC7 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x1e) 459*60021220SAndre Przywara #define KVM_REG_PPC_PMC8 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x1f) 460*60021220SAndre Przywara 461*60021220SAndre Przywara /* 32 floating-point registers */ 462*60021220SAndre Przywara #define KVM_REG_PPC_FPR0 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x20) 463*60021220SAndre Przywara #define KVM_REG_PPC_FPR(n) (KVM_REG_PPC_FPR0 + (n)) 464*60021220SAndre Przywara #define KVM_REG_PPC_FPR31 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x3f) 465*60021220SAndre Przywara 466*60021220SAndre Przywara /* 32 VMX/Altivec vector registers */ 467*60021220SAndre Przywara #define KVM_REG_PPC_VR0 (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x40) 468*60021220SAndre Przywara #define KVM_REG_PPC_VR(n) (KVM_REG_PPC_VR0 + (n)) 469*60021220SAndre Przywara #define KVM_REG_PPC_VR31 (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x5f) 470*60021220SAndre Przywara 471*60021220SAndre Przywara /* 32 double-width FP registers for VSX */ 472*60021220SAndre Przywara /* High-order halves overlap with FP regs */ 473*60021220SAndre Przywara #define KVM_REG_PPC_VSR0 (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x60) 474*60021220SAndre Przywara #define KVM_REG_PPC_VSR(n) (KVM_REG_PPC_VSR0 + (n)) 475*60021220SAndre Przywara #define KVM_REG_PPC_VSR31 (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x7f) 476*60021220SAndre Przywara 477*60021220SAndre Przywara /* FP and vector status/control registers */ 478*60021220SAndre Przywara #define KVM_REG_PPC_FPSCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x80) 479*60021220SAndre Przywara /* 480*60021220SAndre Przywara * VSCR register is documented as a 32-bit register in the ISA, but it can 481*60021220SAndre Przywara * only be accesses via a vector register. Expose VSCR as a 32-bit register 482*60021220SAndre Przywara * even though the kernel represents it as a 128-bit vector. 483*60021220SAndre Przywara */ 484*60021220SAndre Przywara #define KVM_REG_PPC_VSCR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x81) 485*60021220SAndre Przywara 486*60021220SAndre Przywara /* Virtual processor areas */ 487*60021220SAndre Przywara /* For SLB & DTL, address in high (first) half, length in low half */ 488*60021220SAndre Przywara #define KVM_REG_PPC_VPA_ADDR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x82) 489*60021220SAndre Przywara #define KVM_REG_PPC_VPA_SLB (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x83) 490*60021220SAndre Przywara #define KVM_REG_PPC_VPA_DTL (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x84) 491*60021220SAndre Przywara 492*60021220SAndre Przywara #define KVM_REG_PPC_EPCR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x85) 493*60021220SAndre Przywara #define KVM_REG_PPC_EPR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x86) 494*60021220SAndre Przywara 495*60021220SAndre Przywara /* Timer Status Register OR/CLEAR interface */ 496*60021220SAndre Przywara #define KVM_REG_PPC_OR_TSR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x87) 497*60021220SAndre Przywara #define KVM_REG_PPC_CLEAR_TSR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x88) 498*60021220SAndre Przywara #define KVM_REG_PPC_TCR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x89) 499*60021220SAndre Przywara #define KVM_REG_PPC_TSR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x8a) 500*60021220SAndre Przywara 501*60021220SAndre Przywara /* Debugging: Special instruction for software breakpoint */ 502*60021220SAndre Przywara #define KVM_REG_PPC_DEBUG_INST (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x8b) 503*60021220SAndre Przywara 504*60021220SAndre Przywara /* MMU registers */ 505*60021220SAndre Przywara #define KVM_REG_PPC_MAS0 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x8c) 506*60021220SAndre Przywara #define KVM_REG_PPC_MAS1 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x8d) 507*60021220SAndre Przywara #define KVM_REG_PPC_MAS2 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8e) 508*60021220SAndre Przywara #define KVM_REG_PPC_MAS7_3 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8f) 509*60021220SAndre Przywara #define KVM_REG_PPC_MAS4 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x90) 510*60021220SAndre Przywara #define KVM_REG_PPC_MAS6 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x91) 511*60021220SAndre Przywara #define KVM_REG_PPC_MMUCFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x92) 512*60021220SAndre Przywara /* 513*60021220SAndre Przywara * TLBnCFG fields TLBnCFG_N_ENTRY and TLBnCFG_ASSOC can be changed only using 514*60021220SAndre Przywara * KVM_CAP_SW_TLB ioctl 515*60021220SAndre Przywara */ 516*60021220SAndre Przywara #define KVM_REG_PPC_TLB0CFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x93) 517*60021220SAndre Przywara #define KVM_REG_PPC_TLB1CFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x94) 518*60021220SAndre Przywara #define KVM_REG_PPC_TLB2CFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x95) 519*60021220SAndre Przywara #define KVM_REG_PPC_TLB3CFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x96) 520*60021220SAndre Przywara #define KVM_REG_PPC_TLB0PS (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x97) 521*60021220SAndre Przywara #define KVM_REG_PPC_TLB1PS (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x98) 522*60021220SAndre Przywara #define KVM_REG_PPC_TLB2PS (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x99) 523*60021220SAndre Przywara #define KVM_REG_PPC_TLB3PS (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x9a) 524*60021220SAndre Przywara #define KVM_REG_PPC_EPTCFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x9b) 525*60021220SAndre Przywara 526*60021220SAndre Przywara /* Timebase offset */ 527*60021220SAndre Przywara #define KVM_REG_PPC_TB_OFFSET (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x9c) 528*60021220SAndre Przywara 529*60021220SAndre Przywara /* POWER8 registers */ 530*60021220SAndre Przywara #define KVM_REG_PPC_SPMC1 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x9d) 531*60021220SAndre Przywara #define KVM_REG_PPC_SPMC2 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x9e) 532*60021220SAndre Przywara #define KVM_REG_PPC_IAMR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x9f) 533*60021220SAndre Przywara #define KVM_REG_PPC_TFHAR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xa0) 534*60021220SAndre Przywara #define KVM_REG_PPC_TFIAR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xa1) 535*60021220SAndre Przywara #define KVM_REG_PPC_TEXASR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xa2) 536*60021220SAndre Przywara #define KVM_REG_PPC_FSCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xa3) 537*60021220SAndre Przywara #define KVM_REG_PPC_PSPB (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xa4) 538*60021220SAndre Przywara #define KVM_REG_PPC_EBBHR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xa5) 539*60021220SAndre Przywara #define KVM_REG_PPC_EBBRR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xa6) 540*60021220SAndre Przywara #define KVM_REG_PPC_BESCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xa7) 541*60021220SAndre Przywara #define KVM_REG_PPC_TAR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xa8) 542*60021220SAndre Przywara #define KVM_REG_PPC_DPDES (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xa9) 543*60021220SAndre Przywara #define KVM_REG_PPC_DAWR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xaa) 544*60021220SAndre Przywara #define KVM_REG_PPC_DAWRX (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xab) 545*60021220SAndre Przywara #define KVM_REG_PPC_CIABR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xac) 546*60021220SAndre Przywara #define KVM_REG_PPC_IC (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xad) 547*60021220SAndre Przywara #define KVM_REG_PPC_VTB (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xae) 548*60021220SAndre Przywara #define KVM_REG_PPC_CSIGR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xaf) 549*60021220SAndre Przywara #define KVM_REG_PPC_TACR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb0) 550*60021220SAndre Przywara #define KVM_REG_PPC_TCSCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb1) 551*60021220SAndre Przywara #define KVM_REG_PPC_PID (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb2) 552*60021220SAndre Przywara #define KVM_REG_PPC_ACOP (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb3) 553*60021220SAndre Przywara 554*60021220SAndre Przywara #define KVM_REG_PPC_VRSAVE (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb4) 555*60021220SAndre Przywara #define KVM_REG_PPC_LPCR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb5) 556*60021220SAndre Przywara #define KVM_REG_PPC_LPCR_64 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb5) 557*60021220SAndre Przywara #define KVM_REG_PPC_PPR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb6) 558*60021220SAndre Przywara 559*60021220SAndre Przywara /* Architecture compatibility level */ 560*60021220SAndre Przywara #define KVM_REG_PPC_ARCH_COMPAT (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb7) 561*60021220SAndre Przywara 562*60021220SAndre Przywara #define KVM_REG_PPC_DABRX (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb8) 563*60021220SAndre Przywara #define KVM_REG_PPC_WORT (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb9) 564*60021220SAndre Przywara #define KVM_REG_PPC_SPRG9 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xba) 565*60021220SAndre Przywara #define KVM_REG_PPC_DBSR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xbb) 566*60021220SAndre Przywara 567*60021220SAndre Przywara /* Transactional Memory checkpointed state: 568*60021220SAndre Przywara * This is all GPRs, all VSX regs and a subset of SPRs 569*60021220SAndre Przywara */ 570*60021220SAndre Przywara #define KVM_REG_PPC_TM (KVM_REG_PPC | 0x80000000) 571*60021220SAndre Przywara /* TM GPRs */ 572*60021220SAndre Przywara #define KVM_REG_PPC_TM_GPR0 (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0) 573*60021220SAndre Przywara #define KVM_REG_PPC_TM_GPR(n) (KVM_REG_PPC_TM_GPR0 + (n)) 574*60021220SAndre Przywara #define KVM_REG_PPC_TM_GPR31 (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x1f) 575*60021220SAndre Przywara /* TM VSX */ 576*60021220SAndre Przywara #define KVM_REG_PPC_TM_VSR0 (KVM_REG_PPC_TM | KVM_REG_SIZE_U128 | 0x20) 577*60021220SAndre Przywara #define KVM_REG_PPC_TM_VSR(n) (KVM_REG_PPC_TM_VSR0 + (n)) 578*60021220SAndre Przywara #define KVM_REG_PPC_TM_VSR63 (KVM_REG_PPC_TM | KVM_REG_SIZE_U128 | 0x5f) 579*60021220SAndre Przywara /* TM SPRS */ 580*60021220SAndre Przywara #define KVM_REG_PPC_TM_CR (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x60) 581*60021220SAndre Przywara #define KVM_REG_PPC_TM_LR (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x61) 582*60021220SAndre Przywara #define KVM_REG_PPC_TM_CTR (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x62) 583*60021220SAndre Przywara #define KVM_REG_PPC_TM_FPSCR (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x63) 584*60021220SAndre Przywara #define KVM_REG_PPC_TM_AMR (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x64) 585*60021220SAndre Przywara #define KVM_REG_PPC_TM_PPR (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x65) 586*60021220SAndre Przywara #define KVM_REG_PPC_TM_VRSAVE (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x66) 587*60021220SAndre Przywara #define KVM_REG_PPC_TM_VSCR (KVM_REG_PPC_TM | KVM_REG_SIZE_U32 | 0x67) 588*60021220SAndre Przywara #define KVM_REG_PPC_TM_DSCR (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x68) 589*60021220SAndre Przywara #define KVM_REG_PPC_TM_TAR (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x69) 590*60021220SAndre Przywara 591*60021220SAndre Przywara /* PPC64 eXternal Interrupt Controller Specification */ 592*60021220SAndre Przywara #define KVM_DEV_XICS_GRP_SOURCES 1 /* 64-bit source attributes */ 593*60021220SAndre Przywara 594*60021220SAndre Przywara /* Layout of 64-bit source attribute values */ 595*60021220SAndre Przywara #define KVM_XICS_DESTINATION_SHIFT 0 596*60021220SAndre Przywara #define KVM_XICS_DESTINATION_MASK 0xffffffffULL 597*60021220SAndre Przywara #define KVM_XICS_PRIORITY_SHIFT 32 598*60021220SAndre Przywara #define KVM_XICS_PRIORITY_MASK 0xff 599*60021220SAndre Przywara #define KVM_XICS_LEVEL_SENSITIVE (1ULL << 40) 600*60021220SAndre Przywara #define KVM_XICS_MASKED (1ULL << 41) 601*60021220SAndre Przywara #define KVM_XICS_PENDING (1ULL << 42) 602*60021220SAndre Przywara 603*60021220SAndre Przywara #endif /* __LINUX_KVM_POWERPC_H */ 604