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

Xenlib misc updates and fixes #83

Merged
merged 5 commits into from
May 9, 2024

Conversation

GrygiriiS
Copy link

Set of misc, not critical updates and fixes.

Copy link
Collaborator

@lorc lorc left a comment

Choose a reason for hiding this comment

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

Thanks

Reviewed-by: Volodymyr Babchuk <[email protected]>

@@ -1044,26 +1044,15 @@ static int dom0less_init(void)

static int init_domain0(void)
{
struct xen_domctl_getdomaininfo dominfo;
Copy link
Collaborator

@lorc lorc May 7, 2024

Choose a reason for hiding this comment

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

Taking into account size of xen_domctl_getdomaininfo it is debatable if we should store it in the stack. Better to have -ENOMEM than stack overrun.

@lorc
Copy link
Collaborator

lorc commented May 7, 2024

Oh, and one more thing. Please configure spell checker in your editor, so we can avoid things like "but there is
mor simple" in commit messages.

Grygorii Strashko added 5 commits May 8, 2024 18:28
With CONFIG_XEN_SHELL=n build unused functions warnings observed, so fix
it.

Signed-off-by: Grygorii Strashko <[email protected]>
Reviewed-by: Volodymyr Babchuk <[email protected]>
The XENSTORE_TREE_TRAVERSE_DEPTH is used in xss_list_traverse() which is
generic even if it's used now only form xenlib SHELL code.

Signed-off-by: Grygorii Strashko <[email protected]>
Reviewed-by: Volodymyr Babchuk <[email protected]>
The init_domain0() is using XSTAT features to get Dom0 info, but there is
more simple way is to use xen_domctl_getdomaininfo() API.

Hence, use xen_domctl_getdomaininfo() to simplify the code and get rid from
XSTAT dependencies.

Also -1 k_malloc.

The size of struct xen_domctl_getdomaininfo is 120 bytes and It is
initcall, so safe to allocate on stack.

Signed-off-by: Grygorii Strashko <[email protected]>
Reviewed-by: Volodymyr Babchuk <[email protected]>
The "pragma once" is not generic approach for Zephyr to prevent recursive
headers inclusion. Get rid of it.

Signed-off-by: Grygorii Strashko <[email protected]>
Reviewed-by: Volodymyr Babchuk <[email protected]>
No need to send ESCAPE_CHARACTER Ctrl-'[' to guest domain, just return from
console_shell_cb().

Signed-off-by: Grygorii Strashko <[email protected]>
Reviewed-by: Volodymyr Babchuk <[email protected]>
@lorc
Copy link
Collaborator

lorc commented May 9, 2024

@firscity, could you please merge this?

@firscity firscity merged commit 1d0fa90 into xen-troops:main May 9, 2024
5 checks passed
@GrygiriiS GrygiriiS deleted the xenlib-rpi5_dev_misc branch May 10, 2024 08:26
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