This patch corrects PCI_EXP_DEVCTL_FLR so that function level reset will be really executed, and also replaces some magic numbers with micro. Signed-off-by: Anthony Xu <anthony.xu@intel.com> Signed-off-by: Weidong Han <weidong.han@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
-#define PCI_EXP_DEVCTL_FLR (0x1b) +#define PCI_EXP_DEVCTL_FLR (1 << 15) Can you please explain what is the difference (in functionality) between these values? Thanks, Guy.> -----Original Message----- > From: xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of > Han, Weidong > Sent: Wednesday, November 07, 2007 5:30 AM > To: xen-devel@lists.xensource.com > Cc: Kay, Allen M > Subject: [Xen-devel] [VTD][PATCH] Correct PCI_EXP_DEVCTL_FLR > > This patch corrects PCI_EXP_DEVCTL_FLR so that function level > reset will be really executed, and also replaces some magic > numbers with micro. > > Signed-off-by: Anthony Xu <anthony.xu@intel.com> > Signed-off-by: Weidong Han <weidong.han@intel.com> >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2007-Nov-07 09:17 UTC
RE: [Xen-devel] [VTD][PATCH] Correct PCI_EXP_DEVCTL_FLR
Guy Zana wrote:> -#define PCI_EXP_DEVCTL_FLR (0x1b) > +#define PCI_EXP_DEVCTL_FLR (1 << 15) > > Can you please explain what is the difference (in functionality) > between these values? >According to existing pdev_flr(), PCI_EXP_DEVCTL_FLR should be changed. --Weidong _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
I''ve no idea where the value 0x1b came from, but bit 15 is the FLR bit in the DEVCTL register, according to the PCI Express spec. So the patch looks good. -- Keir On 7/11/07 08:53, "Guy Zana" <guy@neocleus.com> wrote:> -#define PCI_EXP_DEVCTL_FLR (0x1b) > +#define PCI_EXP_DEVCTL_FLR (1 << 15) > > Can you please explain what is the difference (in functionality) between these > values? > > Thanks, > Guy. > >> -----Original Message----- >> From: xen-devel-bounces@lists.xensource.com >> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of >> Han, Weidong >> Sent: Wednesday, November 07, 2007 5:30 AM >> To: xen-devel@lists.xensource.com >> Cc: Kay, Allen M >> Subject: [Xen-devel] [VTD][PATCH] Correct PCI_EXP_DEVCTL_FLR >> >> This patch corrects PCI_EXP_DEVCTL_FLR so that function level >> reset will be really executed, and also replaces some magic >> numbers with micro. >> >> Signed-off-by: Anthony Xu <anthony.xu@intel.com> >> Signed-off-by: Weidong Han <weidong.han@intel.com> >> > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Alex Williamson
2007-Nov-07 15:56 UTC
Re: [Xen-devel] [VTD][PATCH] Correct PCI_EXP_DEVCTL_FLR
On Wed, 2007-11-07 at 11:29 +0800, Han, Weidong wrote:> This patch corrects PCI_EXP_DEVCTL_FLR so that function level reset will > be really executed, and also replaces some magic numbers with micro.PAGE_SHIFT/SIZE/MASK shouldn''t be used in userspace so freely. AFAICT, this breaks the build on x86_64 and ia64. Ideally we should use getpagesize(). If that doesn''t work, at least define them to the defaults locally like in toosl/ioemu/hw/iommu.c. Thanks, Alex -- Alex Williamson HP Open Source & Linux Org. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel