[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 2/2] VT-d: Fix vt-d flush timeout issue.



On 11.12.2015 at 3:05pm, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> On 10/12/15 09:33, Quan Xu wrote:
> > diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h index
> > a5aef55..0bf6b1a 100644
> > --- a/xen/include/xen/pci.h
> > +++ b/xen/include/xen/pci.h
> > @@ -41,6 +41,7 @@
> >  struct pci_dev_info {
> >      bool_t is_extfn;
> >      bool_t is_virtfn;
> > +    bool_t is_unassignable;
> >      struct {
> >          u8 bus;
> >          u8 devfn;
> > @@ -88,6 +89,12 @@ struct pci_dev {
> >  #define for_each_pdev(domain, pdev) \
> >      list_for_each_entry(pdev, &(domain->arch.pdev_list), domain_list)
> >
> > +#define PDEV_UNASSIGNABLE 1
> > +#define mark_pdev_unassignable(pdev) \
> > +    pdev->info.is_unassignable = PDEV_UNASSIGNABLE
> > +
> > +#define IS_PDEV_UNASSIGNABLE(pdev) pdev->info.is_unassignable
> 
> Static inlines please.
> 
> These macros lack any hygene whatsoever, but don't need to be macros in the
> first place.
> 

Andrew,

Could I modify it as below:

+static inline void mark_pdev_unassignable(struct pci_dev *pdev)
+{
+    pdev->info.is_unassignable = 1;
+}
+
+static inline bool_t is_pdev_unassignable(struct pci_dev *pdev)
+{
+    return pdev->info.is_unassignable;
+}

Correct me If I still don't get the point. Thanks.




-Quan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.