get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2231410,
    "url": "http://patchwork.ozlabs.org/api/patches/2231410/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260430172204.1006673-3-pbonzini@redhat.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": "<20260430172204.1006673-3-pbonzini@redhat.com>",
    "list_archive_url": null,
    "date": "2026-04-30T17:21:08",
    "name": "[PULL,02/58] target/arm/hvf, target/i386/hvf: Pass MR-relative offset to memory_region_set_dirty()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "69566f18efecb6933f6dddffddf3cf354e395997",
    "submitter": {
        "id": 2701,
        "url": "http://patchwork.ozlabs.org/api/people/2701/?format=api",
        "name": "Paolo Bonzini",
        "email": "pbonzini@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260430172204.1006673-3-pbonzini@redhat.com/mbox/",
    "series": [
        {
            "id": 502347,
            "url": "http://patchwork.ozlabs.org/api/series/502347/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502347",
            "date": "2026-04-30T17:21:16",
            "name": "[PULL,01/58] pythondeps: bump to meson 1.11.1",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502347/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2231410/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2231410/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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=eFVJqXIN;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=RpWlzSC3;\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=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists1p.gnu.org (lists1p.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 4g61Gb6v5Rz1yJr\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 03:23:19 +1000 (AEST)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wIV5z-0004cO-GY; Thu, 30 Apr 2026 13:22:39 -0400",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1wIV5o-0004Y6-5T\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:22:30 -0400",
            "from us-smtp-delivery-124.mimecast.com ([170.10.133.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1wIV5j-0004AG-2P\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:22:24 -0400",
            "from mail-qk1-f200.google.com (mail-qk1-f200.google.com\n [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-310-gtMHJFIJNceHx-LF6az4QQ-1; Thu, 30 Apr 2026 13:22:19 -0400",
            "by mail-qk1-f200.google.com with SMTP id\n af79cd13be357-8eaee67d1bcso246953185a.0\n for <qemu-devel@nongnu.org>; Thu, 30 Apr 2026 10:22:18 -0700 (PDT)",
            "from [192.168.10.48] ([151.49.85.67])\n by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8fbb4028f9bsm23342085a.38.2026.04.30.10.22.15\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 30 Apr 2026 10:22:16 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777569741;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=cFq/igNF+Xhi8H/iYwBMXK+5Kh7wY4UEYJ/pdGdNZKc=;\n b=eFVJqXIN3/UQ8/sGzRkeYKxocvHG6a8GYUEjqATlGLLoaTzGYzigp8ONVKbdtVcpim4mEu\n qHs+GJJVlMrmFrpD45nLyx5XTcleg85JoD+F3GZn0hpfouO7rYwpNM3sSzmBjuconZeF5d\n lCTX0w5zJAuIjM1HXaOZZnYmv79ZKfc=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1777569738; x=1778174538; 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=cFq/igNF+Xhi8H/iYwBMXK+5Kh7wY4UEYJ/pdGdNZKc=;\n b=RpWlzSC3w5LDCGTp+343H1KBlwZBKmvrYHKGxWLABB6RMK/S8HLz7JNpFIrDBgNHfa\n HFGQ44EpDoW4VPThDhVKFe1S0JQiNRDvPOQ4aNmnOjDjGi5xMrEqjcPmieuEknr78MPK\n 7Z5GL9r5X3VjRCoAs8v1E3hYPt3NpoDtWgq0zVUJQ+Fv2tFcX/jopABbovKZ6Zhk7XAk\n E9z1r54jFVHmX62rb95c7gsAlWE9EyUN1pk/JIsBl50E2WqHOSgYKZS+m1+pQCG4R402\n UznNnpXUuD75vFZm7s9fX5JPKfazcEMzsYYudH25JSofJtVuqF7Viit+ry4rhIZw3xeH\n TKYQ=="
        ],
        "X-MC-Unique": "gtMHJFIJNceHx-LF6az4QQ-1",
        "X-Mimecast-MFC-AGG-ID": "gtMHJFIJNceHx-LF6az4QQ_1777569738",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777569738; x=1778174538;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=cFq/igNF+Xhi8H/iYwBMXK+5Kh7wY4UEYJ/pdGdNZKc=;\n b=sIVMzThe9VW/rwNCA44ppu7qOZn/NG8NIt/SCzaj5LsAaqTTuDf4lQsbsfMIcLijo5\n w8VjAd3uiYe3RxfBJtZYqY3J5f9o94lj83HMQ/0glsY3wLEiwVfp3o98DKECTk1SZP8N\n DzL/uLAqOt0cmmz5k4B+m4utcKRsJwO6v1IJjeYlGGIH9hpS5asKDaosRjDaK0nKVVIt\n bIgCkbTP6AmSCWET3KgYyqaWq7jbEpJH6TexI3aek3aSKCd1uDbVNB+DiQPQe58i8x1x\n L5fw1q7EHYhQO1xseFlWJK/4az7ZmsAqCIglUwauYuZ00n5L6lolQuMPigmwUfkxslNE\n JLTA==",
        "X-Gm-Message-State": "AOJu0YzwZrZ4yGTlCYju3ZqS2NFbQJEcDxigcCb2EuQQy2vZl0fTkRi+\n DC6n/lXXfMWv09jdkYdlCqm6sz8HLCspco7HVmi+LPyOThfuwp6931Jf4f9HLE5xxfp2sKqr8TO\n YwNGs0//qDBNp5EJRC+nD7d34agJZv9S/LeJndkDlMd/IhxXY0OojOXav+jnCCr6yPRiQlNkFRs\n YhuYUFHUXX2oNw+j5mz5Bcj9xsqER+B1M3S7UmbanA",
        "X-Gm-Gg": "AeBDieuHW1XkBZbfKk40plzOwWJDrnRTXyhwW3mxwHk1bZaB7Uu688TLdQPQf/sN2p+\n 0ry93oq8yb/kB3yerPWgmaw6PsKAcidDEMg4+oWoN8ZG2qbfKbQghtsfDOVz4LP5f+yEoxFk6bH\n T3g2VQXRQBuC16gMdUn4w49s2e39E2MtMyv8vT3GIZYaBOYrXnNDDj6VP87fA62q6XhTC2e6kIU\n mZk5EwYHsLxoRCxj/ad/puyh/Qnj6GTuOnu3AETrjSWbqZzM6Dq5A/VPJr9WEk6dhzAVeBOxgV0\n HOOKXZhWGcRATRZi7ZrC8jTg9Sign9byjF2MxdmTAx7oSvtZdg8lxiCrw+HYHgASvP/hUjW14aL\n x3jBN39bzW3g2E4Fc561Q6h3zO+VfQ/5SDrMd9dHxYrZjVM8OPM394Vbc94djFyxRifzhA2Zhoh\n BU/159YG/NOqFjByy8bDVKHW0XrrIC+mLRFxA=",
        "X-Received": [
            "by 2002:a05:620a:258c:b0:8ed:45b8:de8d with SMTP id\n af79cd13be357-8fa8759663fmr615338785a.13.1777569737607;\n Thu, 30 Apr 2026 10:22:17 -0700 (PDT)",
            "by 2002:a05:620a:258c:b0:8ed:45b8:de8d with SMTP id\n af79cd13be357-8fa8759663fmr615331485a.13.1777569736944;\n Thu, 30 Apr 2026 10:22:16 -0700 (PDT)"
        ],
        "From": "Paolo Bonzini <pbonzini@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "\"Scott J. Goldman\" <scottjgo@gmail.com>",
        "Subject": "[PULL 02/58] target/arm/hvf,\n target/i386/hvf: Pass MR-relative offset to memory_region_set_dirty()",
        "Date": "Thu, 30 Apr 2026 19:21:08 +0200",
        "Message-ID": "<20260430172204.1006673-3-pbonzini@redhat.com>",
        "X-Mailer": "git-send-email 2.54.0",
        "In-Reply-To": "<20260430172204.1006673-1-pbonzini@redhat.com>",
        "References": "<20260430172204.1006673-1-pbonzini@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=170.10.133.124;\n envelope-from=pbonzini@redhat.com;\n helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,\n SPF_HELO_PASS=-0.001, 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 development <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": "From: \"Scott J. Goldman\" <scottjgo@gmail.com>\n\nBoth the arm and i386 hvf accelerators have the same bug in their\ndirty-page logging path: the address fed to memory_region_set_dirty()\nis computed as \"<ipa,gpa>_page + xlat\", but memory_region_set_dirty()\nexpects an offset relative to the start of the resolved MemoryRegion.\naddress_space_translate() already returns that offset in xlat, while\nipa_page / gpa_page is the guest-physical (system address space)\naddress.\n\nAdding the two together produces a bogus offset that for any non-\ntrivial RAM size walks well past the end of the MemoryRegion's dirty\nbitmap. With dirty logging active (e.g. live migration on a guest\nwith several GB of RAM), this triggers an out-of-bounds atomic write\ninside bitmap_set_atomic() and crashes the source QEMU as soon as the\nguest writes to RAM:\n\n    Thread .. 'CPU N/HVF', stop reason = EXC_BAD_ACCESS ...\n      bitmap_set_atomic at bitmap.c:213\n      physical_memory_set_dirty_range at physmem.c:1038\n      memory_region_set_dirty at memory.c:2191\n      hvf_handle_exception at hvf.c\n\nFix it by passing only the MR-relative offset xlat. ipa_page /\ngpa_page is still the right argument to hvf_unprotect_dirty_range(),\nwhich works on the guest-physical address space.\n\nSigned-off-by: Scott J. Goldman <scottjgo@gmail.com>\nLink: https://lore.kernel.org/r/20260427232116.50586-2-scottjgo@gmail.com\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n---\n target/arm/hvf/hvf.c  | 2 +-\n target/i386/hvf/hvf.c | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c\nindex 678afe5c8e1..2146c5c87c6 100644\n--- a/target/arm/hvf/hvf.c\n+++ b/target/arm/hvf/hvf.c\n@@ -2159,7 +2159,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcpu_exit_exception_t *excp)\n                 assert(!mr->readonly);\n \n                 if (memory_region_get_dirty_log_mask(mr)) {\n-                    memory_region_set_dirty(mr, ipa_page + xlat, page_size);\n+                    memory_region_set_dirty(mr, xlat, page_size);\n                     hvf_unprotect_dirty_range(ipa_page, page_size);\n                 }\n \ndiff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c\nindex c0d028b1473..cdc8bd19504 100644\n--- a/target/i386/hvf/hvf.c\n+++ b/target/i386/hvf/hvf.c\n@@ -146,7 +146,7 @@ static bool ept_emulation_fault(CPUState *cs, uint64_t gpa, uint64_t ept_qual)\n     if (write && memory_region_get_dirty_log_mask(mr)) {\n         uintptr_t page_size = qemu_real_host_page_size();\n \n-        memory_region_set_dirty(mr, gpa_page + xlat, page_size);\n+        memory_region_set_dirty(mr, xlat, page_size);\n         hvf_unprotect_dirty_range(gpa_page, page_size);\n     }\n \n",
    "prefixes": [
        "PULL",
        "02/58"
    ]
}