get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2232020/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2232020,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2232020/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/ltp/patch/20260502081446.10472-1-chihsheng@google.com/",
    "project": {
        "id": 59,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/59/?format=api",
        "name": "Linux Test Project development",
        "link_name": "ltp",
        "list_id": "ltp.lists.linux.it",
        "list_email": "ltp@lists.linux.it",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260502081446.10472-1-chihsheng@google.com>",
    "date": "2026-05-02T08:14:46",
    "name": "tst_virt: Add fallback KVM detection via virtio block devices",
    "commit_ref": null,
    "pull_url": null,
    "state": "needs-review-ack",
    "archived": false,
    "hash": "481a68a5fc7e2def864db437fa25136e12bc91c3",
    "submitter": {
        "id": 93256,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/93256/?format=api",
        "name": "Darren Chang",
        "email": "chihsheng@google.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ltp/patch/20260502081446.10472-1-chihsheng@google.com/mbox/",
    "series": [
        {
            "id": 502517,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502517/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/ltp/list/?series=502517",
            "date": "2026-05-02T08:14:46",
            "name": "tst_virt: Add fallback KVM detection via virtio block devices",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502517/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2232020/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/2232020/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "ltp@lists.linux.it"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "ltp@picard.linux.it"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=lists.linux.it header.i=@lists.linux.it\n header.a=rsa-sha256 header.s=picard header.b=ZA83ArXJ;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256\n header.s=20251104 header.b=WF3GXO9R;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=213.254.12.146; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from picard.linux.it (picard.linux.it [213.254.12.146])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g711N182hz1yGq\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 02 May 2026 18:15:18 +1000 (AEST)",
            "from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id F12D53E24F6\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  2 May 2026 10:15:12 +0200 (CEST)",
            "from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it\n [IPv6:2001:4b78:1:20::2])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1))\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id CFB753CECB5\n for <ltp@lists.linux.it>; Sat,  2 May 2026 10:15:07 +0200 (CEST)",
            "from mail-pf1-x449.google.com (mail-pf1-x449.google.com\n [IPv6:2607:f8b0:4864:20::449])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 3AAA86012B3\n for <ltp@lists.linux.it>; Sat,  2 May 2026 10:15:07 +0200 (CEST)",
            "by mail-pf1-x449.google.com with SMTP id\n d2e1a72fcca58-82f896eb6faso2832009b3a.3\n for <ltp@lists.linux.it>; Sat, 02 May 2026 01:15:07 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=lists.linux.it;\n i=@lists.linux.it; q=dns/txt; s=picard; t=1777709713; h=date :\n mime-version : message-id : to : subject : list-id : list-unsubscribe\n : list-archive : list-post : list-help : list-subscribe : from :\n reply-to : content-type : content-transfer-encoding : sender : from;\n bh=PSfdWPORP/4S+tUMTjiOvfEyTEsoeerWrlFSqkVI+J4=;\n b=ZA83ArXJjSKP4rehPhqxJlITWXemGYCWfn0pYwGQWAU1+mxePq9K+98Z8UH9OT19Vy2Ok\n RCTZySyWvnAc1kvQMjYcYWT+eXf1mJMC1sFH1g7zcnmtdMRzxOzhWaRQNqzsyvFlIa0zb0J\n 8M/kcqRkEwYFRLVz+ocOnD3QRipUqgg=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=google.com; s=20251104; t=1777709705; x=1778314505; darn=lists.linux.it;\n h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject\n :date:message-id:reply-to;\n bh=X72uZw7lhsX+prQYnKj1oeF1Br5FZ5xlBuQfhk4UprI=;\n b=WF3GXO9RQpY5i58Jf6AiANtlAy/uWE+9tJTDkcxgeoQCCtqSfxSPmrUnxLMvfT23R4\n bb4zrto7kPXfbPQSJ8mr9SzD8TTZ1N4/586V6R27tH3x0BZwXERE7JWZ6a0WXlwQVDpB\n 6gwUHPa568o8gFqniEEXE9bpTEnHbjgExJaETqvgVQgcioypFx8kJUibrv94JbjK+zHw\n isgnaALwD+TAnB/YG1ImBu1zHn1R5Pp1WB0/8UdlCMEAhBzaqvFUlm3Q3RKuFkmY/pVg\n ZOZpiSXh/ntSgLnZMo1XIFkArpcqPbJDX2kjfQ45ehHepyCuM/8kyOxiCPXaZ5cud3Ud\n IaIg=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777709705; x=1778314505;\n h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state\n :from:to:cc:subject:date:message-id:reply-to;\n bh=X72uZw7lhsX+prQYnKj1oeF1Br5FZ5xlBuQfhk4UprI=;\n b=GcWge+nFHSkEUMVo2icWNX6/a3PgQFITZwzTbaHP5xdQDtkNAl4YMdfwvUvup7JGqN\n Rv0/kDY1EQX+KXu9feh9tElOfpWroawul4cCiFst8QuscZHx2MtuAjt0EEf3TlWsxlc1\n im5FXAoNnFa3EZNGwJdRYi0ar64I9bys0L1EbW/y6Oj2Yl1Xg4XQJDBEysYqg+WLVfcW\n vnloS24zF+btMXD8xOKYff1CuvzA+AhM3SoVH1NHR9vPEZkt+HSt3ElxFZfw8/Izduv3\n nOrsr/kA/ylwqP4+s9/1kddX0J/EDEx0REFzOaped2G/Nr/9Fmpr6OzEj5FRE6IfUkq8\n MCvQ==",
        "X-Gm-Message-State": "AOJu0YxEb9fXrU1TH4BuyaJU5IubeW0mz75bNEfSGzJVgl8mRAQTYj8O\n 5hLq+MrIpyrYmUxBRUST3TPKRBybPoOsdRGfO1c28iiaxLFaZ1fdVKjdlKoRT/ISUbbqwCGFY4r\n zWk84i5dV5OROWUMJpzHJAm+GkpPB4vOnQnVjYrI37+siQi0dSplDXKAIr/gEcW8KNfuHLiq3ni\n BGttA/NwMzg9XrNmf007tO52oxBv+FLn76HxSSw6V+CpHRAMg=",
        "X-Received": "from pfzz25.prod.google.com ([2002:a05:6a00:1f9:b0:835:38e9:3254])\n (user=chihsheng job=prod-delivery.src-stubby-dispatcher) by\n 2002:a05:6a00:3d44:b0:82a:79b8:2049 with SMTP id\n d2e1a72fcca58-8352d218aa1mr2591514b3a.25.1777709705023;\n Sat, 02 May 2026 01:15:05 -0700 (PDT)",
        "Date": "Sat,  2 May 2026 08:14:46 +0000",
        "Mime-Version": "1.0",
        "X-Mailer": "git-send-email 2.54.0.545.g6539524ca2-goog",
        "Message-ID": "<20260502081446.10472-1-chihsheng@google.com>",
        "To": "ltp@lists.linux.it",
        "X-Spam-Status": "No, score=-7.4 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DMARC_PASS,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL\n shortcircuit=no autolearn=disabled version=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on in-2.smtp.seeweb.it",
        "X-Virus-Scanned": "clamav-milter 1.0.9 at in-2.smtp.seeweb.it",
        "X-Virus-Status": "Clean",
        "Subject": "[LTP] [PATCH] tst_virt: Add fallback KVM detection via virtio block\n devices",
        "X-BeenThere": "ltp@lists.linux.it",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Linux Test Project <ltp.lists.linux.it>",
        "List-Unsubscribe": "<https://lists.linux.it/options/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=unsubscribe>",
        "List-Archive": "<http://lists.linux.it/pipermail/ltp/>",
        "List-Post": "<mailto:ltp@lists.linux.it>",
        "List-Help": "<mailto:ltp-request@lists.linux.it?subject=help>",
        "List-Subscribe": "<https://lists.linux.it/listinfo/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=subscribe>",
        "From": "Darren Chang via ltp <ltp@lists.linux.it>",
        "Reply-To": "Darren Chang <chihsheng@google.com>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it",
        "Sender": "\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"
    },
    "content": "Currently, is_kvm() relies on reading /proc/cpuinfo to find the\n\"QEMU Virtual CPU\" string.\n\nThis patch introduces a fallback mechanism to detect KVM environments\nby checking for the existence of standard virtio block devices when the\nCPU info check fails. Specifically, it probes for:\n- /sys/block/vda (Reliable sysfs kernel interface)\n- /dev/vda       (Standard Linux device node)\n- /dev/block/vda (Android's ueventd device node)\n\nIncluding \"/dev/block/vda\" ensures that the detection works seamlessly\nwithin Android emulator environments (such as Cuttlefish),\nwhich use ueventd and place block devices under /dev/block/ instead of\nthe standard Linux /dev/.\n\nSigned-off-by: Darren Chang <chihsheng@google.com>\n---\n lib/tst_virt.c | 13 +++++++++++++\n 1 file changed, 13 insertions(+)",
    "diff": "diff --git a/lib/tst_virt.c b/lib/tst_virt.c\nindex 109d7a853..ac0aef665 100644\n--- a/lib/tst_virt.c\n+++ b/lib/tst_virt.c\n@@ -44,6 +44,19 @@ static int is_kvm(void)\n \t}\n \n \tSAFE_FCLOSE(NULL, cpuinfo);\n+\n+\t/* * Fallback check for KVM:\n+\t * Android's ueventd creates block devices in /dev/block/\n+\t * instead of the standard Linux /dev/, so we check both.\n+\t */\n+\tif (!found) {\n+\t\tif (access(\"/dev/vda\", F_OK) == 0 ||\n+\t\t\taccess(\"/sys/block/vda\", F_OK) == 0 ||\n+\t\t\taccess(\"/dev/block/vda\", F_OK) == 0) {\n+\t\t\tfound = 1;\n+\t\t}\n+\t}\n+\n \treturn found;\n }\n \n",
    "prefixes": []
}