[5/7] drm/i915: Update PV INFO page definition for Intel GVT-g
diff mbox

Message ID 1440056724-26976-6-git-send-email-zhiyuan.lv@intel.com
State New
Headers show

Commit Message

Zhiyuan Lv Aug. 20, 2015, 7:45 a.m. UTC
Some more definitions in the PV info page are added. They are mainly
for the guest notification to Intel GVT-g device model. They are used
for Broadwell enabling.

Signed-off-by: Zhiyuan Lv <zhiyuan.lv@intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
---
 drivers/gpu/drm/i915/i915_vgpu.h | 34 ++++++++++++++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

Comments

Joonas Lahtinen Aug. 20, 2015, 12:58 p.m. UTC | #1
On to, 2015-08-20 at 15:45 +0800, Zhiyuan Lv wrote:
> Some more definitions in the PV info page are added. They are mainly
> for the guest notification to Intel GVT-g device model. They are used
> for Broadwell enabling.
> 
> Signed-off-by: Zhiyuan Lv <zhiyuan.lv@intel.com>
> Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
> 

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Is there any public document about the interface?

> ---
>  drivers/gpu/drm/i915/i915_vgpu.h | 34 
> ++++++++++++++++++++++++++++++++--
>  1 file changed, 32 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_vgpu.h 
> b/drivers/gpu/drm/i915/i915_vgpu.h
> index 97a88b5..21c97f4 100644
> --- a/drivers/gpu/drm/i915/i915_vgpu.h
> +++ b/drivers/gpu/drm/i915/i915_vgpu.h
> @@ -40,6 +40,19 @@
>  #define INTEL_VGT_IF_VERSION \
>  	INTEL_VGT_IF_VERSION_ENCODE(VGT_VERSION_MAJOR, 
> VGT_VERSION_MINOR)
>  
> +/*
> + * notifications from guest to vgpu device model
> + */
> +enum vgt_g2v_type {
> +	VGT_G2V_PPGTT_L3_PAGE_TABLE_CREATE = 2,
> +	VGT_G2V_PPGTT_L3_PAGE_TABLE_DESTROY,
> +	VGT_G2V_PPGTT_L4_PAGE_TABLE_CREATE,
> +	VGT_G2V_PPGTT_L4_PAGE_TABLE_DESTROY,
> +	VGT_G2V_EXECLIST_CONTEXT_CREATE,
> +	VGT_G2V_EXECLIST_CONTEXT_DESTROY,
> +	VGT_G2V_MAX,
> +};
> +
>  struct vgt_if {
>  	uint64_t magic;		/* VGT_MAGIC */
>  	uint16_t version_major;
> @@ -70,11 +83,28 @@ struct vgt_if {
>  	uint32_t rsv3[0x200 - 24];	/* pad to half page */
>  	/*
>  	 * The bottom half page is for response from Gfx driver to 
> hypervisor.
> -	 * Set to reserved fields temporarily by now.
>  	 */
>  	uint32_t rsv4;
>  	uint32_t display_ready;	/* ready for display owner 
> switch */
> -	uint32_t rsv5[0x200 - 2];	/* pad to one page */
> +
> +	uint32_t rsv5[4];
> +
> +	uint32_t g2v_notify;
> +	uint32_t rsv6[7];
> +
> +	uint32_t pdp0_lo;
> +	uint32_t pdp0_hi;
> +	uint32_t pdp1_lo;
> +	uint32_t pdp1_hi;
> +	uint32_t pdp2_lo;
> +	uint32_t pdp2_hi;
> +	uint32_t pdp3_lo;
> +	uint32_t pdp3_hi;
> +
> +	uint32_t execlist_context_descriptor_lo;
> +	uint32_t execlist_context_descriptor_hi;
> +
> +	uint32_t  rsv7[0x200 - 24];    /* pad to one page */
>  } __packed;
>  
>  #define vgtif_reg(x) \
Zhiyuan Lv Aug. 21, 2015, 2:27 a.m. UTC | #2
On Thu, Aug 20, 2015 at 03:58:43PM +0300, Joonas Lahtinen wrote:
> On to, 2015-08-20 at 15:45 +0800, Zhiyuan Lv wrote:
> > Some more definitions in the PV info page are added. They are mainly
> > for the guest notification to Intel GVT-g device model. They are used
> > for Broadwell enabling.
> > 
> > Signed-off-by: Zhiyuan Lv <zhiyuan.lv@intel.com>
> > Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
> > 
> 
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> 
> Is there any public document about the interface?

So far no ... The information we got is that the 4K MMIO range from 0x78000
is reserved for virtualization usage, but the detailed definition will not
appear in spec. Thanks!

> 
> > ---
> >  drivers/gpu/drm/i915/i915_vgpu.h | 34 
> > ++++++++++++++++++++++++++++++++--
> >  1 file changed, 32 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_vgpu.h 
> > b/drivers/gpu/drm/i915/i915_vgpu.h
> > index 97a88b5..21c97f4 100644
> > --- a/drivers/gpu/drm/i915/i915_vgpu.h
> > +++ b/drivers/gpu/drm/i915/i915_vgpu.h
> > @@ -40,6 +40,19 @@
> >  #define INTEL_VGT_IF_VERSION \
> >  	INTEL_VGT_IF_VERSION_ENCODE(VGT_VERSION_MAJOR, 
> > VGT_VERSION_MINOR)
> >  
> > +/*
> > + * notifications from guest to vgpu device model
> > + */
> > +enum vgt_g2v_type {
> > +	VGT_G2V_PPGTT_L3_PAGE_TABLE_CREATE = 2,
> > +	VGT_G2V_PPGTT_L3_PAGE_TABLE_DESTROY,
> > +	VGT_G2V_PPGTT_L4_PAGE_TABLE_CREATE,
> > +	VGT_G2V_PPGTT_L4_PAGE_TABLE_DESTROY,
> > +	VGT_G2V_EXECLIST_CONTEXT_CREATE,
> > +	VGT_G2V_EXECLIST_CONTEXT_DESTROY,
> > +	VGT_G2V_MAX,
> > +};
> > +
> >  struct vgt_if {
> >  	uint64_t magic;		/* VGT_MAGIC */
> >  	uint16_t version_major;
> > @@ -70,11 +83,28 @@ struct vgt_if {
> >  	uint32_t rsv3[0x200 - 24];	/* pad to half page */
> >  	/*
> >  	 * The bottom half page is for response from Gfx driver to 
> > hypervisor.
> > -	 * Set to reserved fields temporarily by now.
> >  	 */
> >  	uint32_t rsv4;
> >  	uint32_t display_ready;	/* ready for display owner 
> > switch */
> > -	uint32_t rsv5[0x200 - 2];	/* pad to one page */
> > +
> > +	uint32_t rsv5[4];
> > +
> > +	uint32_t g2v_notify;
> > +	uint32_t rsv6[7];
> > +
> > +	uint32_t pdp0_lo;
> > +	uint32_t pdp0_hi;
> > +	uint32_t pdp1_lo;
> > +	uint32_t pdp1_hi;
> > +	uint32_t pdp2_lo;
> > +	uint32_t pdp2_hi;
> > +	uint32_t pdp3_lo;
> > +	uint32_t pdp3_hi;
> > +
> > +	uint32_t execlist_context_descriptor_lo;
> > +	uint32_t execlist_context_descriptor_hi;
> > +
> > +	uint32_t  rsv7[0x200 - 24];    /* pad to one page */
> >  } __packed;
> >  
> >  #define vgtif_reg(x) \

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/i915_vgpu.h b/drivers/gpu/drm/i915/i915_vgpu.h
index 97a88b5..21c97f4 100644
--- a/drivers/gpu/drm/i915/i915_vgpu.h
+++ b/drivers/gpu/drm/i915/i915_vgpu.h
@@ -40,6 +40,19 @@ 
 #define INTEL_VGT_IF_VERSION \
 	INTEL_VGT_IF_VERSION_ENCODE(VGT_VERSION_MAJOR, VGT_VERSION_MINOR)
 
+/*
+ * notifications from guest to vgpu device model
+ */
+enum vgt_g2v_type {
+	VGT_G2V_PPGTT_L3_PAGE_TABLE_CREATE = 2,
+	VGT_G2V_PPGTT_L3_PAGE_TABLE_DESTROY,
+	VGT_G2V_PPGTT_L4_PAGE_TABLE_CREATE,
+	VGT_G2V_PPGTT_L4_PAGE_TABLE_DESTROY,
+	VGT_G2V_EXECLIST_CONTEXT_CREATE,
+	VGT_G2V_EXECLIST_CONTEXT_DESTROY,
+	VGT_G2V_MAX,
+};
+
 struct vgt_if {
 	uint64_t magic;		/* VGT_MAGIC */
 	uint16_t version_major;
@@ -70,11 +83,28 @@  struct vgt_if {
 	uint32_t rsv3[0x200 - 24];	/* pad to half page */
 	/*
 	 * The bottom half page is for response from Gfx driver to hypervisor.
-	 * Set to reserved fields temporarily by now.
 	 */
 	uint32_t rsv4;
 	uint32_t display_ready;	/* ready for display owner switch */
-	uint32_t rsv5[0x200 - 2];	/* pad to one page */
+
+	uint32_t rsv5[4];
+
+	uint32_t g2v_notify;
+	uint32_t rsv6[7];
+
+	uint32_t pdp0_lo;
+	uint32_t pdp0_hi;
+	uint32_t pdp1_lo;
+	uint32_t pdp1_hi;
+	uint32_t pdp2_lo;
+	uint32_t pdp2_hi;
+	uint32_t pdp3_lo;
+	uint32_t pdp3_hi;
+
+	uint32_t execlist_context_descriptor_lo;
+	uint32_t execlist_context_descriptor_hi;
+
+	uint32_t  rsv7[0x200 - 24];    /* pad to one page */
 } __packed;
 
 #define vgtif_reg(x) \