From: Zhi Wang <zhi.a.wang@intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
"Vetter, Daniel" <daniel.vetter@intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Chris Wilson <chris@chris-wilson.co.uk>,
"Lv, Zhiyuan" <zhiyuan.lv@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: Discuss GVT context hacks in i915
Date: Tue, 16 Feb 2016 12:08:57 +0800 [thread overview]
Message-ID: <56C2A0D9.8010908@intel.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D15F7B20F8@SHSMSX101.ccr.corp.intel.com>
Hi:
Thanks Kevin! See my comments below.
On 02/16/16 11:11, Tian, Kevin wrote:
>> From: Wang, Zhi A
>> Sent: Tuesday, February 16, 2016 12:04 AM
>>
>> The better design idea is to reuse the data structures and helper
>> functions, but have new top-level entry functions for creating e.g. a
>> xengt lrc context. So e.g. have a lrc init function for xengt which
>> takes the setup stuff as parameters. Wrt ppgtt my idea was to reuse
>> struct i915_hw_ppgtt for managing the shadow pagetable, with xengt using
>> the i915_gem_gtt.c functions to write shadow pagetable entries. That way
>> i915 still knows the virtual->physical mapping, which aids in e.g. crash
>> dump recording. Of course you're not going to bind entire vma, but
>> instead will use the lower-level functions that just bind pages.
>>
>> [Zhi] Thanks! Just want to make sure that you prefer that GVT-g specific
>> modifications should be put into a fork of top-level i915 APIs? For example,
>> we prepare a new function to create the GVT context, which is a fork of
>> simplified i915_gem_create_context().
>
> Not specific for GVT. You need to make it generic to accept any lrc init
> function where GVT is just one user.
>
@Daniel, Just want to clarify the "new top-level entry functions "here,
should I refine the related i915 APIs as below:
int xengt_i915_api()
{
call i915_common_low_level_api();
}
or:
native_callbacks();
xengt_callbacks();
int i915_api(*callbacks);
>>
>> For i915_hw_ppgtt and GVT-g shadow page table, we tried to think about how
>> to merge these two similar things into one, but have some opens:
>>
>> Most of the GTT/PPGTT page table entry routines in i915_gem_gtt.c, e.g. the
>> abstractions/ insert_entries() are aimed to generate the page table entry, but
>> GVT-g shadow page implementation also need the per-platform page table
>> entry bit field extraction routines. For example, extract the GFN from guest page
>> table, which means we have to add some new callbacks which native i915
>> will not use at all. Is it OK for host i915 to add such kinds of callbacks?
>
> What Daniel suggested is to reuse low level functions to write shadow
> PTE entries. It's not about how we sync shadow PTE content from guest
> PTE content. So how to extract GFN from guest page table will be still
> kept within GVT shadow code. Only when GVT shadow wants to operate
> shadow PTE entries, it goes to i915_gem_gtt.c.
>
>>
>> b. GVT-g shadow page table implementation should be the most complicated
>> part in GVT-g, maybe the first easy step should be putting the shadow page
>> table root pointer into i915_hw_ppgtt. E.g. GVT-g allocates a fake i915_hw_ppgtt
>> only use it to store root pointer and addressing mode bit?
>
> Not a 'fake' one. It a real i915_hw_ppgtt but in a special mode that the
> actual mgmt. logic comes from another place (GVT shadow) but the low
> level interface can be reused (possibly some slight changes still required)
>
OK. That's much better! we could still keep some bitfield extraction
routines inside GVT-g.
> Thanks
> Kevin
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2016-02-16 4:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <56C19630.5010301@intel.com>
2016-02-15 9:13 ` Fwd: Discuss GVT context hacks in i915 Zhi Wang
[not found] ` <56C19B26.7020206@intel.com>
2016-02-15 16:03 ` Wang, Zhi A
2016-02-15 17:20 ` Daniel Vetter
2016-02-16 1:09 ` Wang, Zhi A
2016-02-16 3:11 ` Tian, Kevin
2016-02-16 4:08 ` Zhi Wang [this message]
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=56C2A0D9.8010908@intel.com \
--to=zhi.a.wang@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kevin.tian@intel.com \
--cc=zhiyuan.lv@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).