xenpaging: add error code to indicate iommem passthrough
PATCH 1/1 xenpaging: add error code to indicate iommem passthrough
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1333120147 -7200
# Node ID 34d9828185501f6e7ea2c3c2a397176a8e54ef0a # Parent 80653c8ea1d19dfe6130396bbc77f766eb9f9fab
xenpaging: add error code to indicate iommem passthrough
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.
tools/xenpaging/xenpaging.c +4 -1
@@ -378,7 +378,10 @@ static struct xenpaging *xenpaging_init(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" );
xen/arch/x86/mm/mem_event.c +2 -1
@@ -564,10 +564,11 @@ int mem_event_domctl(struct domain *d, xbreak ;/* 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 ;
Quoted 7 lines · Olaf Hering
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1333120147 -7200
# Node ID34d9828185501f6e7ea2c3c2a397176a8e54ef0a# Parent80653c8ea1d19dfe6130396bbc77f766eb9f9fab
xenpaging: add error code to indicate iommem passthrough
Quoted 7 lines
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.
I believe what I said was:
] I'll take a patch to change the return code if it also documents it in ] the hypercall interface. :)
This adds another funny errno and doesn't document anything!
Just to be clear: if you want to use these ERRNO values with something other than their usual meaning, then please add some comments in xen/include/public/domctl.h to describe what's going on.
Cheers,
Tim.
Quoted 38 lines
Signed-off-by Olaf Hering <[email protected]>diff -r
80653c8ea1d1-r34d982818550tools/xenpaging/xenpaging.ctools/xenpaging/xenpaging.c +4
-1@@ -378,7 +378,10 @@ static struct xenpaging *xenpaging_init(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" );diff -r
80653c8ea1d1-r34d982818550xen/arch/x86/mm/mem_event.cxen/arch/x86/mm/mem_event.c +2
-1@@ -564,10 +564,11 @@ int mem_event_domctl(struct domain *d, xbreak ;/* 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 ;_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Olaf Hering writes ("[Xen-devel] [PATCH] xenpaging: add error code to indicate iommem passthrough"):
Quoted 9 lines
xenpaging: add error code to indicate iommem passthrough
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.
The tools parts of this are fine.
Ian.
Tim Deegan
AppliedQuoted 11 lines · Olaf Hering
xenpaging: add error code to indicate iommem passthrough
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 <[email protected]>
Applied, thanks.
Tim.