-
Notifications
You must be signed in to change notification settings - Fork 98
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
cvm: Refactor ohcl/ovmm emulator for flexible register retrieval and update #482
base: main
Are you sure you want to change the base?
Conversation
Take a look at #478 too, lets make sure we don't conflict too hard. |
u128::from_ne_bytes(self.vp.runner.fx_state().xmm[index]) | ||
} | ||
|
||
fn set_xmm(&mut self, index: usize, v: u128) -> Result<(), Self::Error> { |
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.
We should add some documentation on which registers get set immediately, and which only get set when you call flush.
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.
And which are immutable i guess.
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 guess these docs would have to be per-backing.
Overall this looks really nice, and a great step in the right direction. Thanks! |
@smalis-msft taking this out of draft mode as several of the CI tests don't fail to run locally for me, I'd like to see the output of the full run |
This looks pretty good to me overall. I've asked @jstarks to also take a pass on it as well though. Also note that all of our windows-hosted vmm tests in this repo rely on virt_whp support, so they'll probably hit your todos. SNP/TDX/MSHV testing is done in an outer loop currently. (We know that situation isn't great and are actively working on making it better). |
guest_memory, | ||
dev, | ||
interruption_pending, | ||
gva_valid, | ||
) { | ||
self.set_emulator_state(&state) | ||
.map_err(VpHaltReason::Hypervisor)?; |
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.
This needs to be a flush now right? Or is that handled inside emulate_mnf_write_fast_path?
note: still a couple active discussions about this PR, but no longer in draft mode so we can see CI results
Motivation
Changes
state
struct. Instead, the frontend calls functions to read and update register state.