-
Notifications
You must be signed in to change notification settings - Fork 35
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
vm_arm: add pcpu list for core pinning #54
base: master
Are you sure you want to change the base?
Conversation
175709b
to
eadf2e8
Compare
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.
Looks good to me.
Please add the DCO. |
Please rebase this, and add the signed-off-by: line in your commit message. |
20e04e9
to
b2284ea
Compare
Bumping this PR. I believe everything has been addressed. |
The CI build is failing with include errors, but I wonder if this is related the the change here or a general probelm? |
It's at least not a CI glitch, one of the recently merged PRs must have introduced this problem (or it is introduced here). |
The current status of camkes-vm-examples is green, with the most recent tested manifest being this one:
|
@Apave24 could you do a rebase, so we get another CI run here? |
5d4a348
to
727df13
Compare
Adds a pcpu list to the VM_Arm component to allow pinning of vcpus to specific physical cpus within a CAmkES configuration. Signed-off-by: Alex Pavey <[email protected]>
727df13
to
aff0b99
Compare
Signed-off-by: Alex Pavey <[email protected]>
aff0b99
to
f060b5c
Compare
/*- endfor -*/ | ||
/*- endif -*/ | ||
|
||
int get_instance_size_pcpus_list(void) { |
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.
int get_instance_size_pcpus_list(void) { | |
unsigned int get_instance_size_pcpus_list(void) { |
@@ -1270,8 +1271,26 @@ static int main_continued(void) | |||
} | |||
} | |||
|
|||
int pcpu_assignments = 0; |
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.
Let's avoid assigning 0 and then overwriting this, it gives compiler warnings at the picky level.
unsigned int pcpu_assignments = get_instance_size_pcpus_list();
if (pcpu_assignments > NUM_VCPUS) {
pcpu_assignments = NUM_VCPUS;
}
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.
Or well, we could even merge this nicely into the CPU node creation at line 1260:
/* Create CPUs and DTB node */
unsigned int pcpu_list_size = get_instance_size_pcpus_list();
for (int i = 0; i < NUM_VCPUS; i++) {
vm_vcpu_t *new_vcpu = create_vmm_plat_vcpu(&vm, VM_PRIO - 1);
assert(new_vcpu);
if (i < pcpu_list_size) {
/* Assign VCPU to explicit physical CPU */
new_vcpu->target_cpu = pcpus[i];
}
}
// ... and now generate the device tree VCPU nodes
@@ -42,3 +42,5 @@ typedef struct { | |||
} vm_config_t; | |||
|
|||
extern const vm_config_t vm_config; | |||
|
|||
int get_instance_size_pcpus_list(void); |
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.
int get_instance_size_pcpus_list(void); | |
unsigned int get_instance_size_pcpus_list(void); |
Adds a pcpu list to the VM_Arm component to allow pinning of vcpus to specific physical cpus within a CAmkES configuration.
Test with: seL4/seL4_projects_libs#84