diff options
author | Olaf Hering <olaf@aepfle.de> | 2012-03-30 17:09:07 +0200 |
---|---|---|
committer | Olaf Hering <olaf@aepfle.de> | 2012-03-30 17:09:07 +0200 |
commit | 2f84bdc38b94ec6f4dff53051e39d9f8cc168de6 (patch) | |
tree | a611bee42fe8daf7be68a5afb5cc0f0d7af7ce91 | |
parent | 157b4d954c81f83409c19ed650c893eb38f8e376 (diff) | |
download | xen-2f84bdc38b94ec6f4dff53051e39d9f8cc168de6.tar.gz xen-2f84bdc38b94ec6f4dff53051e39d9f8cc168de6.tar.bz2 xen-2f84bdc38b94ec6f4dff53051e39d9f8cc168de6.zip |
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 <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>
-rw-r--r-- | tools/xenpaging/xenpaging.c | 5 | ||||
-rw-r--r-- | xen/arch/x86/mm/mem_event.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c index 5c1cd81ecc..52dbdaa9f3 100644 --- a/tools/xenpaging/xenpaging.c +++ b/tools/xenpaging/xenpaging.c @@ -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"); diff --git a/xen/arch/x86/mm/mem_event.c b/xen/arch/x86/mm/mem_event.c index 2986825380..5c7d6b7bc2 100644 --- a/xen/arch/x86/mm/mem_event.c +++ b/xen/arch/x86/mm/mem_event.c @@ -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; |