[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/4] xen/xsm: Add XSM_HW_PRIV


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Thu, 12 Jun 2025 13:31:06 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oPrLHnvatmBdPewhuh0Ilah1Jx05z6rtCk5m6G1mJTk=; b=GWIZq1A1jzVplh/8wkgXpLayRQ9wRDcSvPfIqvnhrVT/llUX7TexIJv3Pct/oVDWuxwvsjSWFIC5KksqTfkLc9OxG3jipUkNDxjKy776s6vojUFGUSklU3KDdww4JkWqpiwsFy+jFjEipaBqjpUDsuTRa11o1+YOfYyO2/oyfYZASk+OCNvXWTaWwNbsCs6+FE9d5dTHub2LyPNCko1+lX5T83PJTwz5G3OQaW+0RwjDl593qTA96gA1y/K2is0RANn2aRjbQtVwVU8ZDGKIdyTUt926IpLOoGHmRFgGV14WfRdyjiIcpxS8zDqUxIvr45q6OaBg9mxeHDLLdbWMbQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rvA9xOjHSD4Ln8q6xd1dWX1yrTL+e+kPTVEs4hpZqZvXr9+PpIH9zcbYLgEKOMODEbaZzJgzCLsHqchQlHxJwCQCRMykdKKlSfwVI5qiO809nRXNqjB4EJHde+eaM3tLLzNe95Cchu7s7cHLwQBWpp86NBInC+SC2mvE8GEjeNRyI/H/FzQpd0be9R6KdG3ZDjTViA+B2LuIBgT/rhHLI9KJAGu7Or12BRik/2sTku2HIM1ksPfXad0w345wR+2WlAjOblP7kw+LPUl+8Y8jnhJKnxRWraA+CNTEEkFiMmvMd5TwnICNu1yf+gpjK8BbZx4PEJnE8mhOZVEFsMSgLg==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 12 Jun 2025 17:31:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-06-12 03:36, Jan Beulich wrote:
On 11.06.2025 05:13, Jason Andryuk wrote:
On 2025-06-11 09:02, Jan Beulich wrote:
On 11.06.2025 00:57, Jason Andryuk wrote:
Xen includes disctinct concepts of a control domain (privileged) and a
hardware domain, but there is only a single XSM_PRIV check.  For dom0
this is not an issue as they are one and the same.

With hyperlaunch and its build capabilities, a non-privileged hwdom and a
privileged control domain should be possible.  Today the hwdom fails the
XSM_PRIV checks for hardware-related hooks which it should be allowed
access to.

Introduce XSM_HW_PRIV, and use it to mark many of the physdev_op and
platform_op.  The hwdom is allowed access for XSM_HW_PRIV.

Make XSM_HW_PRIV a new privilege level that is given to the hardware
domain, but is not exclusive.  The control domain can still execute
XSM_HW_PRIV commands.  This is a little questionable since it's unclear
how the control domain can meaningfully execute them.  But this approach
is chosen to maintain the increasing privileges and keep control domain
fully privileged.

I consider this conceptually wrong. "Control" aiui refers to software
(e.g. VMs or system-wide settings), but there ought to be a (pretty?)
clear boundary between control and hardware domains, imo. As to
"pretty" - should any overlap be necessary (xms_machine_memory_map()
comes to mind), such would need handling specially then, I think. At
the same time: The more of an overlap there is, the less clear it is
why the two want/need separating in the first place.

So you are in favor of splitting control and hardware into distinct
sets?  I am okay with this.  I implemented that originally, but I
started doubting it.  Mainly, should control be denied any permission?

Yes, imo: Fundamentally for anything the hardware domain is supposed to
be doing.

Ok.

Yet as indicated in other replies to this series - boundaries
aren't always as clear as they ought to be for a clean separation.

Agreed.

We aren't using the toolstack to build domains - dom0less or Hyperlaunch
handles that.  This avoids issues that might arise from running the
toolstack.

IOW you don't have a control domain there in the first place?

I have a domain with d->is_privileged == true. We don't create more domains with it though, which was your other email's definition of the control domain. But it can pause and unpause domains.

Regards,
Jason



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.