Skip to content
  • David Gibson's avatar
    target-ppc: Add mechanism for synchronizing SPRs with KVM · d67d40ea
    David Gibson authored
    
    
    Currently when runing under KVM on ppc, we synchronize a certain number of
    vital SPRs to KVM through the SET_SREGS call.  This leaves out quite a lot
    of important SPRs which are maintained in KVM.  It would be helpful to
    have their contents in qemu for debugging purposes, and when we implement
    migration it will be vital, since they include important guest state that
    will need to be restored on the target.
    
    This patch sets up for synchronization of any registers supported by the
    KVM ONE_REG calls.  A new variant on spr_register() allows a ONE_REG id to
    be stored with the SPR information.  When we set/get information to KVM
    we also synchronize any SPRs so registered.
    
    For now we set this mechanism up to synchronize a handful of important
    registers that already have ONE_REG IDs, notably the DAR and DSISR.
    
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    d67d40ea