[Intel-gfx] [PATCH v3 3/8] drm/i915: Partition the fence registers for vGPU in i915 driver

Gerd Hoffmann kraxel at redhat.com
Tue Dec 16 23:33:49 PST 2014


On Di, 2014-12-16 at 15:01 +0000, Tvrtko Ursulin wrote:
> Hi,
> 
> On 12/16/2014 02:41 PM, Gerd Hoffmann wrote:
> >> I didn't figure out how each domain knowns which fences to use? They
> >> know how many, but which ones?
> >
> > I think the guest doesn't have to know because mmio access is trapped by
> > the hypervisor anyway.
> 
> Okay.. so the point is to ensure no domain can hog all fences, but if 
> the hypervisor is already tracking everything why is this limiting 
> required then in the guest? Hypervisor could just say all fences are 
> allocated since it knows how much it gave out per guest.

There is no dynamic allocation.  Each guest gets a fixed number of
fences assigned which it can use, pretty much like memory where each
guest gets a fixed piece too.

It's not possible to allow guests direct access to the fence registers
though.  And if every fence register access traps into the hypervisor
anyway the hypervisor can easily map the guest virtual fence to host
physical fence, so there is no need to tell the guest which fences it
owns, the number of fences is enough.

cheers,
  Gerd




More information about the Intel-gfx mailing list