All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Rahul Singh <rahul.singh@arm.com>, <bertrand.marquis@arm.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>,
	<xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v2 3/3] xen/vpci: msix: move read/write call to MSI-X PBA entry to arch file
Date: Fri, 25 Feb 2022 09:21:50 +0100	[thread overview]
Message-ID: <YhiRnmgajgeat/fP@Air-de-Roger> (raw)
In-Reply-To: <c8f54e83-95c9-04aa-d788-da755e284c42@suse.com>

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.


  reply	other threads:[~2022-02-25  8:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 15:25 [PATCH v2 0/3] xen/vpci: msix: Make VPCI MSI-X code non-x86 specific Rahul Singh
2022-02-15 15:25 ` [PATCH v2 1/3] xen/vpci: msix: move x86 specific code to x86 file Rahul Singh
2022-02-24 14:57   ` Jan Beulich
2022-03-01 13:34     ` Rahul Singh
2022-03-01 13:55       ` Jan Beulich
2022-03-03 16:31         ` Rahul Singh
2022-03-04  7:23           ` Jan Beulich
2022-03-09 10:08             ` Rahul Singh
2022-03-09 10:16               ` Roger Pau Monné
2022-03-09 10:47                 ` Rahul Singh
2022-03-09 11:17                   ` Roger Pau Monné
2022-03-09 10:17               ` Jan Beulich
2022-03-09 15:50                 ` Rahul Singh
2022-03-09 15:53                   ` Jan Beulich
2022-03-09 16:06                   ` Roger Pau Monné
2022-03-10 11:48                     ` Rahul Singh
2022-03-10 15:54                       ` Roger Pau Monné
2022-02-15 15:25 ` [PATCH v2 2/3] xen/vpci: msix: change return value of vpci_msix_{read,write} Rahul Singh
2022-02-15 15:25 ` [PATCH v2 3/3] xen/vpci: msix: move read/write call to MSI-X PBA entry to arch file Rahul Singh
2022-02-24 15:18   ` Jan Beulich
2022-02-25  8:21     ` Roger Pau Monné [this message]
2022-02-25  8:20   ` Roger Pau Monné
2022-02-28 12:23     ` Rahul Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YhiRnmgajgeat/fP@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=jbeulich@suse.com \
    --cc=rahul.singh@arm.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.