-
Notifications
You must be signed in to change notification settings - Fork 5
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
Implement TDVF and INIT_VCPU #7
Conversation
fe25d9d
to
9e1a7a1
Compare
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.
Nice work, I've suggested a few changes.
Side note: There are a lot of functional changes here for this to be only one commit (IMO it can be easily broken into 4+ commits). While its fine for now and you don't need to change, it is good practice to create commits with small modular changes that either introduce new functionality or fix something. This can ease the burden on a reviewer when trying to review code submitted.
Signed-off-by: Jake Correnti <[email protected]>
Signed-off-by: Jake Correnti <[email protected]>
9e1a7a1
to
40e06b8
Compare
Signed-off-by: Jake Correnti <[email protected]>
Signed-off-by: Jake Correnti <[email protected]>
Signed-off-by: Jake Correnti <[email protected]>
Signed-off-by: Jake Correnti <[email protected]>
40e06b8
to
70dd780
Compare
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.
One small change, looks good otherwise.
src/launch/mod.rs
Outdated
fn try_from(fd: &'a mut kvm_ioctls::VcpuFd) -> Result<Self, Self::Error> { | ||
// need to enable the X2APIC bit for CPUID[0x1] so that the kernel can call | ||
// KVM_SET_MSRS(MSR_IA32_APIC_BASE) without failing | ||
let kvm = Kvm::new()?; |
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 think we should be re-using the Kvm
that we initialized the vCPU with. We should include that in this.
impl<'a> TryFrom<(&'a mut kvm_ioctls::VcpuFd, &'a mut kvm_ioctls::Kvm)> for TdxVcpu<'a>
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.
the TryFrom
trait only allows one argument from what I can see
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.
the
TryFrom
trait only allows one argument from what I can see
I misread your code snippet, please disregard
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.
should be fixed.
Signed-off-by: Jake Correnti <[email protected]>
70dd780
to
642c1d6
Compare
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.
Nice work!
Adds a module that will provide an API for TDVF (TDX Virtual Firmware).
Adds the API to initialize a VCPU for TDX.