projectacrn / acrn-hypervisor

Project ACRN hypervisor
BSD 3-Clause "New" or "Revised" License
1.1k stars 505 forks source link

[Code refine]: Refine hypercall dispatch #5924

Closed NanlinXie closed 3 years ago

NanlinXie commented 3 years ago

The permission checks in vmcall_vmexit_handler() cover multiple aspects in the same if … else if … else block, which will not scale when more kinds of checks are needed. To enhance scalability the permissions should be maintained and checked in a unified manner.

NanlinXie commented 3 years ago

[External_System_ID] ACRN-6999

NanlinXie commented 3 years ago

Doc Impact Analysis:

NanlinXie commented 3 years ago

Will have impact to hypercall API error code, and will update with code PR.

gvancuts commented 3 years ago

I don't know enough about the changes that are planned but there are some documentation about hypercalls in the HLD sections.

junjiemao1 commented 3 years ago

PR !5994, which contains both the code changes and relevant document updates, has been merged.

NanlinXie commented 3 years ago

@junjiemao1 , could you link your doc PR here, and @szhen11 and @shenfang2019 could help on verification.

junjiemao1 commented 3 years ago

@junjiemao1 , could you link your doc PR here, and @szhen11 and @shenfang2019 could help on verification.

It is the same PR.

dbkinder commented 3 years ago

Indeed it is: #5994