On 04/06/2019 13:55, Julien Grall wrote: >> @@ -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"?
I agree that keeping arch in the name is a little weird, and this is definitely the patch to rename it in - there are only 9 instances in the entire codebase. For the patch overall, Acked-by: Andrew Cooper <andrew.coop...@citrix.com>, however this helper ends up being named. ~Andrew
_______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel