]> xenbits.xensource.com Git - xen.git/commitdiff
xenpaging: add error code to indicate iommem passthrough
authorOlaf Hering <olaf@aepfle.de>
Fri, 30 Mar 2012 15:09:07 +0000 (17:09 +0200)
committerOlaf Hering <olaf@aepfle.de>
Fri, 30 Mar 2012 15:09:07 +0000 (17:09 +0200)
Similar to the existing ENODEV and EXDEV error codes, add EMDEV to
indicate that iommu passthrough is not compatible with paging.
All error codes are just made-up return codes to give proper error
messages in the pager.

Also update the HAP related error message now that paging is enabled
also on AMD hosts.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <Ian.Jackson@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
tools/xenpaging/xenpaging.c
xen/arch/x86/mm/mem_event.c

index 5c1cd81ecc91183b11389872acd16c1259f82962..52dbdaa9f38cd9d65e089891f8b0f5a5d9809ad4 100644 (file)
@@ -378,7 +378,10 @@ static struct xenpaging *xenpaging_init(int argc, char *argv[])
                 ERROR("xenpaging is (or was) active on this domain");
                 break;
             case ENODEV:
-                ERROR("EPT not supported for this guest");
+                ERROR("xenpaging requires Hardware Assisted Paging");
+                break;
+            case EMLINK:
+                ERROR("xenpaging not supported while iommu passthrough is enabled");
                 break;
             case EXDEV:
                 ERROR("xenpaging not supported in a PoD guest");
index 2986825380884e4712d45bab27e64945becc2442..5c7d6b7bc272fa4e2bab4641074c09e95a1056d3 100644 (file)
@@ -564,10 +564,11 @@ int mem_event_domctl(struct domain *d, xen_domctl_mem_event_op_t *mec,
                 break;
 
             /* No paging if iommu is used */
-            rc = -EXDEV;
+            rc = -EMLINK;
             if ( unlikely(need_iommu(d)) )
                 break;
 
+            rc = -EXDEV;
             /* Disallow paging in a PoD guest */
             if ( p2m->pod.entry_count )
                 break;