uint32_t emflags;
int rc;
- INIT_LIST_HEAD(&d->arch.pdev_list);
INIT_PAGE_LIST_HEAD(&d->arch.relmem_list);
spin_lock_init(&d->arch.e820_lock);
*/
dom_xen = domain_create(DOMID_XEN, NULL, false);
BUG_ON(IS_ERR(dom_xen));
- INIT_LIST_HEAD(&dom_xen->arch.pdev_list);
/*
* Initialise our DOMID_IO domain.
rwlock_init(&d->vnuma_rwlock);
+#ifdef CONFIG_HAS_PCI
+ INIT_LIST_HEAD(&d->pdev_list);
+#endif
+
err = -ENOMEM;
if ( !zalloc_cpumask_var(&d->dirty_cpumask) )
goto fail;
if ( devfn == pdev->devfn )
{
- list_move(&pdev->domain_list, &target->arch.pdev_list);
+ list_move(&pdev->domain_list, &target->pdev_list);
pdev->domain = target;
}
if ( pdev->domain )
return;
pdev->domain = dom_xen;
- list_add(&pdev->domain_list, &dom_xen->arch.pdev_list);
+ list_add(&pdev->domain_list, &dom_xen->pdev_list);
}
int __init pci_hide_device(unsigned int seg, unsigned int bus,
goto out;
}
- list_add(&pdev->domain_list, &hardware_domain->arch.pdev_list);
+ list_add(&pdev->domain_list, &hardware_domain->pdev_list);
}
else
iommu_enable_device(pdev);
if ( !pdev->domain )
{
pdev->domain = ctxt->d;
- list_add(&pdev->domain_list, &ctxt->d->arch.pdev_list);
+ list_add(&pdev->domain_list, &ctxt->d->pdev_list);
setup_one_hwdom_device(ctxt, pdev);
}
else if ( pdev->domain == dom_xen )
if ( devfn == pdev->devfn )
{
- list_move(&pdev->domain_list, &target->arch.pdev_list);
+ list_move(&pdev->domain_list, &target->pdev_list);
pdev->domain = target;
}
* Check for overlaps with other BARs. Note that only BARs that are
* currently mapped (enabled) are checked for overlaps.
*/
- list_for_each_entry(tmp, &pdev->domain->arch.pdev_list, domain_list)
+ for_each_pdev ( pdev->domain, tmp )
{
if ( tmp == pdev )
{
printk("vPCI MSI/MSI-X d%d\n", d->domain_id);
- list_for_each_entry ( pdev, &d->arch.pdev_list, domain_list )
+ for_each_pdev ( d, pdev )
{
const struct vpci_msi *msi;
const struct vpci_msix *msix;
bool_t s3_integrity;
- struct list_head pdev_list;
-
union {
struct pv_domain pv;
struct hvm_domain hvm;
#define has_pirq(d) (!!((d)->arch.emulation_flags & X86_EMU_USE_PIRQ))
#define has_vpci(d) (!!((d)->arch.emulation_flags & X86_EMU_VPCI))
-#define has_arch_pdevs(d) (!list_empty(&(d)->arch.pdev_list))
-
#define gdt_ldt_pt_idx(v) \
((v)->vcpu_id >> (PAGETABLE_ORDER - GDT_LDT_VCPU_SHIFT))
#define pv_gdt_ptes(v) \
};
#define for_each_pdev(domain, pdev) \
- list_for_each_entry(pdev, &(domain->arch.pdev_list), domain_list)
+ list_for_each_entry(pdev, &(domain)->pdev_list, domain_list)
+
+#define has_arch_pdevs(d) (!list_empty(&(d)->pdev_list))
/*
* The pcidevs_lock protect alldevs_list, and the assignment for the
int64_t time_offset_seconds;
+#ifdef CONFIG_HAS_PCI
+ struct list_head pdev_list;
+#endif
+
#ifdef CONFIG_HAS_PASSTHROUGH
struct domain_iommu iommu;
#endif