hv: rename CONFIG_GPU_SBDF to CONFIG_IGD_SBDF

The name CONFIG_IGD_SBDF indicates the bdf of an integrated GPU on platform.

Tracked-On: #6855
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
This commit is contained in:
Yang,Yu-chu
2021-11-22 10:58:21 -08:00
committed by wenlingz
parent 68136b7f7a
commit 30951f7a83
6 changed files with 13 additions and 13 deletions

View File

@@ -167,7 +167,7 @@ class DmarTbl:
# TODO: Get board information is independent part of acrn-config tools, it does not get the GPU_SBDF default
# config from the other part of tools, so hard code the GPU_SBDF to gernerate DRHDx_IGNORE macro
CONFIG_GPU_SBDF = 0x10
CONFIG_IGD_SBDF = 0x10
PCI_BRIDGE_HEADER = 1
@@ -257,7 +257,7 @@ def walk_pci_bus(tmp_pdf, dmar_tbl, dmar_hw_list, drhd_cnt):
get_secondary_bus(dmar_tbl, tmp_pdf.device, tmp_pdf.function)
if ((dmar_tbl.dmar_drhd.segment << 16) | (
dmar_tbl.dmar_dev_scope.bus << 8) | tmp_pdf.path) == CONFIG_GPU_SBDF:
dmar_tbl.dmar_dev_scope.bus << 8) | tmp_pdf.path) == CONFIG_IGD_SBDF:
dmar_hw_list.hw_ignore[drhd_cnt] = 'true'
dmar_tbl.path_offset += ctypes.sizeof(DevScopePath)

View File

@@ -119,7 +119,7 @@ def create_device_node(allocation_etree, vm_id, devdict):
if common.get_node(f"./func", dev_node) is None:
common.append_node(f"./func", f"{bdf.func:#04x}", dev_node)
def create_gpu_sbdf(board_etree, allocation_etree):
def create_igd_sbdf(board_etree, allocation_etree):
"""
Extract the integrated GPU bdf from board.xml. If the device is not present, set bdf to "0xFFFF" which indicates the device
doesn't exist.
@@ -127,15 +127,15 @@ def create_gpu_sbdf(board_etree, allocation_etree):
bus = "0x0"
device_node = common.get_node(f"//bus[@type='pci' and @address='{bus}']/device[vendor='0x8086' and class='0x030000']", board_etree)
if device_node is None:
common.append_node("/acrn-config/hv/MISC_CFG/GPU_SBDF", '0xFFFF', allocation_etree)
common.append_node("/acrn-config/hv/MISC_CFG/IGD_SBDF", '0xFFFF', allocation_etree)
else:
address = device_node.get('address')
dev = int(address, 16) >> 16
func = int(address, 16) & 0xffff
common.append_node("/acrn-config/hv/MISC_CFG/GPU_SBDF", f"{(int(bus, 16) << 8) | (dev << 3) | func:#06x}", allocation_etree)
common.append_node("/acrn-config/hv/MISC_CFG/IGD_SBDF", f"{(int(bus, 16) << 8) | (dev << 3) | func:#06x}", allocation_etree)
def fn(board_etree, scenario_etree, allocation_etree):
create_gpu_sbdf(board_etree, allocation_etree)
create_igd_sbdf(board_etree, allocation_etree)
vm_nodes = scenario_etree.xpath("//vm")
for vm_node in vm_nodes:
vm_id = vm_node.get('id')

View File

@@ -248,8 +248,8 @@
<xsl:template match="MISC_CFG">
<xsl:call-template name="integer-by-key-value">
<xsl:with-param name="key" select="'GPU_SBDF'" />
<xsl:with-param name="value" select="//allocation-data/acrn-config/hv/MISC_CFG/GPU_SBDF" />
<xsl:with-param name="key" select="'IGD_SBDF'" />
<xsl:with-param name="value" select="//allocation-data/acrn-config/hv/MISC_CFG/IGD_SBDF" />
</xsl:call-template>
</xsl:template>