Cover Letter Detail
Show a cover letter.
GET /api/covers/2217949/?format=api
{ "id": 2217949, "url": "http://patchwork.ozlabs.org/api/covers/2217949/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/cover/20260331040659.401397-1-tangtao1634@phytium.com.cn/", "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": "<20260331040659.401397-1-tangtao1634@phytium.com.cn>", "list_archive_url": null, "date": "2026-03-31T04:06:55", "name": "[0/4] tests/qtest: Add memory-access attributes (secure/space)", "submitter": { "id": 91412, "url": "http://patchwork.ozlabs.org/api/people/91412/?format=api", "name": "Tao Tang", "email": "tangtao1634@phytium.com.cn" }, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/cover/20260331040659.401397-1-tangtao1634@phytium.com.cn/mbox/", "series": [ { "id": 498122, "url": "http://patchwork.ozlabs.org/api/series/498122/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498122", "date": "2026-03-31T04:06:55", "name": "tests/qtest: Add memory-access attributes (secure/space)", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498122/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/2217949/comments/", "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 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)", "hzbj-icmmx-7; spf=neutral smtp.mail=tangtao163\n 4@phytium.com.cn;" ], "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 4flF3L3mhqz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 15:08:29 +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 1w7QOQ-00010H-W2; Tue, 31 Mar 2026 00:07:55 -0400", "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 <tangtao1634@phytium.com.cn>)\n id 1w7QOL-0000zS-4x; Tue, 31 Mar 2026 00:07:49 -0400", "from zg8tmja5ljk3lje4ms43mwaa.icoremail.net ([209.97.181.73])\n by eggs.gnu.org with esmtp (Exim 4.90_1)\n (envelope-from <tangtao1634@phytium.com.cn>)\n id 1w7QOI-0002FB-2w; Tue, 31 Mar 2026 00:07:48 -0400", "from prodtpl.icoremail.net (unknown [10.12.1.20])\n by hzbj-icmmx-7 (Coremail) with SMTP id AQAAfwD38Y2FSMtpPYjBCA--.61S2;\n Tue, 31 Mar 2026 12:07:33 +0800 (CST)", "from phytium.com.cn (unknown [218.76.62.144])\n by mail (Coremail) with SMTP id AQAAf8DwSJR6SMtpYqQHAA--.18366S3;\n Tue, 31 Mar 2026 12:07:22 +0800 (CST)" ], "From": "Tao Tang <tangtao1634@phytium.com.cn>", "To": "Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>,\n Paolo Bonzini <pbonzini@redhat.com>", "Cc": "qemu-devel@nongnu.org, qemu-arm@nongnu.org,\n Peter Maydell <peter.maydell@linaro.org>,\n Chen Baozi <chenbaozi@phytium.com.cn>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>,\n Chao Liu <chao.liu.zevorn@gmail.com>, Tao Tang <tangtao1634@phytium.com.cn>", "Subject": "[PATCH 0/4] tests/qtest: Add memory-access attributes (secure/space)", "Date": "Tue, 31 Mar 2026 12:06:55 +0800", "Message-Id": "<20260331040659.401397-1-tangtao1634@phytium.com.cn>", "X-Mailer": "git-send-email 2.34.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-CM-TRANSID": "AQAAf8DwSJR6SMtpYqQHAA--.18366S3", "X-CM-SenderInfo": "pwdqw3tdrrljuu6sx5pwlxzhxfrphubq/1tbiAQAKBWnJfH8GCQABsj", "X-Coremail-Antispam": "1Uk129KBjvJXoWxZw17ZF18tFy8tw45Ww4xCrg_yoWrWFWkpF\n W3Aa43Kr48JF17Jw4fGa18XFy5Ka97GF17XFy7tr15uFWYyFW7Xry29ryFqr9xGrW8Xr1Y\n 93WDtFn8Wwn8t3DanT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj\n DUYxn0WfASr-VFAU7a7-sFnT9fnUUIcSsGvfJ3UbIYCTnIWIevJa73UjIFyTuYvj4RJUUU\n UUUUU", "Received-SPF": "pass client-ip=209.97.181.73;\n envelope-from=tangtao1634@phytium.com.cn;\n helo=zg8tmja5ljk3lje4ms43mwaa.icoremail.net", "X-Spam_score_int": "-8", "X-Spam_score": "-0.9", "X-Spam_bar": "/", "X-Spam_report": "(-0.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H5=-1,\n RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=1, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=no 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": "This is v4 of the qtest attrs support series. The main changes from v3 are\nimprovements to error handling validation and negative-case coverage.\n\nThanks to everyone who reviewed the previous version and provided valuable\nfeedback.\n\nThis series is also available in a branch below:\nhttps://gitlab.com/TaoTang/qemu/-/commits/series/qtest-secure-api-v4-2\n\nCI is all green:\nhttps://gitlab.com/TaoTang/qemu/-/pipelines/2418450703\n\nThe remainder of this cover letter is unchanged from the previous version.\n\nMotivation\n----------\n\nIOMMU functional testing is always stack-heavy: for example, even for the\nNon-secure Arm SMMU model, end-to-end validation can require a fairly involved\nsoftware stack. To keep the testing loop tight and reproducible, I previously\nproposed using iommu-testdev + QTest to validate IOMMU/SMMU behaviour without\nbooting a guest [1].\n\n[1] https://www.qemu.org/docs/master/specs/iommu-testdev.html\n\nHowever, the current QTest interface cannot tag memory accesses with MemTxAttrs,\nso it is hard to write targeted tests for security-sensitive paths. This becomes\na bigger issue for Secure SMMU work, which is RFCing in [2], and for future Arm\nRME-DA enablement.\n\n[2] https://lore.kernel.org/qemu-devel/20260221100250.2976287-1-tangtao1634@phytium.com.cn/\n\nThis series therefore extends qtest memory access commands with an optional\nattrs argument, adds matching libqtest helpers, and introduces tests that\nexercise the new APIs against address spaces that actually differ by security\ncontext.\n\nIn particular:\n- on Arm virt,secure=on, the test now uses the secure-only RAM window so the\n requested attrs must select the correct AddressSpace\n- on x86 q35,smm=on, the API series covers normal RAM, and an extra NOT-MERGE\n validation patch adds an SMM-only RAM window so the secure path can be\n cross-checked against a location not visible from the default address space\n\n\nCompatibility\n-------------\n\nThis series is additive for existing qtest users:\n- Existing qtest memory commands keep their current forms; attrs is an optional\n extra argument\n- Existing libqtest memory helpers remain available and are kept as wrappers\n passing NULL attrs\n- The first three patches are the upstreamable API and test additions\n- The fourth patch is explicitly marked NOT-MERGE and only provides extra x86\n RFC coverage by wiring in a q35 test-only SMM RAM window\n\nOne behavioural improvement is that memory access failures on the new paths are\nnow reported consistently as ERR, which lets tests validate address-space\nselection failures directly.\n\n\nTesting\n-------\n\nThe API series was exercised with:\n\n meson test -C build \\\n \"qtest-aarch64/qtest-attrs-test\" \\\n \"qtest-i386/qtest-attrs-test\" \\\n \"qtest-x86_64/qtest-attrs-test\"\n\nThe extra x86 cross-check from the NOT-MERGE patch was exercised with:\n\n meson test -C build \\\n \"qtest-i386/qtest-x86-attrs-test\" \\\n \"qtest-x86_64/qtest-x86-attrs-test\"\n\n\nFuture work\n-----------\n\nOnce the Secure SMMU series lands, I plan to build on this qtest API to extend\niommu-testdev-based tests to cover more security contexts while still avoiding\na full guest software stack.\n\n\nTao Tang (4):\n tests/qtest: Add attrs support to qtest server memory commands\n tests/qtest: Add libqtest attrs helpers for memory accesses\n tests/qtest: Add qtest-attrs-test for memory access attrs\n [NOT-MERGE] tests/qtest: add q35 SMM-only x86 attrs coverage\n\n hw/pci-host/q35.c | 26 ++\n include/hw/pci-host/q35.h | 8 +\n system/qtest.c | 420 +++++++++++++++++++++++++----\n tests/qtest/libqtest-single.h | 156 +++++++++++\n tests/qtest/libqtest.c | 246 +++++++++++++----\n tests/qtest/libqtest.h | 177 ++++++++++++\n tests/qtest/meson.build | 8 +-\n tests/qtest/qtest-attrs-test.c | 350 ++++++++++++++++++++++++\n tests/qtest/qtest-x86-attrs-test.c | 170 ++++++++++++\n 9 files changed, 1452 insertions(+), 109 deletions(-)\n create mode 100644 tests/qtest/qtest-attrs-test.c\n create mode 100644 tests/qtest/qtest-x86-attrs-test.c" }