[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 Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 29 Mar 2023 16:28:03 +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=WEFc+1aSD0VmI3gjzogVrPnLxrn5weTFYkL6yLR7CBA=; b=hjdYpsTmRrrcKKGh6ZHCixJv75L64kD0MgMgBY3ebA2k2ghp7o8ud7SKxaLHg2R1rFT+GcDL0Kt4VOEQWQhRkfYSimmPz/15HPSZcZ6XqK96Xf7JPhrprcvtA8c/Bw8jzSFXULVINekqs5kZMh5kEH7n0bmxfUALffsPNZUMzzCO9XrcDGgLp8P+48zUJdBjwPFOD4PwVe1/FxyYVgYr6jxRuN4jET6c6fDDv/Qs8/1oe2JkjXRjbCfmq8guDzmEB6sAChsYfX4qthA9d0qew8el6aA21PK0c2picud01bz7Sff/59hKv/Ql5ag/3dflSJeRCmqn4x/wfyrHUgicWA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KEzkIKRQO3DyVTyWTDtsUIrYXFzFoFLsAZSTligLxQlkeer45kmpuorlTMYVlqZBlsFtyh9/3T2TmTuBXCRLkDvNScm0OQndUTPurOyuWfPIhw8NAm6ie2gpEEakrGb/CaukIVzId1fw3cZNTN/eqj+mlGscdgjvaAhhPLHKdSDgBYb5gkCTKbwdKhObs2ubvAavQUFTX56QMAZkkBO6otxM57s/6/tTAy1a7t7hja+inaFPkfsiAHAWRXLYjG0sNIAdGBQeFM8w1/9ivLnt6LAmn109wP/gC/uHDyguuDyS9Lz90qraOpge5NXWevRXwWX/q6osZBNinMWVRWr+Aw==
  • 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 14:28:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.03.2023 16:20, Roger Pau Monné wrote:
> 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.

Yeah, dropping would be fine with me. Plus you're the maintainer anyway ...

Jan



 


Rackspace

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