-
Notifications
You must be signed in to change notification settings - Fork 53
add CPU platforms to instances #8728
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
Open
iximeow
wants to merge
43
commits into
main
Choose a base branch
from
minimum-cpu-platforms
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 29 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
4130d30
make sleds report their CPU families to Nexus
gjcolombo d316a2e
differentiate Turin and Turin Dense for the control plane
iximeow 1367289
unwind CPU families from the public sled API
iximeow b5eaf68
review notes
iximeow 114f383
fix links ugh
iximeow 4c40d47
migration still needs to know about turin dense
iximeow 5ec45d3
sled-agent needs to expose cpu_family for inventory collections too
iximeow e9cbbdd
it compiles (might work now?)
iximeow bf7ccae
migrations need to be... right ...
iximeow 0a79d5e
and that's the missing update of cpu_family.
iximeow ea59a26
non-illumos has to build too ofc
iximeow 10cd335
fix expectorated output and, oh, docs are in the openapi spec
iximeow 99a37f0
cleanup
iximeow 6846a4a
move SledCpuFamily to a more fitting place
iximeow 5f94661
rustfmt AGH
iximeow 543bdc9
and expectorate up the reconfigurator output
iximeow 34516b4
instance minimum CPU platforms
gjcolombo 3831038
walk back "minimum"ness of CPU platforms
iximeow 33956f9
i want propolis logs too please thank you
iximeow 9b6b6ec
one more pass at aligning RFD 314, what we currently expose, and the …
iximeow 5cf7b9c
and map the CPU platform "Turin" to all Turin sled CPU types
iximeow a877f39
one use of SledCpuFamily i missed in the rebase
iximeow 1d34ab2
revert the buildomat log collection changes
iximeow 4275594
more(!) RFD 341 errors
iximeow c686acf
move all the cpuid stuff, but it something is not great with the new …
iximeow 9348caf
update raw-cpuid, genericize ideal Milan, map CpuIdDump to Propolis
iximeow af4e2ee
rustfmt
iximeow b05bae4
move MILAN_CPUID to an equivalence test
iximeow 5f8aedd
outline more sensitive CPUID bits into a compatibility helper
iximeow 9e92b01
dead code
iximeow d4cbf2f
another RFD 314/PR transcription error: extended APIC space
iximeow bfee777
adjust leaf 8000_001D expectations with RFD 314 adjustments
iximeow fb12fc9
test demonstrating constructed CPUID tables are as exepected
iximeow d59a842
rustfmt
iximeow d9acd90
describe the CPU profile tests a bit better, formatting
iximeow 63a5326
more fmt
iximeow e5ba594
turbo nit
iximeow b2fd208
Merge remote-tracking branch 'github/main' into minimum-cpu-platforms
iximeow 401d58b
forgot to import everything the tests need
iximeow 5364358
clippy
iximeow d17b8aa
hide leaf B for now (in coordination with rfd314 updates)
iximeow 10e67c1
pretty sure this forbids irresponsible migrations..
iximeow 75ed627
extremely confused about ANY() but de-eww success!
iximeow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
use crate::SledCpuFamily; | ||
|
||
use super::impl_enum_type; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
impl_enum_type!( | ||
InstanceCpuPlatformEnum: | ||
|
||
#[derive( | ||
Copy, | ||
Clone, | ||
Debug, | ||
PartialEq, | ||
AsExpression, | ||
FromSqlRow, | ||
Serialize, | ||
Deserialize | ||
)] | ||
pub enum InstanceCpuPlatform; | ||
|
||
AmdMilan => b"amd_milan" | ||
AmdTurin => b"amd_turin" | ||
); | ||
|
||
impl InstanceCpuPlatform { | ||
/// Returns a slice containing the set of sled CPU families that can | ||
/// accommodate an instance with this CPU platform. | ||
pub fn compatible_sled_cpu_families(&self) -> &'static [SledCpuFamily] { | ||
match self { | ||
// Turin-based sleds have a superset of the features made available | ||
// in a guest's Milan CPU platform | ||
Self::AmdMilan => { | ||
&[SledCpuFamily::AmdMilan, SledCpuFamily::AmdTurin] | ||
} | ||
Self::AmdTurin => &[SledCpuFamily::AmdTurin], | ||
} | ||
} | ||
} | ||
|
||
impl From<omicron_common::api::external::InstanceCpuPlatform> | ||
for InstanceCpuPlatform | ||
{ | ||
fn from(value: omicron_common::api::external::InstanceCpuPlatform) -> Self { | ||
use omicron_common::api::external::InstanceCpuPlatform as ApiPlatform; | ||
match value { | ||
ApiPlatform::AmdMilan => Self::AmdMilan, | ||
ApiPlatform::AmdTurin => Self::AmdTurin, | ||
} | ||
} | ||
} | ||
|
||
impl From<InstanceCpuPlatform> | ||
for omicron_common::api::external::InstanceCpuPlatform | ||
{ | ||
fn from(value: InstanceCpuPlatform) -> Self { | ||
match value { | ||
InstanceCpuPlatform::AmdMilan => Self::AmdMilan, | ||
InstanceCpuPlatform::AmdTurin => Self::AmdTurin, | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is RFD 314 public, and do we intend to make it public? If we're referencing it in a comment that will eventually make it into the public API docs, perhaps we should?