Fwd: [systemd-devel] Proper way for systemd service to wait mdev gvt device initialization
by Alex Ivanov
Could Intel fix that?
-------- Пересылаемое сообщение --------
20.05.2019, 15:18, "Andrei Borzenkov" <arvidjaar(a)gmail.com>:
On Mon, May 20, 2019 at 10:08 AM Mantas Mikulėnas <grawity(a)gmail.com> wrote:
> On Sun, May 19, 2019 at 9:50 PM Alex Ivanov <gnidorah(a)ya.ru> wrote:
>> Hello.
>> What is the proper way to do that? I have a unit that creates gvt device in the system
>>
>> ExecStart = "sh -c 'echo a297db4a-f4c2-11e6-90f6-d3b88d6c9525 > /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_8/create'";
>> ExecStop = "sh -c 'echo 1 > /sys/bus/pci/devices/0000:00:02.0/a297db4a-f4c2-11e6-90f6-d3b88d6c9525/remove'";
>
> Personally, I would use an udev rule:
>
> ACTION=="add", SUBSYSTEM=="pci", ENV{PCI_SLOT_NAME}=="0000:00:02.0", ATTR{mdev_supported_types/i915-GVTg_V5_8/create}="a297db4a-f4c2-11e6-90f6-d3b88d6c9525"
There is a race condition here, driver creates
.../mdev_supported_types after it has registered device so udev may
process event before directory is available.
> Though on the other hand, a service is a good choice if you want to `systemctl stop` it later on.
>
> ACTION=="add", SUBSYSTEM=="pci", ENV{PCI_SLOT_NAME}=="0000:00:02.0", ENV{SYSTEMD_WANTS}+="create-gvt.service"
>
>> Ideally I would to like to start this service when 0000:00:02.0 device appears in the system, but the problem is that /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/ tree is populated later, so my service will fail.
>>
>> So the question what is the proper way to fix that.
>
> If the driver doesn't populate its sysfs entries in time, maybe it at least generates 'change' uevents? (udevadm --monitor)
I would tentatively say this is driver bug. This directory is created
during initial device setup, not in response to some event later. From
https://github.com/torvalds/linux/blob/master/Documentation/driver-model/...:
--><--
As explained in Documentation/kobject.txt, device attributes must be
created before the KOBJ_ADD uevent is generated.
--><--
Note that some drivers even disable KOBJ_ADD notification during
device_register() and trigger it manually later, after sysfs layout is
complete. I cannot evaluate whether this directory can be created and
populated before device_register().
> If there are no uevents either, well, there's nothing you can do from systemd's side. (Other than making a script that loops repeatedly checking "is it there yet? is it there yet?")
Should really be fixed on kernel side.
-------- Конец пересылаемого сообщения --------
1 year, 8 months
Proper way for systemd service to wait mdev gvt device initialization
by Alex Ivanov
Hello.
What is the proper way to do that? I have a unit that creates gvt device in the system
ExecStart = "sh -c 'echo a297db4a-f4c2-11e6-90f6-d3b88d6c9525 > /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_8/create'";
ExecStop = "sh -c 'echo 1 > /sys/bus/pci/devices/0000:00:02.0/a297db4a-f4c2-11e6-90f6-d3b88d6c9525/remove'";
Ideally I would to like to start this service when 0000:00:02.0 device appears in the system, but the problem is that /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/ tree is populated later, so my service will fail.
So the question what is the proper way to fix that.
1 year, 9 months
GVT-g - suboptimal user experience
by Alex Ivanov
Hi.
In the current state of gvt-g the user experience is suboptimal.
So my question is what are the ETAs for following features:
1. Accelerated virt-manager console using gvt-g device
2. Custom resolutions or dynamic resolution
3. UEFI VMs support (Windows guest)
Thanks.
1 year, 9 months
SPICE support for 3D acceleration via gvt-g
by Adam A
Hello,
I succeeded to setup gvt-g with qxl display driver and windows 10 guest over QEMU using latest versions and it works great. Yet only guest-side remote protocol such as RDP allows to get 3D acceleration in the windows instance via the dgpu card.
Could you please advice what is the progress with SPICE protocol integration or any workaround that could be implemented to benefit from the 3D acceleration via gvt-g and use of SPICE protocol to connect with the guest?
In the release note, https://github.com/intel/gvt-linux/wiki/release_note there was a mention about it - Host-side remoting through SPICE is still under development - but since then I couldn't find any information regarding this issue.
Thanks for your help!
1 year, 9 months