Re: [edk2-devel] [PATCH 1/1] OvmfPkg/IoMmuDxe: add locking to IoMmuAllocateCommonBuffer

2023-07-20 Thread Gerd Hoffmann
Hi, > Not sure why InternalAllocateBuffer() doesn't update mReservedMemBitmap > itself. That would be needed to protect the allocation code paths with > InterlockedCompareExchange32() too. Not a straight forward conversion, current code copies around bitmap snippets, so this logic needs a

Re: [edk2-devel] [PATCH 1/1] OvmfPkg/IoMmuDxe: add locking to IoMmuAllocateCommonBuffer

2023-07-20 Thread Gerd Hoffmann
On Thu, Jul 20, 2023 at 10:34:31AM +0200, Ard Biesheuvel wrote: > On Thu, 20 Jul 2023 at 10:24, Gerd Hoffmann wrote: > > > > IoMmuAllocateCommonBuffer has the very same allocation pattern > > IoMmuAllocateBounceBuffer uses, so the fix added by commit a52044a9e602 > > ("OvmfPkg/IoMmuDxe: add

Re: [edk2-devel] [PATCH 1/1] OvmfPkg/IoMmuDxe: add locking to IoMmuAllocateCommonBuffer

2023-07-20 Thread Ard Biesheuvel
On Thu, 20 Jul 2023 at 10:24, Gerd Hoffmann wrote: > > IoMmuAllocateCommonBuffer has the very same allocation pattern > IoMmuAllocateBounceBuffer uses, so the fix added by commit a52044a9e602 > ("OvmfPkg/IoMmuDxe: add locking to IoMmuAllocateBounceBuffer") is needed > here too. > > Reported-by:

[edk2-devel] [PATCH 1/1] OvmfPkg/IoMmuDxe: add locking to IoMmuAllocateCommonBuffer

2023-07-20 Thread Gerd Hoffmann
IoMmuAllocateCommonBuffer has the very same allocation pattern IoMmuAllocateBounceBuffer uses, so the fix added by commit a52044a9e602 ("OvmfPkg/IoMmuDxe: add locking to IoMmuAllocateBounceBuffer") is needed here too. Reported-by: Michael Brown Signed-off-by: Gerd Hoffmann ---