[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 2/3] xen/pci: solve compilation error on ARM with HAS_PCI enabled.
On Wed, 25 Nov 2020, Rahul Singh wrote: > If mem-sharing, mem-paging, or log-dirty functionality is not enabled > for architecture when HAS_PCI is enabled, the compiler will throw an > error. > > Move code to x86 specific file to fix compilation error. > > Also, modify the code to use likely() in place of unlikley() for each > condition to make code more optimized. > > No functional change intended. > > Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx> > --- > > Changes in v4: > - fixed minor comments > > --- > xen/drivers/passthrough/pci.c | 8 +------- > xen/drivers/passthrough/x86/iommu.c | 13 +++++++++++++ > xen/include/xen/iommu.h | 2 ++ > 3 files changed, 16 insertions(+), 7 deletions(-) > > diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c > index 3c6ab1bcb6..4c21655b7d 100644 > --- a/xen/drivers/passthrough/pci.c > +++ b/xen/drivers/passthrough/pci.c > @@ -20,7 +20,6 @@ > #include <xen/iommu.h> > #include <xen/irq.h> > #include <xen/param.h> > -#include <xen/vm_event.h> > #include <xen/delay.h> > #include <xen/keyhandler.h> > #include <xen/event.h> > @@ -1418,12 +1417,7 @@ static int assign_device(struct domain *d, u16 seg, u8 > bus, u8 devfn, u32 flag) > if ( !is_iommu_enabled(d) ) > return 0; > > - /* Prevent device assign if mem paging or mem sharing have been > - * enabled for this domain */ > - if ( d != dom_io && > - unlikely(mem_sharing_enabled(d) || > - vm_event_check_ring(d->vm_event_paging) || > - p2m_get_hostp2m(d)->global_logdirty) ) > + if( !arch_iommu_use_permitted(d) ) code style: if ( !arch_iommu_use_permitted(d) )
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |