Commit d8187be6 authored by Zeng Heng's avatar Zeng Heng
Browse files

mpam/mpam_ctrlmon: update monitor config with its parent's ctrl_val

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I95A33


CVE: NA

----------------------------------------

When the monitor is created, the configuration should follow its parent's
configuration, instead of the last used configuration, or that would lead
to misconfiguration of monitor group.

Fixes: 08127bbf ("mpam: update monitor rmid and group configuration")
Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent be9de0f7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -225,6 +225,8 @@ static void resctrl_group_resync_domain_ctrls(struct rdtgroup *rdtgrp,
		 * we should synchronize all child mon groups'
		 * configuration from this ctrl rdtgrp
		 */
		resctrl_cdp_mpamid_map_val(rdtgrp->closid.intpartid,
					   cfg[i].conf_type, closid.intpartid);
		head = &rdtgrp->mon.crdtgrp_list;
		list_for_each_entry(entry, head, mon.crdtgrp_list) {
			resctrl_cdp_mpamid_map_val(entry->closid.reqpartid,
@@ -283,6 +285,8 @@ static void resctrl_group_update_domain_ctrls(struct rdtgroup *rdtgrp,
		 * we should synchronize all child mon groups'
		 * configuration from this ctrl rdtgrp
		 */
		resctrl_cdp_mpamid_map_val(rdtgrp->closid.intpartid,
					   cfg[i].conf_type, closid.intpartid);
		head = &rdtgrp->mon.crdtgrp_list;
		list_for_each_entry(entry, head, mon.crdtgrp_list) {
			resctrl_cdp_mpamid_map_val(entry->closid.reqpartid,