We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
// Check control registers are in a VMX-friendly state. (SDM Vol. 3C, Appendix A.7, A.8) / macro_rules! cr_is_valid { ($value: expr, $crx: ident) => {{ use Msr::*; let value = $value; let fixed0 = concat_idents!(IA32_VMX_, $crx, _FIXED0).read(); let fixed1 = concat_idents!(IA32_VMX_, $crx, _FIXED1).read(); (!fixed0 | value != 0) && (fixed1 | !value != 0) }}; }
函数最终返回 (!fixed0 | value != 0) && (fixed1 | !value != 0), 但是根据手册,FIXED0应该是所在位为1的,寄存器所在位也为1; FIXED1应该是所在位为0的,寄存器所在位也为0, 判断结果应该写为(value & fixed0 == fixed0) && (value & !fixed1 == 0)才对吧。 不过这样就无法通过检查了。 我看其他开源项目是,先有一个调整寄存器值的操作。
(!fixed0 | value != 0) && (fixed1 | !value != 0)
The text was updated successfully, but these errors were encountered:
Fix buggy control register check in cr_is_valid (#6)
cr_is_valid
907afda
You are right, fixed by the following expression in 907afda:
(!fixed0 | value == !0) && (fixed1 | !value == !0)
Sorry, something went wrong.
No branches or pull requests
函数最终返回
(!fixed0 | value != 0) && (fixed1 | !value != 0)
,但是根据手册,FIXED0应该是所在位为1的,寄存器所在位也为1;
FIXED1应该是所在位为0的,寄存器所在位也为0,
判断结果应该写为(value & fixed0 == fixed0) && (value & !fixed1 == 0)才对吧。
不过这样就无法通过检查了。
我看其他开源项目是,先有一个调整寄存器值的操作。
The text was updated successfully, but these errors were encountered: