All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall.oss@gmail.com>
To: Manish Jaggi <mjaggi@caviumnetworks.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "Jaggi, Manish" <Manish.Jaggi@caviumnetworks.com>,
	Julien Grall <julien.grall@linaro.org>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: Issue With Patch Compilation Fails ( xen/arm: Introduce a generic way to describe device) with HAS_PCI and HAS_PASSTHROUGH.
Date: Wed, 08 Apr 2015 10:49:47 +0100	[thread overview]
Message-ID: <5524F9BB.5090902@gmail.com> (raw)
In-Reply-To: <5524F56F.1020700@caviumnetworks.com>



On 08/04/2015 10:31, Manish Jaggi wrote:
>>> There are lot of issues with pci_to_dev approach
>>> a) iommu_ops callbacks have a pci_dev parameter in x86 but have a device
>>> parameter in arm (smmu.c)
>>> b) hack is done to make device as pci_dev and that is not a good way
>>> of doing.
>>>
>>> I prefer having minimal/some redundancy of two functions rather than
>>> changing
>>> a lot of code.
>> Code duplication is harmful and it is not that minimal. In any case it
>> is good to have a common arch-independent infrastructure. However if you
>> don't like 6c5d3075d97ebe26661df063ee95b14168ad10f7, that's fine, you
>> can come up with a generalization that works better.
>>
> It is working now, I added a few changes in pci_dev->arch and device and
> implemented pci_to_dev for arm.
> For a short term this is ok, I have a generalization of individual
> device.h to include/xen/device.h. Will send that after merging of PCI
> passthrough patches.

The  first version of the commit 6c5d307 [1] was using a generic 
solution lying in xen/device.h. Although it has been "Nack" by Jan 
Beulich because it was increasing the amount of memory used on x86.

The current solution fits the requirement for both x86 (RAM usage) and 
ARM (support 2 kind of device) without duplication the IOMMU ops.

Regards,

[1] 
http://lists.xenproject.org/archives/html/xen-devel/2014-12/msg01659.html

-- 
Julien Grall

      reply	other threads:[~2015-04-08  9:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07 16:27 Issue With Patch Compilation Fails ( xen/arm: Introduce a generic way to describe device) with HAS_PCI and HAS_PASSTHROUGH Jaggi, Manish
2015-04-07 16:43 ` Stefano Stabellini
2015-04-08  5:35   ` Manish Jaggi
2015-04-08  6:54     ` Manish Jaggi
2015-04-08  9:23       ` Stefano Stabellini
2015-04-08  9:31         ` Manish Jaggi
2015-04-08  9:49           ` Julien Grall [this message]

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=5524F9BB.5090902@gmail.com \
    --to=julien.grall.oss@gmail.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Manish.Jaggi@caviumnetworks.com \
    --cc=julien.grall@linaro.org \
    --cc=mjaggi@caviumnetworks.com \
    --cc=stefano.stabellini@eu.citrix.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.