Unverified Commit f8ab733c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6294 [sync] PR-6177: arm64/mpam: Not allowed setting 0 to cache portion bit mask

parents d7f31fdb 54617104
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -320,6 +320,11 @@ parse_cache(char *buf, struct resctrl_resource *r,
		return -EINVAL;
	}

	if (type == SCHEMA_COMM && data == 0) {
		rdt_last_cmd_puts("No allowed CPBM to be set to 0\n");
		return -EINVAL;
	}

	cfg->new_ctrl[type] = data;
	cfg->ctrl_updated[type] = true;
	cfg->have_new_ctrl = true;