-
Notifications
You must be signed in to change notification settings - Fork 64
Add support for FPU flag for PDs #404
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -322,6 +322,7 @@ impl CapDLSpecContainer { | |||
| prio: 0, | ||||
| max_prio: 0, | ||||
| resume: false, | ||||
| fpu: true, | ||||
| ip: entry_point.into(), | ||||
| sp: 0.into(), | ||||
| gprs: Vec::new(), | ||||
|
|
@@ -468,7 +469,7 @@ pub fn build_capdl_spec( | |||
| ) | ||||
| .unwrap(); | ||||
|
|
||||
| // At this point, all of the required objects for the monitor have been created and it caps inserted into | ||||
| // At this point, all of the required objects for the monitor have been created and its caps inserted into | ||||
| // the correct slot in the CSpace. We need to bind those objects into the TCB for the monitor to use them. | ||||
| // In addition, `add_elf_to_spec()` doesn't fill most the details in the TCB. | ||||
| // Now fill them in: stack ptr, priority, ipc buf vaddr, etc. | ||||
|
|
@@ -911,6 +912,7 @@ pub fn build_capdl_spec( | |||
| affinity: Word(vcpu.cpu.0.into()), | ||||
| prio: virtual_machine.priority, | ||||
| max_prio: virtual_machine.priority, | ||||
| fpu: true, | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should probably have a VM fpu attribute here too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very small chance anyone would want to disable the FPU for a VM though. Also, this wouldn't work for x86, where the flag is used for the host task and the FPU is always enabled for the guest itself.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As I understand it it will be refined at a later step during the system setup as mentioned below:
|
||||
| resume: false, | ||||
| // VMs do not have program images associated with them so these are always zero. | ||||
| ip: Word(0), | ||||
|
|
@@ -979,6 +981,7 @@ pub fn build_capdl_spec( | |||
| pd_tcb.extra.master_fault_ep = None; // Not used on MCS kernel. | ||||
| pd_tcb.extra.prio = pd.priority; | ||||
| pd_tcb.extra.max_prio = pd.priority; | ||||
| pd_tcb.extra.fpu = pd.fpu; | ||||
| pd_tcb.extra.resume = true; | ||||
|
|
||||
| pd_tcb.slots.extend(caps_to_bind_to_tcb); | ||||
|
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| Copyright 2025, UNSW | ||
|
|
||
| SPDX-License-Identifier: BSD-2-Clause | ||
| --> | ||
| <system> | ||
| <protection_domain name="test" fpu="foo"> | ||
| </protection_domain> | ||
| </system> |
Uh oh!
There was an error while loading. Please reload this page.