pci: use device attach options for disabling strict reset
Since we have now per-device options, it's more logical to use it here, instead of features with device identifier encoded into feature name.
This commit is contained in:
parent
d0b8933374
commit
402afa1925
@ -233,7 +233,7 @@ class PCIDeviceExtension(qubes.ext.Extension):
|
||||
self.bind_pci_to_pciback(vm.app, device)
|
||||
vm.libvirt_domain.attachDevice(
|
||||
vm.app.env.get_template('libvirt/devices/pci.xml').render(
|
||||
device=device, vm=vm))
|
||||
device=device, vm=vm, options=options))
|
||||
except subprocess.CalledProcessError as e:
|
||||
vm.log.exception('Failed to attach PCI device {!r} on the fly,'
|
||||
' changes will be seen after VM restart.'.format(
|
||||
|
@ -1,5 +1,5 @@
|
||||
<hostdev type="pci" managed="yes"
|
||||
{% if vm.features.get('pci-no-strict-reset/' + device.ident, False) %}
|
||||
{% if options.get('no-strict-reset', False) %}
|
||||
nostrictreset="yes"
|
||||
{% endif %}
|
||||
>
|
||||
|
@ -106,7 +106,9 @@
|
||||
{% include 'libvirt/devices/net.xml' with context %}
|
||||
{% endif %}
|
||||
|
||||
{% for device in vm.devices.pci.persistent() %}
|
||||
{% for assignment in vm.devices.pci.assignments(True) %}
|
||||
{% set device = assignment.device %}
|
||||
{% set options = assignment.options %}
|
||||
{% include 'libvirt/devices/pci.xml' %}
|
||||
{% endfor %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user