• Suraj Jitindar Singh's avatar
    KVM: PPC: Book3S HV: Define usage types for rmap array in guest memslot · d22deab6
    Suraj Jitindar Singh authored
    The rmap array in the guest memslot is an array of size number of guest
    pages, allocated at memslot creation time. Each rmap entry in this array
    is used to store information about the guest page to which it
    corresponds. For example for a hpt guest it is used to store a lock bit,
    rc bits, a present bit and the index of a hpt entry in the guest hpt
    which maps this page. For a radix guest which is running nested guests
    it is used to store a pointer to a linked list of nested rmap entries
    which store the nested guest physical address which maps this guest
    address and for which there is a pte in the shadow page table.
    
    As there are currently two uses for the rmap array, and the potential
    for this to expand to more in the future, define a type field (being the
    top 8 bits of the rmap entry) to be used to define the type of the rmap
    entry which is currently present and define two values for this field
    for the two current uses of the rmap array.
    
    Since the nested case uses the rmap entry to store a pointer, define
    this type as having the two high bits set as is expected for a pointer.
    Define the hpt entry type as having bit 56 set (bit 7 IBM bit ordering).
    Signed-off-by: default avatarSuraj Jitindar Singh <sjitindarsingh@gmail.com>
    Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
    d22deab6
kvm_host.h 21.3 KB