All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>,
	tim@xen.org, Xiantao Zhang <xiantao.zhang@intel.com>,
	stefano.stabellini@citrix.com
Subject: Re: [PATCH v3 09/13] xen/passthrough: Introduce IOMMU ARM architecture
Date: Tue, 18 Mar 2014 19:58:06 +0000	[thread overview]
Message-ID: <5328A54E.9010502@linaro.org> (raw)
In-Reply-To: <1395160826.11824.15.camel@kazak.uk.xensource.com>

Hi Ian,

On 03/18/2014 04:40 PM, Ian Campbell wrote:
> On Tue, 2014-03-11 at 15:49 +0000, Julien Grall wrote:
>> @@ -754,7 +766,7 @@ static int map_device(struct domain *d, const struct dt_device_node *dev)
>>  }
>>  
>>  static int handle_node(struct domain *d, struct kernel_info *kinfo,
>> -                       const struct dt_device_node *node)
>> +                       struct dt_device_node *node)
>>  {
>>      static const struct dt_device_match skip_matches[] __initconst =
>>      {
>> @@ -775,7 +787,7 @@ static int handle_node(struct domain *d, struct kernel_info *kinfo,
>>          DT_MATCH_TIMER,
>>          { /* sentinel */ },
>>      };
>> -    const struct dt_device_node *child;
>> +    struct dt_device_node *child;
> 
> Why do these consts become unwanted?

Because map_device now calls iommu_assign_dt_device which will update
next_assigned in the structure dt_device_node.

>> diff --git a/xen/drivers/passthrough/arm/iommu.c b/xen/drivers/passthrough/arm/iommu.c
>> new file mode 100644
>> index 0000000..b0bd71d
>> --- /dev/null
>> +++ b/xen/drivers/passthrough/arm/iommu.c
> [...]
>> +int __init iommu_hardware_setup(void)
>> +{
>> +    struct dt_device_node *np;
>> +    int rc;
>> +    unsigned int num_iommus = 0;
>> +
>> +    dt_for_each_device_node(dt_host, np)
> 
> I can't find dt_host in this or any of the previous patches.

dt_host was defined a while ago by the device tree code (see
xen/include/xen/device_tree.h).

>> +    {
>> +        rc = device_init(np, DEVICE_IOMMU, NULL);
>> +        if ( !rc )
>> +            num_iommus++;
>> +    }
>> +
>> +    return ( num_iommus > 0 ) ? 0 : -ENODEV;
>> +}
>> +
>> +int arch_iommu_domain_init(struct domain *d)
>> +{
>> +    int ret;
>> +
>> +    ret = iommu_dt_domain_init(d);
>> +
>> +    return ret;
> 
> return iommu_dt-domain_init(d);
> ?

I will do the change in the next version.

>> diff --git a/xen/include/asm-arm/iommu.h b/xen/include/asm-arm/iommu.h
>> new file mode 100644
>> index 0000000..81eec83
>> --- /dev/null
>> +++ b/xen/include/asm-arm/iommu.h
>> [...]
>> +#define domain_hvm_iommu(d) (&d->arch.hvm_domain.hvm_iommu)
> 
> Does this macro give us the freedom to avoid the term "hvm" a bit and
> use d->arch.iommu?

It's possible, I just blindly copied from x86.

Regards,

-- 
Julien Grall

  reply	other threads:[~2014-03-18 19:58 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-11 15:49 [PATCH v3 00/13] IOMMU support for ARM Julien Grall
2014-03-11 15:49 ` [PATCH v3 01/13] xen/common: grant-table: only call IOMMU if paging mode translate is disabled Julien Grall
2014-03-11 15:49 ` [PATCH v3 02/13] xen/passthrough: amd: Remove domain_id from hvm_iommu Julien Grall
2014-03-18 16:19   ` Ian Campbell
2014-03-18 16:32     ` Jan Beulich
2014-03-11 15:49 ` [PATCH v3 03/13] xen/dts: Add dt_property_read_bool Julien Grall
2014-03-11 15:49 ` [PATCH v3 04/13] xen/dts: Add dt_parse_phandle_with_args and dt_parse_phandle Julien Grall
2014-03-18 16:20   ` Ian Campbell
2014-03-11 15:49 ` [PATCH v3 05/13] xen/passthrough: rework dom0_pvh_reqs to use it also on ARM Julien Grall
2014-03-18 16:22   ` Ian Campbell
2014-03-18 17:28     ` Julien Grall
2014-03-18 17:50       ` Ian Campbell
2014-03-18 18:19         ` Julien Grall
2014-03-19 10:01           ` Ian Campbell
2014-03-11 15:49 ` [PATCH v3 06/13] xen/passthrough: iommu: Split generic IOMMU code Julien Grall
2014-03-11 16:50   ` Jan Beulich
2014-03-11 17:09     ` Julien Grall
2014-03-12  7:15       ` Jan Beulich
2014-03-18 16:24   ` Ian Campbell
2014-03-18 17:36     ` Julien Grall
2014-03-18 17:50       ` Ian Campbell
2014-03-18 18:21         ` Julien Grall
2014-03-19 10:02           ` Ian Campbell
2014-03-11 15:49 ` [PATCH v3 07/13] xen/passthrough: iommu: Introduce arch specific code Julien Grall
2014-03-11 16:15   ` Julien Grall
2014-03-11 16:53   ` Jan Beulich
2014-03-18 16:27   ` Ian Campbell
2014-03-18 19:40     ` Julien Grall
2014-03-11 15:49 ` [PATCH v3 08/13] xen/passthrough: iommu: Basic support of device tree assignment Julien Grall
2014-03-11 16:55   ` Jan Beulich
2014-03-18 16:33   ` Ian Campbell
2014-03-18 19:46     ` Julien Grall
2014-03-19 10:12       ` Ian Campbell
2014-03-19 10:42         ` Julien Grall
2014-03-19 10:54           ` Ian Campbell
2014-03-11 15:49 ` [PATCH v3 09/13] xen/passthrough: Introduce IOMMU ARM architecture Julien Grall
2014-03-18 16:40   ` Ian Campbell
2014-03-18 19:58     ` Julien Grall [this message]
2014-03-19 10:29       ` Ian Campbell
2014-03-11 15:49 ` [PATCH v3 10/13] MAINTAINERS: Add drivers/passthrough/arm Julien Grall
2014-03-11 15:49 ` [PATCH v3 11/13] xen/arm: Don't give IOMMU devices to dom0 when iommu is disabled Julien Grall
2014-03-18 16:41   ` Ian Campbell
2014-03-11 15:49 ` [PATCH v3 12/13] xen/arm: Add the property "protected-devices" in the hypervisor node Julien Grall
2014-03-18 16:48   ` Ian Campbell
2014-03-18 20:09     ` Julien Grall
2014-03-19 10:33       ` Ian Campbell
2014-04-03 21:51         ` Julien Grall
2014-04-04  9:40           ` Ian Campbell
2014-04-04 10:25             ` Julien Grall
2014-04-04 10:28               ` Ian Campbell
2014-04-04 10:39                 ` Julien Grall
2014-04-04 10:48                   ` Ian Campbell
2014-04-04 11:01                     ` Julien Grall
2014-04-04 11:13                       ` Ian Campbell
2014-04-04 11:23                         ` Julien Grall
2014-04-04 12:45                           ` Ian Campbell
2014-04-04 13:10                             ` Julien Grall
2014-04-04 13:18                               ` Ian Campbell
2014-03-11 15:49 ` [PATCH v3 13/13] drivers/passthrough: arm: Add support for SMMU drivers Julien Grall
2014-03-18 16:54   ` Ian Campbell
2014-03-18 20:25     ` Julien Grall
2014-03-19 10:35       ` Ian Campbell
2014-03-19 10:44         ` Julien Grall

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=5328A54E.9010502@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xiantao.zhang@intel.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.