diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-01-06 18:27:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-01-06 18:27:17 -0500 |
commit | 08289086b0ab0379f54e1590ceb5e1b04d239c07 (patch) | |
tree | 509a0b7322a331f4639c5d78f7e202f527fbabda /arch/mips | |
parent | b1ee51702e12a99d35d7c11d1d2b5cd324001ee2 (diff) | |
parent | 69130ea1e6b9167d2459e2bab521196d0a0c0e68 (diff) |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fixes from Radim Krčmář:
"MIPS:
- fix host kernel crashes when receiving a signal with 64-bit
userspace
- flush instruction cache on all vcpus after generating entry code
(both for stable)
x86:
- fix NULL dereference in MMU caused by SMM transitions (for stable)
- correct guest instruction pointer after emulating some VMX errors
- minor cleanup"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: VMX: remove duplicated declaration
KVM: MIPS: Flush KVM entry code from icache globally
KVM: MIPS: Don't clobber CP0_Status.UX
KVM: x86: reset MMU on KVM_SET_VCPU_EVENTS
KVM: nVMX: fix instruction skipping during emulated vm-entry
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kvm/entry.c | 5 | ||||
-rw-r--r-- | arch/mips/kvm/mips.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/arch/mips/kvm/entry.c b/arch/mips/kvm/entry.c index 6a02b3a3fa65..e92fb190e2d6 100644 --- a/arch/mips/kvm/entry.c +++ b/arch/mips/kvm/entry.c | |||
@@ -521,6 +521,9 @@ void *kvm_mips_build_exit(void *addr) | |||
521 | uasm_i_and(&p, V0, V0, AT); | 521 | uasm_i_and(&p, V0, V0, AT); |
522 | uasm_i_lui(&p, AT, ST0_CU0 >> 16); | 522 | uasm_i_lui(&p, AT, ST0_CU0 >> 16); |
523 | uasm_i_or(&p, V0, V0, AT); | 523 | uasm_i_or(&p, V0, V0, AT); |
524 | #ifdef CONFIG_64BIT | ||
525 | uasm_i_ori(&p, V0, V0, ST0_SX | ST0_UX); | ||
526 | #endif | ||
524 | uasm_i_mtc0(&p, V0, C0_STATUS); | 527 | uasm_i_mtc0(&p, V0, C0_STATUS); |
525 | uasm_i_ehb(&p); | 528 | uasm_i_ehb(&p); |
526 | 529 | ||
@@ -643,7 +646,7 @@ static void *kvm_mips_build_ret_to_guest(void *addr) | |||
643 | 646 | ||
644 | /* Setup status register for running guest in UM */ | 647 | /* Setup status register for running guest in UM */ |
645 | uasm_i_ori(&p, V1, V1, ST0_EXL | KSU_USER | ST0_IE); | 648 | uasm_i_ori(&p, V1, V1, ST0_EXL | KSU_USER | ST0_IE); |
646 | UASM_i_LA(&p, AT, ~(ST0_CU0 | ST0_MX)); | 649 | UASM_i_LA(&p, AT, ~(ST0_CU0 | ST0_MX | ST0_SX | ST0_UX)); |
647 | uasm_i_and(&p, V1, V1, AT); | 650 | uasm_i_and(&p, V1, V1, AT); |
648 | uasm_i_mtc0(&p, V1, C0_STATUS); | 651 | uasm_i_mtc0(&p, V1, C0_STATUS); |
649 | uasm_i_ehb(&p); | 652 | uasm_i_ehb(&p); |
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index 06a60b19acfb..29ec9ab3fd55 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c | |||
@@ -360,8 +360,8 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id) | |||
360 | dump_handler("kvm_exit", gebase + 0x2000, vcpu->arch.vcpu_run); | 360 | dump_handler("kvm_exit", gebase + 0x2000, vcpu->arch.vcpu_run); |
361 | 361 | ||
362 | /* Invalidate the icache for these ranges */ | 362 | /* Invalidate the icache for these ranges */ |
363 | local_flush_icache_range((unsigned long)gebase, | 363 | flush_icache_range((unsigned long)gebase, |
364 | (unsigned long)gebase + ALIGN(size, PAGE_SIZE)); | 364 | (unsigned long)gebase + ALIGN(size, PAGE_SIZE)); |
365 | 365 | ||
366 | /* | 366 | /* |
367 | * Allocate comm page for guest kernel, a TLB will be reserved for | 367 | * Allocate comm page for guest kernel, a TLB will be reserved for |