From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 366A525D1E9 for ; Mon, 12 Jan 2026 17:39:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768239583; cv=none; b=AtQCz1W+kI+2AlehqoS1JwjizV+fVrJDgqNGpDEhqBUIbNsHndtMArIC7ANP7/pVm4yoTtiM+GlAVCTFGSpZ6kSgNc7eN6+t+tWzbVb1BHRypINTfFNRYukqEARFhr0DJFBtBjzPu5rvGcK/o+Hjyr+/5I4BaAS/lHA9UFdzuwg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768239583; c=relaxed/simple; bh=ud7E3JyfKtNeS9XbwbpACySiyHYX/osdjmtSmj/9fbc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=tEYB9zdnYm3r7QvbL3PASlDTr1vUFQ1ADt7TChbf8/ef9cN4rM4WkulhhyU65JSAEndZGT5MFvvVHvIQ9c58BgVLvW1mf2koKFH/+u/PLDfVP93MVbVc2cCg/F9stbOD8jSgF4sx6mNK3gdvpZ8SK2XitIYthKO05JbnJYvgh48= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Bj8toxuJ; arc=none smtp.client-ip=209.85.216.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Bj8toxuJ" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-34eb6589ed2so6989796a91.2 for ; Mon, 12 Jan 2026 09:39:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768239581; x=1768844381; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=uLoZ69d2BhEfk6FG6qzqG+j7J29DwSqZa37fouhKsT4=; b=Bj8toxuJVa8WYk/5DJOy6TO1tbQLr5bHfri3uaYL5s8FJ+K5+hUzbmov0Z/GwgPE9o T1XuSsp9Npotq6I7WtlIuptegkb6caT7SMivsCvUPRS1XLll4X+NfcB4blNSS4RbbeiT vB41fG3gieGKsdiikqt7YfXd/xqpUoe6R76ulEXG1rmG/v4NWn8aLaScDQesIy9dcP7y NHNoTpXSMDEk1ygflsNJNJqhdw+gHl50dP54FSM4mpYBsqD4g4WWFVCxBJqMAkacXz3I oGSebvZ25hy1hZ7pr5BcTCWhaPLaKfL5k+RtiKRQQlbeyAUZOrO1ZUzTu4PA1eoQw40H USNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768239581; x=1768844381; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uLoZ69d2BhEfk6FG6qzqG+j7J29DwSqZa37fouhKsT4=; b=NXQZ7G6rOJSvXvh3kTsCWLACo4rBR/iptB0SRhq4U2+5twaruamPETtOiv4IU8mgeH JnZhn455mX7iCYx3POxvRN3J2VPkINk3aIizx3w5CLhPNR+4Tasnzqkde+7WM0r1QcEf sJK5Xr002wxajjGa/jfZj5BIijIFsYjazCxWJfwO1fzp3+2LYHUABQ+Gb8zV+cII11SA g4fZJUenz0aYnof1mS06J/n79BTKa2bsUpQbWRNSS+Zr7luoM/gslO0jgE/JGczTERKk TVu8rYB8wbWyxUxtVq7CjYraFaewj9GzJZ0W+BuZtnzSJEEVRrloJr8hYJLKgtDD+hNJ SwlA== X-Forwarded-Encrypted: i=1; AJvYcCWTZHLfFDJ7ctJaonFafMHTmogo0T+D0utXz1j7+eAHah/CMJYx5jZ1rUX8SfnfS86v0x3cSPZLiUsXmoI=@vger.kernel.org X-Gm-Message-State: AOJu0YxGg1cLXOulVXp7nZ48KTZ+cgK7E/TUcjHYl6tK+EncDc7nbC7W pBOfIJ07nuesvKP0H3SotX2qgwqnob01/WMOCWDAXcCU/alT5RxW/6IM7AsdcuSpAiYT70EzRFb gwNby4A== X-Google-Smtp-Source: AGHT+IFUrOBrgUh1CxsPvcRzuutSfCbaaPL8yZ8SQzbWTVj7EMYH3TepTiXVByvAaKJFP/Xu5AfbOmDMzn8= X-Received: from pjbfv11.prod.google.com ([2002:a17:90b:e8b:b0:34c:2f02:7f5d]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:1e0a:b0:34c:e5fc:faec with SMTP id 98e67ed59e1d1-34f68c3367fmr16127936a91.2.1768239581531; Mon, 12 Jan 2026 09:39:41 -0800 (PST) Date: Mon, 12 Jan 2026 09:38:36 -0800 In-Reply-To: <20251016235538.171962-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251016235538.171962-1-seanjc@google.com> X-Mailer: git-send-email 2.52.0.457.g6b5491de43-goog Message-ID: <176823892636.1370730.5324133186861069066.b4-ty@google.com> Subject: Re: [PATCH] Documentation: KVM: Formalizing taking vcpu->mutex *outside* of kvm->slots_lock From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Marc Zyngier , Oliver Upton Content-Type: text/plain; charset="utf-8" On Thu, 16 Oct 2025 16:55:38 -0700, Sean Christopherson wrote: > Explicitly document the ordering of vcpu->mutex being taken *outside* of > kvm->slots_lock. While extremely unintuitive, and arguably wrong, both > arm64 and x86 have gained flows that take kvm->slots_lock inside of > vcpu->mutex. x86's kvm_inhibit_apic_access_page() is particularly > nasty, as slots_lock is taken quite deep within KVM_RUN, i.e. simply > swapping the ordering isn't an option. > > [...] Applied to kvm-x86 generic, thanks! [1/1] Documentation: KVM: Formalizing taking vcpu->mutex *outside* of kvm->slots_lock https://github.com/kvm-x86/linux/commit/98333091750d -- https://github.com/kvm-x86/linux/tree/next