From nobody Fri May 10 21:23:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621762846; cv=none; d=zohomail.com; s=zohoarc; b=n0yt2Bw4ixioluKMmO4XcdlqvO97hahNxQVabcwwiP74mDto/Mct5AoO+1en2g2JjFvgN6+rTtu4Ga3KsVT0t8GUjkaqOeHtbkIYpmIhKHb+pAvqPDortnq1RqvIkwrI5qdpm5IMn2qxphzrqjtz8EKmV4XxBg+QrRaveWcC4nI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621762846; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=l/srWcdbIelU+Cf/uD7ox1LabteZtPhwyCo62ZgjXfs=; b=TBPIRcoZmM4ainFemWv6FBaDf8BKbfWp3ud3cdK7qJZAAWWa4ccBb4ikk1qpLmQrHvvCR5+ru2SVjLhoGkpt4/3iWIpAH9tOi/AWjJib81YA1DvNAB+AF0YCBosyNYcSDRKk+Mbjo599XGUgmp1dwSVa7hC37iw5s2Ai7glMzoc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1621762846237968.8929613061874; Sun, 23 May 2021 02:40:46 -0700 (PDT) Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-456-gWV3lxJnNlu1lgE9w5d1VQ-1; Sun, 23 May 2021 05:40:42 -0400 Received: by mail-ej1-f69.google.com with SMTP id sd18-20020a170906ce32b02903cedf584542so6922453ejb.9 for ; Sun, 23 May 2021 02:40:42 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id qo14sm6479143ejb.47.2021.05.23.02.40.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 May 2021 02:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621762845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l/srWcdbIelU+Cf/uD7ox1LabteZtPhwyCo62ZgjXfs=; b=MWkJrIZrNTr79pOCZgIcOtkkfUturEBMVsTpPSrThR3Qc5pHV4SvZ3YXVZJuUVIMldFhGf qrKB2u5SgaDhpUg8AaP81kR4s++volYZkgaAiNBJjFRL3n9LrJWxgwYAq9sb/eYmjxKLI2 B9MNaodnMNBWxvdVnROLCRW040k6NN8= X-MC-Unique: gWV3lxJnNlu1lgE9w5d1VQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=l/srWcdbIelU+Cf/uD7ox1LabteZtPhwyCo62ZgjXfs=; b=odbBqpDdw3N2TAfIUDgWlrZYHhi1qHrKPwiFnr64AmJnVNR0g1yerbdyLX6UcZY567 RAJjIPfGUDDo6/qu36IOnIRiZstHBsw5pl2eCDvCCofFz8/EAczk4tNvke71HEJxynHT +Kj6o8DnohX2Qg55xKC2lxXjaNnxWsxtBbJP00SjG9pBqGEj47G5JFhOBY6tPMi8S8pM PCqc3OVoQ72bNMNi6QO5emuYtYHtcZnooQsT79ZnTW/q37dEIfcEK8eZPQnze3lDU/6Q p82YYu4tFFU/ob+FEpvqQ/E+4/T3wQavDf2TvL8N0y6ixZSi0vDFYQ7aGxJ3qkeqKYd4 CaUQ== X-Gm-Message-State: AOAM530M01EfArikRz2FNLgqHTvE5ozgxWmSBeZxALQGODa7evwzUP8H tKEqC4Zh/Q2AVIbKSEHqLH+6brIkYdaYXFDosGqbpVV4RTNm49ZlcCgdNFiKk9OMPjIdmf3eJQj 2qnmGayn5ADJntQ== X-Received: by 2002:a05:6402:487:: with SMTP id k7mr19764503edv.315.1621762841887; Sun, 23 May 2021 02:40:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3uMxU61e0PG8/u8JR/p8mSE7qqj/8U5YovHt2hc93HAAlsNtHgxYEiugKVwsFIkuFw6zNeQ== X-Received: by 2002:a05:6402:487:: with SMTP id k7mr19764494edv.315.1621762841782; Sun, 23 May 2021 02:40:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2] hw/virtio: Document *_should_notify() are called within rcu_read_lock() Date: Sun, 23 May 2021 11:40:40 +0200 Message-Id: <20210523094040.3516968-1-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Such comments make reviewing this file somehow easier. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Laurent Vivier --- v2: only one space before end of comment (mst) --- hw/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index e02544b2df7..130e3568409 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -2449,6 +2449,7 @@ static void virtio_set_isr(VirtIODevice *vdev, int va= lue) } } =20 +/* Called within rcu_read_lock(). */ static bool virtio_split_should_notify(VirtIODevice *vdev, VirtQueue *vq) { uint16_t old, new; @@ -2485,6 +2486,7 @@ static bool vring_packed_need_event(VirtQueue *vq, bo= ol wrap, return vring_need_event(off, new, old); } =20 +/* Called within rcu_read_lock(). */ static bool virtio_packed_should_notify(VirtIODevice *vdev, VirtQueue *vq) { VRingPackedDescEvent e; --=20 2.26.3