From: Wei Wang <wei.wang2@amd.com>
To: Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com,
JBeulich@suse.com, keir@xen.org
Cc: xen-devel@lists.xensource.com
Subject: [PATCH 2 of 6 V5] amd iommu: Add a hypercall for hvmloader
Date: Fri, 10 Feb 2012 16:07:07 +0100 [thread overview]
Message-ID: <3c47f70c84e23b96e766.1328886427@gran.amd.com> (raw)
In-Reply-To: <patchbomb.1328886425@gran.amd.com>
# HG changeset patch
# User Wei Wang <wei.wang2@amd.com>
# Date 1328885355 -3600
# Node ID 3c47f70c84e23b96e766c062a4bbae5bcf4f6dbe
# Parent 9cf24ad61936e5d9a6acac9de1dc1fac6694c31e
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 9cf24ad61936 -r 3c47f70c84e2 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c Fri Feb 10 15:49:09 2012 +0100
+++ b/xen/arch/x86/hvm/hvm.c Fri Feb 10 15:49:15 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;
@@ -3775,6 +3776,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 9cf24ad61936 -r 3c47f70c84e2 xen/include/public/hvm/params.h
--- a/xen/include/public/hvm/params.h Fri Feb 10 15:49:09 2012 +0100
+++ b/xen/include/public/hvm/params.h Fri Feb 10 15:49:15 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__ */
next prev parent reply other threads:[~2012-02-10 15:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-10 15:07 [PATCH 0 of 6 V5] amd iommu: support ats/gpgpu passthru on iommuv2 systems Wei Wang
2012-02-10 15:07 ` [PATCH 1 of 6 V5] amd iommu: Add 2 hypercalls for libxc Wei Wang
2012-02-10 15:29 ` Jan Beulich
2012-02-10 15:42 ` Wei Wang
2012-02-10 15:07 ` Wei Wang [this message]
2012-02-10 15:07 ` [PATCH 3 of 6 V5] hvmloader: Build IVRS table Wei Wang
2012-02-10 15:07 ` [PATCH 4 of 6 V5] libxc: add wrappers for new hypercalls Wei Wang
2012-02-10 15:07 ` [PATCH 5 of 6 V5] libxl: bind virtual bdf to physical bdf after device assignment Wei Wang
2012-02-10 15:07 ` [PATCH 6 of 6 V5] libxl: Introduce a new guest config file parameter Wei Wang
2012-02-13 16:54 ` [PATCH 0 of 6 V5] amd iommu: support ats/gpgpu passthru on iommuv2 systems Ian Jackson
2012-02-15 9:49 ` Wei Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3c47f70c84e23b96e766.1328886427@gran.amd.com \
--to=wei.wang2@amd.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).