Re: simplify the mdev interface v8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 28 Sep 2022 14:11:10 +0200
Christoph Hellwig <hch@xxxxxx> 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@nuc ~]# cd /sys/class/mdev_bus/0000\:00\:02.0/mdev_supported_types/
[root@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@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@nuc mdev_supported_types]# uuidgen > i915-GVTg_V4_1/create
[root@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@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@nuc mdev_supported_types]# echo 1 > i915-GVTg_V4_1/devices/669d83b1-81d8-4fd4-8d8b-7f972721c83f/remove 
[root@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@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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux