diff options
author | James Hogan <james.hogan@imgtec.com> | 2015-12-16 18:49:26 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-01-23 21:05:48 -0500 |
commit | caa1faa7aba68feed22129f68e4de499846a971b (patch) | |
tree | 71ed6cb6efc852860761b4e216492c57c0041fd3 | |
parent | 097d5638cb4289c86a4a47bda6a0fe8c2b338ae7 (diff) |
MIPS: KVM: Trivial whitespace and style fixes
A bunch of misc whitespace and style fixes within arch/mips/kvm/.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11883/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/Kconfig | 3 | ||||
-rw-r--r-- | arch/mips/include/asm/kvm_host.h | 2 | ||||
-rw-r--r-- | arch/mips/kvm/emulate.c | 8 | ||||
-rw-r--r-- | arch/mips/kvm/locore.S | 12 | ||||
-rw-r--r-- | arch/mips/kvm/tlb.c | 4 |
5 files changed, 14 insertions, 15 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index a989e7635628..500110063a63 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -2027,7 +2027,8 @@ config KVM_GUEST | |||
2027 | bool "KVM Guest Kernel" | 2027 | bool "KVM Guest Kernel" |
2028 | depends on BROKEN_ON_SMP | 2028 | depends on BROKEN_ON_SMP |
2029 | help | 2029 | help |
2030 | Select this option if building a guest kernel for KVM (Trap & Emulate) mode | 2030 | Select this option if building a guest kernel for KVM (Trap & Emulate) |
2031 | mode. | ||
2031 | 2032 | ||
2032 | config KVM_GUEST_TIMER_FREQ | 2033 | config KVM_GUEST_TIMER_FREQ |
2033 | int "Count/Compare Timer Frequency (MHz)" | 2034 | int "Count/Compare Timer Frequency (MHz)" |
diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h index 6ded8d347af9..6a313157db83 100644 --- a/arch/mips/include/asm/kvm_host.h +++ b/arch/mips/include/asm/kvm_host.h | |||
@@ -58,7 +58,7 @@ | |||
58 | #define KVM_MAX_VCPUS 1 | 58 | #define KVM_MAX_VCPUS 1 |
59 | #define KVM_USER_MEM_SLOTS 8 | 59 | #define KVM_USER_MEM_SLOTS 8 |
60 | /* memory slots that does not exposed to userspace */ | 60 | /* memory slots that does not exposed to userspace */ |
61 | #define KVM_PRIVATE_MEM_SLOTS 0 | 61 | #define KVM_PRIVATE_MEM_SLOTS 0 |
62 | 62 | ||
63 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 63 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
64 | #define KVM_HALT_POLL_NS_DEFAULT 500000 | 64 | #define KVM_HALT_POLL_NS_DEFAULT 500000 |
diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c index 41b1b090f56f..95b83a6582ef 100644 --- a/arch/mips/kvm/emulate.c +++ b/arch/mips/kvm/emulate.c | |||
@@ -1243,10 +1243,9 @@ enum emulation_result kvm_mips_emulate_CP0(uint32_t inst, uint32_t *opc, | |||
1243 | #ifdef KVM_MIPS_DEBUG_COP0_COUNTERS | 1243 | #ifdef KVM_MIPS_DEBUG_COP0_COUNTERS |
1244 | cop0->stat[MIPS_CP0_STATUS][0]++; | 1244 | cop0->stat[MIPS_CP0_STATUS][0]++; |
1245 | #endif | 1245 | #endif |
1246 | if (rt != 0) { | 1246 | if (rt != 0) |
1247 | vcpu->arch.gprs[rt] = | 1247 | vcpu->arch.gprs[rt] = |
1248 | kvm_read_c0_guest_status(cop0); | 1248 | kvm_read_c0_guest_status(cop0); |
1249 | } | ||
1250 | /* EI */ | 1249 | /* EI */ |
1251 | if (inst & 0x20) { | 1250 | if (inst & 0x20) { |
1252 | kvm_debug("[%#lx] mfmcz_op: EI\n", | 1251 | kvm_debug("[%#lx] mfmcz_op: EI\n", |
@@ -2583,9 +2582,8 @@ enum emulation_result kvm_mips_handle_tlbmiss(unsigned long cause, | |||
2583 | * an entry into the guest TLB. | 2582 | * an entry into the guest TLB. |
2584 | */ | 2583 | */ |
2585 | index = kvm_mips_guest_tlb_lookup(vcpu, | 2584 | index = kvm_mips_guest_tlb_lookup(vcpu, |
2586 | (va & VPN2_MASK) | | 2585 | (va & VPN2_MASK) | |
2587 | (kvm_read_c0_guest_entryhi | 2586 | (kvm_read_c0_guest_entryhi(vcpu->arch.cop0) & ASID_MASK)); |
2588 | (vcpu->arch.cop0) & ASID_MASK)); | ||
2589 | if (index < 0) { | 2587 | if (index < 0) { |
2590 | if (exccode == T_TLB_LD_MISS) { | 2588 | if (exccode == T_TLB_LD_MISS) { |
2591 | er = kvm_mips_emulate_tlbmiss_ld(cause, opc, run, vcpu); | 2589 | er = kvm_mips_emulate_tlbmiss_ld(cause, opc, run, vcpu); |
diff --git a/arch/mips/kvm/locore.S b/arch/mips/kvm/locore.S index 7e2210846b8b..81687ab1b523 100644 --- a/arch/mips/kvm/locore.S +++ b/arch/mips/kvm/locore.S | |||
@@ -335,7 +335,7 @@ NESTED (MIPSX(GuestException), CALLFRAME_SIZ, ra) | |||
335 | 335 | ||
336 | /* Now restore the host state just enough to run the handlers */ | 336 | /* Now restore the host state just enough to run the handlers */ |
337 | 337 | ||
338 | /* Swtich EBASE to the one used by Linux */ | 338 | /* Switch EBASE to the one used by Linux */ |
339 | /* load up the host EBASE */ | 339 | /* load up the host EBASE */ |
340 | mfc0 v0, CP0_STATUS | 340 | mfc0 v0, CP0_STATUS |
341 | 341 | ||
@@ -490,11 +490,11 @@ __kvm_mips_return_to_guest: | |||
490 | REG_ADDU t3, t1, t2 | 490 | REG_ADDU t3, t1, t2 |
491 | LONG_L k0, (t3) | 491 | LONG_L k0, (t3) |
492 | andi k0, k0, 0xff | 492 | andi k0, k0, 0xff |
493 | mtc0 k0,CP0_ENTRYHI | 493 | mtc0 k0, CP0_ENTRYHI |
494 | ehb | 494 | ehb |
495 | 495 | ||
496 | /* Disable RDHWR access */ | 496 | /* Disable RDHWR access */ |
497 | mtc0 zero, CP0_HWRENA | 497 | mtc0 zero, CP0_HWRENA |
498 | 498 | ||
499 | /* load the guest context from VCPU and return */ | 499 | /* load the guest context from VCPU and return */ |
500 | LONG_L $0, VCPU_R0(k1) | 500 | LONG_L $0, VCPU_R0(k1) |
@@ -606,11 +606,11 @@ __kvm_mips_return_to_host: | |||
606 | 606 | ||
607 | /* Restore RDHWR access */ | 607 | /* Restore RDHWR access */ |
608 | PTR_LI k0, 0x2000000F | 608 | PTR_LI k0, 0x2000000F |
609 | mtc0 k0, CP0_HWRENA | 609 | mtc0 k0, CP0_HWRENA |
610 | 610 | ||
611 | /* Restore RA, which is the address we will return to */ | 611 | /* Restore RA, which is the address we will return to */ |
612 | LONG_L ra, PT_R31(k1) | 612 | LONG_L ra, PT_R31(k1) |
613 | j ra | 613 | j ra |
614 | nop | 614 | nop |
615 | 615 | ||
616 | VECTOR_END(MIPSX(GuestExceptionEnd)) | 616 | VECTOR_END(MIPSX(GuestExceptionEnd)) |
diff --git a/arch/mips/kvm/tlb.c b/arch/mips/kvm/tlb.c index aed0ac2a4972..3d3f22301a35 100644 --- a/arch/mips/kvm/tlb.c +++ b/arch/mips/kvm/tlb.c | |||
@@ -673,8 +673,8 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | |||
673 | 673 | ||
674 | local_irq_save(flags); | 674 | local_irq_save(flags); |
675 | 675 | ||
676 | if (((vcpu->arch. | 676 | if ((vcpu->arch.guest_kernel_asid[cpu] ^ asid_cache(cpu)) & |
677 | guest_kernel_asid[cpu] ^ asid_cache(cpu)) & ASID_VERSION_MASK)) { | 677 | ASID_VERSION_MASK) { |
678 | kvm_get_new_mmu_context(&vcpu->arch.guest_kernel_mm, cpu, vcpu); | 678 | kvm_get_new_mmu_context(&vcpu->arch.guest_kernel_mm, cpu, vcpu); |
679 | vcpu->arch.guest_kernel_asid[cpu] = | 679 | vcpu->arch.guest_kernel_asid[cpu] = |
680 | vcpu->arch.guest_kernel_mm.context.asid[cpu]; | 680 | vcpu->arch.guest_kernel_mm.context.asid[cpu]; |