[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/4] PCI: move pdev_list field to common structure
Hi, On 6/4/19 1:42 PM, Jan Beulich wrote: Its management shouldn't be arch-specific, and in particular there should be no need for special precautions when creating the special domains. At this occasion - correct parenthesization of for_each_pdev(), - stop open-coding for_each_pdev() in vPCI code. From an Arm POV, this makes sense. With one comment below. @@ -476,8 +474,6 @@ struct arch_domain #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) \ --- a/xen/include/xen/pci.h +++ b/xen/include/xen/pci.h @@ -121,7 +121,9 @@ struct pci_dev { };#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)) This feels a bit strange to keep "arch" in the macro name when the code is now generic. How about "domain_has_pdevs"? Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |