mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 05:46:46 +07:00
26f4f3b578
The ability to read hardware registers from userland with the RDHWR instruction should depend upon the corresponding bit of the HWREna register being set, otherwise a reserved instruction exception should be generated. However KVM's current emulation ignores the guest's HWREna and always emulates RDHWR instructions even if the guest OS has disallowed them. Therefore rework the RDHWR emulation code to check for privilege or the corresponding bit in the guest HWREna bit. Also remove the #if 0 case for the UserLocal register. I presume it was there for debug purposes but it seems unnecessary now that the guest can control whether it causes a guest exception. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Gleb Natapov <gleb@kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Sanjay Lal <sanjayl@kymasys.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
00README.txt | ||
Kconfig | ||
kvm_cb.c | ||
kvm_locore.S | ||
kvm_mips_comm.h | ||
kvm_mips_commpage.c | ||
kvm_mips_dyntrans.c | ||
kvm_mips_emul.c | ||
kvm_mips_int.c | ||
kvm_mips_int.h | ||
kvm_mips_opcode.h | ||
kvm_mips_stats.c | ||
kvm_mips.c | ||
kvm_tlb.c | ||
kvm_trap_emul.c | ||
Makefile | ||
trace.h |