Loading...
Searching...
No Matches
_addrxlat_step Struct Reference

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.

## Detailed Description

State of the current step in address translation.

## Field Documentation

## base

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.

## ctx

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.

## elemsz

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.

## idx

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.

## meth

const addrxlat_meth_t* _addrxlat_step::meth

Translation method for this particular translation.

This field must be initialized for addrxlat_launch.

## [union]

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).

## remain

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.

## sys

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).

The documentation for this struct was generated from the following file:

- include/libkdumpfile/addrxlat.h