#define H_SUCCESS 0 #define H_BUSY 1 /* Hardware busy -- retry later */ #define H_CLOSED 2 /* Resource closed */ #define H_NOT_AVAILABLE 3 #define H_CONSTRAINED 4 /* Resource request constrained to max allowed */ #define H_PARTIAL 5 #define H_IN_PROGRESS 14 /* Kind of like busy */ #define H_PAGE_REGISTERED 15 #define H_PARTIAL_STORE 16 #define H_PENDING 17 /* returned from H_POLL_PENDING */ #define H_CONTINUE 18 /* Returned from H_Join on success */ #define H_LONG_BUSY_START_RANGE 9900 /* Start of long busy range */ #define H_LONG_BUSY_ORDER_1_MSEC 9900 /* Long busy, hint that 1msec \
is a good time to retry */ #define H_LONG_BUSY_ORDER_10_MSEC 9901 /* Long busy, hint that 10msec \
is a good time to retry */ #define H_LONG_BUSY_ORDER_100_MSEC 9902 /* Long busy, hint that 100msec \
is a good time to retry */ #define H_LONG_BUSY_ORDER_1_SEC 9903 /* Long busy, hint that 1sec \
is a good time to retry */ #define H_LONG_BUSY_ORDER_10_SEC 9904 /* Long busy, hint that 10sec \
is a good time to retry */ #define H_LONG_BUSY_ORDER_100_SEC 9905 /* Long busy, hint that 100sec \
is a good time to retry */ #define H_LONG_BUSY_END_RANGE 9905 /* End of long busy range */
/* Internal value used in book3s_hv kvm support; not returned to guests */ #define H_TOO_HARD 9999
/* Long Busy is a condition that can be returned by the firmware * when a call cannot be completed now, but the identical call * should be retried later. This prevents calls blocking in the * firmware for long periods of time. Annoyingly the firmware can return * a range of return codes, hinting at how long we should wait before * retrying. If you don't care for the hint, the macro below is a good * way to check for the long_busy return codes
*/ #define H_IS_LONG_BUSY(x) ((x >= H_LONG_BUSY_START_RANGE) \
&& (x <= H_LONG_BUSY_END_RANGE))
/* Flags */ #define H_LARGE_PAGE (1UL<<(63-16)) #define H_EXACT (1UL<<(63-24)) /* Use exact PTE or return H_PTEG_FULL */ #define H_R_XLATE (1UL<<(63-25)) /* include a valid logical page num in the pte if the valid bit is set */ #define H_READ_4 (1UL<<(63-26)) /* Return 4 PTEs */ #define H_PAGE_STATE_CHANGE (1UL<<(63-28)) #define H_PAGE_UNUSED ((1UL<<(63-29)) | (1UL<<(63-30))) #define H_PAGE_SET_UNUSED (H_PAGE_STATE_CHANGE | H_PAGE_UNUSED) #define H_PAGE_SET_LOANED (H_PAGE_SET_UNUSED | (1UL<<(63-31))) #define H_PAGE_SET_ACTIVE H_PAGE_STATE_CHANGE #define H_AVPN (1UL<<(63-32)) /* An avpn is provided as a sanity test */ #define H_ANDCOND (1UL<<(63-33)) #define H_LOCAL (1UL<<(63-35)) #define H_ICACHE_INVALIDATE (1UL<<(63-40)) /* icbi, etc. (ignored for IO pages) */ #define H_ICACHE_SYNCHRONIZE (1UL<<(63-41)) /* dcbst, icbi, etc (ignored for IO pages */ #define H_COALESCE_CAND (1UL<<(63-42)) /* page is a good candidate for coalescing */ #define H_ZERO_PAGE (1UL<<(63-48)) /* zero the page before mapping (ignored for IO pages) */ #define H_COPY_PAGE (1UL<<(63-49)) #define H_N (1UL<<(63-61)) #define H_PP1 (1UL<<(63-62)) #define H_PP2 (1UL<<(63-63))
/* Platform specific hcalls, used by KVM */ #define H_RTAS 0xf000
/* * Platform specific hcalls, used by QEMU/SLOF. These are ignored by * KVM and only kept here so we can identify them during tracing.
*/ #define H_LOGICAL_MEMOP 0xF001 #define H_CAS 0XF002 #define H_UPDATE_DT 0XF003
/* "Platform specific hcalls", provided by PHYP */ #define H_GET_24X7_CATALOG_PAGE 0xF078 #define H_GET_24X7_DATA 0xF07C #define H_GET_PERF_COUNTER_INFO 0xF080
/* Values for argument to H_SIGNAL_SYS_RESET */ #define H_SIGNAL_SYS_RESET_ALL -1 #define H_SIGNAL_SYS_RESET_ALL_OTHERS -2 /* >= 0 values are CPU number */
/* H_GET_CPU_CHARACTERISTICS return values */ #define H_CPU_CHAR_SPEC_BAR_ORI31 (1ull << 63) // IBM bit 0 #define H_CPU_CHAR_BCCTRL_SERIALISED (1ull << 62) // IBM bit 1 #define H_CPU_CHAR_L1D_FLUSH_ORI30 (1ull << 61) // IBM bit 2 #define H_CPU_CHAR_L1D_FLUSH_TRIG2 (1ull << 60) // IBM bit 3 #define H_CPU_CHAR_L1D_THREAD_PRIV (1ull << 59) // IBM bit 4 #define H_CPU_CHAR_BRANCH_HINTS_HONORED (1ull << 58) // IBM bit 5 #define H_CPU_CHAR_THREAD_RECONFIG_CTRL (1ull << 57) // IBM bit 6 #define H_CPU_CHAR_COUNT_CACHE_DISABLED (1ull << 56) // IBM bit 7 #define H_CPU_CHAR_BCCTR_FLUSH_ASSIST (1ull << 54) // IBM bit 9 #define H_CPU_CHAR_BCCTR_LINK_FLUSH_ASSIST (1ull << 52) // IBM bit 11
#define H_CPU_BEHAV_FAVOUR_SECURITY (1ull << 63) // IBM bit 0 #define H_CPU_BEHAV_L1D_FLUSH_PR (1ull << 62) // IBM bit 1 #define H_CPU_BEHAV_BNDS_CHK_SPEC_BAR (1ull << 61) // IBM bit 2 #define H_CPU_BEHAV_FAVOUR_SECURITY_H (1ull << 60) // IBM bit 3 #define H_CPU_BEHAV_FLUSH_COUNT_CACHE (1ull << 58) // IBM bit 5 #define H_CPU_BEHAV_FLUSH_LINK_STACK (1ull << 57) // IBM bit 6 #define H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY (1ull << 56) // IBM bit 7 #define H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS (1ull << 55) // IBM bit 8 #define H_CPU_BEHAV_NO_STF_BARRIER (1ull << 54) // IBM bit 9
/* Type of translation to invalidate (type) */ #define H_RPTI_TYPE_NESTED 0x0001 /* Invalidate nested guest partition-scope */ #define H_RPTI_TYPE_TLB 0x0002 /* Invalidate TLB */ #define H_RPTI_TYPE_PWC 0x0004 /* Invalidate Page Walk Cache */ /* Invalidate caching of Process Table Entries if H_RPTI_TYPE_NESTED is clear */ #define H_RPTI_TYPE_PRT 0x0008 /* Invalidate caching of Partition Table Entries if H_RPTI_TYPE_NESTED is set */ #define H_RPTI_TYPE_PAT 0x0008 #define H_RPTI_TYPE_ALL (H_RPTI_TYPE_TLB | H_RPTI_TYPE_PWC | \
H_RPTI_TYPE_PRT) #define H_RPTI_TYPE_NESTED_ALL (H_RPTI_TYPE_TLB | H_RPTI_TYPE_PWC | \
H_RPTI_TYPE_PAT)
/* Invalidation targets (target) */ #define H_RPTI_TARGET_CMMU 0x01 /* All virtual processors in the partition */ #define H_RPTI_TARGET_CMMU_LOCAL 0x02 /* Current virtual processor */ /* All nest/accelerator agents in use by the partition */ #define H_RPTI_TARGET_NMMU 0x04
/** * plpar_hcall_norets: - Make a pseries hypervisor call with no return arguments * @opcode: The hypervisor call to make. * * This call supports up to 7 arguments and only returns the status of * the hcall. Use this version where possible, its slightly faster than * the other plpar_hcalls.
*/ long plpar_hcall_norets(unsignedlong opcode, ...);
/* Variant which does not do hcall tracing */ long plpar_hcall_norets_notrace(unsignedlong opcode, ...);
/** * plpar_hcall: - Make a pseries hypervisor call * @opcode: The hypervisor call to make. * @retbuf: Buffer to store up to 4 return arguments in. * * This call supports up to 6 arguments and 4 return arguments. Use * PLPAR_HCALL_BUFSIZE to size the return argument buffer. * * Used for all but the craziest of phyp interfaces (see plpar_hcall9)
*/ #define PLPAR_HCALL_BUFSIZE 4 long plpar_hcall(unsignedlong opcode, unsignedlong retbuf[static PLPAR_HCALL_BUFSIZE], ...);
/** * plpar_hcall_raw: - Make a hypervisor call without calculating hcall stats * @opcode: The hypervisor call to make. * @retbuf: Buffer to store up to 4 return arguments in. * * This call supports up to 6 arguments and 4 return arguments. Use * PLPAR_HCALL_BUFSIZE to size the return argument buffer. * * Used when phyp interface needs to be called in real mode. Similar to * plpar_hcall, but plpar_hcall_raw works in real mode and does not * calculate hypervisor call statistics.
*/ long plpar_hcall_raw(unsignedlong opcode, unsignedlong retbuf[static PLPAR_HCALL_BUFSIZE], ...);
/** * plpar_hcall9: - Make a pseries hypervisor call with up to 9 return arguments * @opcode: The hypervisor call to make. * @retbuf: Buffer to store up to 9 return arguments in. * * This call supports up to 9 arguments and 9 return arguments. Use * PLPAR_HCALL9_BUFSIZE to size the return argument buffer.
*/ #define PLPAR_HCALL9_BUFSIZE 9 long plpar_hcall9(unsignedlong opcode, unsignedlong retbuf[static PLPAR_HCALL9_BUFSIZE], ...); long plpar_hcall9_raw(unsignedlong opcode, unsignedlong retbuf[static PLPAR_HCALL9_BUFSIZE], ...);
/* * Register state for entering a nested guest with H_ENTER_NESTED. * New member must be added at the end.
*/ struct hv_guest_state {
u64 version; /* version of this structure layout, must be first */
u32 lpid;
u32 vcpu_token; /* These registers are hypervisor privileged (at least for writing) */
u64 lpcr;
u64 pcr;
u64 amor;
u64 dpdes;
u64 hfscr;
s64 tb_offset;
u64 dawr0;
u64 dawrx0;
u64 ciabr;
u64 hdec_expiry;
u64 purr;
u64 spurr;
u64 ic;
u64 vtb;
u64 hdar;
u64 hdsisr;
u64 heir;
u64 asdr; /* These are OS privileged but need to be set late in guest entry */
u64 srr0;
u64 srr1;
u64 sprg[4];
u64 pidr;
u64 cfar;
u64 ppr; /* Version 1 ends here */
u64 dawr1;
u64 dawrx1; /* Version 2 ends here */
};
/* Latest version of hv_guest_state structure */ #define HV_GUEST_STATE_VERSION 2
/* * From the document "H_GetPerformanceCounterInfo Interface" v1.07 * * H_GET_PERF_COUNTER_INFO argument
*/ struct hv_get_perf_counter_info_params {
__be32 counter_request; /* I */
__be32 starting_index; /* IO */
__be16 secondary_index; /* IO */
__be16 returned_values; /* O */
__be32 detail_rc; /* O, only needed when called via *_norets() */
/* * O, size each of counter_value element in bytes, only set for version * >= 0x3
*/
__be16 cv_element_size;
/* I, 0 (zero) for versions < 0x3 */
__u8 counter_info_version_in;
/* O, 0 (zero) if version < 0x3. Must be set to 0 when making hcall */
__u8 counter_info_version_out;
__u8 reserved[0xC];
__u8 counter_value[];
} __packed;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.