xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Xu, Quan" <quan.xu@intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "Nakajima, Jun" <jun.nakajima@intel.com>,
	Keir Fraser <keir@xen.org>, Jan Beulich <jbeulich@suse.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	"Wu, Feng" <feng.wu@intel.com>
Subject: Re: [PATCH 2/2] IOMMU/MMU: Adjust low level functions for VT-d Device-TLB flush error.
Date: Fri, 18 Mar 2016 02:30:06 +0000	[thread overview]
Message-ID: <945CA011AD5F084CBEA3E851C0AB28894B8670AD@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D15F7EC7CE@SHSMSX101.ccr.corp.intel.com>

On March 17, 2016 3:38pm, Tian, Kevin <kevin.tian@intel.com> wrote:
> > From: Xu, Quan
> > Sent: Thursday, March 17, 2016 2:55 PM
> >
> > Current code would be panic(), when VT-d Device-TLB flush timed out.
> > the panic() is going to be eliminated, so we must check all kinds of
> > error and all the way up the call trees.
> 
> sorry that I'm unclear what is the criteria of defining high level and low level
> functions in two patches. Could you elaborate? Once I thought you may mean
> common code and vendor specific code, however...
> 

In this patch set, it is adjusting top level functions of the call tree first, and working my way down to leaf ones.
I tried to define that top level is mainly about MMU, and the low level is mainly about IOMMU. Mixed things are in
Consideration of compiling and simplification. For high level of these call trees, IMO it is a reasonable attempt at splitting things.


> >  xen/arch/x86/mm/p2m-ept.c                     |   2 +-
> >  xen/drivers/passthrough/amd/iommu_init.c      |  12 ++-
> >  xen/drivers/passthrough/amd/pci_amd_iommu.c   |   2 +-
> >  xen/drivers/passthrough/arm/smmu.c            |  10 ++-
> >  xen/drivers/passthrough/iommu.c               |  17 ++--
> >  xen/drivers/passthrough/vtd/extern.h          |   2 +-
> >  xen/drivers/passthrough/vtd/iommu.c           | 120
> > ++++++++++++++++++--------
> >  xen/drivers/passthrough/vtd/quirks.c          |  26 +++---
> >  xen/include/asm-x86/hvm/svm/amd-iommu-proto.h |   2 +-
> >  xen/include/asm-x86/iommu.h                   |   2 +-
> >  xen/include/xen/iommu.h                       |   6 +-
> 
> Above you have general passthrough/iommu.c though most of others are
> vendor specific.
> 


 .e.g, as the 'struct iommu_ops' is common structure for arm/amd/intel.


> Then in PATCH [1/2], you have:
> 
> xen/arch/x86/acpi/power.c             | 14 +++++++++++++-
>  xen/arch/x86/mm.c                     | 13 ++++++++-----
>  xen/arch/x86/mm/p2m-ept.c             | 10 +++++++++-
>  xen/arch/x86/mm/p2m-pt.c              | 12 ++++++++++--
>  xen/common/grant_table.c              |  5 +++--
>  xen/common/memory.c                   |  5 +++--
>  xen/drivers/passthrough/iommu.c       | 16 +++++++++++-----
>  xen/drivers/passthrough/vtd/x86/vtd.c |  7 +++++--
>  xen/drivers/passthrough/x86/iommu.c   |  6 +++++-
>  xen/include/xen/iommu.h               |  6 +++---
> 
> They are also mixed.
> 

It is in Consideration of compiling and simplification. 
 e.g. for this call tree,  ...--iommu_suspend()--device_power_down()--...
 device_power_down() is in -xen/arch/x86/acpi/power.c
 iommu_suspend() is in -xen/drivers/passthrough/iommu.c

when I tried to return error code from iommu_suspend(), which is with 'void' annotation.
I need change it from 'void' to 'int', then it is unavoidable to mix things.

Any good idea? To be honest, I am very tired to at splitting things like this :).


Quan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-03-18  2:30 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17  6:54 [PATCH 0/2] Check " Quan Xu
2016-03-17  6:54 ` [PATCH 1/2] IOMMU/MMU: Adjust top level functions for " Quan Xu
2016-03-17  7:32   ` Tian, Kevin
2016-03-17  7:58     ` Jan Beulich
2016-03-17  8:00       ` Tian, Kevin
2016-03-17 12:30   ` George Dunlap
2016-03-17 12:33     ` George Dunlap
2016-03-18  3:19       ` Xu, Quan
2016-03-18  8:09         ` Jan Beulich
2016-03-24  6:45           ` Xu, Quan
2016-03-18  7:54     ` Xu, Quan
2016-03-18  8:19       ` Jan Beulich
2016-03-18  9:09         ` Xu, Quan
2016-03-18  9:29           ` Jan Beulich
2016-03-18  9:38             ` Dario Faggioli
2016-03-18  9:48               ` Jan Beulich
2016-03-21  6:18                 ` Tian, Kevin
2016-03-21 12:22                   ` Jan Beulich
2016-03-24  9:02                 ` Xu, Quan
2016-03-24  9:58                   ` Jan Beulich
2016-03-24 14:12                     ` Xu, Quan
2016-03-24 14:37                       ` Jan Beulich
2016-03-17 17:14   ` Jan Beulich
2016-03-28  3:33     ` Xu, Quan
2016-03-29  7:20       ` Jan Beulich
2016-03-30  2:28         ` Xu, Quan
2016-03-30  2:35           ` Xu, Quan
2016-03-30  8:05           ` Jan Beulich
2016-03-17  6:54 ` [PATCH 2/2] IOMMU/MMU: Adjust low " Quan Xu
2016-03-17  7:37   ` Tian, Kevin
2016-03-18  2:30     ` Xu, Quan [this message]
2016-03-18  8:06       ` Jan Beulich
2016-03-21  5:01         ` Tian, Kevin
2016-03-17 15:31   ` George Dunlap
2016-03-18  6:57     ` Xu, Quan
2016-03-18 10:20   ` Jan Beulich
2016-03-25  9:27     ` Xu, Quan
2016-03-29  7:36       ` Jan Beulich
2016-04-11  3:09         ` Xu, Quan
2016-04-11  3:27           ` Xu, Quan
2016-04-11 16:34             ` Jan Beulich
2016-04-12  1:09               ` Xu, Quan

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=945CA011AD5F084CBEA3E851C0AB28894B8670AD@SHSMSX101.ccr.corp.intel.com \
    --to=quan.xu@intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=feng.wu@intel.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=xen-devel@lists.xen.org \
    --subject='Re: [PATCH 2/2] IOMMU/MMU: Adjust low level functions for VT-d Device-TLB flush error.' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).