All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Wang <wei.wang2@amd.com>
To: xen-devel@lists.xensource.com
Subject: Fwd: [osrc-patches] [PATCH 3 of 7 V4] amd iommu: Add a hypercall for hvmloader
Date: Fri, 20 Jan 2012 16:55:59 +0100	[thread overview]
Message-ID: <4F198E8F.2020502@amd.com> (raw)
In-Reply-To: <c5cd29b41f2526bb4f93.1327074283@gran.amd.com>

# 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

           reply	other threads:[~2012-01-20 15:55 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <c5cd29b41f2526bb4f93.1327074283@gran.amd.com>]

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=4F198E8F.2020502@amd.com \
    --to=wei.wang2@amd.com \
    --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.