Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Roja Eswaran <roja@zededa.com>
  • Loading branch information
roja-zededa committed Oct 1, 2024
1 parent 5e78a47 commit 1d5f3ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/pillar/cmd/domainmgr/domainmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -1291,12 +1291,12 @@ func assignCPUs(ctx *domainContext, config *types.DomainConfig, status *types.Do
// releaseCPUs releases the CPUs that were previously assigned to the VM.
// The cpumask in the *status* is updated accordingly, and the CPUs are released in the CPUAllocator context.
func releaseCPUs(ctx *domainContext, config *types.DomainConfig, status *types.DomainStatus) {
if ctx.cpuPinningSupported && config.VmConfig.CPUsPinned && status.VmConfig.CPUs != "" {
if ctx.cpuPinningSupported && config.VmConfig.CPUsPinned && status.VmConfig.CPUs != nil {
if err := ctx.cpuAllocator.Free(config.UUIDandVersion.UUID); err != nil {
log.Errorf("Failed to free CPUs for %s: %s", config.DisplayName, err)
}
}
status.VmConfig.CPUs = ""
status.VmConfig.CPUs = nil
}

func handleCreate(ctx *domainContext, key string, config *types.DomainConfig) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/pillar/types/domainmgrtypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ type VmConfig struct {
ExtraArgs string // added to bootargs
BootLoader string // default ""
// For CPU pinning
CPUs []int // default nil, list of [1,2]
CPUs []int // default nil, list of [1,2]
DeviceTree string // default ""; sets device_tree
// Example: device_tree="guest-gpio.dtb"
DtDev []string // default nil; sets dtdev
Expand Down

0 comments on commit 1d5f3ad

Please sign in to comment.