intel / XenGT-Preview-kernel

Other
33 stars 14 forks source link

The possibility of fence register full virtualization #5

Open thomasengul opened 9 years ago

thomasengul commented 9 years ago

Currently, fence registers are partitioned between VMs, thus a single VM has a subset of fence registers.

Is it possible to support a VM a full set of fence regiseters by saving and restoring fence registers when vGPU context switch time?

If it is possible, guest driver won't be modified for fence registers and also a VM can use a full set of fence registers.

l1viathan commented 9 years ago

Theoretically that is possible, but the implementation may not be trivial. Keeping them partitioned is the most straight forward way, do you have any problem with this design?

thomasengul commented 9 years ago

No problem with the design. I'm just thinking that it is cool if this solution can be applied with the un-modified guest GPU drivers. (i.e., full virtualization for GPU)

I don't understand why the implementation is not trivial. I think it is a typical save/restore of fence registers in GPU context switch. Please, read my thinking: When a VM takes over the physical GPU, the GPU is only serving for this VM with its fence registers. At that moment, the other VMs only access their virtual fence registers. This is perfectly safe becuase the physical GPU is not serving those VMs, thusly no need to access the fence registers of theirs. Their virtual fence registers would be accessed whenever the VM gets scheduled on physical GPU.

1) Fence registers for the GPU-scheduled VM,