lkml.org 
[lkml]   [2020]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] drm/i915/gvt: make gvt oblivious of kvmgt data structures
From
Date
On Wed, 2020-01-08 at 12:24 +0200, Jani Nikula wrote:
> On Mon, 06 Jan 2020, Julian Stecklina <julian.stecklina@cyberus-technology.de>
> wrote:
[...]
> > + /* Hypervisor-specific device state. */
> > + void *vdev;
>
> I have no clue about the relative merits of the patch, but you can use
> the actual type for the pointer with a forward declaration. You don't
> need the definition for that.
>
> i.e.
>
> struct kvmgt_vdev;
> ...
> struct kvmgt_vdev *vdev;

The goal here is to make the GVT code independent of the hypervisor backend.
Different hypervisor backends need to keep different per-device state, so using
the KVM type here defeats the purpose.

I assume this is not only useful for us, but also for other hypervisor backends,
such as Xen or 3rd-party hypervisors.

Julian


\
 
 \ /
  Last update: 2020-01-08 17:09    [W:0.078 / U:1.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site