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

Re: [PATCH 09/24] XSM: make .hvm_param*() hooks dependent upon HVM=y


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Sun, 2 Aug 2026 11:05:36 -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=1785683132; 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=kjBmZcGw1BB42KQvYs/PpCClxsoGAWvtXvcmYYyz9s0=; b=VVFMidnOq0R+4tZfTf65HbPRZ4tF8Q3bVxzyQBgU+MoqUBIBzmXw9ibdzmBqR+wNQeOqqLBsAw2hAi55Q+pWUYgnnunDjq3/GuDrpd46qxvERVoM3uE/v5Xix0kLTmQxuWymRRccbAds3rGSHjL9gGvt/uE5oh6KnYPzrVGNPMw=
  • Arc-seal: i=1; a=rsa-sha256; t=1785683132; cv=none; d=zohomail.com; s=zohoarc; b=ZqRPG8fvxCgZkK6LfxcjzyLWWaAJMA0zF2gyrQYLnCF5YUoYJ3JZbEhgIBp0Fm+EjJlstpnaOPFEIUG2/nr9RH6xEvr7Zz5A/oFqUwsd2/bZPs4bewecFkTABqk3zlVo7mkYXOqAn3hHfeIu8d6K5rraOSYcOLwj2Ns9IHu9dnQ=
  • 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 15:05:37 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>



On 7/28/26 9:17 AM, Jan Beulich wrote:
They're unreachable / dead otherwise.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Strictly speaking .hvm_param_altp2mhvm() is dependent upon X86=y as well
(but oddly not dependent upon ALTP2M=y).


At a minimum, would it be worth at least adding a comment about the dependency? Note, this is just a question/suggestion.

--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -569,6 +569,8 @@ static XSM_INLINE int cf_check xsm_map_g
      return xsm_default_action(action, d, t);
  }
+#ifdef CONFIG_HVM
+
  static XSM_INLINE int cf_check xsm_hvm_param(
      XSM_DEFAULT_ARG struct domain *d, unsigned long op)
  {
@@ -583,6 +585,8 @@ static XSM_INLINE int cf_check xsm_hvm_p
      return xsm_default_action(action, current->domain, d);
  }
+#endif /* CONFIG_HVM */
+
  #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)
--- a/xen/include/xsm/hooks.h
+++ b/xen/include/xsm/hooks.h
@@ -104,8 +104,10 @@ XSM_HOOK(int, pci_config_permission, str
  XSM_HOOK(int, hypfs_op)
  #endif
+#ifdef CONFIG_HVM
  XSM_HOOK(int, hvm_param, struct domain *, unsigned long)
  XSM_HOOK(int, hvm_param_altp2mhvm, struct domain *)
+#endif
#ifdef CONFIG_ALTP2M
  XSM_HOOK(int, hvm_altp2mhvm_op, struct domain *, uint64_t, uint32_t)
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1368,6 +1368,8 @@ static int cf_check flask_map_gmfn_forei
      return domain_has_perm(d, t, SECCLASS_MMU, MMU__MAP_READ | 
MMU__MAP_WRITE);
  }
+#ifdef CONFIG_HVM
+
  static int cf_check flask_hvm_param(struct domain *d, unsigned long op)
  {
      uint32_t perm;
@@ -1393,6 +1395,8 @@ static int cf_check flask_hvm_param_altp
      return current_has_perm(d, SECCLASS_HVM, HVM__ALTP2MHVM);
  }
+#endif /* CONFIG_HVM */
+
  #ifdef CONFIG_ALTP2M
  static int cf_check flask_hvm_altp2mhvm_op(struct domain *d, uint64_t mode, 
uint32_t op)
  {


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®.