diff mbox series

[16/23] xsm/dummy: Allow hwdom xen_version

Message ID 20250306220343.203047-17-jason.andryuk@amd.com (mailing list archive)
State New
Headers show
Series ARM split hardware and control domains | expand

Commit Message

Jason Andryuk March 6, 2025, 10:03 p.m. UTC
Running xl queries XENVER_commandline and XENVER_build_id.  The hardware
domain should have access to the command line.  The hardware domain is
at least semi-trusted - just allow it access to all the xen_version
info.

Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
---
 xen/include/xsm/dummy.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 4536ee5dad..9e6bc0ed12 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -859,6 +859,8 @@  static XSM_INLINE int cf_check xsm_xen_version(XSM_DEFAULT_ARG uint32_t op)
         /* These MUST always be accessible to any guest by default. */
         return xsm_default_action(XSM_HOOK, current->domain, NULL);
     default:
+        if ( is_hardware_domain(current->domain) )
+            return xsm_default_action(XSM_HW_PRIV, current->domain, NULL);
         return xsm_default_action(XSM_PRIV, current->domain, NULL);
     }
 }