lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 17 Aug 2020 11:46:46 +0800
From:   Jiaxun Yang <jiaxun.yang@...goat.com>
To:     linux-mips@...r.kernel.org
Cc:     Jiaxun Yang <jiaxun.yang@...goat.com>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Huacai Chen <chenhc@...ote.com>,
        Aleksandar Markovic <aleksandar.qemu.devel@...il.com>,
        Paul Burton <paulburton@...nel.org>,
        Serge Semin <Sergey.Semin@...kalelectronics.ru>,
        WANG Xuerui <git@...0n.name>,
        周琰杰 (Zhou Yanjie) 
        <zhouyanjie@...yeetech.com>,
        Liangliang Huang <huanglllzu@...il.com>,
        afzal mohammed <afzal.mohd.ma@...il.com>,
        Ingo Molnar <mingo@...nel.org>, Peter Xu <peterx@...hat.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Sergey Korolev <s.korolev@...systems.com>,
        Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
        Anup Patel <anup.patel@....com>, Marc Zyngier <maz@...nel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Jens Axboe <axboe@...nel.dk>,
        Steven Price <steven.price@....com>,
        Michael Kelley <mikelley@...rosoft.com>,
        Mike Leach <mike.leach@...aro.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Atish Patra <atish.patra@....com>,
        Ming Lei <ming.lei@...hat.com>, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org
Subject: [PATCH 7/7] MIPS: KVM: Don't use htimer when INTIMER is disabled

When INTIMER is disabled by host, the GT compare interrupt
will be ignored.

Signed-off-by: Jiaxun Yang <jiaxun.yang@...goat.com>
---
 arch/mips/kvm/vz.c | 6 ++++++
 1 file changed, 6 insertions(+)

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;
-- 
2.28.0.rc1

Powered by blists - more mailing lists