]> xenbits.xensource.com Git - xen.git/commitdiff
Revert "x86/pvh: Allow (un)map_pirq when dom0 is PVH"
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 30 Jul 2024 13:12:53 +0000 (14:12 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 30 Jul 2024 16:36:51 +0000 (17:36 +0100)
This reverts commit e42d107d0d8bfa82c92ec7ed69bac259effc97ad.

The Gitlab CI {adl,zen3p}-pci-hvm-x86-64-gcc-debug tests says this breaks PCI
Passthrough to HVM guests, with -EOPNOTSUPP.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/hypercall.c
xen/arch/x86/physdev.c

index 83a9b4fb1e127b12d37d9a566b741dec25df5a26..7fb3136f0c7ce8cde838704a03748d71ab977e8f 100644 (file)
@@ -71,14 +71,8 @@ long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
 
     switch ( cmd )
     {
-        /*
-        * Only being permitted for management of other domains.
-        * Further restrictions are enforced in do_physdev_op.
-        */
     case PHYSDEVOP_map_pirq:
     case PHYSDEVOP_unmap_pirq:
-        break;
-
     case PHYSDEVOP_eoi:
     case PHYSDEVOP_irq_status_query:
     case PHYSDEVOP_get_free_pirq:
index 9f30a8c63a06b4a89314ddf612a16c3c03067aa6..d6dd622952a94c8b79969954bcb11ee1e5d6fcaa 100644 (file)
@@ -323,11 +323,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( !d )
             break;
 
-        /* Only mapping when the subject domain has a notion of PIRQ */
-        if ( !is_hvm_domain(d) || has_pirq(d) )
-            ret = physdev_map_pirq(d, map.type, &map.index, &map.pirq, &msi);
-        else
-            ret = -EOPNOTSUPP;
+        ret = physdev_map_pirq(d, map.type, &map.index, &map.pirq, &msi);
 
         rcu_unlock_domain(d);
 
@@ -350,11 +346,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( !d )
             break;
 
-        /* Only unmapping when the subject domain has a notion of PIRQ */
-        if ( !is_hvm_domain(d) || has_pirq(d) )
-            ret = physdev_unmap_pirq(d, unmap.pirq);
-        else
-            ret = -EOPNOTSUPP;
+        ret = physdev_unmap_pirq(d, unmap.pirq);
 
         rcu_unlock_domain(d);