Skip to content

Commit

Permalink
IoBundle.KeepInHost should not forbid assignment
Browse files Browse the repository at this point in the history
KeepInHost is used to keep unassigned devices visible to the host,
i.e., not reserved for future PCI passthrough. However, once a device
with KeepInHost=true is selected for assignment to an application,
the assignment takes precedence over KeepInHost. Only IsPort=true
devices are forbidden from assignment.

After a recent change, everything is kept in the host until assignment,
and therefore we may consider removing the KeepInHost flag.
See commit: aad213f

But here we only fix a bug introduced in the commit referenced above.
Specifically, KeepInHost was misunderstood and used to forbid (or more
precisely skip) device assignment. This makes it impossible, for example,
to assign WiFi adapters or cellular modems.

Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 5b9cbd9)
  • Loading branch information
milan-zededa authored and eriknordmark committed Jul 30, 2024
1 parent 957c87d commit 61288ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/pillar/cmd/domainmgr/domainmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ func doAssignIoAdaptersToDomain(ctx *domainContext, config types.DomainConfig,
log.Functionf("Assigning %s (%s) to %s",
ib.Phylabel, ib.UsbAddr, status.DomainName)
assignmentsUsb = addNoDuplicate(assignmentsUsb, ib.UsbAddr)
} else if ib.PciLong != "" && !ib.IsPCIBack && !ib.KeepInHost {
} else if ib.PciLong != "" && !ib.IsPCIBack {
log.Functionf("Assigning %s (%s) to %s",
ib.Phylabel, ib.PciLong, status.DomainName)
assignmentsPci = addNoDuplicate(assignmentsPci, ib.PciLong)
Expand Down

0 comments on commit 61288ae

Please sign in to comment.