Skip to content

Device handling API design issues #4626

@marmarta

Description

@marmarta

Qubes R4.0:

Event 'device-attached' means two essentially different things:

  • if a VM is running, it means "a device was successfully attached to a VM and now is in use by that VM"
  • if a VM is not running, it means "set the VM to try to use that device whenever it starts".
    Those should be two different events: an actual device-attach and some sort of device-assigned-to-vm, because the current way leads to tears and heartbreak and confusion.

Idea of "persistent" assignment doesn't really fit for some devices. It's okay-ish for PCI, as those devices are not hot-pluggable (mostly), but not so much for USB. The most weirdest is when VM is started with a device attached persistently, but then the device is unplugged. Now device is still "attached persistently", but not really attached (or even present).
There are also other problems like #4780. Also, it's useful to be able to start a VM even if device currently is missing (and attach it when device will be plugged in).

Metadata

Metadata

Assignees

Labels

C: coreThis issue pertains to a Qubes core component.P: majorPriority: major. Between "default" and "critical" in severity.affects-4.2This issue affects Qubes OS 4.2.

Type

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions