-
Notifications
You must be signed in to change notification settings - Fork 86
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
HandleMsrAccess not being triggered on __writemsr #7
Comments
Yep, __readmsr not handling either. |
To test, I handle common exception, and put
result is 0, if that helps regardless, at this point, system is in KeInitAmd64SpecificState(). so vmexit is working, as the handle exception was called, because i see that log output. but i don't see this readmsr handled, or any other read/write msr calls handled in the HandleMsrAccess fn. |
Nevermind, __readmsr/__writemsr are triggering just fine. I just didn't realize because none of the other MSRs were processing... This is the code that matters in HandleMsrAccess:
Where the only log that ever is displayed over serial is: Interestingly, that is the IA32_BIOS_UPDATE_SIGNATURE, which is left default from the github code where it sets No other msr are being written/read, only 8B. Now, for the most unusual thing, if I call __readmsr like this: which is clearly wrong. |
Actually calling __readmsr at host level like I did to "test" shouldn't trigger a VM exit because we're already at host level... so ignore that. The issue still stands though, why am I only seeing 8B & no other write/read msrs. |
It is because the MSR bitmap is used to specify other MSRs should not cause VM-exit. Search If you wonder "why I do/do not get VM-exit", I suggest looking up |
OK, yeah I see it. Thank you Satoshi, you're always extremely helpful. Love this project so far, I'm using it to get into HV development. It's so well commented it's insane. So I really appreciate that. Thanks! |
You are very welcome. I do not provide a dedicated place for Q&A and non-issue discussions for my projects, but feel free to ask questions if you struggle to make sense of things. I publish my projects to help anyone learn. |
@tandasat thank you. if I do have questions, where would you like them? As a new, individual issue to help other users in the future, or just one thread? Regarding VMExits, from my understanding of reading the manual so far for Intel VT-x, there are times when the guest VM must exit the VM because of certain execution, and have the host (MiniVisor) execute that code for them on hardware. Is this the correct way of looking at it? --edited out question as i solved this on my own-- |
You are doing very important things. Thank you very much for that! |
UEFI version, HV seems to be working fine otherwise, other VMExits are triggering. __writemsr isn't. Possibly __readmsr too, haven't checked. Will update with more information as I debug it.
The text was updated successfully, but these errors were encountered: