{"action":"created","issue":{"url":"https://api.github.com/repos/Bareflank/hypervisor/issues/529","repository_url":"https://api.github.com/repos/Bareflank/hypervisor","labels_url":"https://api.github.com/repos/Bareflank/hypervisor/issues/529/labels{/name}","comments_url":"https://api.github.com/repos/Bareflank/hypervisor/issues/529/comments","events_url":"https://api.github.com/repos/Bareflank/hypervisor/issues/529/events","html_url":"https://github.com/Bareflank/hypervisor/issues/529","id":271306813,"number":529,"title":"[RFC] High-level naming and directory structure","user":{"login":"connojd","id":9279947,"avatar_url":"https://avatars0.githubusercontent.com/u/9279947?v=4","gravatar_id":"","url":"https://api.github.com/users/connojd","html_url":"https://github.com/connojd","followers_url":"https://api.github.com/users/connojd/followers","following_url":"https://api.github.com/users/connojd/following{/other_user}","gists_url":"https://api.github.com/users/connojd/gists{/gist_id}","starred_url":"https://api.github.com/users/connojd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connojd/subscriptions","organizations_url":"https://api.github.com/users/connojd/orgs","repos_url":"https://api.github.com/users/connojd/repos","events_url":"https://api.github.com/users/connojd/events{/privacy}","received_events_url":"https://api.github.com/users/connojd/received_events","type":"User","site_admin":false},"labels":[{"id":454449303,"url":"https://api.github.com/repos/Bareflank/hypervisor/labels/request%20for%20comments","name":"request for comments","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":{"login":"rianquinn","id":5932003,"avatar_url":"https://avatars3.githubusercontent.com/u/5932003?v=4","gravatar_id":"","url":"https://api.github.com/users/rianquinn","html_url":"https://github.com/rianquinn","followers_url":"https://api.github.com/users/rianquinn/followers","following_url":"https://api.github.com/users/rianquinn/following{/other_user}","gists_url":"https://api.github.com/users/rianquinn/gists{/gist_id}","starred_url":"https://api.github.com/users/rianquinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rianquinn/subscriptions","organizations_url":"https://api.github.com/users/rianquinn/orgs","repos_url":"https://api.github.com/users/rianquinn/repos","events_url":"https://api.github.com/users/rianquinn/events{/privacy}","received_events_url":"https://api.github.com/users/rianquinn/received_events","type":"User","site_admin":false},"assignees":[{"login":"rianquinn","id":5932003,"avatar_url":"https://avatars3.githubusercontent.com/u/5932003?v=4","gravatar_id":"","url":"https://api.github.com/users/rianquinn","html_url":"https://github.com/rianquinn","followers_url":"https://api.github.com/users/rianquinn/followers","following_url":"https://api.github.com/users/rianquinn/following{/other_user}","gists_url":"https://api.github.com/users/rianquinn/gists{/gist_id}","starred_url":"https://api.github.com/users/rianquinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rianquinn/subscriptions","organizations_url":"https://api.github.com/users/rianquinn/orgs","repos_url":"https://api.github.com/users/rianquinn/repos","events_url":"https://api.github.com/users/rianquinn/events{/privacy}","received_events_url":"https://api.github.com/users/rianquinn/received_events","type":"User","site_admin":false},{"login":"connojd","id":9279947,"avatar_url":"https://avatars0.githubusercontent.com/u/9279947?v=4","gravatar_id":"","url":"https://api.github.com/users/connojd","html_url":"https://github.com/connojd","followers_url":"https://api.github.com/users/connojd/followers","following_url":"https://api.github.com/users/connojd/following{/other_user}","gists_url":"https://api.github.com/users/connojd/gists{/gist_id}","starred_url":"https://api.github.com/users/connojd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connojd/subscriptions","organizations_url":"https://api.github.com/users/connojd/orgs","repos_url":"https://api.github.com/users/connojd/repos","events_url":"https://api.github.com/users/connojd/events{/privacy}","received_events_url":"https://api.github.com/users/connojd/received_events","type":"User","site_admin":false},{"login":"JaredWright","id":13487832,"avatar_url":"https://avatars0.githubusercontent.com/u/13487832?v=4","gravatar_id":"","url":"https://api.github.com/users/JaredWright","html_url":"https://github.com/JaredWright","followers_url":"https://api.github.com/users/JaredWright/followers","following_url":"https://api.github.com/users/JaredWright/following{/other_user}","gists_url":"https://api.github.com/users/JaredWright/gists{/gist_id}","starred_url":"https://api.github.com/users/JaredWright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JaredWright/subscriptions","organizations_url":"https://api.github.com/users/JaredWright/orgs","repos_url":"https://api.github.com/users/JaredWright/repos","events_url":"https://api.github.com/users/JaredWright/events{/privacy}","received_events_url":"https://api.github.com/users/JaredWright/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Bareflank/hypervisor/milestones/7","html_url":"https://github.com/Bareflank/hypervisor/milestone/7","labels_url":"https://api.github.com/repos/Bareflank/hypervisor/milestones/7/labels","id":2891095,"number":7,"title":"Bareflank v1.2: Cleanup","description":"","creator":{"login":"rianquinn","id":5932003,"avatar_url":"https://avatars3.githubusercontent.com/u/5932003?v=4","gravatar_id":"","url":"https://api.github.com/users/rianquinn","html_url":"https://github.com/rianquinn","followers_url":"https://api.github.com/users/rianquinn/followers","following_url":"https://api.github.com/users/rianquinn/following{/other_user}","gists_url":"https://api.github.com/users/rianquinn/gists{/gist_id}","starred_url":"https://api.github.com/users/rianquinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rianquinn/subscriptions","organizations_url":"https://api.github.com/users/rianquinn/orgs","repos_url":"https://api.github.com/users/rianquinn/repos","events_url":"https://api.github.com/users/rianquinn/events{/privacy}","received_events_url":"https://api.github.com/users/rianquinn/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2017-11-06T14:09:00Z","updated_at":"2017-11-06T14:09:19Z","due_on":"2018-04-27T07:00:00Z","closed_at":null},"comments":9,"created_at":"2017-11-05T19:30:16Z","updated_at":"2017-11-27T18:29:32Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Directory names**\r\nThis RFC is intended to start a discussion about the high-level component names used by the Bareflank hypervisor. The bulk of the hypervisor code resides under the bfvmm directory:\r\n\r\n- bfvmm/src\r\n  - debug_ring\r\n  - exit_handler\r\n  - intrinsics\r\n  - memory_manager\r\n  - serial\r\n  - support\r\n  - vcpu\r\n  - vcpu_factory\r\n  - vmcs\r\n  - vmxon\r\n\r\nThe last two - vmcs and vmxon - are the only names that assume an architecture. I propose that we create a new directory called `vmctl` (short for virtual machine control), and place the vmcs/vmxon code under an x86-specific directory. Something like\r\n\r\n- bfvmm/src/vmctl\r\n  - arch-independent vmctl files\r\n  - arch/\r\n    - x86/\r\n      - intel/\r\n        - vmcs files\r\n        - vmxon files\r\n      - amd/\r\n        - vmcb files\r\n    - aarch64/\r\n\r\nI decided on `vmctl` because I think that it conceptually captures what the vmcs and vmxon currently do. This directory will be the location of the state needed to manage virtual machines. A \"virtual machine\" is any code that runs at a less-privileged level than the VMM. The VMM is code that runs with hypervisor privileges. So on ARM, the VMM will run in normal world at EL2, and will manage code that runs in normal world at EL1 and EL0 (i.e. VMs). In Intel-speak, the VMM runs in VMX-root and a VM is any code that runs in VMX-nonroot.\r\n\r\nIf we go this route, it will probably make sense to mirror the above layout for each of the bfvmm's high-level modules. So the bfvmm would look like\r\n\r\n- bfvmm/src/\\<module\\>\r\n  - arch-independent files at the top level\r\n  - arch/\r\n    - x86/\r\n      - intel/\r\n      - amd/\r\n      - ...\r\n    - aarch64/\r\n      - ...\r\n\r\nwhere \\<module\\> = debug_ring, exit_handler, memory_manager, etc.\r\n\r\n**Other Issues**\r\n- Right now the build system treats each child directory under bfvmm/src as a module.  Without any changes to the build system, the proposed directory change would create one \"vmctl\" module and would effectively decrease the modularity from before. With changes that @JaredWright is making to the build system now, I think this will be relatively simple to address though.\r\n\r\n- The intrinsics directory is by far the largest directory under bfvmm. Most of the code is under include/intrinsics and it already follows a structure similar to the proposed one above. Conceptually, the intrinsics code is the software layer that interacts directly with the hardware. One issue that I have with its current location is that the code is not specific to the bfvmm, as it is also used by the [extended_apis](https://github.com/Bareflank/extended_apis) and the [hyperkernel](https://github.com/Bareflank/hyperkernel), and really it could be used by *any* code that needs to interact with the hardware in some way.  I think that moving the intrinsics code to the top-level would help illustrate the role that the code actually plays"},"comment":{"url":"https://api.github.com/repos/Bareflank/hypervisor/issues/comments/347278347","html_url":"https://github.com/Bareflank/hypervisor/issues/529#issuecomment-347278347","issue_url":"https://api.github.com/repos/Bareflank/hypervisor/issues/529","id":347278347,"user":{"login":"cpavlina","id":8991037,"avatar_url":"https://avatars3.githubusercontent.com/u/8991037?v=4","gravatar_id":"","url":"https://api.github.com/users/cpavlina","html_url":"https://github.com/cpavlina","followers_url":"https://api.github.com/users/cpavlina/followers","following_url":"https://api.github.com/users/cpavlina/following{/other_user}","gists_url":"https://api.github.com/users/cpavlina/gists{/gist_id}","starred_url":"https://api.github.com/users/cpavlina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpavlina/subscriptions","organizations_url":"https://api.github.com/users/cpavlina/orgs","repos_url":"https://api.github.com/users/cpavlina/repos","events_url":"https://api.github.com/users/cpavlina/events{/privacy}","received_events_url":"https://api.github.com/users/cpavlina/received_events","type":"User","site_admin":false},"created_at":"2017-11-27T18:29:32Z","updated_at":"2017-11-27T18:29:32Z","author_association":"CONTRIBUTOR","body":"> I am fine with respect to removing the \"bf\" from the folders (thats an old carry over from 1.0), but some things still need it like \"bfelf_loader.h\" and BFM. We don't want \"m\" in /bin, and we cannot use \"elf_loader.h\" as it will interfere with the existing ELF loader headers in Linux.\r\n\r\nI feel like we're risking introducing a lot of confusing inconsistency by only using bf- when necessary to avoid naming collisions. It doesn't make much sense to me to \"randomly\" have some things namespaced and others just lying around in the global space because they happen not to collide with anything. Either remove it from everything (not feasible) or from nothing, IMO..."}}
{"actor":{"display_login":"cpavlina"}}