Commit e4e94c0f authored by James Hogan's avatar James Hogan Committed by Paolo Bonzini

MIPS: KVM: Drop unused host_cp0_entryhi

The host EntryHi in the KVM VCPU context is virtually unused. It gets
stored on exceptions, but only ever used in a kvm_debug() when a TLB
miss occurs.

Drop it entirely, removing that information from the kvm_debug output.
Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent d40dd9e8
...@@ -346,7 +346,6 @@ struct kvm_vcpu_arch { ...@@ -346,7 +346,6 @@ struct kvm_vcpu_arch {
unsigned long host_cp0_badvaddr; unsigned long host_cp0_badvaddr;
unsigned long host_cp0_cause; unsigned long host_cp0_cause;
unsigned long host_cp0_epc; unsigned long host_cp0_epc;
unsigned long host_cp0_entryhi;
/* GPRS */ /* GPRS */
unsigned long gprs[32]; unsigned long gprs[32];
......
...@@ -364,7 +364,6 @@ void output_kvm_defines(void) ...@@ -364,7 +364,6 @@ void output_kvm_defines(void)
OFFSET(VCPU_HOST_CP0_BADVADDR, kvm_vcpu_arch, host_cp0_badvaddr); OFFSET(VCPU_HOST_CP0_BADVADDR, kvm_vcpu_arch, host_cp0_badvaddr);
OFFSET(VCPU_HOST_CP0_CAUSE, kvm_vcpu_arch, host_cp0_cause); OFFSET(VCPU_HOST_CP0_CAUSE, kvm_vcpu_arch, host_cp0_cause);
OFFSET(VCPU_HOST_EPC, kvm_vcpu_arch, host_cp0_epc); OFFSET(VCPU_HOST_EPC, kvm_vcpu_arch, host_cp0_epc);
OFFSET(VCPU_HOST_ENTRYHI, kvm_vcpu_arch, host_cp0_entryhi);
OFFSET(VCPU_R0, kvm_vcpu_arch, gprs[0]); OFFSET(VCPU_R0, kvm_vcpu_arch, gprs[0]);
OFFSET(VCPU_R1, kvm_vcpu_arch, gprs[1]); OFFSET(VCPU_R1, kvm_vcpu_arch, gprs[1]);
......
...@@ -1634,7 +1634,6 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc, ...@@ -1634,7 +1634,6 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc,
(cop0) & KVM_ENTRYHI_ASID)); (cop0) & KVM_ENTRYHI_ASID));
if (index < 0) { if (index < 0) {
vcpu->arch.host_cp0_entryhi = (va & VPN2_MASK);
vcpu->arch.host_cp0_badvaddr = va; vcpu->arch.host_cp0_badvaddr = va;
vcpu->arch.pc = curr_pc; vcpu->arch.pc = curr_pc;
er = kvm_mips_emulate_tlbmiss_ld(cause, NULL, run, er = kvm_mips_emulate_tlbmiss_ld(cause, NULL, run,
...@@ -2576,8 +2575,8 @@ enum emulation_result kvm_mips_handle_tlbmiss(unsigned long cause, ...@@ -2576,8 +2575,8 @@ enum emulation_result kvm_mips_handle_tlbmiss(unsigned long cause,
unsigned long va = vcpu->arch.host_cp0_badvaddr; unsigned long va = vcpu->arch.host_cp0_badvaddr;
int index; int index;
kvm_debug("kvm_mips_handle_tlbmiss: badvaddr: %#lx, entryhi: %#lx\n", kvm_debug("kvm_mips_handle_tlbmiss: badvaddr: %#lx\n",
vcpu->arch.host_cp0_badvaddr, vcpu->arch.host_cp0_entryhi); vcpu->arch.host_cp0_badvaddr);
/* /*
* KVM would not have got the exception if this entry was valid in the * KVM would not have got the exception if this entry was valid in the
......
...@@ -308,9 +308,6 @@ NESTED (MIPSX(GuestException), CALLFRAME_SIZ, ra) ...@@ -308,9 +308,6 @@ NESTED (MIPSX(GuestException), CALLFRAME_SIZ, ra)
mfc0 k0, CP0_CAUSE mfc0 k0, CP0_CAUSE
LONG_S k0, VCPU_HOST_CP0_CAUSE(k1) LONG_S k0, VCPU_HOST_CP0_CAUSE(k1)
mfc0 k0, CP0_ENTRYHI
LONG_S k0, VCPU_HOST_ENTRYHI(k1)
/* Now restore the host state just enough to run the handlers */ /* Now restore the host state just enough to run the handlers */
/* Switch EBASE to the one used by Linux */ /* Switch EBASE to the one used by Linux */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment