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

Re: [PATCH] vpci/msix: restore PBA access length and alignment restrictions


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 29 Mar 2023 15:22:34 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=7FNYIWSXSyfAcJlYVXVlF6LufMrN+XtaTunTNge7Cic=; b=UwBAfoFVvDv1o5SfdyosWG8Kf9zxinckSdungK53mqt5rEKvBP4OhhTsjNGUjN3dHGpFRaiTwaEwYeuJGwLv2TzKwHgXY5jufDvqjm7bj7z5UuCHkYKKaIuzEZd+WnTVfrfyJHRtwY1q1t2mXD30fRfzEyr3cxLUr62ES1b3nHxx1V+M85z51Q4+D0Bd7ur5NS+6avx6au9UwhlrCIshIeT0ZWdgRM1zO1Ygf0w/Wt/dgGJ4XrMb/ca32kGzQjtSCb0ucohSKwsueHJFME2FPTGus/cdLT+qUJVPbaEUD2sJlOWajpARFJ98UDhWTIPiRyuVTynVygRik7kWgn855g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MafniogVHMpePVVmGqvDNP33JSi/q7bDlvQ/Q//dKKukHsLQBNQTmtRYB7q0c9vCUQdxvutc56v3U5P6/E0bYq1Hd+MhTLFSRtW93csO/NYyRTvnwNUCkl6CTn4JbQZiCgvy3g5jOP51BDLdrsQlETPsiY9VF3bYLGth1FczQN7MB61Q0ZnG37shF2GST7WTZZFj9GyXOu4S4gqeBTz+iJdpWgEMQaLlat+hqn0XDwSenLiUrzOtTQIGQAZcU67F7AIGJ+UDOi0dYV+tY4N/TRyyGZH1wYZ3IqWr46EMCRmsMbwFL7xH/N8vQQdtyPsuG9sjW/jYjZaw8GpfUnRwGQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 29 Mar 2023 13:23:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

Jan



 


Rackspace

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