[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v7 1/7] public / x86: introduce __HYPERCALL_iommu_op



>>> On 15.10.18 at 12:35, <paul.durrant@xxxxxxxxxx> wrote:
> --- a/xen/common/Makefile
> +++ b/xen/common/Makefile
> @@ -13,6 +13,7 @@ obj-$(CONFIG_CRASH_DEBUG) += gdbstub.o
>  obj-y += grant_table.o
>  obj-y += guestcopy.o
>  obj-bin-y += gunzip.init.o
> +obj-$(CONFIG_X86) += iommu_op.o

I'm afraid I didn't notice this placement in earlier versions. Doesn't
the new hypercalls as a prereq take host IOMMU functionality? If
so, why would this not live in e.g. drivers/passthrough/ (under
this or perhaps a different name)?

Also now that we have full PV and HVM separation - is the
hypercall meant to be usable by both types of guests from the
very beginning? Otherwise conditionals will need to be
introduced above (expressed by the common list model if at all
possible) or in the source file.

> --- /dev/null
> +++ b/xen/common/iommu_op.c
> @@ -0,0 +1,193 @@
> +/******************************************************************************
> + * iommu_op.c
> + *
> + * Paravirtualised IOMMU functionality
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; If not, see <http://www.gnu.org/licenses/>.
> + *
> + * Copyright (C) 2018 Citrix Systems Inc
> + */
> +
> +#include <xen/event.h>
> +#include <xen/guest_access.h>
> +#include <xen/hypercall.h>
> +
> +static void iommu_op(xen_iommu_op_t *op)
> +{
> +    switch ( op->op )
> +    {
> +    default:
> +        op->status = -EOPNOTSUPP;
> +        break;
> +    }
> +}
> +
> +int do_one_iommu_op(xen_iommu_op_buf_t *buf)

static? const?

> +#ifdef CONFIG_COMPAT
> +
> +int compat_one_iommu_op(compat_iommu_op_buf_t *buf)

Same here.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.