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

Re: [PATCH v2 3/3] xen/vpci: msix: move read/write call to MSI-X PBA entry to arch file


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 25 Feb 2022 09:21:50 +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=oP54Ot7PWMoy2ZY2U1Ti9Nruaac6CbGjFHOhndATzFY=; b=BoNbPT8X+a0AorE/Eu/hNL2Ad5fk72upHRKvZXhdvqrrz5y5DKwYn9cWSRpntRBWqt9DbuJ0YSj4SgO6x+Qz2IvIvS4hD6EEBIrnXQra19boZbJOcQjyRjj8CJ5qO84h2betmU8Zt8L+OrnvqCmMZW+k81rCfVWmJdP+SELZEBs6ke+3ajOdZXM0nBq+HLw5JxOhVTn/nry7/jmznT7ltwalmttp4kuld2Cqx9uGbC1qL+fHZBcmuyt6ZFo1z6RuBdF31M/UclnK+uSdcHxWbzsEu/vNfRcIQAQ2gufddrbR4HpPBKKkHUvw1JrpKUh3XYLNhpwdxOP8lKNq2c2mzw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OIsdafmqmtayZ48S6seSN0jsxXT18jYKmZjZk5AYON/W8ici1nIPqcLck0JcH3olzYGiIE0beOJkL0xTEkWJxCPMZWX1R8nbReNSzBGTODfGH4WRR4e95Pyft5iLqdzi8wfXWWtwoQ8mjfi+Pf6KqEGQwsILvGmWShOQleUC5lKUp7BQf5pU55M1l5JHWL47A8MEYtdifzx3hbuu45nOy8ERhJfsOFmCmzAm4aScK6WmGb4wTou61b+eWHRIbr/N2SiCfrdW/lk5Yrc+mQTsSRg4i5u5xFuOos9ewj+rWhcIecDh0UWsFfmgHgSLMcs606lm8x2OweHVatmnZryfug==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Rahul Singh <rahul.singh@xxxxxxx>, <bertrand.marquis@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 25 Feb 2022 08:22:04 +0000
  • Ironport-data: A9a23:hnJyXaBKHpkrgxVW/+7jw5YqxClBgxIJ4kV8jS/XYbTApDkm0mADz DEYXGyGPvnZazPzftt0PITnpB5Q6p7Qy9ViQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E/raNANlFEkvU2ybuOU5NXsZ2YgHWeIdA970Ug5w7Rj39Yy6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPhWy Ol8jZK2Tz0DO7fxmcEzYjx/IythaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9OohwFuRfWD8Us 6ZCcXZUM07F17neLLGTE4GAguw5K8bmJsUHs2xIxjDFF/c2B5vERs0m4PcGg21r1p8SRJ4yY eI6UhpBV0nkPydkJ0gsA7Mcpbr5xWbGJmgwRFW9+vNsvjm7IBZK+KfpGMrYfJqNX8o9tlaVo CfK8nr0BjkeNceD0nyV/3S0nOjNkCjnHoUIG9WQ/PNwnEeawGBVDRQMTEa6utGwkEv4UNVaQ 2QW8Cczqak59GSwU8LwGRa/pRaspBccRt4WCOw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GbNfqE6gL3b79AM90oJjHfxx6Qk7wI9HdwGOtt5Dt //Q9RVfYF1P74rhJ1GdZQ8qOuMexvwqEH3QRSvyWqOLtB0B5uKke+z3IkI
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Feb 24, 2022 at 04:18:31PM +0100, Jan Beulich wrote:
> On 15.02.2022 16:25, Rahul Singh wrote:
> > @@ -170,31 +170,7 @@ bool vpci_msix_read(struct vpci_msix *msix, unsigned 
> > long addr,
> >          return true;
> >  
> >      if ( VMSIX_ADDR_IN_RANGE(addr, msix->pdev->vpci, VPCI_MSIX_PBA) )
> > -    {
> > -        /*
> > -         * Access to PBA.
> > -         *
> > -         * TODO: note that this relies on having the PBA identity mapped 
> > to the
> > -         * guest address space. If this changes the address will need to be
> > -         * translated.
> > -         */
> > -        switch ( len )
> > -        {
> > -        case 4:
> > -            *data = readl(addr);
> > -            break;
> > -
> > -        case 8:
> > -            *data = readq(addr);
> > -            break;
> > -
> > -        default:
> > -            ASSERT_UNREACHABLE();
> > -            break;
> > -        }
> 
> ... in the comment ahead of this switch() (and the assumption is likely
> wrong for DomU).
> 
> But then, Roger: What "identity mapped" is meant here? Surely not GVA ->
> GPA, but rather GPA -> HPA? The address here is a guest physical one,
> but read{l,q}() act on (host) virtual addresses. This would have been
> easier to notice as wrong if read{l,q}() weren't allowing unsigned long
> arguments to be passed to them.

Urg, indeed, thanks for noticing. I will send a patch to fix this
right now.

Roger.



 


Rackspace

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