Skip to content

[Rebase & FF] Fix Partition ID being used for FFA_RUN calls#1827

Merged
kuqin12 merged 3 commits into
microsoft:release/202511from
kuqin12:fix_part_id
Jun 24, 2026
Merged

[Rebase & FF] Fix Partition ID being used for FFA_RUN calls#1827
kuqin12 merged 3 commits into
microsoft:release/202511from
kuqin12:fix_part_id

Conversation

@kuqin12

@kuqin12 kuqin12 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Description

The current implementation of FFA run invocation always uses the original partition ID as the input for FFA_RUN. However, this is problematic when the partitions are chain loading the direct request 2 functions and the partitions are interruptible. In that case, the caller should FFA_RUN to the partition specified in w1.

Then the w1 information was eaten in the case of direct request calls, because we only exposed the payload to the callers.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

This is tested on ARM virt and physical platform.

Integration Instructions

N/A

@kuqin12 kuqin12 marked this pull request as draft June 19, 2026 17:38
@mu-automation

mu-automation Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

✅ QEMU Validation Passed

Source Dependencies

Repository Commit
mu_basecore 0ce4540
mu_tiano_platforms 2f0a2be

Results

Platform Target Build Boot Overall Boot Time Build Logs Boot Logs
Q35 DEBUG ✅ success ✅ success 0m 19s Build Logs Boot Logs
ArmVirt DEBUG ✅ success ✅ success 0m 14s Build Logs Boot Logs

Workflow run: https://github.com/microsoft/mu_basecore/actions/runs/28066724054

This comment was automatically generated by the Mu QEMU PR Validation workflow.

@codecov-commenter

codecov-commenter commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release/202511@733cc7e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...tyPkg/Library/Tpm2DeviceLibFfa/Tpm2ServiceFfaRaw.c 0.00% 2 Missing ⚠️
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigFfaPeim.c 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             release/202511    #1827   +/-   ##
=================================================
  Coverage                  ?    2.25%           
=================================================
  Files                     ?     1637           
  Lines                     ?   420611           
  Branches                  ?     5035           
=================================================
  Hits                      ?     9469           
  Misses                    ?   411060           
  Partials                  ?       82           
Flag Coverage Δ
FmpDevicePkg 9.53% <ø> (?)
MdeModulePkg 1.64% <ø> (?)
MdePkg 5.44% <ø> (?)
NetworkPkg 0.55% <ø> (?)
PolicyServicePkg 30.42% <ø> (?)
SecurityPkg 1.59% <0.00%> (?)
UefiCpuPkg 4.78% <ø> (?)
UnitTestFrameworkPkg 11.70% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kuqin12 kuqin12 force-pushed the fix_part_id branch 2 times, most recently from 854482a to 9a631df Compare June 22, 2026 20:52
@kuqin12 kuqin12 marked this pull request as ready for review June 22, 2026 21:48
@kuqin12 kuqin12 changed the title [DRAFT][Rebase & FF] Fix Partition ID being used for FFA_RUN calls [Rebase & FF] Fix Partition ID being used for FFA_RUN calls Jun 22, 2026
@kuqin12 kuqin12 requested review from Raymond-MS and cfernald June 22, 2026 21:48
Comment thread MdeModulePkg/Library/ArmFfaLib/ArmFfaCommon.c Outdated
Comment thread MdeModulePkg/Library/ArmFfaLib/ArmFfaCommon.c Outdated
Comment thread ArmPkg/Drivers/MmCommunicationPei/MmCommunicationPei.c
Comment thread SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigFfaPeim.c
Comment thread SecurityPkg/Library/Tpm2DeviceLibFfa/Tpm2ServiceFfaRaw.c Outdated
@kuqin12 kuqin12 force-pushed the fix_part_id branch 3 times, most recently from f7e5f83 to a81d042 Compare June 23, 2026 23:24
@kuqin12 kuqin12 enabled auto-merge (rebase) June 23, 2026 23:24
kuqin12 added 3 commits June 23, 2026 17:25
The direct message arguments stripped off the header, making the
underlying FF-A function interface to lose information when it comes to
certain return code, i.e. FFA_YIELD and FFA_INTERRUPT.

This change adds back the header field for this purpose so that the
callers can decide how to act on the corresponding return codes.

It then populates the header field for this purpose in FFA direct
message functions so that the callers can decide how to act on the
corresponding return codes.

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
As the FFA function now returns the target ID properly, instead of
hardcoding the FFA_RUN target ID being the STMM, we use the parsed
ID to issue the FFA_RUN.

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
As the FFA function now returns the target ID properly, instead of
hardcoding the FFA_RUN target ID being the TPM SP, we use the parsed
ID to issue the FFA_RUN.

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
@kuqin12 kuqin12 merged commit 1175b2f into microsoft:release/202511 Jun 24, 2026
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants