[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] vpci/msix: handle accesses adjacent to the MSI-X table


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 14 Mar 2023 17:34:39 +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=hFgkAdfK2aWtavfPvvKyKRjTsv5wgIwYx/e/HvsUdHo=; b=QesWjSW21fe9A+WOQM2wsCvXTipG2Kc/gITrCoTJyGQAGBw9mnmkTZBdy9Q6ApwmYfJ/fqS0D5OGhiIIP01VYLOri0cTlzrhI7Ev8IWTfnNLMitrV8N0Eig8H/XWlXDTn3RQXYPGPpf87m7a21nxS+nSYXRJqpvzCGDjflKqxg04zyKnwutxz0MW9akY2yg9HUdDVZOFtJhMYd6Iw/JvQUU73CXmlRZVZ0UgQ+r9KpjjY4vFj7MtTE1RqgePU12mZ6hGoywX785b1nlAOVYEFzdRxTFf7nVaf3s2eYya6BhZzEmslIjBXv1UcWAupIU46HWFa+2wR10eCxCM+PM5NQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=csFSTtnhed/C52rHNRHQBP4pzaloRaFMjIe7NgsjzWIn0xVT4pCOL22j2PmRt/xsTsFh3uwP/OQG/hFgt6eTHiEtlPdTCMDp6fLVxpyxIKQx0AfPxKM1E1G+WHrcQbSto1YV1CHDRNBqKLbici+OfdCcNddE6SErPNxZcFpYegwvUBJo4CoRC6VIWfhUKlJHO25xSrdWDBNpAoMvcCC/wlE4M1xnkyLJQdpf6dBYFGG8Krl+mbSulYztZOj//r5eAO0NlqOcLKqQO/TYv/K0yNZRFtFYaCt6n1nrK7VHV0VsUb/takMnt5qJfJCvgb5xfsKZcKdTFWfXx5WH/7IN5w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 14 Mar 2023 16:35:25 +0000
  • Ironport-data: A9a23:5fg+TKwAkU/If3dUE296t+clxyrEfRIJ4+MujC+fZmUNrF6WrkUBy jYWXjvQbq3cZWTwet8gPYzk9x4OvJbWnNVnSgZuqiAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+UMHUMja4mtC5QRlPKwT5jcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KUUT9 sY0AwsPVA6Og97r5q2rWuR9oNt2eaEHPKtH0p1h5RfwKK9/BLrlE+DN79Ie2yosjMdTG/qYf 9AedTdkcBXHZVtIJ0sTD5U92uyvgxETcRUB8A7T+fVxvjiVlVIguFTuGIO9ltiiX8Jak1zev mvb12/4HgsbJJqUzj/tHneE176Rx3umB9l6+LuQ6twximXP2EIpIiZGf2OAm/aQhnyvRIcKQ 6AT0m90xUQoz2SpRNTgWxyzoFafowURHdFXFoUS+AyLj6bZ/QudLmwFVSJaLswrstcsQj4n3 UPPmMnmbQGDq5WQQHOZs72S/TW7PHFMKXdYPHFVCwwY/9PkvYc/yArVScpuG7K0iduzHizsx zeNr241gLB7YdM36phXNGvv21qEzqUlhCZutm07gkrNAttFWbOY
  • Ironport-hdrordr: A9a23:6iZkyK184DS0Y3pmrWcGSwqjBEIkLtp133Aq2lEZdPU0SKGlfq GV7ZMmPHrP4gr5N0tOpTntAse9qDbnhP1ICOoqTNOftWvd2FdARbsKheffKn/bak/DH4Zmvp uIGJIObeEYY2IasS77ijPIb+rJwrO8gd+VbTG19QYSceloAZsQnjuQEmygYytLrJEtP+tCKH KbjPA33gaISDAsQemQIGIKZOTHr82jruOaXfZXbyRXkDVnlFmTmcXHLyQ=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Mar 14, 2023 at 04:46:19PM +0100, Jan Beulich wrote:
> On 14.03.2023 14:54, Roger Pau Monné wrote:
> > On Tue, Mar 14, 2023 at 12:56:33PM +0100, Jan Beulich wrote:
> >> On 14.03.2023 11:13, Roger Pau Monne wrote:
> >> I'm also concerned of misaligned accesses: While we can't keep the
> >> guest from doing such on pages we don't intercept, depending on the kind
> >> of anomalies such may cause the effects there may be contained to that
> >> guest. When doing the accesses from the hypervisor, bad effects could
> >> affect the entire system. (FTAOD I don't mean to constrain guests, but I
> >> do think we need to consider splitting misaligned accesses.)
> > 
> > I was also wondering about misaligned accesses.  Should be allow dom0
> > any kind of access, while limiting domUs to aligned only?
> 
> I guess the code would be simpler we we treated both equally. As said,
> my goal is not to refuse misaligned accesses, but to break them up. To
> keep things simple we might even use purely byte accesses (and then
> perhaps simply REP MOVSB). Special casing Dom0 would only add code for
> no real gain.

Hm, I would be worried about then breaking the requirement of some
registers being accessed using a specific size, but again we are
dealing with misaligned accesses to a region that shouldn't contain
registers in the first place.

FWIW, the device I currently have that has registers in the same page
as the MSIX and the PBA tables is fine with limiting such accesses to
aligned only.

What is it that worries you about Xen relying unaligned accesses
instead of just the domain itself doing it on any other BAR MMIO it
has directly mapped into the p2m?  Any error generated by the device
in such setup would likely have the same effect, regardless of whether
the access is in Xen or domain context.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.