mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-26 15:31:35 +00:00
acrn-config: Set/Unset RDT support in the <$BOARD$>.config file
This patch checks if RDT feature is supported by platform and updates the CONFIG_RDT_ENABLED flag in the <$BOARD$>.config file accordingly. Tracked-On: #3715 Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
parent
6cfd81cdf1
commit
a81fcc2308
@ -4,6 +4,7 @@
|
||||
#
|
||||
|
||||
import sys
|
||||
import subprocess
|
||||
import board_cfg_lib
|
||||
|
||||
|
||||
@ -104,6 +105,17 @@ def get_serial_type():
|
||||
return (ttys_type, ttys_value)
|
||||
|
||||
|
||||
def is_rdt_supported():
|
||||
"""
|
||||
Returns True if platform supports RDT else False
|
||||
"""
|
||||
(rdt_resources, rdt_res_clos_max, _) = board_cfg_lib.clos_info_parser(board_cfg_lib.BOARD_INFO_FILE)
|
||||
if len(rdt_resources) == 0 or len(rdt_res_clos_max) == 0:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def generate_file(config):
|
||||
"""Start to generate board.c
|
||||
:param config: it is a file pointer of board information for writing to
|
||||
@ -150,4 +162,9 @@ def generate_file(config):
|
||||
print("# KATA VM is not supported on dual-core systems", file=config)
|
||||
print("CONFIG_MAX_KATA_VM_NUM=0", file=config)
|
||||
|
||||
if is_rdt_supported():
|
||||
print("CONFIG_RDT_ENABLED=y", file=config)
|
||||
else:
|
||||
print("CONFIG_RDT_ENABLED=n", file=config)
|
||||
|
||||
return err_dic
|
||||
|
Loading…
Reference in New Issue
Block a user