-
Notifications
You must be signed in to change notification settings - Fork 77
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
Support get/set_vp_register for synic registers #342
base: main
Are you sure you want to change the base?
Conversation
.as_mut() | ||
.unwrap() | ||
.read_nontimer_msr(msr), | ||
_ => self.backing.untrusted_synic.as_mut().unwrap().read_msr(msr), |
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 it ok for these TDX paths to have access to the timer registers on the untrusted_synic?
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.
No.
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.
Will tweak
@@ -1883,7 +1883,17 @@ macro_rules! registers { | |||
Sifp = 0x000A0012, | |||
Sipp = 0x000A0013, | |||
Eom = 0x000A0014, | |||
Sirbp = 0x000A0015, |
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 removed this register because not only do we never use it, but neither does the hcl. Makes things here a bit clearer I think, that we explicitly do not support this register today.
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.
hvdef
is for definitions and should not reflect what we actually support in any crate that consumes it.
df9cb3c
to
c8dc6b8
Compare
This is fine conceptually, but do x64 guests actually try to access synic registers this way? |
We do this by just converting the register index to an msr index and calling the existing read/write msr functions. This comes along with a refactor to the timer MSRs to move their control inside the synic, making read/write_msr more complete.
A follow up PR will tackle the VINA register (would conflict with #248) and the apic base register.