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

Re: [PATCH 08/24] XSM: make .hvm_altp2mhvm_op() hook dependent upon ALTP2M=y


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Sun, 2 Aug 2026 10:58:51 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785682729; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=REvUedEfGalwFIovbtEDV+JDqejvcYhtg35ytkXdVpc=; b=iut2fLazBw/vKWIM5I+TY18Yoy84paB96TVtRakN770ciFdsypzWbjrbJTc9DdrZ29G+tN/ruASZ1B6el+fpfddG8oxGDmDhu6/AXFvW9eD3mVY72QgXnDMUHjfZiRFcgPfgAlaWACDLcJxuhpp6eZpMpAHofQBOpXT8ulQIJMw=
  • Arc-seal: i=1; a=rsa-sha256; t=1785682729; cv=none; d=zohomail.com; s=zohoarc; b=B19UDRc0SzbXVQDRZUNSVL4UsnJxj34lfr68VKa7JyhXd0TNQYun/s3jYF4VXnpKTCQ298mxoh8s7PhIhI0vfl/zOLSDJA0m5/LPjdAJyhSrMsAIEN2+LujRCZfUg+6j7xCHEekoLHi8sCvKI9aJ6inRlwihu7h1z2NAf/r3uOw=
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=zoho header.d=apertussolutions.com header.i="dpsmith@xxxxxxxxxxxxxxxxxxxx" header.h="Message-ID:Date:MIME-Version:Subject:To:From:In-Reply-To:Content-Type:Content-Transfer-Encoding"
  • Delivery-date: Sun, 02 Aug 2026 14:58:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 7/28/26 9:16 AM, Jan Beulich wrote:
It's unreachable / dead otherwise.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -583,6 +583,7 @@ static XSM_INLINE int cf_check xsm_hvm_p
      return xsm_default_action(action, current->domain, d);
  }
+#ifdef CONFIG_ALTP2M
  static XSM_INLINE int cf_check xsm_hvm_altp2mhvm_op(
      XSM_DEFAULT_ARG struct domain *d, uint64_t mode, uint32_t op)
  {
@@ -602,6 +603,7 @@ static XSM_INLINE int cf_check xsm_hvm_a
          return -EPERM;
      }
  }
+#endif /* CONFIG_ALTP2M */
#ifdef CONFIG_VM_EVENT
  static XSM_INLINE int cf_check xsm_mem_access(XSM_DEFAULT_ARG struct domain 
*d)
--- a/xen/include/xsm/hooks.h
+++ b/xen/include/xsm/hooks.h
@@ -106,7 +106,11 @@ XSM_HOOK(int, hypfs_op)
XSM_HOOK(int, hvm_param, struct domain *, unsigned long)
  XSM_HOOK(int, hvm_param_altp2mhvm, struct domain *)
+
+#ifdef CONFIG_ALTP2M
  XSM_HOOK(int, hvm_altp2mhvm_op, struct domain *, uint64_t, uint32_t)
+#endif
+
  XSM_HOOK(int, get_vnumainfo, struct domain *)
#ifdef CONFIG_VM_EVENT
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1393,6 +1393,7 @@ static int cf_check flask_hvm_param_altp
      return current_has_perm(d, SECCLASS_HVM, HVM__ALTP2MHVM);
  }
+#ifdef CONFIG_ALTP2M
  static int cf_check flask_hvm_altp2mhvm_op(struct domain *d, uint64_t mode, 
uint32_t op)
  {
      /*
@@ -1416,6 +1417,7 @@ static int cf_check flask_hvm_altp2mhvm_
return current_has_perm(d, SECCLASS_HVM, HVM__ALTP2MHVM_OP);
  }
+#endif /* CONFIG_ALTP2M */
#ifdef CONFIG_VM_EVENT
  static int cf_check flask_mem_access(struct domain *d)


Acked-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>



 


Rackspace

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