Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Incorrect/truncated CPU flags returned with later Linux kernels #1791

@comay

Description

@comay

Description

With later 5.x Linux kernels, /proc/cpuinfo can return a field of VMX related flags along the lines of

vmx flags	: vnmi preemption_timer posted_intr invvpid ept_x_only ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid unrestricted_guest vapic_reg vid ple shadow_vmcs pml ept_mode_based_exec tsc_scaling

As this line follows the original flags line, its contents replace the primary CPU flags resulted in a truncated, incorrect list of the flags. Instead, a new field such as vmx_flags or vmx should be introduced to contain these particular flags under vmx flags.

Ohai Version

14.8.12 or 15.6.3

Platform Version

Kernel versions that incorporated this commit or variations of it.

Ohai Output

Note how common CPU flags like fpu are missing.

{
  "0": {
    "vendor_id": "GenuineIntel",
    "family": "6",
    "model": "106",
    "model_name": "Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz",
    "stepping": "6",
    "mhz": "3000.000",
    "cache_size": "61440 KB",
    "physical_id": "0",
    "core_id": "0",
    "cores": "40",
    "flags": [
      "vnmi",
      "preemption_timer",
      "posted_intr",
      "invvpid",
      "ept_x_only",
      "ept_ad",
      "ept_1gb",
      "flexpriority",
      "apicv",
      "tsc_offset",
      "vtpr",
      "mtf",
      "vapic",
      "ept",
      "vpid",
      "unrestricted_guest",
      "vapic_reg",
      "vid",
      "ple",
      "shadow_vmcs",
      "pml",
      "ept_mode_based_exec",
      "tsc_scaling"
    ]
  },
  "1": {
  .
  .
  .

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UntriagedAn issue that has yet to be triaged.Type: BugDoes not work as expected.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions