linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* kvm-unit-tests: psci_cpu_on_test FAILed
@ 2019-08-02 10:56 Zenghui Yu
  2019-08-02 11:32 ` Andrew Jones
  2019-08-02 15:56 ` Marc Zyngier
  0 siblings, 2 replies; 6+ messages in thread
From: Zenghui Yu @ 2019-08-02 10:56 UTC (permalink / raw)
  To: Marc Zyngier, drjones, James Morse, julien.thierry.kdev,
	suzuki.poulose
  Cc: linux-arm-kernel, Wanghaibin (D), kvmarm, kvm

Hi folks,

Running kvm-unit-tests with Linux 5.3.0-rc2 on Kunpeng 920, we will get
the following fail info:

	[...]
	FAIL psci (4 tests, 1 unexpected failures)
	[...]
and
	[...]
	INFO: unexpected cpu_on return value: caller=CPU9, ret=-2
	FAIL: cpu-on
	SUMMARY: 4 tests, 1 unexpected failures


I think this is an issue had been fixed once by commit 6c7a5dce22b3
("KVM: arm/arm64: fix races in kvm_psci_vcpu_on"), which makes use of
kvm->lock mutex to fix the race between two PSCI_CPU_ON calls - one
does reset on the MPIDR register whilst another reads it.

But commit 358b28f09f0 ("arm/arm64: KVM: Allow a VCPU to fully reset
itself") later moves the reset work into check_vcpu_requests(), by
making a KVM_REQ_VCPU_RESET request in PSCI code. Thus the reset work
has not been protected by kvm->lock mutex anymore, and the race shows up
again...

Do we need a fix for this issue? At least achieve a mutex execution
between the reset of MPIDR and kvm_mpidr_to_vcpu()?


Thanks,
zenghui


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-05  2:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-02 10:56 kvm-unit-tests: psci_cpu_on_test FAILed Zenghui Yu
2019-08-02 11:32 ` Andrew Jones
2019-08-02 15:56 ` Marc Zyngier
2019-08-03  9:27   ` Zenghui Yu
2019-08-03 10:10     ` Marc Zyngier
2019-08-05  2:38       ` Zenghui Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).