On 02.02.2024 22:33, Stewart Hildebrand wrote: > --- a/xen/arch/x86/physdev.c > +++ b/xen/arch/x86/physdev.c > @@ -123,7 +123,9 @@ int physdev_map_pirq(domid_t domid, int type, int *index, > int *pirq_p, > > case MAP_PIRQ_TYPE_MSI: > case MAP_PIRQ_TYPE_MULTI_MSI: > + pcidevs_lock(); > ret = allocate_and_map_msi_pirq(d, *index, pirq_p, type, msi); > + pcidevs_unlock(); > break;
I'm afraid I need to come back to this: This is the only place where this patch retains (moves) use of the global lock. By moving, its scope is actually extended. It was previously said that conversion doesn't happen to limit the scope of what is changing. But with allocate_and_map_msi_pirq() being happy about either lock being held, I'm having a hard time seeing why here the global lock would continue to need using. To me doing so suggests uncertainty whether the checking in the function is actually correct. Jan
