• James Hogan's avatar
    MIPS: KVM: Allow ULRI to restrict UserLocal register · cef061d0
    James Hogan authored
    The ULRI bit in Config3 specifies whether the UserLocal register is
    implemented, but it is assumed to always be set. Now that the Config
    registers can be modified by userland, allow Config3.ULRI to be cleared
    and check ULRI before allowing the corresponding bit to be set in
    HWREna.
    
    In fact any HWREna bits corresponding to unimplemented RDHWR registers
    should read as zero and be ignored on write, so we actually prevent
    other unimplemented bits being set too.
    Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Radim Krčmář <rkrcmar@redhat.com>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: linux-mips@linux-mips.org
    Cc: kvm@vger.kernel.org
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    cef061d0
emulate.c 68 KB