-
Notifications
You must be signed in to change notification settings - Fork 564
vmm: Change booting process to cover AArch64 requirements #1238
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
vmm: Change booting process to cover AArch64 requirements #1238
Conversation
03030a1 to
420b8c6
Compare
420b8c6 to
54afc89
Compare
|
@michael2012z Does the |
|
@sameo In |
54afc89 to
de0ec54
Compare
|
The integration test failure was fixed. Now the PR is ready for review. |
rbradford
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider if you could have the same flow on x86. Where load_kernel does not call configure_system().
That might lead to less difference in the architecture paths?
Or maybe the vCPUs could be setup earlier on all architectures.
In my opinion any function that has a same name should be called at the same point in the flow, if that means you need to do further refactoring (or split configure_system) then that's fine as I think there is more value in having more similarity and commonality.
de0ec54 to
7108175
Compare
I totally agree with this. Now that X86 and ARM align the path in this way. |
7108175 to
b88589e
Compare
39021fa to
5abf67d
Compare
|
Hi, @rbradford, @sameo , may I have more comments from you for this PR? |
|
@michael2012z I'll have a look today. |
Between X86 and AArch64, there is some difference in booting a VM:
- X86_64 can setup IOAPIC before creating any VCPU.
- AArch64 have to create VCPU's before creating GIC.
The old process is:
1. load_kernel()
load kernel binary
configure system
2. activate_vcpus()
create & start VCPU's
So we need to separate "activate_vcpus" into "create_vcpus" and
"activate_vcpus" (to start vcpus only). Setup GIC and create FDT
between the 2 steps.
The new procedure is:
1. load_kernel()
load kernel binary
(X86_64) configure system
2. create VCPU's
3. (AArch64) setup GIC
4. (AArch64) configure system
5. start VCPU's
Signed-off-by: Michael Zhao <[email protected]>
Now the flow of both architectures are aligned to: 1. load kernel 2. create VCPU's 3. configure system 4. start VCPU's Signed-off-by: Michael Zhao <[email protected]>
Signed-off-by: Michael Zhao <[email protected]>
5abf67d to
16f19dd
Compare
|
@sboeuf , @rbradford , thank you for reviewing. I updated the code correspondingly. |
sboeuf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @michael2012z!
@sameo PTAL
Splits from #1126.
To enable CH on AArch64, we need to change the process of creating and activating VCPU's.
To make it easy to review, this PR contains the modifications for X86 only, ARM code will be added later.
Between X86 and AArch64, there is some differences in booting a VM:
The old booting process is:
load kernel binary
configure system
create & start VCPU's
So we need to separate "activate_vcpus()" into "create_vcpus()" and "activate_vcpus()" (to start VCPUS's only). We also separate load_kernel() into "load_kernel()" and "configure system()" (GIC setup and FDT generating is included in it) to align the steps among architectures.
The new procedure is:
Signed-off-by: Michael Zhao [email protected]