lkml.org 
[lkml]   [2021]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] kvm: x86: move srcu lock out of kvm_vcpu_check_block
From
Date
On 19/05/21 23:53, Sean Christopherson wrote:
> 1. Refactor check_nested_events() to split out a has_events() helper.
> 2. Move the has_events() call from kvm_vcpu_running() into kvm_vcpu_has_events()
> 3. Drop the explicit hv_timer_pending() in inject_pending_event(). It should
> be dead code since it's just a pointer to nested_vmx_preemption_timer_pending(),
> which is handled by vmx_check_nested_events() and called earlier.
> 4. Drop the explicit hv_timer_pending() in kvm_vcpu_has_events() for the same
> reasons as (3). This can also drop hv_timer_pending() entirely.

Sounds good except that I would do (3) first, since if I understand
correctly it's a valid cleanup in the current code as well, and do (2)
and (4) at the same time since you're basically enlarging the scope of
the existing hv_timer_pending call to include all nested events.

Paolo

\
 
 \ /
  Last update: 2021-05-20 14:33    [W:0.046 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site