From: Jean Guyader <jean.guyader@eu.citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"Kay, Allen M" <allen.m.kay@intel.com>,
"Han, Weidong" <weidong.han@intel.com>,
Jean Guyader <Jean.Guyader@citrix.com>,
Ian Pratt <Ian.Pratt@eu.citrix.com>,
Ross Philipson <Ross.Philipson@citrix.com>,
Jean Guyader <jean.guyader@gmail.com>
Subject: Re: [PATCH][VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through
Date: Sat, 5 Jun 2010 09:40:10 +0100 [thread overview]
Message-ID: <20100605084010.GA16920@angi.xci-test.com> (raw)
In-Reply-To: <20100604203040.GC28034@phenom.dumpdata.com>
[-- Attachment #1: Type: text/plain, Size: 616 bytes --]
On Fri, Jun 04, 2010 at 09:30:40PM +0100, Konrad Rzeszutek Wilk wrote:
> > Yes, to take more time to do an FLR on those platform, but I don't think
> > this is a proper fix. The fix we have for that in our tree (XCI) is to make
> > sure the value we write when we restore the pci config space stick in
> > pciback.
> >
> > I'll send the patch later today,
>
> Please send it to me as well so I can stick in the proper pv-ops tree.
Thanks Konrad.
Here is the patch for a 2.6.27 kernel.
pciback: Verify write when restoring the pci config space after FLR
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
[-- Attachment #2: pciback-verify-write-after-flr --]
[-- Type: text/plain, Size: 1002 bytes --]
diff --git a/drivers/xen/pciback/pciback_ops.c b/drivers/xen/pciback/pciback_ops.c
index 2b77b31..62267e3 100644
--- a/drivers/xen/pciback/pciback_ops.c
+++ b/drivers/xen/pciback/pciback_ops.c
@@ -56,11 +56,20 @@ void pciback_reload_config_space(struct pci_dev *dev)
struct pciback_dev_data *dev_data = pci_get_drvdata(dev);
u32 *ptr = (u32*)dev_data->cfg_space;
int i, val, count = dev->cfg_size/sizeof(u32);
+ int limit = 0;
for (i = 0; i < count; i += sizeof(u32), ptr++) {
pci_read_config_dword(dev, i, &val);
- if (val != *ptr)
+ while (limit < 1000 && val != *ptr)
+ {
pci_write_config_dword(dev, i, *ptr);
+ pci_read_config_dword(dev, i, &val);
+ mdelay(1);
+ limit++;
+ }
+ if (limit == 1000)
+ printk(KERN_ERR "pciback: Error reloading config space after flr dev:%x offset:%x\n",
+ dev->devfn, i);
}
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-06-05 8:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 0:22 [PATCH][VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through Kay, Allen M
2010-06-04 8:53 ` Jean Guyader
2010-06-04 13:30 ` Kay, Allen M
2010-06-04 20:30 ` Konrad Rzeszutek Wilk
2010-06-05 8:40 ` Jean Guyader [this message]
2010-06-07 15:58 ` Konrad Rzeszutek Wilk
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=20100605084010.GA16920@angi.xci-test.com \
--to=jean.guyader@eu.citrix.com \
--cc=Ian.Pratt@eu.citrix.com \
--cc=Jean.Guyader@citrix.com \
--cc=Ross.Philipson@citrix.com \
--cc=allen.m.kay@intel.com \
--cc=jean.guyader@gmail.com \
--cc=konrad.wilk@oracle.com \
--cc=weidong.han@intel.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 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).