simplify the mdev interface v8
Alex Williamson
alex.williamson at redhat.com
Wed Sep 28 18:56:50 UTC 2022
On Wed, 28 Sep 2022 14:11:10 +0200
Christoph Hellwig <hch at lst.de> wrote:
> On Tue, Sep 27, 2022 at 03:54:26PM -0600, Alex Williamson wrote:
> > Oops, I had to drop this, I get a null pointer from gvt-g code:
>
> Ok, this is a stupid bug in the second patch in the series. I did not
> hit it in my mdev testing as my script just uses the first type and
> thus never hits these, but as your trace showed mdevctl and once I
> used that I could reproduce it. The fix for patch 2 is below, and
> the git tree at:
>
> git://git.infradead.org/users/hch/misc.git mvdev-lifetime
>
> has been updated with that folded in and the recent reviews.
That fixes the crash, but available_instances isn't working:
[root at nuc ~]# cd /sys/class/mdev_bus/0000\:00\:02.0/mdev_supported_types/
[root at nuc mdev_supported_types]# ls */devices/
i915-GVTg_V4_1/devices/:
i915-GVTg_V4_2/devices/:
i915-GVTg_V4_4/devices/:
i915-GVTg_V4_8/devices/:
[root at nuc mdev_supported_types]# grep . */available_instances
i915-GVTg_V4_1/available_instances:1
i915-GVTg_V4_2/available_instances:2
i915-GVTg_V4_4/available_instances:5
i915-GVTg_V4_8/available_instances:7
[root at nuc mdev_supported_types]# uuidgen > i915-GVTg_V4_1/create
[root at nuc mdev_supported_types]# ls */devices/
i915-GVTg_V4_1/devices/:
669d83b1-81d8-4fd4-8d8b-7f972721c83f
i915-GVTg_V4_2/devices/:
i915-GVTg_V4_4/devices/:
i915-GVTg_V4_8/devices/:
[root at nuc mdev_supported_types]# grep . */available_instances
i915-GVTg_V4_1/available_instances:0
i915-GVTg_V4_2/available_instances:0
i915-GVTg_V4_4/available_instances:1
i915-GVTg_V4_8/available_instances:1
[root at nuc mdev_supported_types]# echo 1 > i915-GVTg_V4_1/devices/669d83b1-81d8-4fd4-8d8b-7f972721c83f/remove
[root at nuc mdev_supported_types]# ls */devices/
i915-GVTg_V4_1/devices/:
i915-GVTg_V4_2/devices/:
i915-GVTg_V4_4/devices/:
i915-GVTg_V4_8/devices/:
[root at nuc mdev_supported_types]# grep . */available_instances
i915-GVTg_V4_1/available_instances:0
i915-GVTg_V4_2/available_instances:0
i915-GVTg_V4_4/available_instances:1
i915-GVTg_V4_8/available_instances:1
More information about the intel-gvt-dev
mailing list