From: Mohammadfaiz Bawa <mbawa@redhat.com>
To: Stefan Berger <stefanb@linux.ibm.com>
Cc: Mohamed Mediouni <mohamed@unpredictable.fr>,
qemu-devel@nongnu.org, qemu-arm@nongnu.org,
Stefan Berger <stefanb@linux.vnet.ibm.com>,
Peter Maydell <peter.maydell@linaro.org>,
"Michael S . Tsirkin" <mst@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Ani Sinha <anisinha@redhat.com>,
Shannon Zhao <shannon.zhaosl@gmail.com>,
Pierrick Bouvier <pierrick.bouvier@linaro.org>
Subject: Re: [PATCH 1/3] docs/specs/tpm: document PPI support on ARM64 virt
Date: Thu, 26 Mar 2026 12:57:48 +0530 [thread overview]
Message-ID: <CAJg9Kky1q=5DFDPkh-i1hyxCKmpuEnR02hrHN-ncewY2VO0LQA@mail.gmail.com> (raw)
In-Reply-To: <07ff064e-bea4-4beb-811a-f5f3485836d6@linux.ibm.com>
On Thu, Mar 26, 2026 at 2:01 AM Stefan Berger <stefanb@linux.ibm.com> wrote:
>
>
>
> On 3/25/26 4:22 PM, Mohamed Mediouni wrote:
> >
> >> On 25. Mar 2026, at 20:31, Stefan Berger <stefanb@linux.ibm.com> wrote:
> >>
> >>
> >> I remember having played around with TPM for QEMU on ARM64 (Raspberry 5(?)) a while ago and had the impression that there was something related to caching that prevented the MMIO interface from working correctly and Peter may have confirmed this back then on IRC .. I am not sure what exactly it was that didn't work correctly when run natively on ARM hardware. It worked well when run in CPU emulation on x86_64 for example. So I am wondering whether there is a minimum requirement for an ARM CPU or ARM CPU features related to caching that someone needs to know about to be able to use TPM TIS successfully? If so, it would probably be good to mention it here as well. If you know.
> >>
> >> Otherwise this looks good to me.
> >
> > Hi,
> >
> > There are two things here:
> >
> > - For Windows guests it’s a bit complicated
> >
> > Windows guests LDP accesses on the TPM register range which doesn’t match ISV=1
>
> oh, yes, right ldp instruction.
>
> > syndrome requirements and needs a workaround in current QEMU.
> >
> > I _think_ the QEMU-side workaround described below went in, which is:
> >
> > If we map the TPM register range as read directly, trap on write to workaround
> > usage of LDP then we hit...
> >
> > - FEAT_S2FWB
> >
> > This is part of Armv8.4 onwards officially* and allows KVM to force a device
> > memory type read to be promoted to write-back.
> > > That allows the (easiest) workaround for (1) to work.
> >
> > However that’s not the _only_ workaround, you can remove it and include
> > https://patchew.org/QEMU/20260317174740.31674-1-lucaaamaral@gmail.com/ instead.
> >
> > That works fine and removes reliance on FEAT_S2FWB.
> >
> > * some older Arm chips implement equivalent semantics without signalling it, but
> > that might depend on SoC-level integration.
>
>
> It would be good to mention in the docs what the user needs to know
> about CPU requirements, if anything, so that it can actually work. If
> these recent modifications/patches make the TIS work on any processor,
> then there's nothing to mention...
>
> >
> > Thanks,
> > -Mohamed
> >
Thanks Stefan, Mohamed
I wasn't aware of the LDP / S2FWB angle, appreciate the context.
Looking into it, the FEAT_S2FWB requirement is for TPM TIS MMIO access
in general on ARM64 and predates this series. The PPI region we're
adding is RAM-backed (memory_region_init_ram_device_ptr), so it
shouldn't be affected by that issue.
and for our testing we used an Ampere Altra Max M128-30 (Neoverse N1
r3p1, MIDR 0x413fd0c1). TPM TIS works correctly with Windows 11 ARM64
guests with this fix.
Regards,
Faiz
next prev parent reply other threads:[~2026-03-26 7:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 7:10 [PATCH 0/3] hw/tpm: add PPI support to tpm-tis-device on ARM64 virt Mohammadfaiz Bawa
2026-03-24 7:10 ` [PATCH 1/3] docs/specs/tpm: document PPI support " Mohammadfaiz Bawa
2026-03-25 19:31 ` Stefan Berger
2026-03-25 20:22 ` Mohamed Mediouni
2026-03-25 20:31 ` Stefan Berger
2026-03-26 7:27 ` Mohammadfaiz Bawa [this message]
2026-03-26 11:29 ` Mohamed Mediouni
2026-03-24 7:10 ` [PATCH 2/3] hw/acpi/tpm: parameterize PPI base address in tpm_build_ppi_acpi Mohammadfaiz Bawa
2026-03-25 19:32 ` Stefan Berger
2026-03-24 7:10 ` [PATCH 3/3] hw/tpm: add PPI support to tpm-tis-device for ARM64 virt Mohammadfaiz Bawa
2026-03-25 19:37 ` Stefan Berger
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='CAJg9Kky1q=5DFDPkh-i1hyxCKmpuEnR02hrHN-ncewY2VO0LQA@mail.gmail.com' \
--to=mbawa@redhat.com \
--cc=anisinha@redhat.com \
--cc=imammedo@redhat.com \
--cc=mohamed@unpredictable.fr \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shannon.zhaosl@gmail.com \
--cc=stefanb@linux.ibm.com \
--cc=stefanb@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox