[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] vpci/msix: restore PBA access length and alignment restrictions
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Wed, 29 Mar 2023 16:20:06 +0200
- 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=SqAvuPxhF0UC5OLv0I7PWV09VxCAVxMGI1xMtYDsCaY=; b=Zzn8Vfla5TMkd6H6nsO8fF2baLRIBpkpVEx3J1+SpPRVHlryXxLMmWLDIzAw8heEsfQ14G1RwlmPajNIhQ58gj7nsEXTqaWHKnPagZkstYwL9XWh8inEXCp+in7gYBpAkqw1ILwxAyudckK6vBVI1Ox+/vxWf4pl9fH7VnPxGRHfQJnT0BiNvwKh+tM1f+5WBOVyIhq1UQbOxa74Bvc/yPSg3tnUdXxqnbxt1e6KrObRyLjP9ekxkjt9UOrvincvhf+jCLetrc9MU+aVE1HA5gX24gIzB5QBoPgnhGkNaBSPvnooNoQrwzRFAc6JZv56dvorwq/w1eT8lnI9lRo+5Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fwVStKdmaJlLtMp+7a9rMwjy/uH0lH9adVyPdGHDOF6TOUSOeXobd2+w5ClPSSCbAb3OSUsEJ9hKmp4rdkVlRNOnNUo9hrNS4tFIo3wGnvCvCQrUdMCNDB82/FcJuSy0YTTdtQXcx/Xda6nY7Q3n3j3JSukuVzEBIwvXQ4kLHXNUYgjN3zsRlCfTW+MlR++SXsMkXVZhQHNC4o237q3zhKzZz8OUVqLxguwUhG8nQja4jrV9/HSCqFkjzOSlflfl5Q6K59fQ8JHc9hJwC9/qCiCLOG1F10MtSOaxIQvIDg1ExlUxnS/zXE4s+vmRJSI9T03mSF4p+eMZKAxxENKLmQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 29 Mar 2023 14:20:57 +0000
- Ironport-data: A9a23:BT6j36COmhHk+BVW/zTiw5YqxClBgxIJ4kV8jS/XYbTApG9xhGEFy GFJWW+GbvfeNmP3e9xwPNjk908B7Z6DndRmQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nOHuGmYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbyRFu8pvlDs15K6p4GhC7wRkDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIwqsR1GU9y9 /IjORNdXA7dh8+5xe66c7w57igjBJGD0II3nFhFlGmcKMl8BJfJTuPN+MNS2yo2ioZWB/HCa sEFaD1pKhPdfxlIPVRRA5U79AuqriCnL3sE9xTI+Oxuuzi7IA9ZidABNPLPfdOHX4NNl1uwr WPa5WXpRBodMbRzzBLcqinx27SSzHyTtIQ6RISoq8d23lKq1C9CDzlRcQWWnubphRvrMz5YA wlOksY0loAw/kG2Stj2XzWjvWWJ+BUbXrJ4A+A8rQ2A1KfQywKYHXQfCC5MbsQ8s807TiBs0 UWG9+4FHhRqubyRDHeCrLGdqGrqPTBPdDdSIygZUQEC/t/v5pkpiQ7CRcpiF6jzicDpHTb3w HaBqy1Wa6gvsPPnHp6TpTjv6w9AbLCQEWbZOi2/srqZ0z5E
- Ironport-hdrordr: A9a23:dcMlAKrkznIK9PlyxdPEGjEaV5tBLNV00zEX/kB9WHVpm5Oj+v xGzc5w6farsl0ssREb9uxo9pPwJE800aQFmbX5XI3SJTUO3VHFEGgM1+vfKlHbak7DH6tmpN xdmstFeaHN5DpB/KHHCWCDer5PoeVvsprY49s2p00dMD2CAJsQizuRZDzrcHGfE2J9dOAE/d enl716jgvlXU5SQtWwB3EDUeSGj9rXlKj+aRpDKw875BKIhTaI7qe/NxSDxB8RXx5G3L9nqA H+4kfEz5Tml8v+5g7X1mfV4ZgTsNz9yuFbDMjJptkJJi7qggOIYp0kf7GZpjg6rMym9V5vut jRpBULOdh19hrqDymIiCqo/zOl/Ccl6nfkx1PdqXz/ofbhTDZ/L8Zan4pWfjbQ9kJl5bhHoe t29lPck6ASIQLLnSz76dSNfxZ2lnCsqX5nteIIlXRQXaYXdbcUh40C+0F+FosGAUvBmfYaOd grKPuZyOddcFucYXyclm5zwOa0VnB2JRuCSlhqgL3m7xFm2FRCi2cIzs0WmXkNsLgnTYNf2u jCOqN00JlTU84/d8tGdag8aPryLlaIbQPHMWqUL1iiProAIWjxp5n+56hwzP22eaYP0IA5lP 36IR9lXFYJCgPT4PC1rd12GkinehT/Yd2t8LAS23FBgMyzeFKxWhfzCmzHkKOb0oYi64PgKr OO0altco7exFvVaPl0NjLFKudvwFklIbgoU4UAKiazi/OODLHWncrmV9uWDIbRMF8fKxPC6z 04LXLOGPk=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Mar 29, 2023 at 03:22:34PM +0200, Jan Beulich wrote:
> On 29.03.2023 12:18, Roger Pau Monne wrote:
> > @@ -419,9 +424,8 @@ static int adjacent_write(const struct domain *d, const
> > struct vpci_msix *msix,
> > * assumed to be equal or bigger (8 bytes) than the length of any
> > access
> > * handled here.
> > */
> > - if ( (VMSIX_ADDR_IN_RANGE(addr, vpci, VPCI_MSIX_PBA) ||
> > - VMSIX_ADDR_IN_RANGE(addr + len - 1, vpci, VPCI_MSIX_PBA)) &&
> > - !is_hardware_domain(d) )
> > + if ( VMSIX_ADDR_IN_RANGE(addr, vpci, VPCI_MSIX_PBA) &&
> > + (!access_allowed(msix->pdev, addr, len) ||
> > !is_hardware_domain(d)) )
> > /* Ignore writes to PBA for DomUs, it's undefined behavior. */
> > return X86EMUL_OKAY;
>
> While preparing the backport, where I'm folding this into the earlier
> patch, I've noticed that this change has now left the comment stale
> (the problematic part if just out of context). Not sure though whether
> that's worth yet another fixup patch.
I see, thanks for noticing. I think I can likely adjust in some further change,
or even just drop it, not sure the comment is that relevant anymore if both the
PBA and the access must be aligned now.
Roger.
|