Message ID | 20200817034701.3515721-8-jiaxun.yang@flygoat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | R4000 clock enhancements for Loongson | expand |
diff --git a/arch/mips/kvm/vz.c b/arch/mips/kvm/vz.c index 9d03bd0a604a..1d2140f7461a 100644 --- a/arch/mips/kvm/vz.c +++ b/arch/mips/kvm/vz.c @@ -341,6 +341,12 @@ static bool kvm_vz_should_use_htimer(struct kvm_vcpu *vcpu) if (kvm_mips_count_disabled(vcpu)) return false; + if (cpu_has_extimer) { + /* Guest htimer compare interrupt will be ignored if INTIMER is disabled */ + if (!(read_c0_config6() & LOONGSON_CONF6_INTIMER)) + return false; + } + /* Chosen frequency must match real frequency */ if (mips_hpt_frequency != vcpu->arch.count_hz) return false;
When INTIMER is disabled by host, the GT compare interrupt will be ignored. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> --- arch/mips/kvm/vz.c | 6 ++++++ 1 file changed, 6 insertions(+)