#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 *whenacallcannotbecompletednow,buttheidenticalcall *shouldberetriedlater.Thispreventscallsblockinginthe *firmwareforlongperiodsoftime.Annoyinglythefirmwarecanreturn *arangeofreturncodes,hintingathowlongweshouldwaitbefore *retrying.Ifyoudon'tcareforthehint,themacrobelowisagood *waytocheckforthelong_busyreturncodes
*/ #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))
/* 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
int h_get_mpp_x(struct hvcall_mpp_x_data *mpp_x_data);
staticinlineunsignedint get_longbusy_msecs(int longbusy_rc)
{ switch (longbusy_rc) { case H_LONG_BUSY_ORDER_1_MSEC: return1; case H_LONG_BUSY_ORDER_10_MSEC: return10; case H_LONG_BUSY_ORDER_100_MSEC: return100; case H_LONG_BUSY_ORDER_1_SEC: return1000; case H_LONG_BUSY_ORDER_10_SEC: return10000; case H_LONG_BUSY_ORDER_100_SEC: return100000; default: return1;
}
}
/* *RegisterstateforenteringanestedguestwithH_ENTER_NESTED. *Newmembermustbeaddedattheend.
*/ 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
/* 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.0.32Bemerkung:
(vorverarbeitet am 2026-09-28)
¤
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.