diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-07-20 16:08:14 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-07-20 16:08:14 +0800 |
commit | 1d508e233d21a7848cf54d7d03b40dac2d9ea873 (patch) | |
tree | eec5222580c4bca752ae35d5cef3842166e6f8c8 /arch/mips/kvm/mips.c | |
parent | 439863d92fda525a8f3b326a24490e91c70f0496 (diff) | |
parent | 5880876e94699ce010554f483ccf0009997955ca (diff) |
Merge remote-tracking branch 'lts/linux-4.1.y' into linux-linaro-lsk-v4.1lsk-v4.1-16.07
Conflicts:
pick up 45d1abd9de arm64: Use PoU cache instr for I/D coherency
in arch/arm64/mm/flush.c
Diffstat (limited to 'arch/mips/kvm/mips.c')
-rw-r--r-- | arch/mips/kvm/mips.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index 3e12912ce828..69311b9c551e 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c @@ -312,6 +312,15 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id) memcpy(gebase + offset, mips32_GuestException, mips32_GuestExceptionEnd - mips32_GuestException); +#ifdef MODULE + offset += mips32_GuestExceptionEnd - mips32_GuestException; + memcpy(gebase + offset, (char *)__kvm_mips_vcpu_run, + __kvm_mips_vcpu_run_end - (char *)__kvm_mips_vcpu_run); + vcpu->arch.vcpu_run = gebase + offset; +#else + vcpu->arch.vcpu_run = __kvm_mips_vcpu_run; +#endif + /* Invalidate the icache for these ranges */ local_flush_icache_range((unsigned long)gebase, (unsigned long)gebase + ALIGN(size, PAGE_SIZE)); @@ -401,7 +410,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) /* Disable hardware page table walking while in guest */ htw_stop(); - r = __kvm_mips_vcpu_run(run, vcpu); + r = vcpu->arch.vcpu_run(run, vcpu); /* Re-enable HTW before enabling interrupts */ htw_start(); |