Re: [PATCH 3/3] x86/pci: Fix racy accesses to MSI-X Control register

2022-12-13 Thread David Vrabel
On 13/12/2022 11:50, Jan Beulich wrote: On 13.12.2022 12:34, David Vrabel wrote: On 12/12/2022 17:04, Jan Beulich wrote: On 10.11.2022 17:59, David Vrabel wrote: --- a/xen/arch/x86/include/asm/msi.h +++ b/xen/arch/x86/include/asm/msi.h @@ -237,7 +237,10 @@ struct arch_msix { int

Re: [PATCH 3/3] x86/pci: Fix racy accesses to MSI-X Control register

2022-12-13 Thread Jan Beulich
On 13.12.2022 12:34, David Vrabel wrote: > On 12/12/2022 17:04, Jan Beulich wrote: >> On 10.11.2022 17:59, David Vrabel wrote: >>> >>> --- a/xen/arch/x86/include/asm/msi.h >>> +++ b/xen/arch/x86/include/asm/msi.h >>> @@ -237,7 +237,10 @@ struct arch_msix { >>> int

Re: [PATCH 3/3] x86/pci: Fix racy accesses to MSI-X Control register

2022-12-13 Thread David Vrabel
On 12/12/2022 17:04, Jan Beulich wrote: On 10.11.2022 17:59, David Vrabel wrote: --- a/xen/arch/x86/include/asm/msi.h +++ b/xen/arch/x86/include/asm/msi.h @@ -237,7 +237,10 @@ struct arch_msix { int table_refcnt[MAX_MSIX_TABLE_PAGES]; int table_idx[MAX_MSIX_TABLE_PAGES];

Re: [PATCH 3/3] x86/pci: Fix racy accesses to MSI-X Control register

2022-12-12 Thread Jan Beulich
On 10.11.2022 17:59, David Vrabel wrote: > Concurrent access the the MSI-X control register are not serialized > with a suitable lock. For example, in msix_capability_init() access > use the pcidevs_lock() but some calls to msi_set_mask_bit() use the > interrupt descriptor lock. > > This can lead

[PATCH 3/3] x86/pci: Fix racy accesses to MSI-X Control register

2022-11-10 Thread David Vrabel
Concurrent access the the MSI-X control register are not serialized with a suitable lock. For example, in msix_capability_init() access use the pcidevs_lock() but some calls to msi_set_mask_bit() use the interrupt descriptor lock. This can lead to MSI-X being incorrectly disabled and subsequent