Message ID | 1494581878-2258-3-git-send-email-tina.zhang@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On pe, 2017-05-12 at 17:37 +0800, Tina Zhang wrote: > vgt_caps is used for guest i915 driver to get the vgpu capabilities from > the device model. VGT_CPAS_FULL_PPGTT is one of the capabilities type to > let guest i915 dirver know that the guest i915 full ppgtt is supported by > device model. > > Changes since v1: > - Use u32 instead of uint32_t (Joonas) > - Move VGT_CAPS_FULL_PPGTT introduction to this patch and use #define instead > of enum (Joonas) > > Signed-off-by: Tina Zhang <tina.zhang@intel.com> This should probably be the first patch in the series. As far as the code goes, this is; Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Regards, Joonas PS. Please remember to add Cc's for patches next time.
On 2017.05.12 17:37:56 +0800, Tina Zhang wrote: > vgt_caps is used for guest i915 driver to get the vgpu capabilities from > the device model. VGT_CPAS_FULL_PPGTT is one of the capabilities type to > let guest i915 dirver know that the guest i915 full ppgtt is supported by > device model. > > Changes since v1: > - Use u32 instead of uint32_t (Joonas) > - Move VGT_CAPS_FULL_PPGTT introduction to this patch and use #define instead > of enum (Joonas) > > Signed-off-by: Tina Zhang <tina.zhang@intel.com> > --- > drivers/gpu/drm/i915/i915_pvinfo.h | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_pvinfo.h b/drivers/gpu/drm/i915/i915_pvinfo.h > index c0cb297..8dc0664 100644 > --- a/drivers/gpu/drm/i915/i915_pvinfo.h > +++ b/drivers/gpu/drm/i915/i915_pvinfo.h > @@ -53,12 +53,18 @@ enum vgt_g2v_type { > VGT_G2V_MAX, > }; > > +/* > + * VGT capabilities type > + */ > +#define VGT_CAPS_FULL_PPGTT BIT(2) > + > struct vgt_if { > u64 magic; /* VGT_MAGIC */ > uint16_t version_major; > uint16_t version_minor; > u32 vgt_id; /* ID of vGT instance */ > - u32 rsv1[12]; /* pad to offset 0x40 */ > + u32 vgt_caps; /* VGT capabilities */ > + u32 rsv1[11]; /* pad to offset 0x40 */ We need to bump pvinfo version for this structural change to keep versioned pvinfo page for compat check. So in this case I sugguest to bump minor version and check required pvinfo version when detecting caps. > /* > * Data structure to describe the balooning info of resources. > * Each VM can only have one portion of continuous area for now. > -- > 2.7.4 > > _______________________________________________ > intel-gvt-dev mailing list > intel-gvt-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
diff --git a/drivers/gpu/drm/i915/i915_pvinfo.h b/drivers/gpu/drm/i915/i915_pvinfo.h index c0cb297..8dc0664 100644 --- a/drivers/gpu/drm/i915/i915_pvinfo.h +++ b/drivers/gpu/drm/i915/i915_pvinfo.h @@ -53,12 +53,18 @@ enum vgt_g2v_type { VGT_G2V_MAX, }; +/* + * VGT capabilities type + */ +#define VGT_CAPS_FULL_PPGTT BIT(2) + struct vgt_if { u64 magic; /* VGT_MAGIC */ uint16_t version_major; uint16_t version_minor; u32 vgt_id; /* ID of vGT instance */ - u32 rsv1[12]; /* pad to offset 0x40 */ + u32 vgt_caps; /* VGT capabilities */ + u32 rsv1[11]; /* pad to offset 0x40 */ /* * Data structure to describe the balooning info of resources. * Each VM can only have one portion of continuous area for now.
vgt_caps is used for guest i915 driver to get the vgpu capabilities from the device model. VGT_CPAS_FULL_PPGTT is one of the capabilities type to let guest i915 dirver know that the guest i915 full ppgtt is supported by device model. Changes since v1: - Use u32 instead of uint32_t (Joonas) - Move VGT_CAPS_FULL_PPGTT introduction to this patch and use #define instead of enum (Joonas) Signed-off-by: Tina Zhang <tina.zhang@intel.com> --- drivers/gpu/drm/i915/i915_pvinfo.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)