nodelabeller

package
v0.53.0-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HV_X64_MSR_RESET                   = 0x40000003
	HV_X64_MSR_VP_INDEX                = 0x40000002
	HV_X64_MSR_VP_RUNTIME              = 0x40000010
	HV_X64_MSR_SCONTROL                = 0x40000080
	HV_X64_MSR_STIMER0_CONFIG          = 0x400000B0
	HV_X64_MSR_TSC_FREQUENCY           = 0x40000022
	HV_X64_MSR_REENLIGHTENMENT_CONTROL = 0x40000106
)

Variables

View Source
var CapsDesc = []capability{
	{
		Extension: uintptr(C.CapHyperv),
		Name:      "base",
	},
	{
		Extension: uintptr(C.CapHypervTime),
		Name:      "time",
	},
	{
		Extension: uintptr(C.CapHypervVpIndex),
		MSR:       HV_X64_MSR_VP_INDEX,
		Name:      "vpindex",
	},
	{
		Extension: uintptr(C.CapHypervTlbflush),
		Name:      "tlbflush",
	},
	{
		Extension: uintptr(C.CapHypervSendIPI),
		Name:      "ipi",
	},
	{
		Extension: uintptr(C.CapHypervSynic),
		MSR:       HV_X64_MSR_SCONTROL,
		Name:      "synic",
	},
	{
		Extension: uintptr(C.CapHypervSynic2),
		MSR:       HV_X64_MSR_SCONTROL,
		Name:      "synic2",
	},
	{
		MSR:  HV_X64_MSR_TSC_FREQUENCY,
		Name: "frequencies",
	},
	{
		MSR:  HV_X64_MSR_RESET,
		Name: "reset",
	},
	{
		MSR:  HV_X64_MSR_VP_RUNTIME,
		Name: "runtime",
	},
	{
		MSR:  HV_X64_MSR_STIMER0_CONFIG,
		Name: "synictimer",
	},
	{
		MSR:  HV_X64_MSR_REENLIGHTENMENT_CONTROL,
		Name: "reenlightenment",
	},
}

Functions

This section is empty.

Types

type CPU

type CPU struct {
	Mode []Mode `xml:"mode"`
}

CPU represents slice of cpu modes

type Feature

type Feature struct {
	Name string `xml:"name,attr"`
}

type FeatureModel

type FeatureModel struct {
	Model Features `xml:"model"`
}

Structures needed to parse cpu features

type Features

type Features struct {
	Features []Feature `xml:"feature"`
}

type HostDomCapabilities

type HostDomCapabilities struct {
	CPU CPU              `xml:"cpu"`
	SEV SEVConfiguration `xml:"features>sev"`
}

HostDomCapabilities represents structure for parsing output of virsh capabilities

type HostFeature added in v0.40.0

type HostFeature struct {
	Policy string `xml:"policy,attr"`
	Name   string `xml:"name,attr"`
}

type Mode

type Mode struct {
	Name      string        `xml:"name,attr"`
	Supported string        `xml:"supported,attr"`
	Vendor    Vendor        `xml:"vendor"`
	Feature   []HostFeature `xml:"feature"`
	Model     []Model       `xml:"model"`
}

Mode represents slice of cpu models

type Model

type Model struct {
	Name     string `xml:",chardata"`
	Usable   string `xml:"usable,attr"`
	Fallback string `xml:"fallback,attr"`
}

Model represents cpu model

type NodeLabeller

type NodeLabeller struct {
	SEV SEVConfiguration
	// contains filtered or unexported fields
}

NodeLabeller struct holds informations needed to run node-labeller

func NewNodeLabeller

func NewNodeLabeller(clusterConfig *virtconfig.ClusterConfig, clientset kubecli.KubevirtClient, host, namespace string) (*NodeLabeller, error)

func (*NodeLabeller) HostCapabilities added in v0.43.0

func (n *NodeLabeller) HostCapabilities() *api.Capabilities

func (*NodeLabeller) Run

func (n *NodeLabeller) Run(threadiness int, stop chan struct{})

Run runs node-labeller

type SEVConfiguration added in v0.49.0

type SEVConfiguration struct {
	Supported       string `xml:"supported,attr"`
	Cbitpos         string `xml:"cbitpos"`
	ReducedPhysBits string `xml:"reducedPhysBits"`
}

type SupportedHostFeature added in v0.40.0

type SupportedHostFeature struct {
	Feature []HostFeature `xml:"feature"`
}

type Vendor

type Vendor struct {
	Name string `xml:",chardata"`
}

Vendor represents vendor of host CPU

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL