• P
    KVM: PPC: Book3S PR: Fix proto-VSID calculations · 8ed7b7e9
    Paul Mackerras 提交于
    This makes sure the calculation of the proto-VSIDs used by PR KVM
    is done with 64-bit arithmetic.  Since vcpu3s->context_id[] is int,
    when we do vcpu3s->context_id[0] << ESID_BITS the shift will be done
    with 32-bit instructions, possibly leading to significant bits
    getting lost, as the context id can be up to 524283 and ESID_BITS is
    18.  To fix this we cast the context id to u64 before shifting.
    Signed-off-by: NPaul Mackerras <paulus@samba.org>
    Signed-off-by: NAlexander Graf <agraf@suse.de>
    8ed7b7e9
book3s_64_mmu_host.c 8.5 KB