Coder Social home page Coder Social logo

discovering-processor-vmx-feature's Introduction

Discovering-Processor-VMX-Feature

Discover VMX features present in your processor by writing a Linux kernel module that queries these featurs.

Prerequisites

• You will need a machine capable of running Linux, with VMX virtualization features exposed. You may be able to do this inside a VM, or maybe not, depending on your hardware and software configuration.

At a high level, you will need to perform the following:

• Configure a Linux machine, either VM based or on real hardware. You may use any Linux distribution you wish. • Download and build the Linux kernel source code • Create a new kernel module with the assignment functionality • Load (insert) the new module • Verify proper output in the system message log.

Functionality to Implemented

You will need to perform the following in your module’s main code: • Determine if your CPU supports VMX true controls • Based on the above, read various MSRs to ascertain support capabilities/features ◦ Entry / Exit / Procbased / Secondary Procbased / Pinbased controls • For each group of controls above, interpret and output the

To determine if true controls are available:

• Read the IA32_VMX_BASIC MSR • Check bit 55 – if set, true controls are available.

To determine if secondary procbased controls are available:

• Check the ability to set “Activate Secondary Controls” control in the primary procbased controls ◦ There are no “true secondary procbased controls”, so there is only one MSR to read if the CPU supports secondary controls.

The table below provides some MSRs that may be of interest to you.

MSR Name MSR -->Index -->Notes

IA32_VMX_BASIC --> 0x480 -->Use this to determine true controls capability (bit 55)

IA32_VMX_PINBASED_CTLS -->0x481 -->Use this MSR for pinbased controls if no true controls capability

IA32_VMX_PROCBASED_CTLS -->0x482 -->Use this MSR for procbased controls if no true controls capability

IA32_VMX_PROCBASED_CTLS2 -->0x48B -->Use this MSR for secondary procbased controls, if available

IA32_VMX_EXIT_CTLS -->0x483 -->Use this MSR for exit controls if no true controls capability

IA32_VMX_ENTRY_CTLS -->0x484 -->Use this MSR for entry controls if no true controls capability

IA32_VMX_TRUE_PINBASED_CTLS -->0x48D -->Use this MSR for pinbased controls if CPU supports true controls

IA32_VMX_TRUE_PROCBASED_CTLS -->0x48E -->Use this MSR for procbased controls if CPU supports true controls

IA32_VMX_TRUE_EXIT_CTLS -->0x48F -->Use this MSR for exit controls if CPU supports true controls

IA32_TRUE_ENTRY_CTLS -->0x490 -->Use this MSR for entry controls if CPU supports true controls

discovering-processor-vmx-feature's People

Contributors

mandipgohil avatar

Watchers

James Cloos avatar  avatar

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.