WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH][VTD] fixed a timing issue on DELL calpella lapto

To: Jean Guyader <jean.guyader@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][VTD] fixed a timing issue on DELL calpella laptop while doing graphics pass-through
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Mon, 7 Jun 2010 11:58:05 -0400
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Kay, Allen M" <allen.m.kay@xxxxxxxxx>, "Han, Weidong" <weidong.han@xxxxxxxxx>, Jean Guyader <Jean.Guyader@xxxxxxxxxx>, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, Ross Philipson <Ross.Philipson@xxxxxxxxxx>, Jean Guyader <jean.guyader@xxxxxxxxx>
Delivery-date: Mon, 07 Jun 2010 09:03:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100605084010.GA16920@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <987664A83D2D224EAE907B061CE93D530114C3D636@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <AANLkTikK2fN2D3zmZuAxZUptuGKrewqs0zR088K_xuQu@xxxxxxxxxxxxxx> <20100604203040.GC28034@xxxxxxxxxxxxxxxxxxx> <20100605084010.GA16920@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.19 (2009-01-05)
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@xxxxxxxxxxxxx>

> 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);
>       }
>  }
>  


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel