From: Wei Wang <wei.wang2@amd.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Jan Beulich <JBeulich@suse.com>, Keir Fraser <keir@xen.org>
Subject: [PATCH 2 of 6 V6] amd iommu: call guest_iommu_set_base from hvmloader
Date: Wed, 26 Sep 2012 16:46:50 +0200 [thread overview]
Message-ID: <5063155A.4070307@amd.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2 bytes --]
[-- Attachment #2: 0002-amd-iommu-call-guest_iommu_set_base-from-hvmloader.patch --]
[-- Type: text/plain, Size: 1724 bytes --]
From 8110e0a223488a1123fa805051905d8788610cf2 Mon Sep 17 00:00:00 2001
From: Wei Wang <wei.wang2@amd.com>
Date: Wed, 26 Sep 2012 11:44:19 +0200
Subject: [PATCH 2/6] amd iommu: call guest_iommu_set_base from 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>
---
xen/arch/x86/hvm/hvm.c | 4 ++++
xen/include/public/hvm/params.h | 3 ++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index d69e419..e5c1e32 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -66,6 +66,7 @@
#include <asm/mem_event.h>
#include <asm/mem_access.h>
#include <public/mem_event.h>
+#include <asm/hvm/svm/amd-iommu-proto.h>
bool_t __read_mostly hvm_enabled;
@@ -3834,6 +3835,9 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE(void) arg)
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 --git a/xen/include/public/hvm/params.h b/xen/include/public/hvm/params.h
index 6b05f61..aab6b7a 100644
--- a/xen/include/public/hvm/params.h
+++ b/xen/include/public/hvm/params.h
@@ -140,7 +140,8 @@
#define HVM_PARAM_PAGING_RING_PFN 27
#define HVM_PARAM_ACCESS_RING_PFN 28
#define HVM_PARAM_SHARING_RING_PFN 29
+#define HVM_PARAM_IOMMU_BASE 30
-#define HVM_NR_PARAMS 30
+#define HVM_NR_PARAMS 31
#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
--
1.7.4
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next reply other threads:[~2012-09-26 14:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 14:46 Wei Wang [this message]
2012-09-27 8:27 ` [PATCH 2 of 6 V6] amd iommu: call guest_iommu_set_base from hvmloader Jan Beulich
2012-10-15 10:00 ` Wei Wang
2012-10-15 10:11 ` Jan Beulich
2012-10-15 12:23 ` Wei Wang
2012-10-15 12:52 ` Jan Beulich
2012-10-15 13:41 ` Wei Wang
2012-10-15 13:51 ` Jan Beulich
2012-10-30 0:56 ` Zhang, Yang Z
-- strict thread matches above, loose matches on Subject: below --
2012-03-08 13:21 [PATCH 0 of 6 V6] amd iommu: support ats/gpgpu passthru on iommuv2 systems Wei Wang
2012-03-08 13:21 ` [PATCH 2 of 6 V6] amd iommu: call guest_iommu_set_base from hvmloader 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=5063155A.4070307@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.