Some things to hot add (without needing special devices) to test with this (some are more related to bug 1755153 but tested here as well):
Testing nvdimms is a bit odd, as there is no "enable" option.
So one needs to start with nvdimms to get it working.
And to do so it needs actually support in virt-aa-helper.
If one ignores that it would work like the following
Add a nvdimm to enable it on start to the base guest XML:
<memory model='nvdimm'>
<source> <path>/var/lib/libvirt/qemu/nvdimm-base</path>
</source>
<target>
<size unit='KiB'>524288</size> <node>0</node>
</target>
</memory>
And for hot add one can use the file:
$ sudo virsh attach-device <guest> hotplug-mem512-nvdimm.xml --live
Trivial input dev - working
$ cat hotplug-input.xml
<input type='tablet' bus='virtio'/>
Passthrough input dev - working
ubuntu@node-horsea:~$ cat hotplug-input-evdev.xml
<input type='passthrough' bus='virtio'>
<source evdev='/dev/input/event0' />
</input>
Got rule:
"/dev/input/event0" rwk,
But also on the latter if added to the initial domain xml it is failing (label callbacks work, but virt-aa-helper needs to learn about it).
So overall it seems we are all good, except the initial memory / input evdev specification.
Filing an extra bug for the two (it is a new issue essentially).
Some things to hot add (without needing special devices) to test with this (some are more related to bug 1755153 but tested here as well):
Testing nvdimms is a bit odd, as there is no "enable" option.
So one needs to start with nvdimms to get it working.
And to do so it needs actually support in virt-aa-helper.
If one ignores that it would work like the following
$ sudo fallocate /var/lib/ libvirt/ qemu/nvdimm- test -l 512m libvirt/ qemu/nvdimm- test libvirt/ qemu/nvdimm- test libvirt/ qemu/nvdimm- base -l 512m libvirt/ qemu/nvdimm- base libvirt/ qemu/nvdimm- base
$ sudo chown libvirt-qemu:kvm /var/lib/
$ sudo chmod 777 /var/lib/
$ sudo fallocate /var/lib/
$ sudo chown libvirt-qemu:kvm /var/lib/
$ sudo chmod 777 /var/lib/
Add a nvdimm to enable it on start to the base guest XML:
<path> /var/lib/ libvirt/ qemu/nvdimm- base</path> >524288< /size>
<node> 0</node>
<memory model='nvdimm'>
<source>
</source>
<target>
<size unit='KiB'
</target>
</memory>
And for hot add one can use the file: mem512- nvdimm. xml --live
$ sudo virsh attach-device <guest> hotplug-
$ cat hotplug- mem512- nvdimm. xml
<path> /var/lib/ libvirt/ qemu/nvdimm- test</path>
<size unit='KiB' >524288< /size>
<node> 0</node>
<memory model='nvdimm'>
<source>
</source>
<target>
</target>
</memory>
The hot add adds the rule: lib/libvirt/ qemu/nvdimm- test" rwk,
"/var/
as it should.
Needs the start rule thou (by virt-aa-helper).
Will retest once implemented.
First look at the others.
"Normal" memory - working
<size unit='KiB' >524288< /size>
<node> 0</node>
$ cat hotplug-mem512.xml
<memory model='dimm'>
<target>
</target>
</memory>
RNG Device - working random' >/dev/random< /backend>
$ cat hotplug-rng.xml
<rng model='virtio'>
<rate period="2000" bytes="1234"/>
<backend model='
</rng>
Trivial input dev - working
$ cat hotplug-input.xml
<input type='tablet' bus='virtio'/>
Passthrough input dev - working node-horsea: ~$ cat hotplug- input-evdev. xml /dev/input/ event0' /> input/event0" rwk,
ubuntu@
<input type='passthrough' bus='virtio'>
<source evdev='
</input>
Got rule:
"/dev/
But also on the latter if added to the initial domain xml it is failing (label callbacks work, but virt-aa-helper needs to learn about it).
So overall it seems we are all good, except the initial memory / input evdev specification.
Filing an extra bug for the two (it is a new issue essentially).