• Paul Mackerras's avatar
    KVM: PPC: Emulation for more integer loads and stores · ceba57df
    Paul Mackerras authored
    This adds emulation for the following integer loads and stores,
    thus enabling them to be used in a guest for accessing emulated
    MMIO locations.
    
    - lhaux
    - lwaux
    - lwzux
    - ldu
    - lwa
    - stdux
    - stwux
    - stdu
    - ldbrx
    - stdbrx
    
    Previously, most of these would cause an emulation failure exit to
    userspace, though ldu and lwa got treated incorrectly as ld, and
    stdu got treated incorrectly as std.
    
    This also tidies up some of the formatting and updates the comment
    listing instructions that still need to be implemented.
    
    With this, all integer loads and stores that are defined in the Power
    ISA v2.07 are emulated, except for those that are permitted to trap
    when used on cache-inhibited or write-through mappings (and which do
    in fact trap on POWER8), that is, lmw/stmw, lswi/stswi, lswx/stswx,
    lq/stq, and l[bhwdq]arx/st[bhwdq]cx.
    Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
    ceba57df
emulate_loadstore.c 16.8 KB