[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/2] vpci/msix: fix PBA accesses
- To: Alex Olson <this.is.a0lson@xxxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Sat, 26 Feb 2022 11:10:55 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7sfGT9aN9+pb2i5D8lPbDuH8UbgfNsQRBEc0pbhJY8c=; b=b+BdRelRZ7/3ZzW6vgq+ms2oZ7/4g2NRonXOzpsctnqworgH+J5h30lKoJM1EDNWm+gF+bz/p+Ki52dcitoL4FqBACS5+ZJwzVT5X3v9DeRxFIY9QVs867SMTlK69TqFx2vy7v+yKRa128Ax5VaBKtVnzLZWp1mA4z3C38SKu2Nf+Ardv757y2Upc6NqMw8vlZMaXtA39CLml+qcNXXRwu/dWNS6ID5BKESoxRijfeajWKm/jfvjpcnom2XzWSN3n/cuVLcs8drdIO5JyAcnK532giZ0mTIBKtkkMgOjMnBTHmrZW7kFJli7rusA4QfX0wIJpLweSi2TBSrzizUMRQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bt1DMACTBmW2ynu/LbTzWh6HZf+QxPKEqkm50ukBMw4HtLooA1owFczweJWxSlh36fwycIc4aNdttJ3XsDyfbo41IJzpel6Zk9djPjzvzZ1wKsx13sJVJdwqc0e8DeIvaMHB51+rnGIrEbD1Waot1aOZvOoQnTasa90DXzrTd8l3T0q/VwS3p/CNJjL6Dk2wuf6fjbhY8VVsNxvnTyo8xfaZdaz6tFlGaaio4dPiE0S1dOxQh0A03Z9peCV+do2OwkHz0f45OTr+Z3SD6b8+PPOI1YF9wE8UAW/7Puq9VpEGXoKJipCGSVpYD75hIqmVMkrr9v0fNjUmZlhN3qWkeA==
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- Delivery-date: Sat, 26 Feb 2022 10:11:09 +0000
- Ironport-data: A9a23:p/uT+awpKIAmRAIOk416t+cTxirEfRIJ4+MujC+fZmUNrF6WrkUPx zQfXWzXMvuJYWumeI8jPITl801T7ZGAm9FlTwA4/CAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnj/0bv656yMUOZigHtIQMsadUsxKbVIiGX9JZS5LwbZj2NYy24bhWmthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ Npln66qRkApZ7L1nMsPYSdCTQIiFu520eqSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DJoQQt2sm1TjEJf0nXYrCU+PB4towMDIY2J0WQaqPO JRxhTxHMxrKbSN+MwcuLJM33/2wq2PBXiZ+twfAzUYwyzeKl1EguFT3C/LXcNGXQcRenm6Du 3nLuW/+B3kyJNGZjDaI7H+oruvOhj/gHpIfEqWi8fxni0HVwXYcYDUKVVqg5/iizEfmX8lYL WQb/yMvqe4580nDczXmd0Tm+jje5EdaAocOVb1hgO2Q9kbKyyyrHGdDTmdeUdgJpv0IX2IJi nTKr/q8UFSDr4apYX6a876Vqxa7Ni4UMXIOaEc4cOcV3zXwiNpt10ySF76PBIbw14SoQm+on 1hmuQBj3+17sCId60msEbkraRqIr4OBcAM67x6/somNvlIgP97Ni2BFBDHmARd8wGSxEgjpU JsswZH2AAUy4Xelzn3lrAIlRuzB2hp9GGeA6WOD5rF4n9hXx1atfJpL/BZ1L1pzP8APdFfBO RGP5FwNvcMOZCPyNcebhr5d7exwnMAM8vy/C5jpgidmOMAtJGdrAgk0DaJv44wduBd1yvxuU XtqWc2tEWwbGcxaIMmeHI8gPUsQ7nlmnwv7HMmjpzz+iOb2TCPFGN8tbQrVBshkvfzsnekg2 4sGXyd8404EC7OWj+i+2dN7EG3m2lBgXcGm85EML7XbSuekcUl4Y8LsLXoaU9UNt4xel/vS/ 2H7XUldyVHlgmbAJxnMYXdmAI4Dl74lxZ7nFUTA5WqV5kU=
- Ironport-hdrordr: A9a23:7584tKAxL983dlflHehAsceALOsnbusQ8zAXPh9KJiC9I/b1qy nxppkmPH/P6Qr4WBkb6Le90Y27MAnhHP9OkPIs1NKZMjUO11HYTr2KgbGSpgEIXheOi9K1tp 0QDZSWaueAdGSS5PySiGLTc6dC/DDEytHRuQ639QYTcegAUdAH0+4WMHf+LqUgLzM2eabRWa Dsr/Zvln6FQzA6f867Dn4KU6zqoMDKrovvZVojCwQ84AeDoDu04PqieiLolSs2Yndq+/MP4G LFmwv26uGKtOy68AbV0yv2445NkNXs59NfDIini9QTKB/rlgG0Db4RE4GqjXQQmqWC+VwqmN 7Dr1MJONly0WrYeiWPrR7ky2DboUITwk6n7WXdrWrooMT/Sj5/IdFGn5hlfhzQ7FdllM1g0Y pQtljp+6Z/PFflpmDQ9tLIXxZlmg6funw5i9MeiHRZTM83dKJRl4oC50lYea1wUR4S0LpXXt WGMfuspcq/KTihHjDkVyhUsZaRt00Ib1i7qhNogL3X79BU9EoJunfwivZv3Evoz6hNO6Ws19 60Q5iAq4s+PfP+TZgNc9vpEvHHfFAkf3r3QRCvyBLcZeQ6B04=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Feb 25, 2022 at 11:57:05AM -0600, Alex Olson wrote:
> I think there is an issue in the spin_lock handling of patch 2 for the
> "msix_write" function as it results in the lock being taken a second time
> while
> held (hangs).
>
> The lock taken before checking "VMSIX_ADDR_IN_RANGE" isn't unlocked for the
> non-
> PBA case and a second lock is attempted just before the call to get_entry()
> later in the same function. It looks like either the added lock should either
> be moved inside the PBA case or the lock before get_entry() should be removed.
Sorry, was in a rush to send this before leaving yesterday and didn't
refresh the commit before generating the patch, v2.1 should be fixed.
Could you provide a 'Tested-by' if it work for you?
>
> On my server, upon loading the ioatdma driver, it now successfully attempts an
> PBA write (which now doesn't crash the system), but I'm not sure I have a way
> to
> fully exercise it...
Urg, that's weird, PBA should be read-only only according to the spec.
Writes to PBA have undefined behavior.
>
> I also see a different (related) issue in which modify_bars is called on a
> virtual function seemingly before the BAR addresses are initialized/known and
> will start a different thread for that topic.
SR-IOV is not supported on PVH dom0 yet, so that's not going to work.
I've posted a series in 2018 to enable it, but sadly had no time to
work on it anymore:
https://lore.kernel.org/xen-devel/20180717094830.54806-1-roger.pau@xxxxxxxxxx/
It's likely not going to apply cleanly, and there's a lot of comments
to be fixed up there.
Thanks, Roger.
|