From: Baoquan He <bhe@redhat.com>
To: Bill Sumner <bill.sumner@hp.com>
Cc: indou.takao@jp.fujitsu.com, linux-pci@vger.kernel.org,
kexec@lists.infradead.org, iommu@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, alex.williamson@redhat.com,
ddutile@redhat.com, doug.hatch@hp.com,
ishii.hironobu@jp.fujitsu.com, bhelgaas@google.com,
dwmw2@infradead.org
Subject: Re: [PATCHv2 4/6] Crashdump-Accepting-Active-IOMMU-Copy-Translations
Date: Fri, 20 Dec 2013 15:25:57 +0800 [thread overview]
Message-ID: <20131220072557.GA4382@dhcp-16-105.nay.redhat.com> (raw)
In-Reply-To: <20131220060429.GB32194@dhcp-16-116.nay.redhat.com>
On 12/20/13 at 02:04pm, Baoquan He wrote:
> On 12/19/13 at 07:49pm, Bill Sumner wrote:
>
> > +static int copy_page_addr(u64 page_addr, u32 shift, u32 bus, u32 devfn,
> > + u64 pte, struct dmar_domain *domain,
> > + void *parms)
> > +{
> > + struct copy_page_addr_parms *ppap = parms;
> > +
> > + u64 page_size = ((u64)1 << shift); /* page_size */
> > + u64 pfn_lo; /* For reserving IOVA range */
> > + u64 pfn_hi; /* For reserving IOVA range */
> > + struct iova *iova_p; /* For reserving IOVA range */
> > +
> > + if (!ppap) {
> > + pr_err("ERROR: ppap is NULL: 0x%3.3x(%3.3d) DevFn: 0x%3.3x(%3.3d) Page: 0x%16.16llx Size: 0x%16.16llx(%lld)\n",
> > + bus, bus, devfn, devfn, page_addr,
> > + page_size, page_size);
> > + return 0;
> > + }
> > +
>
> > + /* Prepare for a new page */
> > + ppap->first = 0; /* Not first-time anymore */
> > + ppap->bus = bus;
> > + ppap->devfn = devfn;
> > + ppap->shift = shift;
> > + ppap->pte = pte;
> > + ppap->next_addr = page_addr + page_size; /* Next-expected page_addr */
> > +
> > + ppap->page_addr = page_addr; /* Addr(new page) */
> > + ppap->page_size = page_size; /* Size(new page) */
> > +
> > + ppap->domain = domain; /* adr(domain for the new range) */
>
> Here I am confused, ppap is used to collect the copied ranges and
> necessary information. To my understanding, this domain is the
> dmar_domain which the 1st device is on. When ppat->last is set to 1,
> among the whole collected range, there may be many domains. I just feel
> not good for this. Is it OK to define a specific lock for ppap
> structure, possibly? Please correct me if I am wrong.
Well, check it again. It's not about the lock. Just all address is
recorded in one dmar_domain.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-12-20 7:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 2:49 [PATCHv2 0/6] Crashdump Accepting Active IOMMU Bill Sumner
2013-12-20 2:49 ` [PATCHv2 1/6] Crashdump-Accepting-Active-IOMMU-Flags-and-Prototype Bill Sumner
2013-12-20 2:49 ` [PATCHv2 2/6] Crashdump-Accepting-Active-IOMMU-Utility-functions Bill Sumner
2013-12-20 2:49 ` [PATCHv2 3/6] Crashdump-Accepting-Active-IOMMU-Domain-Interfaces Bill Sumner
2013-12-20 2:49 ` [PATCHv2 4/6] Crashdump-Accepting-Active-IOMMU-Copy-Translations Bill Sumner
2013-12-20 6:04 ` Baoquan He
2013-12-20 7:25 ` Baoquan He [this message]
2014-01-09 21:13 ` Sumner, William
2013-12-20 2:49 ` [PATCHv2 5/6] Crashdump-Accepting-Active-IOMMU-Debug-Print-IOMMU Bill Sumner
2013-12-20 2:49 ` [PATCHv2 6/6] Crashdump-Accepting-Active-IOMMU-Call-From-Mainline Bill Sumner
2013-12-20 5:41 ` [PATCHv2 0/6] Crashdump Accepting Active IOMMU Baoquan He
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=20131220072557.GA4382@dhcp-16-105.nay.redhat.com \
--to=bhe@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=bill.sumner@hp.com \
--cc=ddutile@redhat.com \
--cc=doug.hatch@hp.com \
--cc=dwmw2@infradead.org \
--cc=indou.takao@jp.fujitsu.com \
--cc=iommu@lists.linux-foundation.org \
--cc=ishii.hironobu@jp.fujitsu.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox