dm:passthrough opregion to uos gpu

uos IGD driver need opregion when enable GVT-d.

This patch pass-thru opregion to uos gpu.
Here is the steps:
(1) set opregion gpa(guest physical addrress) 0xDFFFD000;
(2) get opregion hpa(host physical addrress);
(3) build EPT mapping for opregion.

v1 -> v2:
        * initialize the EPT mapping for passthrough GPU opregion region
        in passthru_init instead of reading the ASLS config space

v2 -> v3:
        * add EPT unmap when deinit
        * change some micro name

Tracked-On: #4360

Signed-off-by: Junming Liu <junming.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Liu XinYun <xinyun.liu@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Wu Binbin <binbin.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
Junming Liu
2020-01-10 22:39:49 +00:00
committed by wenlingz
parent 4d882731ce
commit 1b3754aaee
2 changed files with 30 additions and 0 deletions

View File

@@ -1068,4 +1068,6 @@
/* Graphics definitions */
#define PCIR_BDSM 0x5C /* BDSM graphics base data of stolen memory register */
#define PCIM_BDSM_GSM_MASK 0xFFF00000 /* bits 31:20 contains the base address of stolen memory */
#define PCIR_ASLS_CTL 0xFC /* Opregion start addr register */
#define PCIM_ASLS_OPREGION_MASK 0xFFFFF000 /* opregion need 4KB aligned */
#endif