From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (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 7D3B127990B for ; Mon, 28 Apr 2025 18:09:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745863782; cv=none; b=tRpmC5k/DUNI9fbNU9la5z6teVxBgw1MGZL/cvsNKCz5BEyURm3VM42c7iDpx1hR4veB51ynZy5/WP67u6SOnXWrxYHRJHGP8kHJ0CkSQghAQyANyOFKeF00wM7cb0MczyhvrTDw9Xov8jWK6+TZAC0I63fokKCPs0Y3LklBNUo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745863782; c=relaxed/simple; bh=Tp/iIl9Q/zHH79Zmt5OXH8Ujx60iyEVCTPY1h9qYcFE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=faDlzF9c2b8Qxe3FPzLs1CygqUVXXlK0/xPvDLCbAbBp/JIIkLIcvkAHudGY9Xm7B9z5sO5+A0W6c+Vb2r43VyNZd1Qzj/subsEAoGvMS8xMlk673iyZx+cxyHJl7b35L5r9xIyPSNvDLBlIMVIAdpc3t0UMCjV8e23/dZWszPQ= 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=q7suKjt0; arc=none smtp.client-ip=209.85.216.74 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="q7suKjt0" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-2ff6167e9ccso5931990a91.1 for ; Mon, 28 Apr 2025 11:09:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1745863781; x=1746468581; 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=Tp/iIl9Q/zHH79Zmt5OXH8Ujx60iyEVCTPY1h9qYcFE=; b=q7suKjt0MCnoSNjT7lqdUE+P4SVeM5wIPR7GIMRErateXWyeV5zJRdgq1oTsHE0qEk zGF9nGnYs7XQ9Y/Ckr6rq+UVGnP/XCXmy33VWOBgyPvsorypiD0lXIPr2UDl3z8cmQVC 0kRYxefMcqZPhcgye/3BevPsTGfDUwvmhksfmph5pSTxaHZWVdLaPjz1hpnqmMl0tP8o lyRnrsfBIBG21K6Osy3skKXFXwZ67qHvSf90g6mWIaYwVT3mAK26jJHJfZ5VIXooe/6f oBqADrTHGzPP50VAsBtFZYcv2A3kpLfoIOfnpRi0xYlBpQ+ve/DfcLpflHK44+6doJrv mh1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745863781; x=1746468581; 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=Tp/iIl9Q/zHH79Zmt5OXH8Ujx60iyEVCTPY1h9qYcFE=; b=A/G1ESHUAVs2Sx7sHdfq3GmTj7wx3xOgTtJTC88bSizjXMA+VGqGN+jMIsZv/dUF+T xyWKhOUrXf8UC+pMygfNMvYk6YYP60rs2SFeC1vZtouZWxEhFZWlAcH1hQ4ynLwtPVTE xRhg9Vw79Uzmt4P/C0e6ZmyWapUjXYJIaCMODXIqza0YbI8GIMkAr4RYSn3Ek5NTfFOk HMQPqars9p+5KRSv5KSGCVtBTk9sQqz1C2WQ2yo/a5zS+6uJ+8sMBe8xuhGimJSVeVqr dn8xF1lRlx/au/PXqvW94q4RKM2CKD+lEm+D3emGH11wm0eHl5a+G3t9pELHIDQ7zze0 l42g== X-Forwarded-Encrypted: i=1; AJvYcCWoakfOXzhdxMJuG9ZJ9INVcS4VhLbxGOdVoDnZTrmHQ91opF1N1+MFEWN06c7KUZInsEqPgu6eyCYNUBc=@vger.kernel.org X-Gm-Message-State: AOJu0Yw7keCIWygR4xgDF2PpwyokH1Z5fBiYB1oEp+JiOH/A8mNMtGsB mPVMlgdgW4GeR03OBP9ZoUZMg7DFY6i04mZutejYD9QNBg4YWYmNH8pw7xNBVkRmvnOwJh9FTa+ Vrw== X-Google-Smtp-Source: AGHT+IG1aAcjSNzcjUnMtXPJEVikbQf0GuZAZa9ivU+BSsf6ZyacI9MZyufqcmANUeFXs4QrkN9zsIjMW5c= X-Received: from pjoo7.prod.google.com ([2002:a17:90b:5827:b0:308:867e:1ced]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:1dcb:b0:2f6:f32e:90ac with SMTP id 98e67ed59e1d1-30a21552b2dmr1206424a91.11.1745863780872; Mon, 28 Apr 2025 11:09:40 -0700 (PDT) Date: Mon, 28 Apr 2025 11:09:39 -0700 In-Reply-To: <20250418115504.17155-1-lirongqing@baidu.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250418115504.17155-1-lirongqing@baidu.com> Message-ID: Subject: Re: [PATCH] KVM: Fix obsolete comment about locking for kvm_io_bus_read/write From: Sean Christopherson To: Li RongQing Cc: pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Fri, Apr 18, 2025, Li RongQing wrote: > Nobody is actually calling these functions with slots_lock held. > The srcu read lock is required. I vote to delete the comments entirely, the srcu_dereference() precisely communicates both what is being protected, and what provides the protection.