Re: [PATCH v4 4/5] KVM: LAPIC: Delay trace advance expire delta

From: Paolo Bonzini
Date: Mon May 20 2019 - 07:16:55 EST


On 20/05/19 10:18, Wanpeng Li wrote:
> From: Wanpeng Li <wanpengli@xxxxxxxxxxx>
>
> wait_lapic_expire() call was moved above guest_enter_irqoff() because of
> its tracepoint, which violated the RCU extended quiescent state invoked
> by guest_enter_irqoff()[1][2]. This patch simply moves the tracepoint
> below guest_exit_irqoff() in vcpu_enter_guest(). Snapshot the delta before
> VM-Enter, but trace it after VM-Exit. This can help us to move
> wait_lapic_expire() just before vmentry in the later patch.
>
> [1] Commit 8b89fe1f6c43 ("kvm: x86: move tracepoints outside extended quiescent state")
> [2] https://patchwork.kernel.org/patch/7821111/

This is a bit confusing, since the delta is printed after the
corresponding vmexit but the wait is done before the vmentry. I think
we can drop the tracepoint:

------------- 8< ----------------