public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Yan Zhao <yan.y.zhao@intel.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [PATCH v3] KVM: VMX: fix lockdep warning on posted intr wakeup
Date: Fri, 24 Mar 2023 16:13:37 -0700	[thread overview]
Message-ID: <ZB4uoe9WBzhG9ddU@google.com> (raw)
In-Reply-To: <20230313111022.13793-1-yan.y.zhao@intel.com>

On Mon, Mar 13, 2023, Yan Zhao wrote:
> The lock ordering after this patch are:
> - &p->pi_lock --> &rq->__lock -->
>   &per_cpu(wakeup_vcpus_on_cpu_lock_out, cpu)
> - &per_cpu(wakeup_vcpus_on_cpu_lock_in, cpu) -->
>   &per_cpu(wakeup_vcpus_on_cpu_lock_out, cpu)
> - &per_cpu(wakeup_vcpus_on_cpu_lock_in, cpu) --> &p->pi_lock
> 
> Currently, &rq->__lock is not held in "path sched_in".
> However, if in future "path sched_in" takes &p->pi_lock or &rq->__lock,
> lockdep is able to detect and warn in that case.
> 
> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com>
> [sean: path sched_out and path irq does not race, path sched_in does not
> take &rq->__lock]

But there's no actual deadlock, right?  I have zero interest in fixing a lockdep
false positive by making functional changes to KVM.  I am definitely open to making
changes to somehow let lockdep know what's going on, but complicating KVM's actual
functionality is too much.

  reply	other threads:[~2023-03-24 23:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13 11:10 [PATCH v3] KVM: VMX: fix lockdep warning on posted intr wakeup Yan Zhao
2023-03-24 23:13 ` Sean Christopherson [this message]
2023-03-29  1:53   ` Yan Zhao
2023-03-29 11:51     ` Paolo Bonzini
2023-03-30  9:56       ` Yan Zhao
2023-03-30 18:14         ` Sean Christopherson
2023-03-31  0:06           ` Yan Zhao
2023-04-10 17:30             ` Sean Christopherson

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=ZB4uoe9WBzhG9ddU@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yan.y.zhao@intel.com \
    /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