From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) (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 A6E7338A702 for ; Fri, 27 Feb 2026 23:21:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772234502; cv=none; b=ctah7op7S6AK9mBb67Z16yr2rvKnEsEWNxZ1Qn+ITmgNjeEzJYwLpWw0fwsVJ+URaS3gmL+YHjU7TRrLTvhnmSJiHadKVitErYuaFTeUQXzVQs0jhz6sNZQBha43U1wMEMS0ObqRQjXn4CLBZNxec/9msSkk2Ip9CJzCvaWA9rI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772234502; c=relaxed/simple; bh=Cx6Q1kucVzkTgQKLWqSfFr7o44p92dVv2IBCJ5MhYrs=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=pv5GlT0k1wk+mbwgdflXfNHh4ri8uMrHn9po7KhYzaFsfl0G7KWxJp1QJeIkqNCtM4RhlB6/SS8hxRSd4gu/XOmIf8HROxseYdgWf2S6n1w7oiYqgKRBWncfNRtxBNvwJsHhexpELc/Mjq6RHn8Ii6exELjczSwIBOOFTJUdnD8= 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=eVgdZVua; arc=none smtp.client-ip=209.85.215.201 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="eVgdZVua" Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-c70fc78a985so1228371a12.1 for ; Fri, 27 Feb 2026 15:21:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1772234501; x=1772839301; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=H1z7ArV93oN1LUHXvok5tbiIFDmplItlW6BXRkqEjZQ=; b=eVgdZVuaDyCy2apjaLqqZlxoX6K4JnNOD5UlKTLzRtP6c9bEOyf5LDUvPAugeu9vTS yFMRGlVQdXvUHUrfDYUM+Phd0ejxsVlWuXVCfV4NxE03YUjJx1Uxg9slI6Img0qEFCjJ teEljvjb12Di7hnG/MtvwUANtTg63+VviwADolPRX3GaJ/2Pwiw3apsOq9KQAGDHbKDo 1wQFeJlRQqvhSHH7fb3CVHLbxgbW1yEP84nBjNzjcwPiM+bKHCuLIOhloc9OVSy5UMLS +6W7SuG2fxZV4xYbrscZBlEBSvOCXPDMStp7oJ9E3JBkvu/elSVyNk8xBzrGRquanBzE pMew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772234501; x=1772839301; h=content-transfer-encoding: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=H1z7ArV93oN1LUHXvok5tbiIFDmplItlW6BXRkqEjZQ=; b=nAhMs1oHZcze7hFP++Mx/BZfeBiU0OcEQU5OwUwi0yzwnzAFZH733r8yRRB8tzWFat qyc76QajuIZ/OgTtkK72Y0NnRLBg3w28LblBl5pO+V+w6yUytrL8sLwTjVvyqQYE1kgJ hkbeNvRH4osoDpKzgEQ24xmIg3LnZRrsUWvKT89ELux+N0+eU3lhq1c0I6mm+smModit ynQ1Q5OkTNoBUyU0Lyhbnzud/bKQO3gxXVsDtDtqmUwQVgSsKUOPnYZjDspna665c59o fRvGtUx+W7MReu9oTD6AqvxVc1gh0pyDvpeLOZKE07AkCu5riN9cnhsCAkHUTM9nEqp2 Nc7A== X-Forwarded-Encrypted: i=1; AJvYcCUTsRB0ZPziZzHmKXJbiouvD2iuF9btuWwfwr6Xu2Z/ur8HrbN7oUOAPaa/BvswjsRH7GfbDsNtGQIg+t4=@vger.kernel.org X-Gm-Message-State: AOJu0YxB6l29xJb/I0X1YxnbtDRDAYuomCOeKkzjPrD1/CswSIIjMvMg sXHC6Uu12yRUoL9rMRpLNS7Sbmu5WQI1iFrc1hxx/M+5Xsjc4ucydrdN391KBGrUaY5DH12Xe5q v3wLuWA== X-Received: from pgmt22.prod.google.com ([2002:a63:2256:0:b0:c70:e4b6:a276]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a21:1f8a:b0:371:8e6d:27fa with SMTP id adf61e73a8af0-395c3b0f129mr4334943637.47.1772234500765; Fri, 27 Feb 2026 15:21:40 -0800 (PST) Date: Fri, 27 Feb 2026 15:21:39 -0800 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260207041011.913471-1-seanjc@google.com> <20260207041011.913471-3-seanjc@google.com> Message-ID: Subject: Re: [GIT PULL] KVM: Generic changes for 6.20 From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 09, 2026, Sean Christopherson wrote: > On Mon, Feb 09, 2026, Paolo Bonzini wrote: > > On Mon, Feb 9, 2026 at 6:38=E2=80=AFPM Paolo Bonzini wrote: > > > > > > On Sat, Feb 7, 2026 at 5:10=E2=80=AFAM Sean Christopherson wrote: > > > > - Document that vcpu->mutex is take outside of kvm->slots_lock, wh= ich is all > > > > kinds of unintuitive, but is unfortunately the existing behavior= for > > > > multiple architectures, and in a weird way actually makes sense. > > > > > > I disagree that it is "arguably wrong" how you put it in the commit > > > message. vcpu->mutex is really a "don't worry about multiple ioctls a= t > > > the same time" mutex that tries to stay out of the way. It only > > > becomes unintuitive in special cases like > > > tdx_acquire_vm_state_locks(). > > > > > > By itself this would not be a reason to resend, but while at it you > > > could mention that vcpu->mutex is taken outside kvm->slots_arch_lock? > >=20 > > ... as well as mention kvm_alloc_apic_access_page() in the commit messa= ge. >=20 > Ya, will do. Finally got around to prepping a v2, and I realized that vcpu->mutex isn't = held when kvm_alloc_apic_access_page() is called, and thus isn't (currently) tak= en outside kvm->slots_arch_lock. avic_init_backing_page() and kvm_alloc_apic_access_page() are called with a= vCPU, but only via kvm_arch_vcpu_create(), when neither vcpu->mutex nor kvm->lock= are held (the vCPU is still unreachable). Given that locking.rst doesn't bother documenting that kvm->lock is taken o= utside kvm->slots_arch_lock (there's a whole section on slots locking), I'm inclin= ed to keep the new entry as just: - vcpu->mutex is taken outside kvm->slots_lock But update the changelog to not claim that the behavior is "arguablyh wrong= ". =20