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

invalid attribute 'vaddr' on element 'setvar' #6

Open
sitestudio opened this issue Oct 15, 2023 · 6 comments
Open

invalid attribute 'vaddr' on element 'setvar' #6

sitestudio opened this issue Oct 15, 2023 · 6 comments

Comments

@sitestudio
Copy link

sitestudio commented Oct 15, 2023

Trying to merge the contents of the http-server.system file into the rust_vmm.system file in the rust example in the libvmm repo and seeing this error:

Error: invalid attribute 'vaddr' on element 'setvar': rust_vmm.system:53.8

Relevant line is

<setvar symbol="virtio_net_client_dma_size" vaddr="0x200_000" />

Has something been deprecated?

@sitestudio sitestudio changed the title invalid attribute 'vaddr' or element 'setvar' invalid attribute 'vaddr' on element 'setvar' Oct 15, 2023
@Ivan-Velickovic
Copy link
Contributor

This seems to be something that Nick added to his fork of Microkit, coliasgroup/microkit@51a8042.

@sitestudio
Copy link
Author

Thanks for tracking it down - for some reason I couldn't find. Will have a play with integrating unless/until another solution emerges.

@Ivan-Velickovic
Copy link
Contributor

If you look at the system file, the way setvar is being used is actually to just set global variables to certain values (e.g the size of a buffer). From what I can tell it's not actually being used to set a virtual address.

@sitestudio
Copy link
Author

Thanks again, sounds like it can be worked around. Will have a look in the coming days.

@nspin
Copy link
Member

nspin commented Oct 18, 2023

@Ivan-Velickovic is correct. I am guilty of abusing the Microkit setvar features to avoid hard-coding addresses in two different places (the Microkit system description and the Rust code itself). I made the patch @Ivan-Velickovic linked anticipating that it might be accepted upstream, as the feature the patch adds seemed to be partially implemented already. However (@Ivan-Velickovic would know better on this), Microkit is likely headed in the direction of removing this sort of feature from the system description language, delegating managing and possibly injecting these configuration values to higher-level tools which emit Microkit system descriptions.

In the meantime, I will work towards getting this demo working with upstream Microkit. Hard-coding addresses in multiple places will suffice in the meantime before we start developing higher-level tools on top of Microkit.

@nspin
Copy link
Member

nspin commented Nov 1, 2023

This demo no longer relies on the patch to Microkit mentioned above (coliasgroup/microkit@51a8042).

https://github.com/seL4/rust-sel4 and this demo do, however, for the time being, still rely on a few other patches to Microkit. This is the branch that they depend on: https://github.com/coliasgroup/microkit/tree/rust.

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

No branches or pull requests

3 participants