public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [Question mpam mpam/snapshot+extras/v6.18-rc1] Question with Configuring iommu_group in 'task'
@ 2026-03-27 10:21 Qinxin Xia
  2026-03-27 10:47 ` Ben Horgan
  0 siblings, 1 reply; 2+ messages in thread
From: Qinxin Xia @ 2026-03-27 10:21 UTC (permalink / raw)
  To: ben.horgan
  Cc: amitsinght, baisheng.gao, baolin.wang, carl, dave.martin, david,
	dfustini, fenghuay, gshan, james.morse, jonathan.cameron, kobak,
	lcherian, linux-arm-kernel, linux-kernel, peternewman,
	punit.agrawal, quic_jiles, reinette.chatre, rohit.mathew, scott,
	sdonthineni, xhao, zengheng4, Linuxarm


Hello everyone!

In earlier versions, mpam supports the configuration of iommu_groups.

  823 static ssize_t rdtgroup_tasks_write(struct kernfs_open_file *of,
  824                                     char *buf, size_t nbytes,
loff_t off)
  825 {
  826         struct rdtgroup *rdtgrp;
  827         int iommu_group_id;
  828         bool is_iommu;
  829         char *pid_str;
  830         int ret = 0;
  831         pid_t pid;
  832
  833         rdtgrp = rdtgroup_kn_lock_live(of->kn);
  834         if (!rdtgrp) {
  835                 rdtgroup_kn_unlock(of->kn);
  836                 return -ENOENT;
  837         }
  838         rdt_last_cmd_clear();
  839
  840         if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED ||
  841             rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) {
  842                 ret = -EINVAL;
  843                 rdt_last_cmd_puts("Pseudo-locking in progress\n");
  844                 goto unlock;
  845         }
  846
  847         while (buf && buf[0] != '\0' && buf[0] != '\n') {
  848                 pid_str = strim(strsep(&buf, ","));
  849
  850                 is_iommu = string_is_iommu_group(pid_str, 
&iommu_group_id);

What puzzles me is why we would put it under 'task'—this seems a little
  strange to users.It seems they are not related.Why don't we add a new
interface like 'iommu'?

  851                 if (is_iommu)
  852                         ret = rdtgroup_move_iommu(iommu_group_id, 
rdtgrp, of);
  853                 else if (kstrtoint(pid_str, 0, &pid)) {
  854                         rdt_last_cmd_printf("Task list parsing 
error pid %s\n", pid_str);
  855                         ret = -EINVAL;
  856                         break;
  857                 }
  858
  859                 if (pid < 0) {
  860                         rdt_last_cmd_printf("Invalid pid %d\n", pid);
  861                         ret = -EINVAL;
  862                         break;
  863                 }
  864

In future glue versions, will you re-enable support for iommu_group, and
if so, will the configuration scheme be changed?

-- 
Thanks,
Qinxin



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-27 10:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-27 10:21 [Question mpam mpam/snapshot+extras/v6.18-rc1] Question with Configuring iommu_group in 'task' Qinxin Xia
2026-03-27 10:47 ` Ben Horgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox