]> asedeno.scripts.mit.edu Git - linux.git/commit
KVM: MIPS/MMU: Simplify ASID restoration
authorJames Hogan <james.hogan@imgtec.com>
Fri, 13 Mar 2015 15:54:08 +0000 (15:54 +0000)
committerJames Hogan <james.hogan@imgtec.com>
Fri, 3 Feb 2017 15:20:43 +0000 (15:20 +0000)
commit1534b3964901ff55465a9f582838204193354966
treede8331f46b6b68bdd0f66a9957b6fa894bbd4c75
parent00104b4171491794b53f8d6cc255f539e8bf18b4
KVM: MIPS/MMU: Simplify ASID restoration

KVM T&E uses an ASID for guest kernel mode and an ASID for guest user
mode. The current ASID is saved when the guest is scheduled out, and
restored when scheduling back in, with checks for whether the ASID needs
to be regenerated.

This isn't really necessary as the ASID can be easily determined by the
current guest mode, so lets simplify it to just read the required ASID
from guest_kernel_asid or guest_user_asid even if the ASID hasn't been
regenerated.

Signed-off-by: James 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
arch/mips/include/asm/kvm_host.h
arch/mips/kvm/mmu.c