kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Sean Christopherson <seanjc@google.com>, Jon Kohler <jon@nutanix.com>
Cc: Bijan Mottahedeh <bijan.mottahedeh@nutanix.com>,
	Raphael Norwitz <raphael.norwitz@nutanix.com>,
	Junaid Shahid <junaids@google.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"x86@kernel.org" <x86@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kvm: x86: move srcu lock out of kvm_vcpu_check_block
Date: Thu, 20 May 2021 14:31:11 +0200	[thread overview]
Message-ID: <3d3622c0-7c7a-3d24-d0f5-3204c5d105f9@redhat.com> (raw)
In-Reply-To: <YKWI1GPdNc4shaCt@google.com>

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


  reply	other threads:[~2021-05-20 12:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 17:38 [PATCH] kvm: x86: move srcu lock out of kvm_vcpu_check_block Jon Kohler
2021-04-30 20:45 ` Sean Christopherson
2021-05-01 13:05   ` Paolo Bonzini
2021-05-05 15:46     ` Jon Kohler
2021-05-19 21:53       ` Sean Christopherson
2021-05-20 12:31         ` Paolo Bonzini [this message]
     [not found] <<20210428173820.13051-1-jon@nutanix.com>
2021-04-30  1:54 ` Prashanth Sreenivasa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d3622c0-7c7a-3d24-d0f5-3204c5d105f9@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bijan.mottahedeh@nutanix.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=jon@nutanix.com \
    --cc=joro@8bytes.org \
    --cc=junaids@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=raphael.norwitz@nutanix.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).