* Fwd: [osrc-patches] [PATCH 3 of 7 V4] amd iommu: Add a hypercall for hvmloader
[not found] <c5cd29b41f2526bb4f93.1327074283@gran.amd.com>
@ 2012-01-20 15:55 ` Wei Wang
0 siblings, 0 replies; only message in thread
From: Wei Wang @ 2012-01-20 15:55 UTC (permalink / raw)
To: xen-devel
# HG changeset patch
# User Wei Wang <wei.wang2@amd.com>
# Date 1327066823 -3600
# Node ID c5cd29b41f2526bb4f93c76ceade924feac1f1c3
# Parent ea3af8fa078c07d357de79931a102450b59156ea
amd iommu: Add a hypercall for hvmloader.
IOMMU MMIO base address is dynamically allocated by firmware.
This patch allows hvmloader to notify hypervisor where the
iommu mmio pages are.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
diff -r ea3af8fa078c -r c5cd29b41f25 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c Fri Jan 20 14:40:20 2012 +0100
+++ b/xen/arch/x86/hvm/hvm.c Fri Jan 20 14:40:23 2012 +0100
@@ -65,6 +65,7 @@
#include <public/memory.h>
#include <asm/mem_event.h>
#include <public/mem_event.h>
+#include <asm/hvm/svm/amd-iommu-proto.h>
bool_t __read_mostly hvm_enabled;
@@ -3673,6 +3674,9 @@ long do_hvm_op(unsigned long op, XEN_GUE
case HVM_PARAM_BUFIOREQ_EVTCHN:
rc = -EINVAL;
break;
+ case HVM_PARAM_IOMMU_BASE:
+ rc = guest_iommu_set_base(d, a.value);
+ break;
}
if ( rc == 0 )
diff -r ea3af8fa078c -r c5cd29b41f25 xen/include/public/hvm/params.h
--- a/xen/include/public/hvm/params.h Fri Jan 20 14:40:20 2012 +0100
+++ b/xen/include/public/hvm/params.h Fri Jan 20 14:40:23 2012 +0100
@@ -141,7 +141,8 @@
/* Boolean: Enable nestedhvm (hvm only) */
#define HVM_PARAM_NESTEDHVM 24
+#define HVM_PARAM_IOMMU_BASE 27
-#define HVM_NR_PARAMS 27
+#define HVM_NR_PARAMS 28
#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
_______________________________________________
osrc-patches mailing list
osrc-patches@elbe.amd.com
https://elbe.amd.com/mailman/listinfo/osrc-patches
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-20 15:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <c5cd29b41f2526bb4f93.1327074283@gran.amd.com>
2012-01-20 15:55 ` Fwd: [osrc-patches] [PATCH 3 of 7 V4] amd iommu: Add a hypercall for hvmloader Wei Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).