Skip to content
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

Strange Design #1

Closed
li-zhixin opened this issue Dec 4, 2020 · 4 comments
Closed

Strange Design #1

li-zhixin opened this issue Dec 4, 2020 · 4 comments

Comments

@li-zhixin
Copy link

This library is very well packaged, but not applicable to my scenario. I want to use the cpuid to determine if the program is running in the virtual machine, but the library doesn't read the 31 bits of leaf 0x1, a very strange design.

@iAJTin
Copy link
Owner

iAJTin commented Dec 6, 2020

Hi, li-zhixin,
thanks for taking the time to evaluate this library,
I don't know if I have understood correctly, in your scenario you cannot retrieve the value of the 31 bits of leaf 1 Processor And Features?

@li-zhixin
Copy link
Author

Yes, you are right, let's take a look at the source code together.

//File Path: Leaf00000001 [Processor Info and Features].cs 
//line:159
// 31 - Not used. Always returns 0

There are many similar designs.

//File Path: Leaf00000001 [Processor Info and Features].cs 
//line:173
// 10 - Reserved
//line:183
// 20 - Reserved

I think it's easy to read these bits, or maybe you don't think it's necessary to read certain bits. It is difficult to take all user stories , is it reasonable to impose such a limitation in the library?

@iAJTin
Copy link
Owner

iAJTin commented Dec 10, 2020

Hello, you are right, this bit can be used to determine if you are in a virtualized environment, it is already fixed and the change uploaded to the repository.

In relation to the other bits, which he calls 'strange design', I have not been able to know what they map, if you can help me with this, I update it as quickly as possible, I have relied on the official Intel documentation (What has available in the @documents folder),

Anyway, I have left something, if so and you see it, I would appreciate it if you would tell me about it and so I am improving :)

I hope now I can use it,

I'll look a little more, and if I don't see anything, I'll update the nuget package
a greeting

@li-zhixin
Copy link
Author

As for the other bits, I just saw a similar case, maybe this was not used, or maybe it was used but not documented. I don't know anything about this. Thank you for taking the time to fix this Issue.

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

No branches or pull requests

2 participants