On 15.04.2025 09:15, Andriy Sultanov wrote: > On 4/15/25 8:05 AM, dm...@proton.me wrote: >>> --- a/xen/drivers/passthrough/amd/iommu_acpi.c >>> +++ b/xen/drivers/passthrough/amd/iommu_acpi.c >>> @@ -707,8 +707,7 @@ static int __init cf_check parse_ivrs_ioapic(const char >>> *str) >>> } >>> } >>> >>> - ioapic_sbdf[idx].bdf = PCI_BDF(bus, dev, func); >>> - ioapic_sbdf[idx].seg = seg; >>> + ioapic_sbdf[idx].sbdf = PCI_SBDF( seg, PCI_BDF(bus, dev, func) ); >> PCI_SBDF() is a variadic macro, so, IMO, the line above can be simplified as: >> >> ioapic_sbdf[idx].sbdf = PCI_SBDF( seg, bus, dev, func ); >> >> Ex: pdev_type() in xen/drivers/passthrough/pci.c >> >> Can you please double check in the modified code? >> >>> ioapic_sbdf[idx].id = id; >>> ioapic_sbdf[idx].cmdline = true; >>> >>> @@ -734,8 +733,7 @@ static int __init cf_check parse_ivrs_hpet(const char >>> *str) >>> return -EINVAL; >>> >>> hpet_sbdf.id = id; >>> - hpet_sbdf.bdf = PCI_BDF(bus, dev, func); >>> - hpet_sbdf.seg = seg; >>> + hpet_sbdf.sbdf = PCI_SBDF( seg, PCI_BDF(bus, dev, func) ); >> ^^ >> e.g. here it can be simplified too. > You are right, PCI_SBDF(sef, bus, dev, func) works here and above. Will > resend.
And please also drop the stray blanks immediately next to the parentheses. Jan