libkdumpfile-0.5.4
Kernel coredump file access
|
State of the current step in address translation. More...
#include <addrxlat.h>
Data Fields | ||
addrxlat_ctx_t * | ctx | |
Address translation context. | ||
addrxlat_sys_t * | sys | |
Translation system. | ||
const addrxlat_meth_t * | meth | |
Translation method for this particular translation. | ||
unsigned short | remain | |
Remaining steps. | ||
unsigned | elemsz | |
Size of the indexed element. | ||
addrxlat_fulladdr_t | base | |
On input, base address of the page table. | ||
union { | ||
void * data | ||
User-defined data for ADDRXLAT_CUSTOM. | ||
addrxlat_pte_t pte | ||
PTE value for ADDRXLAT_PGT. | ||
const addrxlat_lookup_elem_t * elem | ||
Matched element for ADDRXLAT_LOOKUP. | ||
addrxlat_addr_t addr | ||
Array content for ADDRXLAT_MEMARR. | ||
} | raw | |
Raw translation step result. | ||
addrxlat_addr_t | idx [ADDRXLAT_FIELDS_MAX+1] | |
Table indices at individual levels. | ||
State of the current step in address translation.
addrxlat_fulladdr_t _addrxlat_step::base |
On input, base address of the page table.
On output base address of the lower-level page table or the target physical address. This field is set on a successful return from addrxlat_launch.
addrxlat_ctx_t* _addrxlat_step::ctx |
Address translation context.
The context is used for memory access and error reporting. This field must be initialized for addrxlat_launch.
unsigned _addrxlat_step::elemsz |
Size of the indexed element.
The next level is found at:
base
+ idx
[ remain
- 1 ] * elemsz
Note that base
is updated using the above formula prior to calling the next_step
function.
addrxlat_addr_t _addrxlat_step::idx[ADDRXLAT_FIELDS_MAX+1] |
Table indices at individual levels.
There is one extra index, which contains the remaining part of the virtual address after all address fields were used. For example, on x86_64, only bits 47:0 are used for paging, the value of the bit field at 63:48 is put into the extra index.
const addrxlat_meth_t* _addrxlat_step::meth |
Translation method for this particular translation.
This field must be initialized for addrxlat_launch.
union { ... } _addrxlat_step::raw |
Raw translation step result.
This field is set on a successful return from addrxlat_step if it is meaningful for the translation method. It may be also used as input for the next translation step (but not for the first step).
unsigned short _addrxlat_step::remain |
Remaining steps.
This field is set on a successful return from addrxlat_launch. The value is then modified by addrxlat_step. Translation is complete when it reaches zero. Note: Although this value is usually decremented by one in every translation step, it may be changed to any value in any step (e.g. on a huge page), so always check if the value has become zero after each call to addrxlat_step.
addrxlat_sys_t* _addrxlat_step::sys |
Translation system.
If not NULL
, this system can be used to translate addresses for memory access. This field must be initialized for addrxlat_launch (it may be NULL
, but not an undefined value).