Skip to content

Description of MSRs module #12

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Krishnanshu1907
Copy link

No description provided.

Copy link
Owner

@codenet codenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits. Good PR.

const MSR_IA32_SPEC_CTRL: u32 = 0x0000_0048;
const MSR_IA32_PRED_CMD: u32 = 0x0000_0049;
```
The above piece of code defines some constant used in the the below. Here we have only defined list of the index of the custom msrs.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the the -> the code?

```rs
pub fn create_boot_msr_entries() -> Result<Msrs>
```
This fucntion returs list of Msrs, let's try to understand that. The kvm holds the all the msrs using following structs defined in `[binding.rs](kvm-bindings-0.5.0/src/x86/bindings.rs)`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fucntion -> function
returs -> returns
holds the -> holds

}
```
The struct `kvm_msr_entry` holds single register with member `index`,`reserved` and `data`.
The struct `kvm_msrs` holds all the msrs using an flexible array.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an -> a

Comment on lines +187 to +197











Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm empty lines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants