package devices
import "github.com/Microsoft/hcsshim/internal/devices"
Index ¶
- func AddDevice(ctx context.Context, vm *uvm.UtilityVM, idType, deviceID string, index uint16, deviceUtilPath string) (vpci *uvm.VPCIDevice, locationPaths []string, err error)
- func InstallWindowsDriver(ctx context.Context, vm *uvm.UtilityVM, driver string) (closer resources.ResourceCloser, err error)
Functions ¶
func AddDevice ¶
func AddDevice(ctx context.Context, vm *uvm.UtilityVM, idType, deviceID string, index uint16, deviceUtilPath string) (vpci *uvm.VPCIDevice, locationPaths []string, err error)
AddDevice is the api exposed to hcsoci to handle assigning a device on a UVM
`idType` refers to the specified device's type, supported types here are `VPCIDeviceIDType` and `VPCIDeviceIDTypeLegacy`.
`deviceID` refers to the specified device's identifier. This must refer to a device instance id for hyper-v isolated device assignment.
`deviceUtilPath` refers to the path in the UVM of the device-util tool used for finding the given device's location path(s).
Returns the allocated vpci device in `vpci` to be tracked for release by the caller. On failure in this function, `vpci` is released and nil is returned for that value.
Returns a slice of strings representing the resulting location path(s) for the specified device.
func InstallWindowsDriver ¶
func InstallWindowsDriver(ctx context.Context, vm *uvm.UtilityVM, driver string) (closer resources.ResourceCloser, err error)
InstallWindowsDriver mounts a specified kernel driver using vsmb, then installs it in the UVM.
`driver` is a directory path on the host that contains driver files for standard installation.
Returns a ResourceCloser for the added vsmb share. On failure, the vsmb share will be released, the returned ResourceCloser will be nil, and an error will be returned.
Source Files ¶
assigned_devices.go drivers.go pnp.go
- Version
- v0.9.8
- Published
- Mar 15, 2023
- Platform
- windows/amd64
- Imports
- 13 packages
- Last checked
- 10 minutes ago –
Tools for package owners.