-
Notifications
You must be signed in to change notification settings - Fork 118
virt_mshv_vtl: add inspection support for cvm cpuid tables #1048
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?
Conversation
inspect::iter_by_key( | ||
table | ||
.iter() | ||
.map(|(key, value)| (format!("{:?} ({:x})", key, key.0), value)), |
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.
Can we just make the key the hex value in both cases? I don't want spaces and parens and open_enum identifiers in keys.
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.
yeah we can just make it the hex key, i found it useful to have both (but that's because i just started looking at cpuid so i don't have the idents memorized)
@@ -178,8 +179,11 @@ pub struct ParsedCpuidEntry { | |||
} | |||
|
|||
/// Prepares and caches the results that should be returned for hardware CVMs. | |||
#[derive(Inspect)] | |||
pub struct CpuidResults { |
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.
I still want this whole thing merged with the non-CVM cpuid handling. We shouldn't have two completely different table formats.
But anyway, that's certainly out of scope for this change.
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.
I agree - it's really annoying that they're completely different.
inspect::iter_by_key( | ||
table | ||
.iter() | ||
.map(|(key, value)| (format!("{:x?}", key), cpuid_result(value))), |
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.
Seems like it should be :#x
and not :x?
I'm going to hold of updating this until John's refactor PR is in - I don't know if we still need it? |
These weren't inspectable before.
I think though, that there's probably some more to do here - the raw value themselves aren't always what the guest will see since there's some runtime state that gets modified with the table. This is at least a starting point though.