* [PATCH][VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through
@ 2010-06-04 0:22 Kay, Allen M
2010-06-04 8:53 ` Jean Guyader
0 siblings, 1 reply; 6+ messages in thread
From: Kay, Allen M @ 2010-06-04 0:22 UTC (permalink / raw)
To: xen-devel@lists.xensource.com
Cc: ian.pratt@eu.citrix.com, Han, Weidong, Ross.Philipson@citrix.com,
jean.guyader@citrix.com
[-- Attachment #1.1: Type: text/plain, Size: 153 bytes --]
Added additional sleep time between FLR and PCI config restore.
Signed-off-by: Allen Kay <allen.m.kay@intel.com<mailto:allen.m.kay@intel.com>>
[-- Attachment #1.2: Type: text/html, Size: 2314 bytes --]
[-- Attachment #2: igd-xen0603.patch --]
[-- Type: application/octet-stream, Size: 404 bytes --]
diff -r 370fd9f97c70 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py Sat May 22 07:18:16 2010 +0100
+++ b/tools/python/xen/util/pci.py Thu Jun 03 11:42:05 2010 -0700
@@ -523,6 +523,7 @@
return (pci_list, cfg_list)
def restore_pci_conf_space(pci_cfg_list):
+ time.sleep(1.0)
pci_list = pci_cfg_list[0]
cfg_list = pci_cfg_list[1]
for i in range(0, len(pci_list)):
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through
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
0 siblings, 2 replies; 6+ messages in thread
From: Jean Guyader @ 2010-06-04 8:53 UTC (permalink / raw)
To: Kay, Allen M
Cc: ian.pratt@eu.citrix.com, xen-devel@lists.xensource.com,
Han, Weidong, jean.guyader@citrix.com, Ross.Philipson@citrix.com
On 4 June 2010 01:22, Kay, Allen M <allen.m.kay@intel.com> wrote:
> Added additional sleep time between FLR and PCI config restore.
>
>
>
> Signed-off-by: Allen Kay <allen.m.kay@intel.com>
>
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,
Jean
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH][VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through
2010-06-04 8:53 ` Jean Guyader
@ 2010-06-04 13:30 ` Kay, Allen M
2010-06-04 20:30 ` Konrad Rzeszutek Wilk
1 sibling, 0 replies; 6+ messages in thread
From: Kay, Allen M @ 2010-06-04 13:30 UTC (permalink / raw)
To: Jean Guyader
Cc: ian.pratt@eu.citrix.com, xen-devel@lists.xensource.com,
Han, Weidong, jean.guyader@citrix.com, Ross.Philipson@citrix.com
That's a more robust fix. Thanks.
Allen
-----Original Message-----
From: Jean Guyader [mailto:jean.guyader@gmail.com]
Sent: Friday, June 04, 2010 1:54 AM
To: Kay, Allen M
Cc: xen-devel@lists.xensource.com; ian.pratt@eu.citrix.com; Han, Weidong; Ross.Philipson@citrix.com; jean.guyader@citrix.com
Subject: Re: [Xen-devel] [PATCH][VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through
On 4 June 2010 01:22, Kay, Allen M <allen.m.kay@intel.com> wrote:
> Added additional sleep time between FLR and PCI config restore.
>
>
>
> Signed-off-by: Allen Kay <allen.m.kay@intel.com>
>
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,
Jean
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through
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
1 sibling, 1 reply; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2010-06-04 20:30 UTC (permalink / raw)
To: Jean Guyader
Cc: xen-devel@lists.xensource.com, Kay, Allen M, Han, Weidong,
jean.guyader@citrix.com, ian.pratt@eu.citrix.com,
Ross.Philipson@citrix.com
> 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through
2010-06-04 20:30 ` Konrad Rzeszutek Wilk
@ 2010-06-05 8:40 ` Jean Guyader
2010-06-07 15:58 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 6+ messages in thread
From: Jean Guyader @ 2010-06-05 8:40 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk
Cc: xen-devel@lists.xensource.com, Kay, Allen M, Han, Weidong,
Jean Guyader, Ian Pratt, Ross Philipson, Jean Guyader
[-- 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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH][VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through
2010-06-05 8:40 ` Jean Guyader
@ 2010-06-07 15:58 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2010-06-07 15:58 UTC (permalink / raw)
To: Jean Guyader
Cc: xen-devel@lists.xensource.com, Kay, Allen M, Han, Weidong,
Jean Guyader, Ian Pratt, Ross Philipson, Jean Guyader
On Sat, Jun 05, 2010 at 09:40:10AM +0100, Jean Guyader wrote:
> 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.
I seem to be missing a wealth of previous checkins. There is no
pciback_reload_config_space in the pciback code that I pulled from
2.6.18.
If you could re-base against Jeremy's PV-OPS kernel and send those
patches that would be tremendously helpful.
Here is a Wiki that explains in detail how to get the PV-OPS kernel and
build it: http://wiki.xensource.com/xenwiki/XenParavirtOps
Much appreciated!
>
> pciback: Verify write when restoring the pci config space after FLR
>
> Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
> 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);
> }
> }
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-06-07 15:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-06-07 15:58 ` Konrad Rzeszutek Wilk
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).