[RFC PATCH v6 43/43] arm/p2m: Add support for HVMOP_altp2m_set_domain_state

Rose Spangler posted 43 patches 3 months, 3 weeks ago
[RFC PATCH v6 43/43] arm/p2m: Add support for HVMOP_altp2m_set_domain_state
Posted by Rose Spangler 3 months, 3 weeks ago
This commit enables the HVMOP_altp2m_set_domain_state command on ARM, since
all prerequisite functions have been implemented. This makes it possible
to activate altp2m on a domain.

This is commit 1/1 of the set_domain_state phase.

Signed-off-by: Rose Spangler <Rose.Spangler@elektrobit.com>
---
v6: Introduced this patch.

    This patch replaces the "arm/p2m: Add HVMOP_altp2m_set_domain_state"
    patch from the v4/v5 patch series.
---
 xen/common/altp2m.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/common/altp2m.c b/xen/common/altp2m.c
index d980ebed08ab..951e56a2aba5 100644
--- a/xen/common/altp2m.c
+++ b/xen/common/altp2m.c
@@ -254,17 +254,18 @@ int do_altp2m_op(
         rc = __copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
         break;
 
-#ifdef CONFIG_X86
     case HVMOP_altp2m_set_domain_state:
     {
         struct vcpu *v;
         bool ostate;
 
+#if defined(CONFIG_X86) && defined(CONFIG_HVM)
         if ( nestedhvm_enabled(d) )
         {
             rc = -EINVAL;
             break;
         }
+#endif
 
         rc = domain_pause_except_self(d);
         if ( rc )
@@ -295,6 +296,7 @@ int do_altp2m_op(
         break;
     }
 
+#ifdef CONFIG_X86
     case HVMOP_altp2m_vcpu_enable_notify:
     {
         struct vcpu *v;
-- 
2.34.1