Skip to content
  • David Gibson's avatar
    mmu-hash*: Add hash pte load/store helpers · dffdaf61
    David Gibson authored
    
    
    On real hardware the ppc hash page table is stored in memory; accordingly
    our mmu emulation code can read a hash page table in guest memory.  But,
    when paravirtualized under PAPR, the real hash page table is in host
    memory, accessible to the guest only via hypercalls.  We model this by
    also allowing the MMU emulation code to access a specially allocated hash
    page table outside the guest's memory image. At present these two options
    are implemented with some ugly conditionals at each access point in the mmu
    emulation code.  In the implementation of the PAPR hypercalls, we assume
    the external hash table.
    
    This patch cleans things up by adding helpers to load and store from the
    hash table for both 32-bit and 64-bit hash mmus.  The 64-bit versions
    handle both the in-guest-memory and outside guest memory cases.  The 32-bit
    versions only handle the in-guest-memory case since no 32-bit systems can
    have an external hash table at present.
    
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    dffdaf61