• P
    target/arm: Don't use cpsr_write/cpsr_read to transfer M profile XPSR · eeade001
    Peter Maydell 提交于
    For M profile the XPSR is a similar but not identical format to the
    A profile CPSR/SPSR. (For instance the Thumb bit is in a different
    place.) For guest accesses we make the M profile code go through
    xpsr_read() and xpsr_write() which handle the different layout.
    However for migration we use cpsr_read() and cpsr_write() to
    marshal state into and out of the migration data stream. This
    is pretty confusing and works more by luck than anything else.
    Make M profile migration use xpsr_read() and xpsr_write() instead.
    
    The most complicated part of this is handling the possibility
    that the migration source is an older QEMU which hands us a
    CPSR format value; helpfully we can always tell the two apart.
    Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
    Message-id: 1501692241-23310-11-git-send-email-peter.maydell@linaro.org
    eeade001
machine.c 13.7 KB