Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xen+hafnium fixes #7246

Merged
merged 4 commits into from
Feb 6, 2025
Merged

Xen+hafnium fixes #7246

merged 4 commits into from
Feb 6, 2025

Conversation

jenswi-linaro
Copy link
Contributor

No description provided.

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, some minor comments.

@@ -1153,6 +1153,15 @@ END_FUNC el0_sync_abort
write_apiakeylo x2
isb
#endif

#ifdef CFG_CORE_FFA
/* x0 is still pointing to the current thread_ctx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing */

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll add it.

adr_l x2, threads
madd x2, x1, x0, x2
ldr w1, [x2, #THREAD_CTX_TSD_RPC_TARGET_INFO]
/* w1 holds rpc_target_info */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe remove this inline comment. Implicit from above inline comment header line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update.

@@ -139,6 +137,8 @@ struct initcall {
#define nex_release_init_resource(fn) release_init_resource(fn)
#endif

#define boot_final(fn) __define_initcall(final, 8, fn)
Copy link
Contributor

@etienne-lms etienne-lms Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe swap order in inline comment at line 83:
s/boot_final() / nex_*init*()/nex_*ini / boot_final()/

I think there should be oter some updates in the inline description because some sentences are wrong or not accurate, e.g.:
"preinit_() are always called before functions registered with _init()."
"boot_final() functions are called first before exiting to normal world the first"
(edited) can be addressed later in a dedicated P-R

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll swap boot_final() / nex_init() in the comment above.
I'll propose an update in a later PR for the description.

@jenswi-linaro
Copy link
Contributor Author

Update

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Etienne Carriere <[email protected]> for the series.
The 2 commit messages that mention SPMC at S-EL2 should maybe also mention SPMC at EL3 (which is possible with CFG_CORE_SEL1_SPMC=n).

Call virt_add_guest_spec_data() for the struct notif_vm_bitmap to make
it accessible from notif_send_async().

Signed-off-by: Jens Wiklander <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
Make the boot_final() call last among the final call, that is, after the
xen_*_init*() calls. spmc_init() accesses the manifest_fd so it must be
called before release_manifest_dt() removes it.

Signed-off-by: Jens Wiklander <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
Add __nex_bss and __nex_data annotations for the rxtx buffers used in a
configuration with SPMC at S-EL2 or EL3.

Signed-off-by: Jens Wiklander <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
thread_foreign_intr_exit() is called after the thread state has been
saved and the thread is suspended. With virtualization enabled
(CFG_NS_VIRTUALIZATION=y) the virt_unset_guest() is also called. After
this, the guests thread contexts aren't available any longer. For FF-A
thread_foreign_intr_exit() needs a few fields from the suspend threads
context so extract those before suspending the thread and pass them as
parameters for thread_foreign_intr_exit().

Signed-off-by: Jens Wiklander <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
@jenswi-linaro
Copy link
Contributor Author

Comments addressed, squashed, and tags applied.

@jforissier jforissier merged commit 539836f into OP-TEE:master Feb 6, 2025
11 checks passed
@jenswi-linaro jenswi-linaro deleted the xen_haf branch February 6, 2025 09:44
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.

3 participants