x86/pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1
authorMukesh Rathor <mukesh.rathor@oracle.com>
Mon, 24 Mar 2014 08:47:59 +0000 (09:47 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 24 Mar 2014 08:47:59 +0000 (09:47 +0100)
A call to do_physdev_op with PHYSDEVOP_pirq_eoi_gmfn_v2/v1 will corrupt
struct hvm_domain when it writes to domain->arch.pv_domain.pirq_eoi_map.
Disallow that. Currently, such a path exists for linux dom0 pvh.

Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
xen/arch/x86/hvm/hvm.c

index 9dd56f7fc8a237061a70e78da5abd504fe3d86d2..08ab9cba375d9b27cfa86305dcfae013e78d8b62 100644 (file)
@@ -3427,6 +3427,12 @@ static long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
     case PHYSDEVOP_irq_status_query:
     case PHYSDEVOP_get_free_pirq:
         return do_physdev_op(cmd, arg);
+
+    /* pvh fixme: coming soon */
+    case PHYSDEVOP_pirq_eoi_gmfn_v1:
+    case PHYSDEVOP_pirq_eoi_gmfn_v2:
+        return -ENOSYS;
+
     }
 }