All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Du, Changbin" <changbin.du@intel.com>
To: Matthew Auld <matthew.william.auld@gmail.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	intel-gvt-dev@lists.freedesktop.org
Subject: Re: [PATCH v6 09/14] drm/i915/gvt: Add 64K huge gtt support
Date: Tue, 15 May 2018 08:01:55 +0800	[thread overview]
Message-ID: <20180515000155.bg7fm3ac522ywtsr@intel.com> (raw)
In-Reply-To: <CAM0jSHNoSJC1=GG_x+4ejddFEzGfcf9hxA3Z4mdYMcH9dqxGOQ@mail.gmail.com>

Hi Auld,
On Mon, May 14, 2018 at 09:31:54PM +0100, Matthew Auld wrote:
> On 8 May 2018 at 10:05,  <changbin.du@intel.com> wrote:
> > From: Changbin Du <changbin.du@intel.com>
> >
> > Finally, this add the first huge gtt support for GVTg - 64K pages. Since
> > 64K page and 4K page cannot be mixed on the same page table, so we always
> > split a 64K entry into small 4K page. And when unshadow guest 64K entry,
> > we need ensure all the shadowed entries in shadow page table also get
> > cleared.
> >
> > For page table which has 64K gtt entry, only PTE#0, PTE#16, PTE#32, ...
> > PTE#496 are used. Unused PTEs update should be ignored.
> >
> > Signed-off-by: Changbin Du <changbin.du@intel.com>
> > ---
> >  drivers/gpu/drm/i915/gvt/gtt.c | 86 +++++++++++++++++++++++++++++++++++++++---
> >  1 file changed, 80 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
> > index 30b15e4..2f13464 100644
> > --- a/drivers/gpu/drm/i915/gvt/gtt.c
> > +++ b/drivers/gpu/drm/i915/gvt/gtt.c
> > @@ -978,9 +978,12 @@ static int ppgtt_invalidate_spt(struct intel_vgpu_ppgtt_spt *spt)
> >                         ppgtt_invalidate_pte(spt, &e);
> >                         break;
> >                 case GTT_TYPE_PPGTT_PTE_64K_ENTRY:
> > +                       /* We don't setup 64K shadow entry so far. */
> > +                       WARN(1, "suspicious 64K gtt entry\n");
> > +                       continue;
> >                 case GTT_TYPE_PPGTT_PTE_2M_ENTRY:
> >                 case GTT_TYPE_PPGTT_PTE_1G_ENTRY:
> > -                       WARN(1, "GVT doesn't support 64K/2M/1GB page\n");
> > +                       WARN(1, "GVT doesn't support 2M/1GB page\n");
> >                         continue;
> >                 case GTT_TYPE_PPGTT_PML4_ENTRY:
> >                 case GTT_TYPE_PPGTT_PDP_ENTRY:
> > @@ -1073,9 +1076,44 @@ static inline void ppgtt_generate_shadow_entry(struct intel_gvt_gtt_entry *se,
> >         se->type = ge->type;
> >         se->val64 = ge->val64;
> >
> > +       /* Because we always split 64KB pages, so clear IPS in shadow PDE. */
> > +       if (se->type == GTT_TYPE_PPGTT_PDE_ENTRY)
> > +               ops->clear_ips(se);
> 
> IIUC we are disabling 64K entries for the spt(we clear the IPS bit),
> so what are we actually gaining by going through the trouble of
> supporting them in the guest, as opposed to just disabling them?
One of the goal to support huge gtt shadowing is to remove speical quirk for
vGPU in the guest gfx driver, though I finally found this is not a light change.
But we still can gain from this change, for example, fewer gtt update trap.

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

  reply	other threads:[~2018-05-15  0:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08  9:05 [PATCH v6 00/14] drm/i915/gvt: Add huge gtt shadowing changbin.du
2018-05-08  9:05 ` [PATCH v6 01/14] drm/i915/gvt: Add new 64K entry type changbin.du
2018-05-08  9:05 ` [PATCH v6 02/14] drm/i915/gvt: Add PTE IPS bit operations changbin.du
2018-05-08  9:05 ` [PATCH v6 03/14] drm/i915/gvt: Handle MMIO GEN8_GAMW_ECO_DEV_RW_IA for 64K GTT changbin.du
2018-05-08  9:05 ` [PATCH v6 04/14] drm/i915/gvt: Detect 64K gtt entry by IPS bit of PDE changbin.du
2018-05-10 15:17   ` Matthew Auld
2018-05-11  2:29     ` Zhenyu Wang
2018-05-08  9:05 ` [PATCH v6 05/14] drm/i915/gvt: Add software PTE flag to mark special 64K splited entry changbin.du
2018-05-08  9:05 ` [PATCH v6 06/14] drm/i915/gvt: Add GTT clear_pse operation changbin.du
2018-05-08  9:05 ` [PATCH v6 07/14] drm/i915/gvt: Split ppgtt_alloc_spt into two parts changbin.du
2018-05-08  9:05 ` [PATCH v6 08/14] drm/i915/gvt: Make PTE iterator 64K entry aware changbin.du
2018-05-08  9:05 ` [PATCH v6 09/14] drm/i915/gvt: Add 64K huge gtt support changbin.du
2018-05-14 20:31   ` Matthew Auld
2018-05-15  0:01     ` Du, Changbin [this message]
2018-05-08  9:05 ` [PATCH v6 10/14] drm/i915/kvmgt: Support setting dma map for huge pages changbin.du
2018-05-10 14:31   ` Matthew Auld
2018-05-14 23:51     ` Du, Changbin
2018-05-08  9:05 ` [PATCH v6 11/14] drm/i915/gvt: Add 2M huge gtt support changbin.du
2018-05-08  9:05 ` [PATCH v6 12/14] drm/i915/gvt: Handle special sequence on PDE IPS bit changbin.du
2018-05-08  9:05 ` [PATCH v6 13/14] drm/i915/gvt: Fix error handling in ppgtt_populate_spt_by_guest_entry changbin.du
2018-05-08  9:05 ` [PATCH v6 14/14] drm/i915: Enable platform support for vGPU huge gtt pages changbin.du
2018-05-16 13:39   ` Joonas Lahtinen
2018-05-08  9:31 ` ✗ Fi.CI.BAT: failure for drm/i915/gvt: Add huge gtt shadowing (rev2) 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=20180515000155.bg7fm3ac522ywtsr@intel.com \
    --to=changbin.du@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=matthew.william.auld@gmail.com \
    /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.