[SWDEV-486872] Removed '--ras' from static command when platform is VM

Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: I0b03f168d7011428cfea3ab303865f4eaeea78ac


[ROCm/amdsmi commit: eb9116e8c2]
This commit is contained in:
gabrpham
2024-10-01 16:41:58 -05:00
committed by Maisam Arif
orang tua 628682645b
melakukan 4b461904b2
3 mengubah file dengan 10 tambahan dan 6 penghapusan
+3
Melihat File
@@ -571,6 +571,9 @@ GPU: 0
- **Removed usage of _validate_positive in Parser and replaced with _positive_int and _not_negative_int as appropriate**.
- This will allow 0 to be a valid input for several options in setting CPUs where appropriate (for example, as a mode or NBIOID)
- **Removed `--ras` option from `amd-smi static` command in Guest environments**
- VMs don't have permission from Hosts to obtain RAS information, so this option was made invalid on Guest environments.
### Optimizations
- **Adjusted ordering of gpu_metrics calls to ensure that pcie_bw values remain stable in `amd-smi metric` & `amd-smi monitor`**.
@@ -311,8 +311,6 @@ class AMDSMICommands():
args.board = board
if driver:
args.driver = driver
if ras:
args.ras = ras
if vram:
args.vram = vram
if cache:
@@ -321,12 +319,14 @@ class AMDSMICommands():
args.process_isolation = process_isolation
# Store args that are applicable to the current platform
current_platform_args = ["asic", "bus", "vbios", "driver", "ras",
current_platform_args = ["asic", "bus", "vbios", "driver",
"vram", "cache", "board", "process_isolation"]
current_platform_values = [args.asic, args.bus, args.vbios, args.driver, args.ras,
current_platform_values = [args.asic, args.bus, args.vbios, args.driver,
args.vram, args.cache, args.board, args.process_isolation]
if self.helpers.is_linux() and self.helpers.is_baremetal():
if ras:
args.ras = ras
if partition:
args.partition = partition
if limit:
@@ -336,7 +336,8 @@ class AMDSMICommands():
if xgmi_plpd:
args.xgmi_plpd = xgmi_plpd
current_platform_args += ["ras", "limit", "partition", "soc_pstate", "xgmi_plpd"]
current_platform_values += [args.ras, args.limit, args.partition, args.soc_pstate, args.xgmi_plpd]
current_platform_values += [args.ras, args.limit, args.partition,
args.soc_pstate, args.xgmi_plpd]
if self.helpers.is_linux() and not self.helpers.is_virtual_os():
if numa:
@@ -635,10 +635,10 @@ class AMDSMIParser(argparse.ArgumentParser):
static_parser.add_argument('-c', '--cache', action='store_true', required=False, help=cache_help)
static_parser.add_argument('-B', '--board', action='store_true', required=False, help=board_help)
static_parser.add_argument('-R', '--process-isolation', action='store_true', required=False, help=process_isolation_help)
static_parser.add_argument('-r', '--ras', action='store_true', required=False, help=ras_help)
# Options to display on Hypervisors and Baremetal
if self.helpers.is_hypervisor() or self.helpers.is_baremetal():
static_parser.add_argument('-r', '--ras', action='store_true', required=False, help=ras_help)
static_parser.add_argument('-p', '--partition', action='store_true', required=False, help=partition_help)
static_parser.add_argument('-l', '--limit', action='store_true', required=False, help=limit_help)
static_parser.add_argument('-P', '--soc-pstate', action='store_true', required=False, help=soc_pstate_help)