Skip to content

Conversation

stlankes
Copy link
Contributor

No description provided.

@stlankes stlankes requested a review from mkroening August 15, 2023 05:51
Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I was confused, though, that MSR is emulated by KVM? Did you measure any speedup or better perf numbers with this? :)

@stlankes
Copy link
Contributor Author

Not really. :-)

Depending on access typo (and what your architecture supports), you can implicitly use an MSR registers.

Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

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

According to "25.4 GUEST-STATE AREA" in Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3C: System Programming Guide, Part 3, FS and GS are part of the processor state and not managed by KVM, so perhaps the msr exits are from some other source like explicit wrmsr and rdmsr? ("26.1 INSTRUCTIONS THAT CAUSE VM EXITS")

@stlankes
Copy link
Contributor Author

I know. But I don't think that we should use the GS register in case of a one-core system

@stlankes stlankes changed the title avoid the usage of unneeded msr accesses improve the readability Aug 15, 2023
@stlankes
Copy link
Contributor Author

Ok, I removed the core local staff

@mkroening mkroening added this pull request to the merge queue Aug 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 15, 2023
@mkroening mkroening enabled auto-merge August 15, 2023 13:13
@mkroening mkroening added this pull request to the merge queue Aug 15, 2023
Merged via the queue into hermit-os:master with commit cc214b1 Aug 15, 2023
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.

2 participants