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

Re: [Xen-devel] [PATCH 5/7] xen/iommu: smmu-v3: Add Xen specific code to enable the ported driver



Hi Jan,

On 01/03/18 14:21, Jan Beulich wrote:
On 01.03.18 at 15:07, <julien.grall@xxxxxxx> wrote:
On 09/02/18 03:10, Sameer Goel wrote:
This driver follows an approach similar to smmu driver. The intent here
is to reuse as much Linux code as possible.
- Glue code has been introduced to bridge the API calls.
- Called Linux functions from the Xen IOMMU function calls.
- Xen modifications are preceded by /*Xen: comment */
- xen/linux_compat: Add a Linux compat header
    For porting files directly from Linux it is useful to have a function 
mapping
    definitions from Linux to Xen. This file adds common API functions and
    other defines that are needed for porting arm SMMU drivers.

I understand Roger asked for it, but that was not a really wise choice
given the size of this patch. Anyway, let's keep it like that.


Signed-off-by: Sameer Goel <sameer.goel@xxxxxxxxxx>
---
   xen/arch/arm/p2m.c                    |   1 +
   xen/drivers/Kconfig                   |   2 +
   xen/drivers/passthrough/arm/Kconfig   |   8 +
   xen/drivers/passthrough/arm/Makefile  |   1 +
   xen/drivers/passthrough/arm/smmu-v3.c | 892 
++++++++++++++++++++++++++++++++--
   xen/include/xen/linux_compat.h        |  84 ++++

You need to CC the REST maintainers for that.

And to be honest, I find adding such disgusting. We've imported
_lots_ of stuff from Linux, yet never needed things like gfp
definitions. I'm far from convinced that converting the new file
in at least some basic aspects to "Xen wording" would complicate
maintaining that file significantly. Headers included at the top
obviously can't use linux/ anyway, so it's never going to be a
verbatim copy.

What Sameer has been doing for SMMUv3 is following the word we did on the ARM SMMUv2 driver. The header is a suggestion for consolidating the macros over the files here.

Overall I think it makes sense to keep "Linux wording" as much as possible because those files are using Linux philosophy. But I would be open to suggestion here. So would you mind giving a list of things you consider "basic aspects to 'Xen wording'"?

Cheers,

--
Julien Grall

_______________________________________________
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®.