From 6edd21c1dcbc40ebce9316e3aacba68ecd81ac5b Mon Sep 17 00:00:00 2001 From: Sun Peng Date: Tue, 28 Apr 2020 13:43:01 +0800 Subject: [PATCH] dm: Data Stolen Memory (DSM) passthrough support for GVT-d on TGL The way of passing DSM address on TGL is the same with on EHL. Adding these code to support GVT-d on TGL. Tracked-On: #5020 Signed-off-by: Sun Peng Acked-by: Yu Wang yu1.wang@intel.com --- devicemodel/hw/pci/passthrough.c | 1 + devicemodel/include/pcireg.h | 1 + 2 files changed, 2 insertions(+) diff --git a/devicemodel/hw/pci/passthrough.c b/devicemodel/hw/pci/passthrough.c index 41fcf7fd0..7a0d5efe7 100644 --- a/devicemodel/hw/pci/passthrough.c +++ b/devicemodel/hw/pci/passthrough.c @@ -426,6 +426,7 @@ passthru_gpu_dsm_opregion(struct vmctx *ctx, struct passthru_dev *ptdev, switch (device) { case INTEL_ELKHARTLAKE: + case INTEL_TIGERLAKE: /* BDSM register has 64 bits. * bits 63:20 contains the base address of stolen memory */ diff --git a/devicemodel/include/pcireg.h b/devicemodel/include/pcireg.h index c4a6b1c14..8db1a518a 100644 --- a/devicemodel/include/pcireg.h +++ b/devicemodel/include/pcireg.h @@ -1067,6 +1067,7 @@ /* Graphics definitions */ #define INTEL_ELKHARTLAKE 0x4551 +#define INTEL_TIGERLAKE 0x9a49 #define PCIR_BDSM 0x5C /* BDSM graphics base data of stolen memory register */ #define PCIR_GEN11_BDSM_DW0 0xC0 #define PCIR_GEN11_BDSM_DW1 0xC4