linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Possible nohz-full/RCU issue in arm64 KVM
@ 2021-12-17 11:51 Nicolas Saenz Julienne
  2021-12-17 13:21 ` Mark Rutland
  0 siblings, 1 reply; 22+ messages in thread
From: Nicolas Saenz Julienne @ 2021-12-17 11:51 UTC (permalink / raw)
  To: Mark Rutland, maz
  Cc: Will Deacon, paulmck, linux-arm-kernel, rcu, Thomas Gleixner,
	frederic, kvmarm, linux-kernel

Hi All,
arm64's guest entry code does the following:

int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)
{
	[...]

	guest_enter_irqoff();

	ret = kvm_call_hyp_ret(__kvm_vcpu_run, vcpu);

	[...]

	local_irq_enable();

	/*
	 * We do local_irq_enable() before calling guest_exit() so
	 * that if a timer interrupt hits while running the guest we
	 * account that tick as being spent in the guest.  We enable
	 * preemption after calling guest_exit() so that if we get
	 * preempted we make sure ticks after that is not counted as
	 * guest time.
	 */
	guest_exit();
	[...]
}


On a nohz-full CPU, guest_{enter,exit}() delimit an RCU extended quiescent
state (EQS). Any interrupt happening between local_irq_enable() and
guest_exit() should disable that EQS. Now, AFAICT all el0 interrupt handlers do
the right thing if trggered in this context, but el1's won't. Is it possible to
hit an el1 handler (for example __el1_irq()) there?

Thanks,

-- 
Nicolás Sáenz


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

end of thread, other threads:[~2022-01-11 12:23 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17 11:51 Possible nohz-full/RCU issue in arm64 KVM Nicolas Saenz Julienne
2021-12-17 13:21 ` Mark Rutland
2021-12-17 14:15   ` Nicolas Saenz Julienne
2021-12-17 14:38     ` Mark Rutland
2021-12-17 15:54       ` Paolo Bonzini
2021-12-17 16:07         ` Paul E. McKenney
2021-12-17 16:20           ` Nicolas Saenz Julienne
2021-12-17 16:43             ` Paul E. McKenney
2021-12-17 16:34           ` Paolo Bonzini
2021-12-17 16:45             ` Paul E. McKenney
2021-12-17 17:02               ` Paolo Bonzini
2021-12-17 17:12                 ` Paul E. McKenney
2021-12-17 17:23                   ` Paolo Bonzini
2021-12-17 17:47                     ` Paul E. McKenney
2022-01-04 16:39         ` Mark Rutland
2022-01-04 17:07           ` Paolo Bonzini
2022-01-11 11:32           ` Nicolas Saenz Julienne
2022-01-11 12:23             ` Mark Rutland
2021-12-17 14:51   ` Paolo Bonzini
2021-12-20 14:28   ` Marc Zyngier
2021-12-20 16:10   ` Frederic Weisbecker
2022-01-04 13:24     ` Mark Rutland

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).