• S
    target/ppc: Fixup set_spr error in h_register_process_table · 60694bc6
    Suraj Jitindar Singh 提交于
    set_spr is used in the function h_register_process_table() to update the
    LPCR_GTSE and LPCR_UPRT values based on the flags passed by the guest.
    The set_spr function takes the last two arguments mask and value used to
    mask and set the value of the spr respectively.
    
    The current call site passes these arguments in the wrong order and thus
    bot GTSE and UPRT will be set irrespective, which is obviously
    incorrect.
    
    Rearrange the function call so that these arguments are passed in the
    correct order and the correct behaviour is exhibited.
    
    It is worth noting that this wasn't detected earlier since these were
    always both set in all cases where this H_CALL was made.
    
    Fixes: 6de83307 ("target/ppc: Set UPRT and GTSE on all cpus in H_REGISTER_PROCESS_TABLE")
    Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
    Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
    60694bc6
spapr_hcall.c 38.1 KB