mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
d59f772b71
commit c20875a3e638e4a03e099b343ec798edd1af5cc6 upstream. Currently it is possible for userspace (e.g. QEMU) to set a value for the MSR for a guest VCPU which has both of the TS bits set, which is an illegal combination. The result of this is that when we execute a hrfid (hypervisor return from interrupt doubleword) instruction to enter the guest, the CPU will take a TM Bad Thing type of program interrupt (vector 0x700). Now, if PR KVM is configured in the kernel along with HV KVM, we actually handle this without crashing the host or giving hypervisor privilege to the guest; instead what happens is that we deliver a program interrupt to the guest, with SRR0 reflecting the address of the hrfid instruction and SRR1 containing the MSR value at that point. If PR KVM is not configured in the kernel, then we try to run the host's program interrupt handler with the MMU set to the guest context, which almost certainly causes a host crash. This closes the hole by making kvmppc_set_msr_hv() check for the illegal combination and force the TS field to a safe value (00, meaning non-transactional). Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
44x.c | ||
44x_emulate.c | ||
44x_tlb.c | ||
44x_tlb.h | ||
book3s.c | ||
book3s_32_mmu.c | ||
book3s_32_mmu_host.c | ||
book3s_32_sr.S | ||
book3s_64_mmu.c | ||
book3s_64_mmu_host.c | ||
book3s_64_mmu_hv.c | ||
book3s_64_slb.S | ||
book3s_64_vio.c | ||
book3s_64_vio_hv.c | ||
book3s_emulate.c | ||
book3s_exports.c | ||
book3s_hv.c | ||
book3s_hv_builtin.c | ||
book3s_hv_interrupts.S | ||
book3s_hv_ras.c | ||
book3s_hv_rm_mmu.c | ||
book3s_hv_rm_xics.c | ||
book3s_hv_rmhandlers.S | ||
book3s_interrupts.S | ||
book3s_mmu_hpte.c | ||
book3s_paired_singles.c | ||
book3s_pr.c | ||
book3s_pr_papr.c | ||
book3s_rmhandlers.S | ||
book3s_rtas.c | ||
book3s_segment.S | ||
book3s_xics.c | ||
book3s_xics.h | ||
booke.c | ||
booke.h | ||
booke_emulate.c | ||
booke_interrupts.S | ||
bookehv_interrupts.S | ||
e500.c | ||
e500.h | ||
e500_emulate.c | ||
e500_mmu.c | ||
e500_mmu_host.c | ||
e500_mmu_host.h | ||
e500mc.c | ||
emulate.c | ||
fpu.S | ||
irq.h | ||
Kconfig | ||
Makefile | ||
mpic.c | ||
powerpc.c | ||
timing.c | ||
timing.h | ||
trace.h |