All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915/gvt: Change KVMGT as self load module
Date: Mon, 3 Dec 2018 11:38:51 +0800	[thread overview]
Message-ID: <20181203033851.GL12743@zhen-hp.sh.intel.com> (raw)
In-Reply-To: <20181130084423.355805b8@x1.home>


[-- Attachment #1.1: Type: text/plain, Size: 1566 bytes --]

On 2018.11.30 08:44:23 -0700, Alex Williamson wrote:
> On Fri, 30 Nov 2018 14:51:24 +0800
> Zhenyu Wang <zhenyuw@linux.intel.com> wrote:
> 
> > This trys to make 'kvmgt' module as self loadable instead of loading
> > by i915/gvt device model. So hypervisor specific module could be
> > stand-alone, e.g only after loading hypervisor specific module, GVT
> > feature could be enabled via specific hypervisor interface, e.g VFIO/mdev.
> > 
> > So this trys to use hypervisor module register/unregister interface
> > for that. Hypervisor module needs to take care of module reference
> > itself when working for hypervisor interface, e.g reference counting
> > for any VFIO/mdev creation.
> 
> This doesn't sound right and I don't see that it's how it works today.
> mdev core doesn't take a reference to the vendor driver, it's the
> vendor driver's responsibility to take a module reference when a device
> is opened.  Likewise created, but unused devices probably shouldn't
> hold a reference, they should be cleaned up on module release
> callback.  Thanks,
> 

In this patch kvmgt driver trys to take module reference when device
created and put when destroy, and yeah I think your point is right,
we'd better handle reference when device is opened or released, and
when hypervisor module releases it would call mdev core device unregister
which has already handled unused devices clean up. Will refresh in that manner.

Thanks

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-12-03  3:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30  6:08 [PATCH 1/3] drm/i915/gvt: mandatory require hypervisor's host_init Zhenyu Wang
2018-11-30  6:08 ` [PATCH 2/3] drm/i915/gvt: remove unused parameter for hypervisor's host_exit call Zhenyu Wang
2018-11-30  6:08 ` [PATCH 3/3] drm/i915/gvt: Change KVMGT as self load module Zhenyu Wang
2018-11-30  6:51   ` [PATCH v2] " Zhenyu Wang
2018-11-30 15:44     ` Alex Williamson
2018-12-03  3:38       ` Zhenyu Wang [this message]
2018-11-30  6:36 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915/gvt: mandatory require hypervisor's host_init Patchwork
2018-11-30  7:00 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915/gvt: mandatory require hypervisor's host_init (rev2) Patchwork
2018-11-30  7:03 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915/gvt: mandatory require hypervisor's host_init Patchwork
2018-11-30  7:17 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915/gvt: mandatory require hypervisor's host_init (rev2) Patchwork
2018-11-30 22:36 ` ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181203033851.GL12743@zhen-hp.sh.intel.com \
    --to=zhenyuw@linux.intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.