Skip to content

Commit 24d1a6e

Browse files
James Hoganralfbaechle
authored andcommitted
MIPS: KVM: Use __local_flush_icache_user_range()
Convert KVM dynamic translation of guest instructions to flush icache for guest mapped addresses using the new __local_flush_icache_user_range() API to allow the more generic flush_icache_range() to be changed to work on kernel addresses only. Signed-off-by: James Hogan <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: "Radim Krčmář" <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/14155/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent d99a043 commit 24d1a6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/mips/kvm/dyntrans.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ static int kvm_mips_trans_replace(struct kvm_vcpu *vcpu, u32 *opc,
4545
} else if (KVM_GUEST_KSEGX((unsigned long) opc) == KVM_GUEST_KSEG23) {
4646
local_irq_save(flags);
4747
memcpy((void *)opc, (void *)&replace, sizeof(u32));
48-
local_flush_icache_range((unsigned long)opc,
49-
(unsigned long)opc + 32);
48+
__local_flush_icache_user_range((unsigned long)opc,
49+
(unsigned long)opc + 32);
5050
local_irq_restore(flags);
5151
} else {
5252
kvm_err("%s: Invalid address: %p\n", __func__, opc);

0 commit comments

Comments
 (0)