From: Fabiano Rosas <farosas@suse.de>
To: Michael Tokarev <mjt@tls.msk.ru>,
Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,
qemu-devel@nongnu.org
Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com,
liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com,
chao.liu.zevorn@gmail.com, andrew.jones@oss.qualcomm.com,
nutty.liu@hotmail.com, Palmer Dabbelt <palmer@dabbelt.com>,
Tao Tang <tangtao1634@phytium.com.cn>,
Laurent Vivier <lvivier@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [PATCH v2 2/3] hw/riscv/riscv-iommu.c: fault when !PTE_U and no priv access
Date: Tue, 14 Jul 2026 10:10:26 -0300 [thread overview]
Message-ID: <87zezt4szh.fsf@suse.de> (raw)
In-Reply-To: <c5a9e4fb-5715-4805-8376-8ea13f5b48c5@tls.msk.ru>
Michael Tokarev <mjt@tls.msk.ru> writes:
> On 7/13/26 16:00, Fabiano Rosas wrote:
>> Michael Tokarev <mjt@tls.msk.ru> writes:
>>
>
> [..]
>>> So, this patch adds a fix for the testing bits.
>>>
>>> When trying to pick this one up for 10.0.x (LTS) series, I've another doubt.
>>> This testing fix fixes v10.2.0-1299-g9d8ffbfc1d3 "tests/qtest/libqos: Add RISC-V
>>> IOMMU helper library". Quite some tests were added based on that library.
>>> It doesn't exist in 10.0.x, and neither is v10.2.0-656-g489812e32df
>>> "tests/qtest/libqos: Add SMMUv3 helper library".
>>> Sure I can drop the parts of this change which touches the tests. But this
>>> means we don't have tests to cover the issues being fixed, and I don't know
>>> if the result of these fixes actually works or not.
>>>
>>> Should we pick up some testing bits in this area for 10.0.x (especially
>>> 9d8ffbfc1d3 and some subsequent commits which use this library)? Or just
>>> ignore all riscv iommu patches in there?
>>
>> I worry picking tests for stable could become a development task,
>> requiring new code to make tests suitable for an older codebase/test
>> codebase.
>>
>> The test frameworks and their supporting infrastructure (such as the
>> riscv iommu lib) don't ensure a stable abi so that a test from one
>> version will run without issues when backported to an earlier
>> version.
>
>> Also, the tests are usually not structured in a way that allow us to
>> pick just the part that tests the code fixes being backported, so we
>> risk trying to test in an earlier version features that don't even exist
>> at that point. There could also exist a complex graph of what's broken
>> vs. what is being tested (e.g. broken in v10, fixed partially in v11,
>> then test needs change, then fixed properly in v12, test needs change
>> again, etc).
>
> Things aren't that bad in practice. Even a large new test lib with
> some significant amount of tests built on top mostly Just Works (tm).
> A bigger problem is to pick them up across various restructuring of
> code, moving and splitting files, etc.
>
Well, for qtest I rely a lot on the maintainers of the actual code being
tested knowing what they're doing, I can't keep up with every single
test that's added, so I think even somewhat trivial shuffling of code
would be disruptive. You're probably quite used to dealing with these
things during normal (non-test) backporting, so it's probably fine.
> Also, if a test fails due to old code, we can look and fix it, - it
> is just a test after all. Or even mark it as "ok to fail" - if we know
> it's due to the old code.
>
Right, but this requires carrying stable-only patches, which makes me
confused. Again, my own lack of understanding.
> But having no tests at all - in my view - is worse. Besides the tests
> which also needs some back-porting/reviewing work when picked up for
> older releases, the main code needs the same. And without the tests
> in place -- no tests in place at all -- we just don't know if something
> is broken until users start reporting it. Provided there *are* users
> of this code in the older releases to begin with :)
>
Sure, if you think the effort is not that big, having tests makes
everything easier, I agree.
> And actually, this last one is a good question, I think. As in - do
> we really need the fixed iommu stuff in 10.0.x, when a lot of other
> development happened in this and other parts of riscv64 since then?
> 10.0.x is used in debian trixie (current stable), and probably that's
> it, - not even ubuntu uses it (which is derived from debian). So, I
> wonder, if this stuff is really interesting to someone outside of the
> most active riscv community, who most likely uses the current qemu
> anyway?
>
> I'll pick this particular change to 10.0.x as the last missing one from
> this pull request, since all the others has been picked up (but without
> the change to tests). Speaking of the future changes, lemme send a
> separate email summarizing all this in a single place. It feels like
> we don't actually need many riscv changes in older 10.0.x at least.
>
> Thanks,
>
> /mjt
next prev parent reply other threads:[~2026-07-14 13:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 12:11 [PATCH v2 0/3] hw/riscv/riscv-iommu.c: additional PTE checks Daniel Henrique Barboza
2026-07-01 12:11 ` [PATCH v2 1/3] hw/riscv/riscv-iommu.c: check for reserved PTE bits Daniel Henrique Barboza
2026-07-01 12:11 ` [PATCH v2 2/3] hw/riscv/riscv-iommu.c: fault when !PTE_U and no priv access Daniel Henrique Barboza
2026-07-07 15:32 ` Tao Tang
2026-07-11 8:30 ` Michael Tokarev
2026-07-11 22:08 ` Michael Tokarev
2026-07-13 13:00 ` Fabiano Rosas
2026-07-14 4:17 ` Michael Tokarev
2026-07-14 13:10 ` Fabiano Rosas [this message]
2026-07-01 12:11 ` [PATCH v2 3/3] hw/riscv/riscv-iommu.c: fault for non-user PTE in G_STAGE Daniel Henrique Barboza
2026-07-03 3:47 ` Alistair Francis
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=87zezt4szh.fsf@suse.de \
--to=farosas@suse.de \
--cc=alistair.francis@wdc.com \
--cc=andrew.jones@oss.qualcomm.com \
--cc=chao.liu.zevorn@gmail.com \
--cc=daniel.barboza@oss.qualcomm.com \
--cc=liwei1518@gmail.com \
--cc=lvivier@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=nutty.liu@hotmail.com \
--cc=palmer@dabbelt.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=tangtao1634@phytium.com.cn \
--cc=zhiwei_liu@linux.alibaba.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.