[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen/mcfg: Call PHYSDEVOP_pci_mmcfg_reserved before PCI enumeration



>>> On 22.09.15 at 15:36, <konrad.wilk@xxxxxxxxxx> wrote:
> The best I could come up with is to do two loops:
>  1) for 0:0:0 -> ff:ff:ff call PHYSDEVOP_pci_device_remove
>     (so blow away what Xen has for its PCI devices.. except for the AMD 
> IOMMU)
>  2) list_for_each_pci_device PHYSDEVOP_pci_device_add (or other variants
>     if VF).
> 
> But that is just a hack working around the Linux code.

The price of being non-intrusive on the Linux side. The above would
seem okay to me for the (rare?) reassign case. (Not sure why you
mean to exclude the AMD IOMMU there.)

> My thinking was that why don't we just make PHYSDEVOP_pci_device_add be
> capable of dealing with changes like these.

That would require it to be able to match up devices at their new
position (bus number) with its original instance (on the old bus).

> However, you  have also added the code to trap on PCI configuation access
> we could also do some smarts when PCI_PRIMARY_BUS is modified (see
> a88b72fddd046a0978242411276861039ec99ad0 x86/PCI: add config space abstract
> write intercept logic). That would take care of it much easier I think?

That's a nice idea actually.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.