Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2026291/?format=api
{ "id": 2026291, "url": "http://patchwork.ozlabs.org/api/patches/2026291/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20241220104220.2007786-14-npiggin@gmail.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20241220104220.2007786-14-npiggin@gmail.com>", "list_archive_url": null, "date": "2024-12-20T10:42:15", "name": "[13/17] hw/scsi: Convert to new bh API", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "96e022322673b4166f09f1edadfd53e34fbf6f0a", "submitter": { "id": 69518, "url": "http://patchwork.ozlabs.org/api/people/69518/?format=api", "name": "Nicholas Piggin", "email": "npiggin@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20241220104220.2007786-14-npiggin@gmail.com/mbox/", "series": [ { "id": 437728, "url": "http://patchwork.ozlabs.org/api/series/437728/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=437728", "date": "2024-12-20T10:42:02", "name": "replay: Fixes and avocado test updates", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/437728/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2026291/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2026291/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=Td4f1Tv/;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4YF3vC6hbjz1yT0\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 20 Dec 2024 21:44:23 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1tOaUV-0007LA-SE; Fri, 20 Dec 2024 05:44:20 -0500", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <npiggin@gmail.com>)\n id 1tOaUU-0007CF-Hw; Fri, 20 Dec 2024 05:44:18 -0500", "from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <npiggin@gmail.com>)\n id 1tOaUS-0005Rd-Tj; Fri, 20 Dec 2024 05:44:18 -0500", "by mail-pg1-x530.google.com with SMTP id\n 41be03b00d2f7-7fd17f2312bso1312076a12.0;\n Fri, 20 Dec 2024 02:44:16 -0800 (PST)", "from wheely.local0.net (14-200-18-130.tpgi.com.au. [14.200.18.130])\n by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-2f2ee06dfd3sm5376942a91.32.2024.12.20.02.44.07\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 20 Dec 2024 02:44:14 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1734691455; x=1735296255; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=gK96j8dWCREGXgJwMGuVlSSEE1tC1GR6d2jBmPlZZVA=;\n b=Td4f1Tv/JfnZL4Elus48aX0gwrTK+3D9BAR1rhG+S9ZDf5r+MbPpEej2OHWGQ9SE5q\n NX5tXU+yPVS14BSZv2j3Zzjtz80qT7PIsfs6YueG0QE57p0wgBENEKQRHOsJ1s1vYVjg\n kli6C0VgsCrdwdUGX5OonMoMPmx65TVMVCYnUDyOmVX3/06Ke6JUPxxUyoxiVy9oVzw7\n S+rcgBa9KtXNHVoc/FXXNeiT2tkotVB3CnCKfD5Z5GgUMua6+GIKNKEPdYcZ+usKfkRF\n svcnv2yzPyqA1H94YfG0ct4ySqFQrCeM/DDB89dTcbMTq9Si1eHoal9NXOW5tWkGRikU\n 8SKw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1734691455; x=1735296255;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=gK96j8dWCREGXgJwMGuVlSSEE1tC1GR6d2jBmPlZZVA=;\n b=Ahsmf0b4d2pVjYjf+e2Sh1VuV0AdmxQySgDFkh+iMuvp5/BhF0jR5r/OU8G88nwEaf\n AdU/XgE45NkfHpqDUUXY/aj2lHtYrwIIV3B77fCS/xKNQwjrIuzJViu9hPO9cBFvyLxq\n r/L+II3JqParF4+uC9TiRAC1oPrFEcNiCN82jdWKfH1+OtfAF6QAY9k9PfgrL2KWslcz\n 2bLJfwHFq8Go5G/wReOXJQlDicXu2Y6+WnOtu+N1Mqv/+ibzzC73FdDA0pNXE/CDmVVq\n Uu5YhBqBd4IqiwyVotsDtrCqu+EMf1x3F+wcnvNaYMVLRUwmdZeLhXN/IZSAx84esNuJ\n 4LKQ==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCWpuaqZyI4QlOFVqeC4+iIctq/SkI79apOe8eSZRS/pUeA23moMPCj6c8FbudjlpiEJ5Mw+pE8L6L5K@nongnu.org", "X-Gm-Message-State": "AOJu0YyG5HUbnjwd68ewoFiT2WsWipkRa75IcOMuIGgHXDM0N20Hrw5C\n MhlzvJQTlb8ntTswDgtBwMnJ7que1YNBG9WGBjo/2xlxqaW23/BHi6KEzQ==", "X-Gm-Gg": "ASbGnctQUD3J9C6quxt+dsm0jA+2MQNqntBnpBNWuj2Exg6Z2PlfBRYn1OC0DuTEY51\n qTHygBFoL7S13cpuc/SiqxhgLUcPinKBFBOMQyzNC1hvJ9u3O/EwaUdVIq8ft3r/9bYSpyLZIDu\n GK9skYJ785Yrr8UamCHAr5QVtC48MecGSMN3+K7DxbcQ+nZJykfqw5QI6Isn4l/NsqO+NQ1zjXP\n uSzeiqdOb4oRBEeNxaReHGi6mtEY5YZNw/HzRHtvHQQVfKIdDDgRTBTIdJq66HhjiF/VHRc2r1c\n PQc8gTsNpw==", "X-Google-Smtp-Source": "\n AGHT+IHZFHLin5x6wJnLdKPCeP9ORVvAm7tn/Fzr3fGVEOIA6Fdk4Fw0nxh1zvmUre6+GFtkqiZjSg==", "X-Received": "by 2002:a17:90b:134d:b0:2ea:4c4f:bd20 with SMTP id\n 98e67ed59e1d1-2f452eed773mr3451099a91.32.1734691454890;\n Fri, 20 Dec 2024 02:44:14 -0800 (PST)", "From": "Nicholas Piggin <npiggin@gmail.com>", "To": "qemu-devel@nongnu.org", "Cc": "Nicholas Piggin <npiggin@gmail.com>, qemu-block@nongnu.org, =?utf-8?q?Al?=\n\t=?utf-8?q?ex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,\n Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>,\n Paolo Bonzini <pbonzini@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>,\n Fam Zheng <fam@euphon.net>, Ronnie Sahlberg <ronniesahlberg@gmail.com>,\n John Snow <jsnow@redhat.com>, \"Michael S. Tsirkin\" <mst@redhat.com>,\n Jason Wang <jasowang@redhat.com>,\n Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,\n Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>,\n \"Dr. David Alan Gilbert\" <dave@treblig.org>,\n Markus Armbruster <armbru@redhat.com>, Michael Roth <michael.roth@amd.com>,\n Wainer dos Santos Moschetta <wainersm@redhat.com>", "Subject": "[PATCH 13/17] hw/scsi: Convert to new bh API", "Date": "Fri, 20 Dec 2024 20:42:15 +1000", "Message-ID": "<20241220104220.2007786-14-npiggin@gmail.com>", "X-Mailer": "git-send-email 2.45.2", "In-Reply-To": "<20241220104220.2007786-1-npiggin@gmail.com>", "References": "<20241220104220.2007786-1-npiggin@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2607:f8b0:4864:20::530;\n envelope-from=npiggin@gmail.com; helo=mail-pg1-x530.google.com", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "Convert aio_bh_schedule_oneshot() to aio_bh_schedule_oneshot_event(),\nwhich can specify the clock type, making it compatible with\nrecord-replay.\n\nOperations on SCSI reqs do affect target machine state, so it should\nuse QEMU_CLOCK_VIRTUAL to recorded and replay the bh.\n\nThis fixes hangs in record/replay when using SCSI devices.\n\nSigned-off-by: Nicholas Piggin <npiggin@gmail.com>\n---\n hw/scsi/scsi-bus.c | 14 +++++++++++---\n 1 file changed, 11 insertions(+), 3 deletions(-)", "diff": "diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c\nindex 2f1678d51e7..16f294ce6b7 100644\n--- a/hw/scsi/scsi-bus.c\n+++ b/hw/scsi/scsi-bus.c\n@@ -166,9 +166,17 @@ static void scsi_device_for_each_req_async(SCSIDevice *s,\n \n /* Paired with blk_dec_in_flight() in scsi_device_for_each_req_async_bh() */\n blk_inc_in_flight(s->conf.blk);\n- aio_bh_schedule_oneshot(blk_get_aio_context(s->conf.blk),\n- scsi_device_for_each_req_async_bh,\n- data);\n+\n+ /*\n+ * This is called by device reset and does not affect the observable state\n+ * of the target (because it is being reset), and by scsi_dma_restart_cb\n+ * to restart DMA on vmstate change which also should not affect the state\n+ * of the target (XXX is this really true?), so QEMU_CLOCK_REALTIME should\n+ * be used to avoid record-replay of the bh event.\n+ */\n+ aio_bh_schedule_oneshot_event(blk_get_aio_context(s->conf.blk),\n+ scsi_device_for_each_req_async_bh,\n+ data, QEMU_CLOCK_REALTIME);\n }\n \n static void scsi_device_realize(SCSIDevice *s, Error **errp)\n", "prefixes": [ "13/17" ] }