From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Malcolm Crossley <malcolm.crossley@citrix.com>
Cc: keir@xen.org, ian.campbell@citrix.com, andrew.cooper3@citrix.com,
tim@xen.org, xen-devel@lists.xen.org, jbeulich@suse.com,
dgdegra@tycho.nsa.gov
Subject: Re: [RFC PATCH 6/7] common/pv-iommu: Add foreign ops to PV-IOMMU interface
Date: Wed, 17 Feb 2016 16:11:00 -0500 [thread overview]
Message-ID: <20160217211100.GF25726@char.us.oracle.com> (raw)
In-Reply-To: <1455099035-17649-7-git-send-email-malcolm.crossley@citrix.com>
On Wed, Feb 10, 2016 at 10:10:34AM +0000, Malcolm Crossley wrote:
> Currently the ops are X86 only due to a dependency on the
> X86 only B2M implementation.
>
> Foreign ops conform to draft D of PV-IOMMU design.
>
> XSM control been implemented to allow full security control of
> these priviledged operatins.
But you missed the decleration of them in access_vectors, the
default policy in xen.te and also the implementation in the hooks.c
And that should all be part of the code that adds the new hypercall.
>
> Page references and page locking are taken before using B2M
> interface which is mandated by the B2M interface itself.
>
> Signed-off-by: Malcolm Crossley <malcolm.crossley@citrix.com>
> --
> Cc: dgdegra@tycho.nsa.gov
> Cc: jbeulich@suse.com
> Cc: ian.campbell@citrix.com
> Cc: keir@xen.org
> Cc: tim@xen.org
> Cc: andrew.cooper3@citrix.com
> Cc: xen-devel@lists.xen.org
> ---
> xen/common/pv_iommu.c | 269 ++++++++++++++++++++++++++++++++++++++++++
> xen/include/public/pv-iommu.h | 22 ++++
> xen/include/xsm/dummy.h | 6 +
> xen/include/xsm/xsm.h | 6 +
> xen/xsm/dummy.c | 1 +
> 5 files changed, 304 insertions(+)
>
> diff --git a/xen/common/pv_iommu.c b/xen/common/pv_iommu.c
> index 91485f3..bbf1a21 100644
> --- a/xen/common/pv_iommu.c
> +++ b/xen/common/pv_iommu.c
> @@ -21,7 +21,12 @@
> #include <asm/event.h>
> #include <xen/guest_access.h>
> #include <public/pv-iommu.h>
> +#include <xsm/xsm.h>
>
> +#ifdef CONFIG_X86
> +#include <asm/m2b.h>
> +#include <asm/setup.h>
> +#endif
> #define ret_t long
>
> static int get_paged_frame(unsigned long gfn, unsigned long *frame,
> @@ -79,6 +84,7 @@ void do_iommu_sub_op(struct pv_iommu_op *op)
> {
> struct domain *d = current->domain;
> struct domain *rd = NULL;
> + int ret;
>
> /* Only order 0 pages supported */
> if ( IOMMU_get_page_order(op->flags) != 0 )
> @@ -183,7 +189,270 @@ void do_iommu_sub_op(struct pv_iommu_op *op)
> op->status = 0;
> break;
> }
> +#ifdef CONFIG_X86
Why not move all of this in arch/x86/pv_iommu.c code that would
implement per-arch code?
> + case IOMMUOP_map_foreign_page:
Didn't look at the rest of the code - will when you repost.
next prev parent reply other threads:[~2016-02-17 21:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1455099035-17649-1-git-send-email-malcolm.crossley@citrix.com>
2016-02-10 10:10 ` [RFC PATCH 1/7] common/pv-iommu: Add stub hypercall for PV-IOMMU Malcolm Crossley
2016-02-10 10:36 ` Malcolm Crossley
2016-02-17 20:09 ` Konrad Rzeszutek Wilk
2016-02-10 10:10 ` [RFC PATCH 2/7] iommu: add iommu_lookup_page to lookup guest gfn for a particular IOMMU mapping Malcolm Crossley
2016-02-17 20:22 ` Konrad Rzeszutek Wilk
2016-02-24 15:08 ` George Dunlap
2016-02-24 15:10 ` Andrew Cooper
2016-02-10 10:10 ` [RFC PATCH 3/7] VT-d: Add iommu_lookup_page support Malcolm Crossley
2016-02-17 20:32 ` Konrad Rzeszutek Wilk
2016-02-10 10:10 ` [RFC PATCH 4/7] common/pv-iommu: Add query, map and unmap ops Malcolm Crossley
2016-02-17 21:05 ` Konrad Rzeszutek Wilk
2016-02-17 21:07 ` Konrad Rzeszutek Wilk
2016-02-10 10:10 ` [RFC PATCH 5/7] x86/m2b: Add a tracking structure for mfn to bfn mappings per page Malcolm Crossley
2016-02-24 17:07 ` George Dunlap
2016-02-10 10:10 ` [RFC PATCH 6/7] common/pv-iommu: Add foreign ops to PV-IOMMU interface Malcolm Crossley
2016-02-17 21:11 ` Konrad Rzeszutek Wilk [this message]
2016-02-10 10:10 ` [RFC PATCH 7/7] common/pv-iommu: Allow hardware_domain to pre IOMMU map foreign memory Malcolm Crossley
2016-02-10 10:33 ` [RFC PATCH 0/7] Implement Xen PV-IOMMU interface Malcolm Crossley
2016-02-17 20:12 ` Konrad Rzeszutek Wilk
2016-02-24 18:08 ` George Dunlap
2016-11-22 16:21 ` Martin Cerveny
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=20160217211100.GF25726@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=andrew.cooper3@citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=ian.campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=malcolm.crossley@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/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.