QEMU-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Tao Tang <tangtao1634@phytium.com.cn>,
	Laurent Vivier <lvivier@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	Peter Maydell <peter.maydell@linaro.org>,
	Chen Baozi <chenbaozi@phytium.com.cn>,
	Chao Liu <chao.liu@processmission.com>,
	Jim MacArthur <jim.macarthur@linaro.org>,
	Tao Tang <tangtao1634@phytium.com.cn>
Subject: Re: [RFC v5 4/5] tests/qtest: Add qtest-attrs-test for memory access attrs
Date: Wed, 19 Aug 2026 11:14:40 -0300	[thread overview]
Message-ID: <87tsoqkxin.fsf@suse.de> (raw)
In-Reply-To: <20260814035628.3924513-5-tangtao1634@phytium.com.cn>

Tao Tang <tangtao1634@phytium.com.cn> writes:

> Add qtest-attrs-test to exercise qtest memory access commands with attrs
> on both aarch64 and x86.
>
> The test covers:
> - Arm virt,secure=on: scalar and bulk accesses across non-secure,
>   secure, and root spaces, plus negative coverage for realm and for
>   non-secure accesses into secure-only RAM
> - x86 q35: normal accesses
> - libqtest-single *_attrs shortcut wrappers
>
> Add reusable response assertion helpers and structured attrs failure
> helpers to libqtest.

Can't you re-order patch 3/5 before 2/5 and put these generic changes in
2/5 as well?

> Use the structured APIs for negative memory access
> tests, while retaining raw protocol commands for malformed command
> shapes that the typed APIs cannot express.
>
> On Arm, the test targets the virt machine's secure-only RAM window so
> that the requested attrs must select the correct address space.
>
> Also wire qtest-attrs-test into the aarch64 and i386/x86_64 qtest
> builds.
>
> Signed-off-by: Tao Tang <tangtao1634@phytium.com.cn>
> ---
>  tests/qtest/libqtest.c         | 156 +++++++++++++++++
>  tests/qtest/libqtest.h         | 111 ++++++++++++
>  tests/qtest/meson.build        |   7 +-
>  tests/qtest/qtest-attrs-test.c | 305 +++++++++++++++++++++++++++++++++
>  4 files changed, 577 insertions(+), 2 deletions(-)
>  create mode 100644 tests/qtest/qtest-attrs-test.c
>
> diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
> index 37aa69e1297..533b6f34599 100644
> --- a/tests/qtest/libqtest.c
> +++ b/tests/qtest/libqtest.c

The repetition introduced in this part is annoying, but let's not suffer
because of it, we can clean it up later. We could probably unify the
attrs and non-attrs versions using variadic functions as with the qmp
helpers.

For libqtest:
Reviewed-by: Fabiano Rosas <farosas@suse.de>


  reply	other threads:[~2026-08-19 14:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14  3:56 [RFC v5 0/5] tests/qtest: Add memory-access attributes (secure/space) Tao Tang
2026-08-14  3:56 ` [RFC v5 1/5] tests/qtest: Add attrs support to qtest server memory commands Tao Tang
2026-08-19 13:32   ` Fabiano Rosas
2026-08-14  3:56 ` [RFC v5 2/5] tests/qtest: Add libqtest attrs helpers for memory accesses Tao Tang
2026-08-14  3:56 ` [RFC v5 3/5] tests/qtest: Add raw command response helper Tao Tang
2026-08-19 14:06   ` Fabiano Rosas
2026-08-14  3:56 ` [RFC v5 4/5] tests/qtest: Add qtest-attrs-test for memory access attrs Tao Tang
2026-08-19 14:14   ` Fabiano Rosas [this message]
2026-08-14  3:56 ` [RFC v5 5/5] [NOT-MERGE] tests/qtest: add q35 SMM-only x86 attrs coverage Tao Tang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tsoqkxin.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=chao.liu@processmission.com \
    --cc=chenbaozi@phytium.com.cn \
    --cc=jim.macarthur@linaro.org \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=tangtao1634@phytium.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox