@@ -1773,6 +1773,7 @@ registers, find a list below:
17731773 PPC | KVM_REG_PPC_VPA_ADDR | 64
17741774 PPC | KVM_REG_PPC_VPA_SLB | 128
17751775 PPC | KVM_REG_PPC_VPA_DTL | 128
1776+ PPC | KVM_REG_PPC_EPCR | 32
17761777
177717784.69 KVM_GET_ONE_REG
17781779
@@ -2071,6 +2072,60 @@ KVM_S390_INT_EXTERNAL_CALL (vcpu) - sigp external call; source cpu in parm
20712072
20722073Note that the vcpu ioctl is asynchronous to vcpu execution.
20732074
2075+ 4.78 KVM_PPC_GET_HTAB_FD
2076+
2077+ Capability: KVM_CAP_PPC_HTAB_FD
2078+ Architectures: powerpc
2079+ Type: vm ioctl
2080+ Parameters: Pointer to struct kvm_get_htab_fd (in)
2081+ Returns: file descriptor number (>= 0) on success, -1 on error
2082+
2083+ This returns a file descriptor that can be used either to read out the
2084+ entries in the guest's hashed page table (HPT), or to write entries to
2085+ initialize the HPT. The returned fd can only be written to if the
2086+ KVM_GET_HTAB_WRITE bit is set in the flags field of the argument, and
2087+ can only be read if that bit is clear. The argument struct looks like
2088+ this:
2089+
2090+ /* For KVM_PPC_GET_HTAB_FD */
2091+ struct kvm_get_htab_fd {
2092+ __u64 flags;
2093+ __u64 start_index;
2094+ __u64 reserved[2];
2095+ };
2096+
2097+ /* Values for kvm_get_htab_fd.flags */
2098+ #define KVM_GET_HTAB_BOLTED_ONLY ((__u64)0x1)
2099+ #define KVM_GET_HTAB_WRITE ((__u64)0x2)
2100+
2101+ The `start_index' field gives the index in the HPT of the entry at
2102+ which to start reading. It is ignored when writing.
2103+
2104+ Reads on the fd will initially supply information about all
2105+ "interesting" HPT entries. Interesting entries are those with the
2106+ bolted bit set, if the KVM_GET_HTAB_BOLTED_ONLY bit is set, otherwise
2107+ all entries. When the end of the HPT is reached, the read() will
2108+ return. If read() is called again on the fd, it will start again from
2109+ the beginning of the HPT, but will only return HPT entries that have
2110+ changed since they were last read.
2111+
2112+ Data read or written is structured as a header (8 bytes) followed by a
2113+ series of valid HPT entries (16 bytes) each. The header indicates how
2114+ many valid HPT entries there are and how many invalid entries follow
2115+ the valid entries. The invalid entries are not represented explicitly
2116+ in the stream. The header format is:
2117+
2118+ struct kvm_get_htab_header {
2119+ __u32 index;
2120+ __u16 n_valid;
2121+ __u16 n_invalid;
2122+ };
2123+
2124+ Writes to the fd create HPT entries starting at the index given in the
2125+ header; first `n_valid' valid entries with contents from the data
2126+ written, then `n_invalid' invalid entries, invalidating any previously
2127+ valid entries found.
2128+
20742129
207521305. The kvm_run structure
20762131------------------------
0 commit comments