get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2231002,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2231002/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-ppc/patch/20260430093810.2762539-8-peter.maydell@linaro.org/",
    "project": {
        "id": 69,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/69/?format=api",
        "name": "QEMU powerpc development",
        "link_name": "qemu-ppc",
        "list_id": "qemu-ppc.nongnu.org",
        "list_email": "qemu-ppc@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260430093810.2762539-8-peter.maydell@linaro.org>",
    "date": "2026-04-30T09:37:52",
    "name": "[v2,07/25] target/s390x: Make get_phys_page_debug handle non-page-aligned addrs",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "de28768c57781409a5404facf7114b897ef49aea",
    "submitter": {
        "id": 5111,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/5111/?format=api",
        "name": "Peter Maydell",
        "email": "peter.maydell@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-ppc/patch/20260430093810.2762539-8-peter.maydell@linaro.org/mbox/",
    "series": [
        {
            "id": 502256,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502256/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-ppc/list/?series=502256",
            "date": "2026-04-30T09:37:46",
            "name": "Handle sub-page granularity in cpu_memory_rw_debug()",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/502256/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2231002/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2231002/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<qemu-ppc-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=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=A+lK18QN;\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-ppc-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 4g5pzj13Ntz1yGq\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 19:39:45 +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-ppc-bounces@nongnu.org>)\n\tid 1wINr9-00053k-51; Thu, 30 Apr 2026 05:38:51 -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 <peter.maydell@linaro.org>)\n id 1wINqq-0004g6-Fi\n for qemu-ppc@nongnu.org; Thu, 30 Apr 2026 05:38:32 -0400",
            "from mail-wr1-x430.google.com ([2a00:1450:4864:20::430])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>)\n id 1wINqi-0002VK-Hf\n for qemu-ppc@nongnu.org; Thu, 30 Apr 2026 05:38:32 -0400",
            "by mail-wr1-x430.google.com with SMTP id\n ffacd0b85a97d-43d75312379so1109143f8f.1\n for <qemu-ppc@nongnu.org>; Thu, 30 Apr 2026 02:38:22 -0700 (PDT)",
            "from lanath.. (wildly.archaic.org.uk. [81.2.115.145])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-447b421721fsm10816795f8f.15.2026.04.30.02.38.19\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 30 Apr 2026 02:38:20 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1777541901; x=1778146701; 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=DOKX0DPjwYUZpph6iph7SwRnGuSF5f4WQz6+Qq/UgBQ=;\n b=A+lK18QNA6IxuMjUR/9/ESTG7vCZs5U5PQi2j76GI0FUWCjBTIbGyGHh3l0jp4pUdN\n 0lBURg0e0tPdcANAiGnRNE7GkhD0EAhLRyisiYi2gIYRleJUBNmLhKfTJP4aPYFnj6VQ\n cm1q3afaW2lopDPmePZnhYJ2EkzRgouuCqt8su4Yy/8+zLoFfU53fgBhzaHmEQhPHS9B\n c8Dgoc8N/+1+EbxbhbwztZxTHoJEvzFu+yCIXCqiWkqqo0V0VAtoJ+XLxjICSu6M3x3g\n 68ehSFXk/kqQKRO7RWEeJKczrgQ1nW8VrRYOabaidbbI5cu6ZPCQNHag7Mzc65Sj2wRa\n uB0g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777541901; x=1778146701;\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=DOKX0DPjwYUZpph6iph7SwRnGuSF5f4WQz6+Qq/UgBQ=;\n b=bIo83N/r0zjyrimEYOggRvRMCgVBKVOH9UcCNJwPIqh7KBz0FiPOgNLkb6hUgA3xiM\n x9KF5jQz6Ysl+GmIMfC6IhWpzQqG1ikhegSoNPVvLS6pXQ3XqszxtIgoh3zjA2yiZwcp\n TdvCejHaoE11WibaNHvTxniQD1AnbE/H81THTEvOeCsalhaxswZDZ6wsepzsGUoqCkeB\n AzcF3N+lGms2psLOOcQi2Ykjs9GEYlP8S2+CYikk8LI1ElYb8t3PM7P9+0sd5MDU/g7f\n aFM4YyBR1m7kpnaPDTlE8TYDzbXcTgZglp/LxINSNSL6e1CaaayhjG/bKemr1Seqp1D5\n Ed8w==",
        "X-Forwarded-Encrypted": "i=1;\n AFNElJ+OxuByFE9/OIw52EZsIuNskj6ajHtFANaOR0AJykUwcGsqbjiU8/IAjloFoanhEPuYLr5mFEDuZg==@nongnu.org",
        "X-Gm-Message-State": "AOJu0YxxmQCGP/xW3VQT5nbXbIL4Z86nMTdQqt38mf1GPUKMUOSRIqB7\n TJC4KO8OWJUWqvVk0Dl7ftn5ASfg4/nuhanfe6QiqDJd++6ZO4OOuySf3t3l+80t9UQ=",
        "X-Gm-Gg": "AeBDievBlqEZi/1nkwxSZ0CrLwhVGZEuLW0ah6JqaJUwuQBAT1awreb97X3StSFaON6\n Ssvy8/zjB1sxllz+/bO/+eQQZI6LCFHbvN3V28+QPLq1hf4d+j15Jau25XVZbteh3q/Pem9405L\n 1fRXJ9imhMSjP3ymaYYoBtuiRMFcIlfzuRq1cDWlEGe5z0x/mn3zjeO3LDCPLq3agfFi4YlSGY0\n 681HTtfXerp/5XWWJ7MYCVRZCvCJrVgT9eTT4J4PJdKSbYFYAneX4su/lV6CyHWAKLwMfz14pKc\n R86VhCG03FYeweJZlooQuv3pqeAhzZx7+izFIvAa4Dxq43lciHjSktfrEuXWZ7ccEbIggk9d1IH\n TeFt/Zx5K3fDr/+8SPhUfExSqzmt+1n1Xwte7PcPlRHaskF51hd563BZYUErGYbuSDj8uIflCke\n E6fabtcM0qDpb9vRbiZazHKU/8Eo+jbWH/5AwVc6QEOzj3Q9hcRl6jOYs5kHN4Em8foPsqMLn+9\n IBXesrAjIDV/ZyegsixjxRg7ozJtKYlCpylu6Oo6A==",
        "X-Received": "by 2002:a05:6000:2381:b0:43f:e9f0:87bd with SMTP id\n ffacd0b85a97d-4494e8d7bc5mr3084907f8f.10.1777541900731;\n Thu, 30 Apr 2026 02:38:20 -0700 (PDT)",
        "From": "Peter Maydell <peter.maydell@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org,\n qemu-s390x@nongnu.org,\n =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,\n Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>,\n Paolo Bonzini <pbonzini@redhat.com>,\n Richard Henderson <richard.henderson@linaro.org>,\n \"Dr. David Alan Gilbert\" <dave@treblig.org>,\n =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>,\n Peter Xu <peterx@redhat.com>, \"Edgar E. Iglesias\" <edgar.iglesias@gmail.com>,\n Jiaxun Yang <jiaxun.yang@flygoat.com>, Nicholas Piggin <npiggin@gmail.com>,\n Chinmay Rath <rathc@linux.ibm.com>, Glenn Miles <milesg@linux.ibm.com>,\n Palmer Dabbelt <palmer@dabbelt.com>,\n Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>,\n Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,\n Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,\n Chao Liu <chao.liu.zevorn@gmail.com>, Ilya Leoshkevich <iii@linux.ibm.com>,\n David Hildenbrand <david@kernel.org>,\n Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n Artyom Tarasenko <atar4qemu@gmail.com>, Max Filippov <jcmvbkbc@gmail.com>",
        "Subject": "[PATCH v2 07/25] target/s390x: Make get_phys_page_debug handle\n non-page-aligned addrs",
        "Date": "Thu, 30 Apr 2026 10:37:52 +0100",
        "Message-ID": "<20260430093810.2762539-8-peter.maydell@linaro.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260430093810.2762539-1-peter.maydell@linaro.org>",
        "References": "<20260430093810.2762539-1-peter.maydell@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2a00:1450:4864:20::430;\n envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no",
        "X-Spam_action": "no action",
        "X-BeenThere": "qemu-ppc@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<qemu-ppc.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-ppc>,\n <mailto:qemu-ppc-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-ppc>",
        "List-Post": "<mailto:qemu-ppc@nongnu.org>",
        "List-Help": "<mailto:qemu-ppc-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-ppc>,\n <mailto:qemu-ppc-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "Currently our implementations of SysemuCPUOps::get_phys_page_debug\nand SysemuCPUOps::get_phys_page_attrs_debug are a mix of \"accepts a\nnon-page-aligned virtual address and returns the corresponding\nnon-page-aligned physical address\" and \"only returns a page-aligned\nphysical address\".  This is awkward for callsites, which in practice\nall want the physical address for an arbitrary virtual address and\nhave to work around the possibility of getting a page-aligned\naddress, and it doesn't account for protection being possibly on a\nsub-page-sized granularity.  We want to standardize on the\nimplementation having to handle non-page-aligned addresses.\n\ns390x already has an implementation of \"give me the actual physical\naddress, not rounded down\", in s390_get_phys_addr_debug(), so we can\nuse this for the SysemuCPUOps::get_phys_page_debug method, and merge\nthe s390_cpu_get_phys_page_debug() function into\ns390_get_phys_addr_debug() which is now its only caller.\n\nThis leaves the function implementing the method with a name\nthat doesn't match the method name, but we will fix that shortly\nby renaming the method to *_addr_* for all targets.\n\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>\nReviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\nMessage-id: 20260417173105.1648172-7-peter.maydell@linaro.org\n---\n target/s390x/cpu-system.c     |  2 +-\n target/s390x/helper.c         | 20 +++++---------------\n target/s390x/s390x-internal.h |  1 -\n 3 files changed, 6 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/target/s390x/cpu-system.c b/target/s390x/cpu-system.c\nindex 881171d71a..c133b0c262 100644\n--- a/target/s390x/cpu-system.c\n+++ b/target/s390x/cpu-system.c\n@@ -176,7 +176,7 @@ void s390_cpu_finalize(Object *obj)\n \n static const struct SysemuCPUOps s390_sysemu_ops = {\n     .has_work = s390_cpu_has_work,\n-    .get_phys_page_debug = s390_cpu_get_phys_page_debug,\n+    .get_phys_page_debug = s390_cpu_get_phys_addr_debug,\n     .get_crash_info = s390_cpu_get_crash_info,\n     .write_elf64_note = s390_cpu_write_elf64_note,\n     .legacy_vmsd = &vmstate_s390_cpu,\ndiff --git a/target/s390x/helper.c b/target/s390x/helper.c\nindex 667d4a0da7..1a2658eaf9 100644\n--- a/target/s390x/helper.c\n+++ b/target/s390x/helper.c\n@@ -39,7 +39,7 @@ void s390x_cpu_timer(void *opaque)\n     cpu_inject_cpu_timer((S390CPU *) opaque);\n }\n \n-hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr)\n+hwaddr s390_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr)\n {\n     S390CPU *cpu = S390_CPU(cs);\n     CPUS390XState *env = &cpu->env;\n@@ -47,10 +47,11 @@ hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr)\n     int prot;\n     uint64_t asc = env->psw.mask & PSW_MASK_ASC;\n     uint64_t tec;\n+    vaddr page = addr & TARGET_PAGE_MASK;\n \n     /* 31-Bit mode */\n     if (!(env->psw.mask & PSW_MASK_64)) {\n-        vaddr &= 0x7fffffff;\n+        page &= 0x7fffffff;\n     }\n \n     /* We want to read the code (e.g., see what we are single-stepping).*/\n@@ -62,24 +63,13 @@ hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr)\n      * We want to read code even if IEP is active. Use MMU_DATA_LOAD instead\n      * of MMU_INST_FETCH.\n      */\n-    if (mmu_translate(env, vaddr, MMU_DATA_LOAD, asc, &raddr, &prot, &tec)) {\n+    if (mmu_translate(env, page, MMU_DATA_LOAD, asc, &raddr, &prot, &tec)) {\n         return -1;\n     }\n+    raddr += (addr & ~TARGET_PAGE_MASK);\n     return raddr;\n }\n \n-hwaddr s390_cpu_get_phys_addr_debug(CPUState *cs, vaddr v_addr)\n-{\n-    hwaddr phys_addr;\n-    vaddr page;\n-\n-    page = v_addr & TARGET_PAGE_MASK;\n-    phys_addr = cpu_get_phys_page_debug(cs, page);\n-    phys_addr += (v_addr & ~TARGET_PAGE_MASK);\n-\n-    return phys_addr;\n-}\n-\n static inline bool is_special_wait_psw(uint64_t psw_addr)\n {\n     /* signal quiesce */\ndiff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h\nindex 40850bcdc4..e7e4f2b45d 100644\n--- a/target/s390x/s390x-internal.h\n+++ b/target/s390x/s390x-internal.h\n@@ -321,7 +321,6 @@ void do_restart_interrupt(CPUS390XState *env);\n void s390x_tod_timer(void *opaque);\n void s390x_cpu_timer(void *opaque);\n void s390_handle_wait(S390CPU *cpu);\n-hwaddr s390_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);\n hwaddr s390_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr);\n LowCore *cpu_map_lowcore(CPUS390XState *env);\n void cpu_unmap_lowcore(CPUS390XState *env, LowCore *lowcore);\n",
    "prefixes": [
        "v2",
        "07/25"
    ]
}