diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2014-12-19 11:05:31 -0500 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2015-01-29 17:24:56 -0500 |
commit | 3c1e716508335eb132c9349cb1a1716c8f7e3d2e (patch) | |
tree | 39aa2fe691caa61a34cef1ac7d09f3348249ddb5 /arch/arm/include/asm/kvm_mmu.h | |
parent | f3747379accba8e95d70cec0eae0582c8c182050 (diff) |
arm/arm64: KVM: Use set/way op trapping to track the state of the caches
Trying to emulate the behaviour of set/way cache ops is fairly
pointless, as there are too many ways we can end-up missing stuff.
Also, there is some system caches out there that simply ignore
set/way operations.
So instead of trying to implement them, let's convert it to VA ops,
and use them as a way to re-enable the trapping of VM ops. That way,
we can detect the point when the MMU/caches are turned off, and do
a full VM flush (which is what the guest was trying to do anyway).
This allows a 32bit zImage to boot on the APM thingy, and will
probably help bootloaders in general.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm/include/asm/kvm_mmu.h')
-rw-r--r-- | arch/arm/include/asm/kvm_mmu.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/include/asm/kvm_mmu.h b/arch/arm/include/asm/kvm_mmu.h index 63e0ecc04901..286644c729ba 100644 --- a/arch/arm/include/asm/kvm_mmu.h +++ b/arch/arm/include/asm/kvm_mmu.h | |||
@@ -190,7 +190,8 @@ static inline void coherent_cache_guest_page(struct kvm_vcpu *vcpu, hva_t hva, | |||
190 | 190 | ||
191 | #define kvm_virt_to_phys(x) virt_to_idmap((unsigned long)(x)) | 191 | #define kvm_virt_to_phys(x) virt_to_idmap((unsigned long)(x)) |
192 | 192 | ||
193 | void stage2_flush_vm(struct kvm *kvm); | 193 | void kvm_set_way_flush(struct kvm_vcpu *vcpu); |
194 | void kvm_toggle_cache(struct kvm_vcpu *vcpu, bool was_enabled); | ||
194 | 195 | ||
195 | #endif /* !__ASSEMBLY__ */ | 196 | #endif /* !__ASSEMBLY__ */ |
196 | 197 | ||