From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
xen-devel@lists.xenproject.org,
"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>
Subject: Re: [PATCH v4 2/6] x86/hvm: Allow access to registers on the same page as MSI-X table
Date: Sat, 2 Dec 2023 04:07:52 +0100 [thread overview]
Message-ID: <ZWqfiN+sIOMHoB9m@mail-itl> (raw)
In-Reply-To: <277f832d-20ce-437d-a7a3-7935aa6cf34e@suse.com>
[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]
On Mon, Nov 27, 2023 at 06:00:57PM +0100, Jan Beulich wrote:
> On 24.11.2023 02:47, Marek Marczykowski-Górecki wrote:
> > GCC gets confused about 'desc' variable:
> >
> > arch/x86/hvm/vmsi.c: In function ‘msixtbl_range’:
> > arch/x86/hvm/vmsi.c:553:8: error: ‘desc’ may be used uninitialized [-Werror=maybe-uninitialized]
> > 553 | if ( desc )
> > | ^
> > arch/x86/hvm/vmsi.c:537:28: note: ‘desc’ was declared here
> > 537 | const struct msi_desc *desc;
> > | ^~~~
>
> This could do with also indicating the gcc version. Issues like this
> tend to get fixed over time.
Sure, I'll add it's GCC 12.2.1.
And indeed, GCC 13.2.1 does not complain anymore.
> > +
> > + if ( !msix->adj_access_idx[adj_type] )
> > + {
> > + gprintk(XENLOG_WARNING,
> > + "Page for adjacent(%d) MSI-X table access not initialized for %pp (addr %#lx, gtable %#lx\n",
> > + adj_type, &entry->pdev->sbdf, addr, entry->gtable);
> > +
> > + return ADJACENT_DONT_HANDLE;
> > + }
> > +
> > + /* If PBA lives on the same page too, discard writes. */
> > + if ( write &&
> > + ((adj_type == ADJ_IDX_LAST &&
> > + msix->table.last == msix->pba.first) ||
> > + (adj_type == ADJ_IDX_FIRST &&
> > + msix->table.first == msix->pba.last)) )
> > + {
> > + gprintk(XENLOG_WARNING,
> > + "MSI-X table and PBA of %pp live on the same page, "
> > + "writing to other registers there is not implemented\n",
> > + &entry->pdev->sbdf);
>
> Here and above I think verbosity needs limiting to the first instance per
> device per domain.
Is there some clever API for that already, or do I need to introduce
extra variable in some of those structures (msixtbl_entry? pci_dev?) ?
(other requested changes ok)
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-12-02 3:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 1:47 [PATCH v4 0/6] MSI-X support with qemu in stubdomain, and other related changes Marek Marczykowski-Górecki
2023-11-24 1:47 ` [PATCH v4 1/6] x86/msi: passthrough all MSI-X vector ctrl writes to device model Marek Marczykowski-Górecki
2023-11-27 16:18 ` Jan Beulich
2023-11-24 1:47 ` [PATCH v4 2/6] x86/hvm: Allow access to registers on the same page as MSI-X table Marek Marczykowski-Górecki
2023-11-27 17:00 ` Jan Beulich
2023-12-02 3:07 ` Marek Marczykowski-Górecki [this message]
2023-12-04 7:52 ` Jan Beulich
2023-11-24 1:47 ` [PATCH v4 3/6] automation: prevent QEMU access to /dev/mem in PCI passthrough tests Marek Marczykowski-Górecki
2023-11-30 3:28 ` Stefano Stabellini
2023-11-24 1:47 ` [PATCH v4 4/6] automation: switch to a wifi card on ADL system Marek Marczykowski-Górecki
2023-11-30 3:30 ` Stefano Stabellini
2023-11-24 1:47 ` [PATCH v4 5/6] [DO NOT APPLY] switch to qemu fork Marek Marczykowski-Górecki
2023-11-24 1:47 ` [PATCH v4 6/6] [DO NOT APPLY] switch to alternative artifact repo Marek Marczykowski-Górecki
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=ZWqfiN+sIOMHoB9m@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.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.