• Paul Mackerras's avatar
    KVM: PPC: Maintain a doubly-linked list of guest HPTEs for each gfn · 06ce2c63
    Paul Mackerras authored
    This expands the reverse mapping array to contain two links for each
    HPTE which are used to link together HPTEs that correspond to the
    same guest logical page.  Each circular list of HPTEs is pointed to
    by the rmap array entry for the guest logical page, pointed to by
    the relevant memslot.  Links are 32-bit HPT entry indexes rather than
    full 64-bit pointers, to save space.  We use 3 of the remaining 32
    bits in the rmap array entries as a lock bit, a referenced bit and
    a present bit (the present bit is needed since HPTE index 0 is valid).
    The bit lock for the rmap chain nests inside the HPTE lock bit.
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
    06ce2c63
kvm_host.h 10.4 KB