Coder Social home page Coder Social logo

cpuid's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpuid's Issues

AMD_SEV and other constants used in common code, but only defined for amd64

#18 introduced some constants, e.g. AMD_SEV, in cpuid_amd64.go, and then used them in cpuid.go. They will be undefined when building on non-x86_64 architectures.
e.g. on s390x:

$ go get github.com/intel-go/cpuid
# github.com/intel-go/cpuid
go/pkg/mod/github.com/intel-go/[email protected]/cpuid.go:291:2: undefined: AMD_SME
go/pkg/mod/github.com/intel-go/[email protected]/cpuid.go:292:2: undefined: AMD_SEV
go/pkg/mod/github.com/intel-go/[email protected]/cpuid.go:293:2: undefined: AMD_PAGE_FLUSH_MSR
go/pkg/mod/github.com/intel-go/[email protected]/cpuid.go:294:2: undefined: AMD_SEV_ES

/cc @jimcadden

MSR, CBNT profiles, etc.

First off -- thanks for a writing a clean, cross platform go library that can be used to detect cpu features, etc.

I work on Intel's ISecL library and migrated its "hostinfo" package away from using command line tools like dmidecode (see https://github.com/intel-secl/intel-secl/tree/master/pkg/lib/hostinfo). At that time I was unaware of this library and will definately integrate it for the cpu detection requirements.

ISecL needs to detect the CBNT profile on Linux and Windows (Windows is a new feature). On Linux, the hostinfo package reads from /dev/cpu/0/msr. As far as I can see there is not a way to get msr data on Windows from user space.

Anyway, for the "asks"...

  • Does cpuid expose MSR related features (CBNT profile, etc.)? From what I see it does not.
  • If the MSR related features are not provided by cpuid, would you consider adding them?
  • If the answers to the previous questions are no, are you aware of any way to collect MSR data from user space across Windows/Linux?

RFE: add support to report hyperv flags

HyperV - the microsoft hypervisor implementation, reports its supported features using cpuid bits.
The HyperV feature support bits as documented in the HyperV Top Level Functional Specifications.

It would be nice to have support for these hyperv flags in cpuid. The feature could be used by virtualized guests running inside HyperV Virtual Machines.

I can contribute a PR adding support for this feature if there is interest from the project maintainers. Thoughts?

Assembler issues in cpuidlow_amd64.s (gollvm)

Hi.
Investigated the bug while running the test:

https://github.com/u-root/u-root/blob/master/cmds/core/ln/ln_test.go
.
@hugelgupf could tell more.

ok github.com/u-root/u-root/cmds/core/ln 0.691s
# github.com/intel-go/cpuid
../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s: Assembler messages:
../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:8: Error: no such instruction: text ·cpuid_low(SB),NOSPLIT,$0-24' ../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:9: Error: junk (FP)' after expression
../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:9: Error: too many memory references for mov' ../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:10: Error: junk (FP)' after expression
../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:10: Error: too many memory references for mov' ../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:12: Error: too many memory references for mov'
../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:13: Error: too many memory references for mov' ../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:14: Error: too many memory references for mov'
../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:15: Error: too many memory references for mov' ../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:19: Error: no such instruction: text ·xgetbv_low(SB),NOSPLIT,$0-16'
../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:20: Error: junk (FP)' after expression ../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:20: Error: too many memory references for mov'
../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:21: Error: no such instruction: byte $0x0F' ../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:22: Error: no such instruction: byte $0x01'
../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:23: Error: no such instruction: byte $0xD0' ../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:24: Error: too many memory references for mov'
../go/pkg/mod/github.com/intel-go/[email protected]/cpuidlow_amd64.s:25: Error: too many memory references for `mov'

I am using

$ go version
go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64

CC @jcooklin @aregm @dvnagorny @xmikus01 @linux4life798 @bramp @rscohn2 @jodh-intel
CC @thanm @cherrymui @ianlancetaylor

unable to compile with go1.6

go build
./cpuidlow_amd64.s:2: illegal or missing addressing mode for symbol NOSPLIT
./cpuidlow_amd64.s:12: illegal or missing addressing mode for symbol NOSPLIT
asm: asm: assembly of ./cpuidlow_amd64.s failed

go version go1.6 darwin/amd6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.