Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1247867

Re: [PATCH] VFIO: platform: AMD xgbe reset module

From Eric Auger <eric.auger@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] VFIO: platform: AMD xgbe reset module
Date 2015-10-15 16:50 +0200
Message-ID <qjS0W-Yf-29@gated-at.bofh.it> (permalink)
References <qjwjL-2JS-15@gated-at.bofh.it> <qjOTn-4XL-13@gated-at.bofh.it> <qjPFN-68P-51@gated-at.bofh.it> <qjRof-dR-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Arnd,
On 10/15/2015 03:59 PM, Arnd Bergmann wrote:
> On Thursday 15 October 2015 14:12:28 Christoffer Dall wrote:
>>>
>>> enum vfio_platform_op {
>>>       VFIO_PLATFORM_BIND,
>>>       VFIO_PLATFORM_UNBIND,
>>>       VFIO_PLATFORM_RESET,
>>> };
>>>
>>> struct platform_driver {
>>>         int (*probe)(struct platform_device *);
>>>         int (*remove)(struct platform_device *);
>>>       ...
>>>       int (*vfio_manage)(struct platform_device *, enum vfio_platform_op);
>>>         struct device_driver driver;
>>> };
>>>
>>> This would integrate much more closely into the platform driver framework,
>>> just like the regular vfio driver integrates into the PCI framework.
>>> Unlike PCI however, you can't just use the generic driver framework to
>>> unbind the driver, because you still need device specific code.
>>>
>> Thanks for these suggestions, really helpful.
>>
>> What I don't understand in the latter example is how VFIO knows which
>> struct platform_driver to interact with?
> 
> This would assume that the driver remains bound to the device, so VFIO
> gets a pointer to the device from somewhere (as it does today) and then
> follows the dev->driver pointer to get to the platform_driver.

>  
>> Also, just so I'm sure I understand correctly, VFIO_PLATFORM_UNBIND is
>> then called by VFIO before the VFIO driver unbinds from the device
>> (unbinding the platform driver from the device being a completely
>> separate thing)?
> 
> This is where we'd need a little more changes for this approach. Instead
> of unbinding the device from its driver, the idea would be that the
> driver remains bound as far as the driver model is concerned, but
> it would be in a quiescent state where no other subsystem interacts with
> it (i.e. it gets unregistered from networking core or whichever it uses).

Currently we use the same mechanism as for PCI, ie. unbind the native
driver and then bind VFIO platform driver in its place. Don't you think
changing this may be a pain for user-space tools that are designed to
work that way for PCI?

My personal preference would be to start with your first proposal since
it looks (to me) less complex and "unknown" that the 2d approach.

Let's wait for Alex opinion too...

Thanks again

Eric




> 
> 	Arnd
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] VFIO: platform: AMD xgbe reset module Eric Auger <eric.auger@linaro.org> - 2015-10-14 17:40 +0200
  Re: [PATCH] VFIO: platform: AMD xgbe reset module Arnd Bergmann <arnd@arndb.de> - 2015-10-14 17:40 +0200
    Re: [PATCH] VFIO: platform: AMD xgbe reset module Eric Auger <eric.auger@linaro.org> - 2015-10-15 10:10 +0200
      Re: [PATCH] VFIO: platform: AMD xgbe reset module Arnd Bergmann <arnd@arndb.de> - 2015-10-15 13:30 +0200
        Re: [PATCH] VFIO: platform: AMD xgbe reset module Christoffer Dall <christoffer.dall@linaro.org> - 2015-10-15 14:20 +0200
          Re: [PATCH] VFIO: platform: AMD xgbe reset module Arnd Bergmann <arnd@arndb.de> - 2015-10-15 16:10 +0200
            Re: [PATCH] VFIO: platform: AMD xgbe reset module Eric Auger <eric.auger@linaro.org> - 2015-10-15 16:50 +0200
              Re: [PATCH] VFIO: platform: AMD xgbe reset module Arnd Bergmann <arnd@arndb.de> - 2015-10-15 17:00 +0200
                Re: [PATCH] VFIO: platform: AMD xgbe reset module Christoffer Dall <christoffer.dall@linaro.org> - 2015-10-15 17:10 +0200
                Re: [PATCH] VFIO: platform: AMD xgbe reset module Arnd Bergmann <arnd@arndb.de> - 2015-10-15 18:00 +0200
                Re: [PATCH] VFIO: platform: AMD xgbe reset module Christoffer Dall <christoffer.dall@linaro.org> - 2015-10-15 18:40 +0200
              Re: [PATCH] VFIO: platform: AMD xgbe reset module Alex Williamson <alex.williamson@redhat.com> - 2015-10-15 19:00 +0200
                Re: [PATCH] VFIO: platform: AMD xgbe reset module Christoffer Dall <christoffer.dall@linaro.org> - 2015-10-15 21:50 +0200
                Re: [PATCH] VFIO: platform: AMD xgbe reset module Alex Williamson <alex.williamson@redhat.com> - 2015-10-15 22:30 +0200
                Re: [PATCH] VFIO: platform: AMD xgbe reset module Eric Auger <eric.auger@linaro.org> - 2015-10-16 15:10 +0200
                Re: [PATCH] VFIO: platform: AMD xgbe reset module Arnd Bergmann <arnd@arndb.de> - 2015-10-16 15:30 +0200
                Re: [PATCH] VFIO: platform: AMD xgbe reset module Eric Auger <eric.auger@linaro.org> - 2015-10-16 16:00 +0200
          Re: [PATCH] VFIO: platform: AMD xgbe reset module Arnd Bergmann <arnd@arndb.de> - 2015-10-15 16:30 +0200
          Re: [PATCH] VFIO: platform: AMD xgbe reset module Eric Auger <eric.auger@linaro.org> - 2015-10-15 16:30 +0200

csiph-web